# Maintainer: A. Wilcox pkgname=mesa-amber pkgver=21.3.9 pkgrel=0 pkgdesc="Mesa DRI OpenGL library" url="https://www.mesa3d.org" arch="all" options="!check" # No test suite. license="MIT AND X11 AND SGI-B-2.0 AND BSL-1.0 AND LGPL-2.1+" depends="" makedepends="bison expat-dev flex libdrm-dev libglvnd-dev libx11-dev libxcb-dev libxdamage-dev libxext-dev libxfixes-dev libxrandr-dev libxshmfence-dev libxxf86vm-dev meson python3 py3-libxml2 py3-mako py3-pygments py3-markupsafe wayland-dev wayland-protocols xorgproto-dev zlib-dev zstd-dev" subpackages="" source="https://mesa.freedesktop.org/archive/mesa-$pkgver.tar.xz big-endian-flipping.patch mesa-amber-i915c.patch no-tls.patch nouveau-flush-fix.patch " builddir="$srcdir"/mesa-$pkgver _dri_driverdir=/usr/lib/xorg/modules/dri _dri_drivers="r100,r200,nouveau" case "$CARCH" in x86* | pmmx) _dri_drivers="${_dri_drivers},i915,i965" _arch_conf="-Dsse2=false" ;; armhf) CFLAGS="$CFLAGS -mfpu=neon" ;; ppc64) _arch_conf="-Dpower8=disabled" ;; esac build() { meson \ -Dprefix=/usr \ -Damber=true \ -Ddri-drivers=$_dri_drivers \ -Ddri-drivers-path=$_dri_driverdir \ -Ddri3=enabled \ -Dgbm=disabled \ -Dglvnd=true \ -Dllvm=disabled \ -Dosmesa=false \ -Dplatforms=x11,wayland \ -Dgallium-drivers='' \ -Dvulkan-drivers='' \ $_arch_conf \ build meson compile -C build } package() { DESTDIR="$pkgdir" meson install -C build if [ -f "$pkgdir"/usr/lib/xorg/modules/dri/i915_dri.so ]; then # Prevent file conflict with mesa-dri. mv "$pkgdir"/usr/lib/xorg/modules/dri/i915_dri.so \ "$pkgdir"/usr/lib/xorg/modules/dri/i915c_dri.so fi rm -rf "$pkgdir"/usr/include rm -rf "$pkgdir"/usr/lib/libglapi.so* rm -rf "$pkgdir"/usr/lib/pkgconfig rm -rf "$pkgdir"/usr/share/drirc.d } sha512sums="4cec6f4f50f444fcd327f7c40f8899c2f265e348e121455262b540b1f890a1468bbea59965af0876c548fa97aa0a05a1b23fa6ca7d308bd60328cfdeab757684 mesa-21.3.9.tar.xz 3417e5c6d7ec564178e1d72431042b0a6ba659321f13a3dda81eda5fa0f2c8bc7c6972cb8266aea84ab05976ffb161659e9988c50ecc418e8bc1e1ce8f93a65f big-endian-flipping.patch 163e80342f6df7706d7db4defc0c5814db92e03fcec675e6729a05ba1b3907e3233a9bd6f40629bde5dcf7afbf397e40f774c2298ad2f9b3948a6db63f801893 mesa-amber-i915c.patch 076bb17d85235f3c833af8f1641f3556e406ad187b7ae1ebacced5f57b8832243a878678de4e50880c9a50b2aae3c42ad2342ed8c3e18d881edb7dd5018a710e no-tls.patch 7283dc0e86e1ddaf4590008db57dd591921f47928945782afaa283f3b87770c731bab19d3d8879b4bf8b785f8886b9b46c576ca735296123f8afff29655abaeb nouveau-flush-fix.patch"