pmaports/main/mesa-pvr-dri-classic/APKBUILD
Mighty a878c81cbb
main/mesa-pvr-dri-classic: Set MESA_LOADER_DRIVER_OVERRIDE=pvr (MR 2790)
[ci:skip-build] already built successfully in CI
2022-01-04 22:20:39 -08:00

118 lines
2.6 KiB
Text

# Maintainer: Jonathan Bakker <xc-racer2@live.ca>
pkgname=mesa-pvr-dri-classic
pkgver=20.3.2
pkgrel=3
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"
subpackages="
$pkgname-tinydm
"
_commit="5bd40a453e1484efea842be9a3f388adb5fac93c"
source="
$pkgname-$_commit.tar.gz::https://github.com/freemangordon/mesa/archive/$_commit.tar.gz
pvr-wayland.sh
"
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
}
tinydm() {
install_if="$pkgname tinydm"
install -Dm755 "$srcdir"/pvr-wayland.sh \
"$subpkgdir"/etc/tinydm.d/env-wayland.d/pvr-wayland.sh
}
sha512sums="
d182338e886fb8a1ee2e049beb8420155a2cb08ea9c0499409d82b1d33fdded790821e6c65dcb6ac519ca6c6c26fc1ba39b5decf1798b8e0cd85996d732204d5 mesa-pvr-dri-classic-5bd40a453e1484efea842be9a3f388adb5fac93c.tar.gz
0cbcf6b55a139822922e0cae1d1e5df72fd9d44a8afc69d94d6235c817485a9f06fc6ba8eb4f56057cc5b823370656564d117734bb17b8ad54a8012c89673acf pvr-wayland.sh
"