2019-02-24 04:20:29 +00:00
|
|
|
# Forked from Alpine to build Purism's source tree with vivante GPU related patches
|
|
|
|
pkgname=mesa-purism-gc7000
|
|
|
|
provides=mesa
|
2019-09-17 00:52:39 +00:00
|
|
|
pkgver=19.1.0_git20190919
|
2019-11-17 17:20:13 +00:00
|
|
|
pkgrel=1
|
2019-09-17 00:52:39 +00:00
|
|
|
_commit="995037366d5130b36e23363e25afef5b10208771"
|
2019-02-24 04:20:29 +00:00
|
|
|
pkgdesc="Mesa DRI OpenGL library"
|
|
|
|
url="https://www.mesa3d.org"
|
|
|
|
arch="aarch64"
|
|
|
|
license="MIT SGI-B-2.0 BSL-1.0"
|
|
|
|
subpackages="
|
|
|
|
$pkgname-dev
|
|
|
|
$pkgname-dri-etnaviv:_dri
|
|
|
|
$pkgname-dri-swrast:_dri
|
|
|
|
$pkgname-glapi $pkgname-egl $pkgname-gl $pkgname-gles
|
|
|
|
$pkgname-osmesa $pkgname-gbm
|
|
|
|
"
|
|
|
|
depends_dev="
|
|
|
|
libdrm-dev
|
|
|
|
libxext-dev
|
|
|
|
libxdamage-dev
|
|
|
|
libxcb-dev
|
|
|
|
libxshmfence-dev
|
|
|
|
"
|
|
|
|
makedepends="
|
|
|
|
$depends_dev
|
|
|
|
bison
|
|
|
|
eudev-dev
|
|
|
|
expat-dev
|
|
|
|
flex
|
|
|
|
gettext
|
2019-05-08 15:24:45 +00:00
|
|
|
elfutils-libelf
|
2019-02-24 04:20:29 +00:00
|
|
|
libtool
|
|
|
|
libxfixes-dev
|
|
|
|
libva-dev
|
|
|
|
libvdpau-dev
|
|
|
|
libx11-dev
|
|
|
|
libxrandr-dev
|
|
|
|
libxxf86vm-dev
|
|
|
|
libxt-dev
|
|
|
|
libxvmc-dev
|
|
|
|
makedepend
|
|
|
|
py-mako
|
|
|
|
py3-libxml2
|
|
|
|
python3
|
|
|
|
talloc-dev
|
|
|
|
wayland-dev
|
|
|
|
wayland-protocols
|
|
|
|
xorgproto
|
|
|
|
zlib-dev
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
"
|
|
|
|
source="
|
2019-08-19 14:37:32 +00:00
|
|
|
https://source.puri.sm/guido.gunther/mesa/-/archive/${_commit}/mesa-${_commit}.tar.gz
|
2019-02-24 04:20:29 +00:00
|
|
|
10-adjust-cache-deflate-buffer.patch
|
|
|
|
20-musl.patch
|
|
|
|
meson-add-toggle-for-TLS-support-in-GLX.patch
|
|
|
|
"
|
|
|
|
replaces="mesa-dricore"
|
2019-11-17 17:20:13 +00:00
|
|
|
pcprefix="mesa-purism-gc7000"
|
2019-02-24 04:20:29 +00:00
|
|
|
|
|
|
|
_dri_driverdir=/usr/lib/dri
|
2019-05-07 14:46:40 +00:00
|
|
|
_dri_driverdir_x11=/usr/lib/xorg/modules/dri
|
|
|
|
_dri_drivers=""
|
|
|
|
_gallium_drivers="swrast,kmsro,etnaviv"
|
|
|
|
_vulkan_drivers=""
|
2019-02-24 04:20:29 +00:00
|
|
|
_arch_opts=
|
|
|
|
|
2019-08-19 14:37:32 +00:00
|
|
|
builddir="$srcdir/mesa-${_commit}"
|
2019-02-24 04:20:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$builddir"
|
|
|
|
|
|
|
|
export CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700"
|
|
|
|
mkdir "$builddir"/build
|
|
|
|
meson -Ddri-search-path="$_dri_driverdir" \
|
|
|
|
-Dgallium-drivers="$_gallium_drivers" \
|
2019-05-07 14:46:40 +00:00
|
|
|
-Ddri-drivers="$_dri_drivers" \
|
|
|
|
-Dvulkan-drivers="$_vulkan_drivers" \
|
2019-02-24 04:20:29 +00:00
|
|
|
-Dplatforms=x11,wayland,drm \
|
|
|
|
-Ddri3=true \
|
|
|
|
-Degl=true \
|
|
|
|
-Dglx=dri \
|
|
|
|
-Dgles1=true \
|
|
|
|
-Dgles2=true \
|
|
|
|
-Dshared-glapi=true \
|
|
|
|
-Dosmesa=gallium \
|
|
|
|
-Dgbm=true \
|
|
|
|
-Dglx-tls=false \
|
|
|
|
-Dprefix="$pkgdir"/usr "$builddir"/build
|
|
|
|
ninja -C "$builddir"/build
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$builddir"
|
|
|
|
ninja -C "$builddir"/build install
|
2019-11-17 17:20:13 +00:00
|
|
|
|
|
|
|
# Make abuild's version check happy (#386)
|
|
|
|
sed -i s/-devel//g "$pkgdir"/usr/lib/pkgconfig/*.pc
|
2019-02-24 04:20:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
egl() {
|
|
|
|
pkgdesc="Mesa libEGL runtime libraries"
|
2019-05-07 14:46:40 +00:00
|
|
|
replaces="$pkgname"
|
2019-02-24 04:20:29 +00:00
|
|
|
|
|
|
|
install -d "$subpkgdir"/usr/lib
|
|
|
|
mv "$pkgdir"/usr/lib/libEGL.so* "$subpkgdir"/usr/lib/
|
|
|
|
}
|
|
|
|
|
|
|
|
gl() {
|
|
|
|
pkgdesc="Mesa libGL runtime libraries"
|
2019-05-07 14:46:40 +00:00
|
|
|
replaces="$pkgname"
|
2019-02-24 04:20:29 +00:00
|
|
|
|
|
|
|
install -d "$subpkgdir"/usr/lib
|
|
|
|
mv "$pkgdir"/usr/lib/libGL.so* "$subpkgdir"/usr/lib/
|
|
|
|
}
|
|
|
|
|
|
|
|
glapi() {
|
|
|
|
pkgdesc="Mesa shared glapi"
|
|
|
|
replaces="$pkgname-gles"
|
|
|
|
|
|
|
|
install -d "$subpkgdir"/usr/lib
|
|
|
|
mv "$pkgdir"/usr/lib/libglapi.so.* "$subpkgdir"/usr/lib/
|
|
|
|
}
|
|
|
|
|
|
|
|
gles() {
|
|
|
|
pkgdesc="Mesa libGLESv2 runtime libraries"
|
2019-05-07 14:46:40 +00:00
|
|
|
replaces="$pkgname"
|
2019-02-24 04:20:29 +00:00
|
|
|
|
|
|
|
install -d "$subpkgdir"/usr/lib
|
|
|
|
mv "$pkgdir"/usr/lib/libGLES*.so* "$subpkgdir"/usr/lib/
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
osmesa() {
|
|
|
|
pkgdesc="Mesa offscreen rendering libraries"
|
|
|
|
|
|
|
|
install -d "$subpkgdir"/usr/lib
|
|
|
|
mv "$pkgdir"/usr/lib/libOSMesa.so.* "$subpkgdir"/usr/lib/
|
|
|
|
}
|
|
|
|
|
|
|
|
gbm() {
|
|
|
|
pkgdesc="Mesa gbm library"
|
2019-05-07 14:46:40 +00:00
|
|
|
replaces="$pkgname"
|
2019-02-24 04:20:29 +00:00
|
|
|
|
|
|
|
install -d "$subpkgdir"/usr/lib
|
|
|
|
mv "$pkgdir"/usr/lib/libgbm.so.* "$subpkgdir"/usr/lib/
|
|
|
|
}
|
|
|
|
|
|
|
|
_mv_dri() {
|
|
|
|
install -d "$subpkgdir"/$_dri_driverdir
|
2019-05-07 14:46:40 +00:00
|
|
|
install -d "$subpkgdir"/$_dri_driverdir_x11
|
2019-02-24 04:20:29 +00:00
|
|
|
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
mv "$pkgdir"/$_dri_driverdir/${1}.so \
|
|
|
|
"$subpkgdir"/$_dri_driverdir/
|
|
|
|
shift
|
2019-05-07 14:46:40 +00:00
|
|
|
|
|
|
|
ln -s $_dri_driverdir/${1}.so \
|
|
|
|
"$subpkgdir"/$_dri_driverdir_x11/${1}.so
|
2019-02-24 04:20:29 +00:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
_mv_vdpau() {
|
|
|
|
local i
|
|
|
|
install -d "$subpkgdir"/usr/lib/vdpau
|
|
|
|
for i in "$@"; do
|
|
|
|
mv "$pkgdir"/usr/lib/vdpau/libvdpau_$i.* \
|
|
|
|
"$subpkgdir"/usr/lib/vdpau/
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
_mv_gpipe() {
|
|
|
|
return 0
|
|
|
|
# http://cgit.freedesktop.org/mesa/mesa/commit/?id=44ec468e8033553c26a112cebba41c343db00eb1
|
|
|
|
# https://code.google.com/p/chromium/issues/detail?id=412089
|
|
|
|
# local i
|
|
|
|
# install -d "$subpkgdir"/usr/lib/gallium-pipe
|
|
|
|
# for i in "$@"; do
|
|
|
|
# mv "$pkgdir"/usr/lib/gallium-pipe/pipe_$i.* \
|
|
|
|
# "$subpkgdir"/usr/lib/gallium-pipe/
|
|
|
|
# done
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_mv_va() {
|
|
|
|
local i
|
|
|
|
install -d "$subpkgdir"/usr/lib/dri
|
|
|
|
for i in "$@"; do
|
|
|
|
mv "$pkgdir"/usr/lib/dri/${i}_drv_video.so \
|
|
|
|
"$subpkgdir"/usr/lib/dri/
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
_dri() {
|
|
|
|
local n=${subpkgname##*-dri-}
|
|
|
|
pkgdesc="Mesa DRI driver for $n"
|
|
|
|
|
|
|
|
case $n in
|
|
|
|
swrast)
|
|
|
|
_mv_dri swrast_dri kms_swrast_dri && _mv_gpipe swrast
|
|
|
|
;;
|
|
|
|
etnaviv)
|
2019-05-07 14:46:40 +00:00
|
|
|
_mv_dri etnaviv_dri imx-drm_dri
|
2019-02-24 04:20:29 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2019-09-17 00:52:39 +00:00
|
|
|
sha512sums="a645a50cf071ed35497f5df4913dd612662c5e8467a79e7b54842d6e98d9736372ee384883309c242fa84129933035dd0468fb5ea0a77720bf943d51aca0ff1e mesa-995037366d5130b36e23363e25afef5b10208771.tar.gz
|
2019-02-24 04:20:29 +00:00
|
|
|
cdf22d2da3328e116c379264886bd01fd3ad5cc45fe03dc6fd97bdc4794502598ee195c0b9d975fa264d6ac31c6fa108c0535c91800ecf4fcabfd308e53074cc 10-adjust-cache-deflate-buffer.patch
|
|
|
|
02db65893d55b5667d9c3bc193fc089e5408596431e06363fe2adea00c9e3c4e80612f3d03dc61f931d1a6ae04340bccf55e1376cf00bbf2433990713649d286 20-musl.patch
|
|
|
|
a7bbc0d8836fe5eb7220c7b41d8af439878a3876302de32739243232f979ea9c63d2069fcd78bef370eafef0a21f491ef99219ae686e965326475764244bbe5d meson-add-toggle-for-TLS-support-in-GLX.patch"
|