Mail archive
alpine-aports

[alpine-aports] [PATCH] main/mesa: Upgrade to 18.0.0

From: Taner Tas <taner76_at_gmail.com>
Date: Mon, 16 Apr 2018 21:21:37 +0300

* Clarify license
* Fix typo related with enabling vulkan drivers
* Add subpackages for radeon and intel vulkan drivers
* Add aarch64 arch to use neon instructions
* Modernize APKBUILD

---
 main/mesa/APKBUILD | 51 ++++++++++++++++++++++++++++++----------------
 1 file changed, 33 insertions(+), 18 deletions(-)
diff --git a/main/mesa/APKBUILD b/main/mesa/APKBUILD
index 1bc4e630..c0a8c4f9 100644
--- a/main/mesa/APKBUILD
+++ b/main/mesa/APKBUILD
_at_@ -1,11 +1,11 @@
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=mesa
-pkgver=17.3.6
+pkgver=18.0.0
 pkgrel=0
 pkgdesc="Mesa DRI OpenGL library"
 url="http://www.mesa3d.org"
 arch="all"
-license="LGPL"
+license="MIT SGI-B-2.0 BSL-1.0"
 subpackages="$pkgname-dev
 	$pkgname-dri-ati:_dri
 	$pkgname-dri-nouveau:_dri
_at_@ -15,6 +15,7 @@ subpackages="$pkgname-dev
 	$pkgname-glapi $pkgname-egl $pkgname-gl $pkgname-gles
 	$pkgname-xatracker $pkgname-osmesa $pkgname-gbm
 	$pkgname-libwayland-egl:_wayland
+	$pkgname-vulkan-ati:_vulkan
 	"
 _llvmver=5
 depends_dev="libdrm-dev dri2proto libxext-dev libxdamage-dev libxcb-dev glproto
_at_@ -37,33 +38,25 @@ _dri_drivers="r200,radeon,nouveau,swrast"
 _gallium_drivers="r300,r600,radeonsi,nouveau,freedreno,swrast,virgl"
 _vulkan_drivers="radeon"
 
-builddir="$srcdir/mesa-$pkgver"
-
 _arch_opts=
 
 case "$CARCH" in
 x86*)
 	_dri_drivers="${_dri_drivers},i915,i965"
 	_gallium_drivers="${_gallium_drivers},svga"
-	_vulcan_drivers="$_vulcan_drivers,intel"
-	subpackages="$subpackages $pkgname-dri-intel:_dri $pkgname-dri-vmwgfx:_dri"
+	_vulkan_drivers="$_vulkan_drivers,intel"
+	subpackages="$subpackages $pkgname-dri-intel:_dri $pkgname-dri-vmwgfx:_dri $pkgname-vulkan-intel:_vulkan"
 	_arch_opts="--enable-dri3"
 	;;
-arm*)
+armhf|aarch64)
 	_gallium_drivers="${_gallium_drivers},vc4"
-	case "$CARCH" in
-	armhf) CFLAGS="$CFLAGS -mfpu=neon";;
-	esac
+	CFLAGS="$CFLAGS -mfpu=neon"
 	;;
 esac
 
 prepare() {
 	cd "$builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i;;
-		esac
-	done
+	default_prepare
 	libtoolize --force \
 		&& aclocal \
 		&& automake --add-missing \
_at_@ -72,7 +65,6 @@ prepare() {
 
 build() {
 	cd "$builddir"
-
 	export CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700"
 	./configure \
 		--build=$CBUILD \
_at_@ -85,7 +77,7 @@ build() {
 		--enable-glx-rts \
 		--with-gallium-drivers=${_gallium_drivers} \
 		--with-dri-drivers=${_dri_drivers} \
-		--with-vulcan-drivers=${_vulkan_drivers} \
+		--with-vulkan-drivers=${_vulkan_drivers} \
 		--with-llvm-prefix=/usr/lib/llvm$_llvmver \
 		--enable-llvm \
 		--enable-llvm-shared-libs \
_at_@ -197,6 +189,16 @@ _mv_gpipe() {
 #	done
 }
 
+_mv_vulkan() {
+	local i
+	install -d "$subpkgdir"/usr/lib
+	install -d "$subpkgdir"/usr/share/vulkan/icd.d
+	for i in "$_at_"; do
+		mv "$pkgdir"/usr/lib/libvulkan_${i}.so "$subpkgdir"/usr/lib
+		mv "$pkgdir"/usr/share/vulkan/icd.d/${i}* "$subpkgdir"/usr/share/vulkan/icd.d
+	done
+}
+
 _dri() {
 	local n=${subpkgname##*-dri-}
 	pkgdesc="Mesa DRI driver for $n"
_at_@ -237,7 +239,20 @@ _wayland() {
 	mv "$pkgdir"/usr/lib/libwayland-egl.so.* "$subpkgdir"/usr/lib/
 }
 
-sha512sums="5164ed5a1d3d25031b712a9f443f0e467a29b2bca0a1aa11324ed5c10279411979c9c7482825053926a813e76c58b78a3439c7c81fcd51a7808f53977080828f  mesa-17.3.6.tar.xz
+_vulkan() {
+	local n=${subpkgname##*-vulkan-}
+	pkgdesc="Mesa Vulkan API driver for $n"
+
+	case $n in
+	ati)
+		_mv_vulkan radeon
+		;;
+	intel)
+		_mv_vulkan intel
+		;;
+	esac
+}
+sha512sums="1494bb09357896a2505b3dcfec772268e28c765804f21e144948a314f1d79d99ff9f21062ef5860eb5a5a568b305a9c954585924a7ac8890fe1ebd8df3bcc396  mesa-18.0.0.tar.xz
 c3d4804ebc24c7216e4c9d4995fb92e116be7f478024b44808ee134a4c93bb51d1f66fe5fb6eca254f124c4abf6f81272b027824b3e2650a9607818bf793035a  glx_ro_text_segm.patch
 163498ac0deaaa9ce19a1e12a8a6f3ab4b90fc97e0b65b25d595c0a01201a5daacb063614c53c26d7958e1daccfa94e3e313c83a8cdc04e29a56891230707bec  musl-fixes.patch
 f206c965b60131563ce920341042bdbd6911efe9e9d8edb5422c2c3490b42e903eb2260ba9549184c76a2f4692908706641818609c535efb9ed16f00ee4f6889  musl-fix-includes.patch
-- 
2.17.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Apr 16 2018 - 21:21:37 GMT