# Maintainer: Jonathan Bakker pkgname=mesa-pvr-dri-classic pkgver=20.3.2 pkgrel=2 pkgdesc="Mesa DRI OpenGL library with PowerVR patches" url="https://github.com/xc-racer99/mesa-pvr/" arch="armhf armv7 aarch64" license="MIT SGI-B-2.0 BSL-1.0" _llvmver=12 depends_dev=" libdrm-dev libxext-dev libxdamage-dev libxcb-dev libxshmfence-dev " makedepends=" $depends_dev bison eudev-dev expat-dev findutils flex gettext elfutils-dev libtool libxfixes-dev libva-dev libvdpau-dev libx11-dev libxrandr-dev libxt-dev libxvmc-dev libxxf86vm-dev mesa-glapi llvm$_llvmver-dev makedepend meson py3-mako py3-libxml2 python3 talloc-dev wayland-dev wayland-protocols xorgproto zlib-dev zstd-dev " depends="mesa sgx-ddk-um-soc" _commit="5bd40a453e1484efea842be9a3f388adb5fac93c" source=" $pkgname-$_commit.tar.gz::https://github.com/freemangordon/mesa/archive/$_commit.tar.gz " options="!check" # we skip tests intentionally builddir="$srcdir/mesa-$_commit" _dri_driverdir=/usr/lib/xorg/modules/dri _dri_drivers="pvr" build() { export CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700" export MESA_GIT_SHA1_OVERRIDE=53b2b224dc2de982c37915a0ad218e33365ff75e python3 bin/git_sha1_gen.py --output include/git_sha1.h # Reasoning for gallium-drivers="swrast": # https://gitlab.com/postmarketOS/pmaports/-/merge_requests/2049#note_543436715 abuild-meson \ -Ddri-drivers-path=$_dri_driverdir \ -Dgallium-drivers="swrast" \ -Ddri-drivers=$_dri_drivers \ -Dvulkan-drivers="" \ -Dplatforms=x11,wayland \ -Dllvm=true \ -Dshared-llvm=true \ -Dshared-glapi=true \ -Dgbm=true \ -Dglx=dri \ -Dopengl=true \ -Dgles1=false \ -Dgles2=true \ -Degl=true \ -Db_ndebug=true \ $_arch_opts \ . output # Print config meson configure output # parallel build workaround ninja -C output src/compiler/nir/nir_intrinsics.h meson compile ${JOBS:+-j ${JOBS}} -C output } package() { install -Dm644 output/src/mesa/drivers/dri/libmesa_dri_drivers.so \ "$pkgdir/$_dri_driverdir"/pvr_dri.so install -Dm644 output/src/gallium/targets/dri/libgallium_dri.so \ "$pkgdir/$_dri_driverdir"/swrast.so } sha512sums=" d182338e886fb8a1ee2e049beb8420155a2cb08ea9c0499409d82b1d33fdded790821e6c65dcb6ac519ca6c6c26fc1ba39b5decf1798b8e0cd85996d732204d5 mesa-pvr-dri-classic-5bd40a453e1484efea842be9a3f388adb5fac93c.tar.gz "