1 # Maintainer: Laurent Carlier <lordheavym@gmail.com>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 # Contributor: Jan de Groot <jgc@archlinux.org>
4 # Contributor: Andreas Radke <andyrtr@archlinux.org>
20 pkgdesc="An open-source implementation of the OpenGL specification"
21 url="https://www.mesa3d.org/"
46 # shared with lib32-mesa
66 # gallium-rusticl deps
73 'spirv-llvm-translator'
76 https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
79 sha256sums=('a9dde3c76571c4806245a05bda1cceee347c3267127e9e549e4f4e225d92e992'
81 '7052ba73bb07ea78873a2431ee4e828f4e72bda7d176d07f770fa48373dec537')
82 b2sums=('47cc90da14a2c33bb54c7811e99b439fadef81a15b63e535210a329bad5e2524fcb415cc5ed51a8deb65ccc9a341af78f02178c93758f09946978179e494382c'
84 '1ecf007b82260710a7bf5048f47dd5d600c168824c02c595af654632326536a6527fbe0738670ee7b921dd85a70425108e0f471ba85a8e1ca47d294ad74b4adb')
85 validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D' # Emil Velikov <emil.l.velikov@gmail.com>
86 '946D09B5E4C9845E63075FF1D961C596A7203456' # Andres Gomez <tanty@igalia.com>
87 'E3E8F480C52ADD73B278EE78E1ECBE07D7D70895' # Juan Antonio Suárez Romero (Igalia, S.L.) <jasuarez@igalia.com>
88 'A5CC9FEC93F2F837CB044912336909B6B25FADFA' # Juan A. Suarez Romero <jasuarez@igalia.com>
89 '71C4B75620BC75708B4BDB254C95FAAB3EB073EC' # Dylan Baker <dylan@pnwbakers.com>
90 '57551DE15B968F6341C248F68D8E31AFC32428A6') # Eric Engestrom <eric@engestrom.ch>
101 -D android-libbacktrace=disabled
105 -D gallium-drivers=r300,r600,radeonsi,nouveau,virgl,svga,swrast,i915,iris,crocus,zink,d3d12
106 -D gallium-extra-hud=true
108 -D gallium-omx=bellagio
109 -D gallium-opencl=icd
110 -D gallium-rusticl=true
111 -D gallium-va=enabled
112 -D gallium-vdpau=enabled
113 -D gallium-xa=enabled
123 -D microsoft-clc=disabled
125 -D platforms=x11,wayland
127 -D shared-glapi=enabled
129 -D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc
130 -D vulkan-drivers=amd,intel,intel_hasvk,swrast,virtio-experimental
131 -D vulkan-layers=device-select,intel-nullhw,overlay
134 # Build only minimal debug info to reduce size
138 arch-meson mesa-$pkgver build "${meson_options[@]}"
139 meson configure build # Print config
140 meson compile -C build
142 # fake installation to be seperated into packages
143 # outside of fakeroot but mesa doesn't need to chown/mod
144 DESTDIR="${srcdir}/fakeinstall" meson install -C build
150 f="${src#fakeinstall/}"
151 dir="${pkgdir}/${f%/*}"
152 install -m755 -d "${dir}"
153 mv -v "${src}" "${dir}/"
157 package_vulkan-mesa-layers() {
158 pkgdesc="Mesa's Vulkan layers"
166 conflicts=('vulkan-mesa-layer')
167 replaces=('vulkan-mesa-layer')
169 _install fakeinstall/usr/share/vulkan/explicit_layer.d
170 _install fakeinstall/usr/share/vulkan/implicit_layer.d
171 _install fakeinstall/$_libdir/libVkLayer_*.so
172 _install fakeinstall/usr/bin/mesa-overlay-control.py
174 install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
177 package_opencl-mesa() {
178 pkgdesc="OpenCL support with clover and rusticl for mesa drivers"
187 'spirv-llvm-translator'
189 optdepends=('opencl-headers: headers necessary for OpenCL development')
190 provides=('opencl-driver')
192 _install fakeinstall/etc/OpenCL
193 _install fakeinstall/$_libdir/lib*OpenCL*
194 _install fakeinstall/$_libdir/gallium-pipe
196 install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
199 package_vulkan-intel() {
200 pkgdesc="Intel's Vulkan mesa driver"
209 optdepends=('vulkan-mesa-layers: additional vulkan layers')
210 provides=('vulkan-driver')
212 _install fakeinstall/usr/share/vulkan/icd.d/intel_*.json
213 _install fakeinstall/$_libdir/libvulkan_intel*.so
215 install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
218 package_vulkan-radeon() {
219 pkgdesc="Radeon's Vulkan mesa driver"
230 optdepends=('vulkan-mesa-layers: additional vulkan layers')
231 provides=('vulkan-driver')
233 _install fakeinstall/usr/share/drirc.d/00-radv-defaults.conf
234 _install fakeinstall/usr/share/vulkan/icd.d/radeon_icd*.json
235 _install fakeinstall/$_libdir/libvulkan_radeon.so
237 install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
240 package_vulkan-swrast() {
241 pkgdesc="Vulkan software rasteriser driver"
252 optdepends=('vulkan-mesa-layers: additional vulkan layers')
253 conflicts=('vulkan-mesa')
254 replaces=('vulkan-mesa')
255 provides=('vulkan-driver')
257 _install fakeinstall/usr/share/vulkan/icd.d/lvp_icd*.json
258 _install fakeinstall/$_libdir/libvulkan_lvp.so
260 install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
263 package_vulkan-virtio() {
264 pkgdesc="Venus Vulkan mesa driver for Virtual Machines"
273 optdepends=('vulkan-mesa-layers: additional vulkan layers')
274 provides=('vulkan-driver')
276 _install fakeinstall/usr/share/vulkan/icd.d/virtio_icd*.json
277 _install fakeinstall/$_libdir/libvulkan_virtio.so
279 install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
282 package_libva-mesa-driver() {
283 pkgdesc="VA-API drivers"
293 provides=('libva-driver')
295 _install fakeinstall/$_libdir/dri/*_drv_video.so
297 install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
300 package_mesa-vdpau() {
301 pkgdesc="VDPAU drivers"
311 provides=('vdpau-driver')
313 _install fakeinstall/$_libdir/vdpau
315 install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
336 'libva-mesa-driver: for accelerated video playback'
337 'mesa-vdpau: for accelerated video playback'
338 'opengl-man-pages: for the OpenGL API man pages'
344 conflicts=('mesa-libgl')
345 replaces=('mesa-libgl')
347 _install fakeinstall/usr/share/drirc.d/00-mesa-defaults.conf
348 _install fakeinstall/usr/share/glvnd/egl_vendor.d/50_mesa.json
350 # ati-dri, nouveau-dri, intel-dri, svga-dri, swrast, swr
351 _install fakeinstall/$_libdir/dri/*_dri.so
353 _install fakeinstall/$_libdir/bellagio
354 _install fakeinstall/$_libdir/d3d
355 _install fakeinstall/$_libdir/lib{gbm,glapi}.so*
356 _install fakeinstall/$_libdir/libOSMesa.so*
357 _install fakeinstall/$_libdir/libxatracker.so*
359 _install fakeinstall/usr/include
360 _install fakeinstall/$_libdir/pkgconfig
363 _install fakeinstall/$_libdir/libGLX_mesa.so*
364 _install fakeinstall/$_libdir/libEGL_mesa.so*
367 ln -sr "$pkgdir"/$_libdir/libGLX_{mesa,indirect}.so.0
369 # make sure there are no files left to install
370 find fakeinstall -depth -print0 | xargs -0 rmdir
372 install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE