2021-01-27 15:30:45 +00:00
|
|
|
pkgname=mesa
|
2021-06-06 00:50:29 +00:00
|
|
|
pkgver=21.1.2
|
2021-04-08 18:21:32 +00:00
|
|
|
deps="musl:wayland:wayland-protocols:llvm:zlib:expat:libffi:libdrm:python-mako"
|
2021-01-27 15:30:45 +00:00
|
|
|
ext=dev
|
|
|
|
|
|
|
|
fetch() {
|
2021-05-03 11:52:54 +00:00
|
|
|
curl "https://archive.mesa3d.org/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.gz
|
2021-01-27 15:30:45 +00:00
|
|
|
tar -xf $pkgname-$pkgver.tar.gz
|
|
|
|
mkdir $pkgname-$pkgver/build
|
|
|
|
cp ../byacc-out-mid-build.patch .
|
2021-01-31 11:09:14 +00:00
|
|
|
cp ../alpine-tls.patch .
|
2021-01-27 22:24:11 +00:00
|
|
|
cp ../LICENSE .
|
2021-01-31 11:09:14 +00:00
|
|
|
cd $pkgname-$pkgver
|
|
|
|
patch -p1 < ../alpine-tls.patch
|
2021-01-27 15:30:45 +00:00
|
|
|
}
|
|
|
|
|
2021-06-18 19:28:15 +00:00
|
|
|
_dri_drivers=""
|
|
|
|
_gallium_drivers=""
|
|
|
|
_vulkan_drivers=""
|
|
|
|
case $ARCH in
|
|
|
|
x86_64)
|
|
|
|
_dri_drivers="i915,i965,nouveau"
|
|
|
|
_gallium_drivers="iris"
|
|
|
|
_vulkan_drivers="intel"
|
|
|
|
;;
|
|
|
|
|
|
|
|
aarch64)
|
|
|
|
_dri_drivers=""
|
2021-07-31 09:38:50 +00:00
|
|
|
_gallium_drivers="vc4,v3d,zink"
|
2021-06-18 19:28:15 +00:00
|
|
|
_vulkan_drivers="broadcom"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2021-01-27 15:30:45 +00:00
|
|
|
build() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
cd build
|
2021-06-18 19:28:15 +00:00
|
|
|
echo "dri drivers: "$_dri_drivers
|
|
|
|
echo "gallium drivers: "$_gallium_drivers
|
|
|
|
echo "vulkan drivers: "$_vulkan_drivers
|
|
|
|
|
2021-01-27 15:30:45 +00:00
|
|
|
meson .. \
|
|
|
|
--prefix=/usr \
|
2021-01-31 11:09:14 +00:00
|
|
|
-Dplatforms=wayland \
|
2021-06-18 19:28:15 +00:00
|
|
|
-Ddri-drivers=$_dri_drivers \
|
2021-05-21 09:26:45 +00:00
|
|
|
-Ddri3=true \
|
2021-06-18 19:28:15 +00:00
|
|
|
-Dgallium-drivers=$_gallium_drivers \
|
2021-01-27 15:30:45 +00:00
|
|
|
-Dgallium-vdpau=false \
|
|
|
|
-Dgallium-xvmc=false \
|
|
|
|
-Dgallium-omx=disabled \
|
|
|
|
-Dgallium-va=false \
|
|
|
|
-Dgallium-xz=false \
|
|
|
|
-Dgallium-nine=false \
|
|
|
|
-Dgallium-opencl=disabled \
|
2021-06-18 19:28:15 +00:00
|
|
|
-Dvulkan-drivers=$_vulkan_drivers \
|
2021-01-27 15:30:45 +00:00
|
|
|
-Dvulkan-overlay-layer=true \
|
|
|
|
-Dvulkan-device-select-layer=true \
|
|
|
|
-Dshared-glapi=enabled \
|
|
|
|
-Dgles1=false \
|
|
|
|
-Dgles2=true \
|
|
|
|
-Dopengl=true \
|
|
|
|
-Dgbm=true \
|
|
|
|
-Dglx=disabled \
|
|
|
|
-Dglvnd=false \
|
|
|
|
-Degl=true \
|
|
|
|
-Dllvm=true \
|
|
|
|
-Dshared-llvm=true \
|
|
|
|
-Dvalgrind=false \
|
|
|
|
-Dlibunwind=false \
|
|
|
|
-Dlmsensors=false \
|
2021-05-21 09:26:45 +00:00
|
|
|
-Dbuild-tests=false \
|
|
|
|
-Duse-elf-tls=false
|
2021-01-27 15:30:45 +00:00
|
|
|
|
|
|
|
samu
|
2021-01-27 22:24:11 +00:00
|
|
|
|
|
|
|
# NEEDED IF NOT USING A PATCHED BYACC
|
2021-05-03 11:52:54 +00:00
|
|
|
# OR BYACC >= 20210328
|
2021-01-27 22:24:11 +00:00
|
|
|
# ===================================
|
|
|
|
# patch -p1 < ../../byacc-out-mid-build.patch
|
|
|
|
# samu
|
2021-01-27 15:30:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
cd build
|
|
|
|
DESTDIR=$pkgdir samu install
|
|
|
|
rm -r $pkgdir/usr/include
|
|
|
|
rm -r $pkgdir/usr/lib/pkgconfig
|
|
|
|
}
|
|
|
|
|
|
|
|
package_dev() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
cd build
|
|
|
|
DESTDIR=$pkgdir samu install
|
|
|
|
rm -r $pkgdir/usr/share
|
|
|
|
rm -r $pkgdir/usr/bin
|
|
|
|
rm $pkgdir/usr/lib/*.so
|
|
|
|
rm $pkgdir/usr/lib/*.so.*
|
|
|
|
}
|
|
|
|
|
|
|
|
license() {
|
|
|
|
cat LICENSE
|
|
|
|
}
|