1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
# Maintainer (Arch): Jan de Groot <jgc@archlinux.org>
# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer: Márcio Silva <coadde@parabola.nu>
pkgbase=mesa
pkgname=('lib32-opencl-mesa' 'lib32-libva-mesa-driver' 'lib32-mesa-vdpau' 'lib32-mesa'
'lib32-mesa-libgl' 'lib32-mesa-libcl-icd' 'lib32-vulkan-radeon' 'lib32-vulkan-intel')
pkgver=17.0.2
pkgrel=2.parabola3
arch=('x86_64')
makedepends=('python2-mako' 'lib32-libxml2' 'lib32-libx11' 'glproto' 'lib32-libdrm' 'dri2proto' 'dri3proto' 'presentproto'
'lib32-libxshmfence' 'lib32-libxxf86vm' 'lib32-libxdamage' 'lib32-libvdpau' 'lib32-libva' 'lib32-wayland' 'elfutils' 'lib32-libelf' 'lib32-llvm'
'libomxil-bellagio' 'lib32-libclc' 'lib32-clang' 'lib32-lm_sensors' 'gcc-multilib')
url="http://mesa3d.sourceforge.net"
license=('custom')
source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
LICENSE
remove-libpthread-stubs.patch
0001-Fix-linkage-against-shared-glapi.patch
0001-glapi-Link-with-glapi-when-built-shared.patch)
sha256sums=('f8f191f909e01e65de38d5bdea5fb057f21649a3aed20948be02348e77a689d4'
'SKIP'
'7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2'
'75ab53ad44b95204c788a2988e97a5cb963bdbf6072a5466949a2afb79821c8f'
'c68d1522f9bce4ce31c92aa7a688da49f13043f5bb2254795b76dea8f47130b7'
'064dcd5a3ab1b7c23383e2cafbd37859e4c353f8839671d9695c6f7c2ef3260b')
validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D') # Emil Velikov <emil.l.velikov@gmail.com>
prepare() {
cd ${srcdir}/mesa-${pkgver}
# Now mesa checks for libpthread-stubs - so remove the check
patch -Np1 -i ../remove-libpthread-stubs.patch
# non-upstreamed ones
patch -Np1 -i ../0001-Fix-linkage-against-shared-glapi.patch
patch -Np1 -i ../0001-glapi-Link-with-glapi-when-built-shared.patch
autoreconf -fiv
}
build() {
# copy source to build mesa-libcl-icd package
cp -a ${srcdir}/{mesa,opencl}-${pkgver}
cd ${srcdir}/mesa-${pkgver}
# softpipe,llvmpipe
DRI=i915,i965,r200,radeon,nouveau,swrast
GALLIUM=r300,r600,radeonsi,nouveau,svga,swrast,virgl,swr
VULKAN=intel,radeon
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib32/xorg/modules/dri \
--with-gallium-drivers=${GALLIUM} \
--with-dri-drivers=${DRI} \
--with-egl-platforms=x11,drm,wayland \
--with-vulkan-drivers=${VULKAN} \
--disable-xvmc \
--enable-gallium-llvm \
--enable-llvm-shared-libs \
--enable-shared-glapi \
--disable-libglvnd \
--enable-egl \
--enable-glx \
--enable-glx-tls \
--enable-gles1 \
--enable-gles2 \
--enable-gbm \
--enable-dri \
--enable-gallium-osmesa \
--enable-texture-float \
--enable-xa \
--enable-vdpau \
--enable-omx \
--enable-nine \
--enable-opencl \
--enable-opencl-icd \
--enable-gallium-extra-hud \
--enable-lmsensors \
--with-clang-libdir=/usr/lib32 \
--libdir=/usr/lib32 \
--libexecdir=/usr/lib32
make
# fake installation
mkdir $srcdir/fakeinstall
make DESTDIR=${srcdir}/fakeinstall install
# build mesa-libcl-icd
cd ${srcdir}/opencl-${pkgver}
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-gallium-drivers=${GALLIUM} \
--with-dri-drivers=${DRI} \
--with-egl-platforms=x11,drm,wayland \
--with-vulkan-drivers=${VULKAN} \
--disable-xvmc \
--enable-gallium-llvm \
--enable-llvm-shared-libs \
--enable-shared-glapi \
--disable-libglvnd \
--enable-egl \
--enable-glx \
--enable-glx-tls \
--enable-gles1 \
--enable-gles2 \
--enable-gbm \
--enable-dri \
--enable-gallium-osmesa \
--enable-texture-float \
--enable-xa \
--enable-vdpau \
--enable-omx \
--enable-nine \
--enable-opencl \
--enable-gallium-extra-hud \
--enable-lmsensors \
--with-clang-libdir=/usr/lib32 \
--libdir=/usr/lib32 \
--libexecdir=/usr/lib32
make
# fake mesa-libcl-icd installation
mkdir $srcdir/openclinstall
make DESTDIR=${srcdir}/openclinstall install
}
package_lib32-opencl-mesa() {
pkgdesc="OpenCL support for AMD/ATI Radeon mesa drivers (32-bit)"
depends=('opencl-mesa' 'lib32-expat' 'lib32-libdrm' 'lib32-libelf' 'lib32-libclc' 'lib32-clang' 'lib32-lm_sensors')
optdepends=('opencl-headers: headers necessary for OpenCL development')
provides=('lib32-opencl-driver')
conflicts=('lib32-opencl-nvidia' 'lib32-opencl-nvidia-340xx' 'lib32-opencl-nvidia-304xx' 'lib32-opencl-catalyst')
replaces=('lib32-opencl-nvidia' 'lib32-opencl-nvidia-340xx' 'lib32-opencl-nvidia-304xx' 'lib32-opencl-catalyst')
install -m755 -d ${pkgdir}/usr/lib32/gallium-pipe
cp -rv ${srcdir}/fakeinstall/usr/lib32/libMesaOpenCL* ${pkgdir}/usr/lib32/
cp -rv ${srcdir}/fakeinstall/usr/lib32/gallium-pipe/pipe_{r600,radeonsi}.so ${pkgdir}/usr/lib32/gallium-pipe/
install -m755 -d "${pkgdir}/usr/share/licenses/lib32-opencl-mesa"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/lib32-opencl-mesa/"
}
package_lib32-vulkan-intel() {
pkgdesc="Intel's Vulkan mesa driver (32-bit)"
depends=('vulkan-intel' 'lib32-wayland' 'lib32-libx11' 'lib32-libxshmfence')
provides=('lib32-vulkan-driver')
install -m755 -d ${pkgdir}/usr/lib32
cp -rv ${srcdir}/fakeinstall/usr/lib32/libvulkan_intel.so ${pkgdir}/usr/lib32/
install -m755 -d "${pkgdir}/usr/share/licenses/lib32-vulkan-intel"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/lib32-vulkan-intel/"
}
package_lib32-vulkan-radeon() {
pkgdesc="Radeon's Vulkan mesa driver (32-bit)"
depends=('vulkan-radeon' 'lib32-wayland' 'lib32-libx11' 'lib32-libxshmfence' 'lib32-libelf' 'lib32-libdrm' 'lib32-llvm-libs')
provides=('lib32-vulkan-driver')
install -m755 -d ${pkgdir}/usr/lib32
cp -rv ${srcdir}/fakeinstall/usr/lib32/libvulkan_radeon.so ${pkgdir}/usr/lib32/
install -m755 -d "${pkgdir}/usr/share/licenses/lib32-vulkan-radeon"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/lib32-vulkan-radeon/"
}
package_lib32-libva-mesa-driver() {
pkgdesc="VA-API implementation for gallium (32-bit)"
depends=('libva-mesa-driver' 'lib32-libdrm' 'lib32-libx11' 'lib32-llvm-libs' 'lib32-expat' 'lib32-libelf' 'lib32-libxshmfence' 'lib32-lm_sensors')
install -m755 -d ${pkgdir}/usr/lib32
cp -rv ${srcdir}/fakeinstall/usr/lib32/dri ${pkgdir}/usr/lib32
install -m755 -d "${pkgdir}/usr/share/licenses/lib32-libva-mesa-driver"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/lib32-libva-mesa-driver/"
}
package_lib32-mesa-vdpau() {
pkgdesc="Mesa VDPAU drivers (32-bit)"
depends=('mesa-vdpau' 'lib32-libdrm' 'lib32-libx11' 'lib32-llvm-libs' 'lib32-expat' 'lib32-libelf' 'lib32-libxshmfence' 'lib32-lm_sensors')
install -m755 -d ${pkgdir}/usr/lib32
cp -rv ${srcdir}/fakeinstall/usr/lib32/vdpau ${pkgdir}/usr/lib32
install -m755 -d "${pkgdir}/usr/share/licenses/lib32-mesa-vdpau"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/lib32-mesa-vdpau/"
}
package_lib32-mesa() {
pkgdesc="A free implementation of the OpenGL specification (32-bit)"
depends=('mesa' 'lib32-libdrm' 'lib32-wayland' 'lib32-libxxf86vm' 'lib32-libxdamage' 'lib32-libxshmfence' 'lib32-libelf'
'lib32-libtxc_dxtn' 'lib32-llvm-libs' 'lib32-mesa-libgl' 'lib32-lm_sensors')
optdepends=('opengl-man-pages: for the OpenGL API man pages'
'lib32-mesa-vdpau: for accelerated video playback'
'lib32-libva-mesa-driver: for accelerated video playback')
provides=('lib32-ati-dri' 'lib32-intel-dri' 'lib32-nouveau-dri' 'lib32-svga-dri'
'lib32-swrast-dri' 'lib32-virgl-dri' 'lib32-swr-dri' 'lib32-mesa-dri' 'lib32-opengl-driver')
conflicts=('lib32-ati-dri' 'lib32-intel-dri' 'lib32-nouveau-dri' 'lib32-svga-dri'
'lib32-swrast-dri' 'lib32-virgl-dri' 'lib32-swr-dri' 'lib32-mesa-dri'
'lib32-nvidia-utils' 'lib32-nvidia-340xx-utils' 'lib32-nvidia-304xx-utils' 'lib32-catalyst-utils')
replaces=('lib32-ati-dri' 'lib32-intel-dri' 'lib32-nouveau-dri' 'lib32-svga-dri'
'lib32-swrast-dri' 'lib32-virgl-dri' 'lib32-swr-dri' 'lib32-mesa-dri'
'lib32-nvidia-utils' 'lib32-nvidia-340xx-utils' 'lib32-nvidia-304xx-utils' 'lib32-catalyst-utils')
install -m755 -d ${pkgdir}/usr/lib32/xorg/modules/dri
# ati-dri, nouveau-dri, intel-dri, svga-dri, swrast
cp -av ${srcdir}/fakeinstall/usr/lib32/xorg/modules/dri/* ${pkgdir}/usr/lib32/xorg/modules/dri
cp -rv ${srcdir}/fakeinstall/usr/lib32/bellagio ${pkgdir}/usr/lib32
cp -rv ${srcdir}/fakeinstall/usr/lib32/d3d ${pkgdir}/usr/lib32
cp -rv ${srcdir}/fakeinstall/usr/lib32/lib{gbm,glapi}.so* ${pkgdir}/usr/lib32/
cp -rv ${srcdir}/fakeinstall/usr/lib32/libOSMesa.so* ${pkgdir}/usr/lib32/
cp -rv ${srcdir}/fakeinstall/usr/lib32/libwayland*.so* ${pkgdir}/usr/lib32/
cp -rv ${srcdir}/fakeinstall/usr/lib32/libxatracker.so* ${pkgdir}/usr/lib32/
cp -rv ${srcdir}/fakeinstall/usr/lib32/pkgconfig ${pkgdir}/usr/lib32/
install -m755 -d "${pkgdir}/usr/share/licenses/lib32-mesa"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/lib32-mesa/"
}
package_lib32-mesa-libgl() {
pkgdesc="Mesa 3-D graphics library (32-bit)"
depends=('mesa-libgl' 'lib32-libdrm' 'lib32-libxdamage' 'lib32-libxshmfence' 'lib32-libxxf86vm' 'lib32-wayland')
provides=('lib32-libgl' 'lib32-libegl' 'lib32-libgles' 'lib32-libglvnd')
conflicts=('lib32-libglvnd' 'lib32-nvidia-libgl' 'lib32-nvidia-340xx-libgl' 'lib32-nvidia-304xx-libgl' 'lib32-nvidia-cg-toolkit' 'lib32-catalyst-libgl')
replaces=('lib32-libglvnd' 'lib32-nvidia-libgl' 'lib32-nvidia-340xx-libgl' 'lib32-nvidia-304xx-libgl' 'lib32-nvidia-cg-toolkit' 'lib32-catalyst-libgl')
install -m755 -d "${pkgdir}/usr/lib32/"
cp -rv ${srcdir}/fakeinstall/usr/lib32/libGL.so* ${pkgdir}/usr/lib32/
cp -rv ${srcdir}/fakeinstall/usr/lib32/libEGL.so* ${pkgdir}/usr/lib32/
cp -rv ${srcdir}/fakeinstall/usr/lib32/libGLES*.so* ${pkgdir}/usr/lib32/
install -m755 -d "${pkgdir}/usr/share/licenses/lib32-mesa-libgl"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/lib32-mesa-libgl/"
}
package_lib32-mesa-libcl-icd() {
pkgdesc="Mesa OpenCL ICD Bindings (32-bit)"
depends=('mesa-libcl-icd' 'lib32-expat' 'lib32-gcc-libs' 'lib32-libdrm' 'lib32-libedit' 'lib32-libelf' 'lib32-libffi' 'lib32-llvm-libs' 'lib32-ncurses' 'lib32-zlib')
optdepends=('lib32-opencl-driver: packaged opencl driver')
provides=('lib32-opencl-icd-loader' 'lib32-ocl-icd' 'lib32-libcl')
conflicts=('lib32-ocl-icd' 'lib32-libcl')
replaces=('lib32-ocl-icd' 'lib32-libcl')
install -m755 -d ${pkgdir}/usr/lib32
cp -rv ${srcdir}/openclinstall/usr/lib32/libOpenCL* ${pkgdir}/usr/lib32/
install -m755 -d "${pkgdir}/usr/share/licenses/lib32-mesa-libcl-icd"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/lib32-mesa-libcl-icd/"
}
|