temp/mesa-git: align with upstream APKBUILD (!826)

This commit is contained in:
Minecrell 2019-12-23 19:38:56 +01:00 committed by Bart Ribbers
parent 598f7c9589
commit 06d449cecd
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
2 changed files with 54 additions and 37 deletions

View file

@ -13,7 +13,7 @@ pkgrel=0
_commit="f6a913bb9540a9c3fa5a22ad5e08dfe87dafdaaf" _commit="f6a913bb9540a9c3fa5a22ad5e08dfe87dafdaaf"
pkgdesc="(Git) Mesa DRI OpenGL library" pkgdesc="(Git) Mesa DRI OpenGL library"
url="https://www.mesa3d.org" url="https://www.mesa3d.org"
arch="armhf armv7 aarch64" arch="all"
license="MIT SGI-B-2.0 BSL-1.0" license="MIT SGI-B-2.0 BSL-1.0"
subpackages=" subpackages="
$pkgname-dev $pkgname-dev
@ -24,8 +24,9 @@ subpackages="
$pkgname-dri-virtio:_dri $pkgname-dri-virtio:_dri
$pkgname-glapi $pkgname-egl $pkgname-gl $pkgname-gles $pkgname-glapi $pkgname-egl $pkgname-gl $pkgname-gles
$pkgname-xatracker $pkgname-osmesa $pkgname-gbm $pkgname-xatracker $pkgname-osmesa $pkgname-gbm
$pkgname-vulkan-ati:_vulkan
" "
_llvmver=8 _llvmver=9
depends_dev=" depends_dev="
libdrm-dev libdrm-dev
libxext-dev libxext-dev
@ -33,6 +34,7 @@ depends_dev="
libxcb-dev libxcb-dev
libxshmfence-dev libxshmfence-dev
" "
# FIXME: Remove glslang when pmbootstrap can handle the conditional makedepends below
makedepends=" makedepends="
$depends_dev $depends_dev
bison bison
@ -40,6 +42,7 @@ makedepends="
expat-dev expat-dev
flex flex
gettext gettext
glslang
elfutils-dev elfutils-dev
libtool libtool
libxfixes-dev libxfixes-dev
@ -53,7 +56,7 @@ makedepends="
llvm$_llvmver-dev llvm$_llvmver-dev
makedepend makedepend
meson meson
py-mako py3-mako
py3-libxml2 py3-libxml2
python3 python3
talloc-dev talloc-dev
@ -71,26 +74,32 @@ source="
" "
provides="mesa" provides="mesa"
replaces="mesa-dricore mesa" replaces="mesa-dricore mesa"
options="!check" # to follow alpine's standards
builddir="$srcdir/mesa-$_commit" builddir="$srcdir/mesa-$_commit"
pcprefix="mesa-git" pcprefix="mesa-git"
if [ "$CARCH" = x86 ]; then
# Bug upstream that needs to be fixed
options="$options textrels"
fi
_dri_driverdir=/usr/lib/xorg/modules/dri _dri_driverdir=/usr/lib/xorg/modules/dri
_dri_drivers="r100,r200,nouveau" _dri_drivers="r100,r200,nouveau"
_gallium_drivers="r300,r600,radeonsi,nouveau,freedreno,swrast,virgl" _gallium_drivers="r300,r600,radeonsi,nouveau,freedreno,swrast,virgl"
_vulkan_drivers="amd" _vulkan_drivers="amd"
_arch_opts= _arch_opts=""
_vulkan_overlay_layer=false
case "$CARCH" in case "$CARCH" in
x86*) x86*)
_dri_drivers="${_dri_drivers},i915,i965" _dri_drivers="${_dri_drivers},i915,i965"
_gallium_drivers="${_gallium_drivers},svga" _gallium_drivers="${_gallium_drivers},svga,iris"
_vulkan_drivers="${_vulkan_drivers},intel" _vulkan_drivers="${_vulkan_drivers},intel"
_vulkan_overlay_layer=true
makedepends="$makedepends glslang"
subpackages="$subpackages \ subpackages="$subpackages \
$pkgname-dri-intel:_dri \ $pkgname-dri-intel:_dri \
$pkgname-dri-vmwgfx:_dri \ $pkgname-dri-vmwgfx:_dri \
$pkgname-vulkan-intel:_vulkan $pkgname-vulkan-intel:_vulkan \
$pkgname-vulkan-ati:_vulkan" $pkgname-vulkan-layer:_vulkan_layer"
_arch_opts="-Ddri3=true" _arch_opts="-Ddri3=true"
case "$CARCH" in case "$CARCH" in
x86) x86)
@ -98,10 +107,10 @@ x86*)
esac esac
;; ;;
armhf|armv7|aarch64) armhf|armv7|aarch64)
_gallium_drivers="${_gallium_drivers},vc4,kmsro,lima,panfrost,etnaviv,tegra" _gallium_drivers="${_gallium_drivers},vc4,v3d,kmsro,lima,panfrost,etnaviv,tegra"
_vulkan_drivers="" # latest patches uses a syscall that is no longer available for EABI.
subpackages="$subpackages subpackages="$subpackages
$pkgname-dri-vc4:_dri $pkgname-dri-vc4:_dri
$pkgname-dri-v3d:_dri
$pkgname-dri-kmsro:_dri $pkgname-dri-kmsro:_dri
$pkgname-dri-lima:_dri $pkgname-dri-lima:_dri
$pkgname-dri-panfrost:_dri $pkgname-dri-panfrost:_dri
@ -112,8 +121,6 @@ armhf|armv7|aarch64)
esac esac
build() { build() {
cd "$builddir"
export CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700" export CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700"
export PATH=/usr/lib/llvm${_llvmver}/bin:$PATH export PATH=/usr/lib/llvm${_llvmver}/bin:$PATH
meson \ meson \
@ -126,30 +133,34 @@ build() {
-Dgallium-drivers=$_gallium_drivers \ -Dgallium-drivers=$_gallium_drivers \
-Ddri-drivers=$_dri_drivers \ -Ddri-drivers=$_dri_drivers \
-Dvulkan-drivers=$_vulkan_drivers \ -Dvulkan-drivers=$_vulkan_drivers \
-Dvulkan-overlay-layer=$_vulkan_overlay_layer \
-Dplatforms=x11,drm,wayland \ -Dplatforms=x11,drm,wayland \
-Dllvm=true \ -Dllvm=true \
-Dshared-llvm=true \ -Dshared-llvm=true \
-Dshared-glapi=true \ -Dshared-glapi=true \
-Dgbm=true \ -Dgbm=true \
-Dglx=dri \ -Dglx=dri \
-Dopengl=true \
-Dosmesa=gallium \ -Dosmesa=gallium \
-Dgles1=true \ -Dgles1=false \
-Dgles2=true \ -Dgles2=true \
-Degl=true \ -Degl=true \
-Dgallium-xa=true \ -Dgallium-xa=true \
-Dgallium-vdpau=true \ -Dgallium-vdpau=true \
-Dgallium-va=true \ -Dgallium-va=true \
-Dgallium-xvmc=false \ -Dgallium-xvmc=false \
-Duse-elf-tls=false \ -Dglx-use-tls=false \
-Dgallium-nine=false \ -Dgallium-nine=false \
-Db_ndebug=true \ -Db_ndebug=true \
$_arch_opts \ $_arch_opts \
. output . output
# parallel build workaround
ninja -C output src/compiler/nir/nir_intrinsics.h
ninja -C output ninja -C output
} }
package() { package() {
cd "$builddir"
DESTDIR="$pkgdir" ninja -C output install DESTDIR="$pkgdir" ninja -C output install
# Make abuild's version check happy (#386) # Make abuild's version check happy (#386)
@ -236,7 +247,7 @@ _mv_dri() {
install -d "$subpkgdir"/$_dri_driverdir install -d "$subpkgdir"/$_dri_driverdir
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
mv "$pkgdir"/$_dri_driverdir/${1}.so \ mv "$pkgdir"/$_dri_driverdir/$1.so \
"$subpkgdir"/$_dri_driverdir/ "$subpkgdir"/$_dri_driverdir/
shift shift
done done
@ -268,7 +279,7 @@ _mv_vulkan() {
install -d "$subpkgdir"/usr/lib install -d "$subpkgdir"/usr/lib
install -d "$subpkgdir"/usr/share/vulkan/icd.d install -d "$subpkgdir"/usr/share/vulkan/icd.d
for i in "$@"; do for i in "$@"; do
mv "$pkgdir"/usr/lib/libvulkan_${i}.so "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/libvulkan_$i.so "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/share/vulkan/icd.d/${i}* "$subpkgdir"/usr/share/vulkan/icd.d/ mv "$pkgdir"/usr/share/vulkan/icd.d/${i}* "$subpkgdir"/usr/share/vulkan/icd.d/
done done
} }
@ -297,7 +308,7 @@ _dri() {
&& _mv_va r600 radeonsi && _mv_va r600 radeonsi
;; ;;
intel) intel)
_mv_dri i915_dri i965_dri _mv_dri i915_dri i965_dri iris_dri
;; ;;
nouveau) nouveau)
_mv_dri nouveau_dri nouveau_vieux_dri \ _mv_dri nouveau_dri nouveau_vieux_dri \
@ -314,6 +325,9 @@ _dri() {
vc4) vc4)
_mv_dri vc4_dri _mv_dri vc4_dri
;; ;;
v3d)
_mv_dri v3d_dri
;;
vmwgfx) vmwgfx)
_mv_dri vmwgfx_dri && _mv_gpipe vmwgfx _mv_dri vmwgfx_dri && _mv_gpipe vmwgfx
;; ;;
@ -352,8 +366,17 @@ _vulkan() {
_mv_vulkan intel ;; _mv_vulkan intel ;;
esac esac
} }
_vulkan_layer() {
pkgdesc="Vulkan overlay layer to display information about the application"
mkdir -p "$subpkgdir"/usr/share/vulkan "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/share/vulkan/explicit_layer.d "$subpkgdir"/usr/share/vulkan
mv "$pkgdir"/usr/lib/libVkLayer_MESA_overlay.so "$subpkgdir"/usr/lib
}
sha512sums="0fc1b76ca8fc4d6095d0c099fbfcd485243e89e7041ab0c57862362f949358b6f43a97f7ec92722cb33a20b42d43391851b0c4d42c0ba52723806a4b070af7f0 mesa-git-f6a913bb9540a9c3fa5a22ad5e08dfe87dafdaaf.tar.gz sha512sums="0fc1b76ca8fc4d6095d0c099fbfcd485243e89e7041ab0c57862362f949358b6f43a97f7ec92722cb33a20b42d43391851b0c4d42c0ba52723806a4b070af7f0 mesa-git-f6a913bb9540a9c3fa5a22ad5e08dfe87dafdaaf.tar.gz
cdf22d2da3328e116c379264886bd01fd3ad5cc45fe03dc6fd97bdc4794502598ee195c0b9d975fa264d6ac31c6fa108c0535c91800ecf4fcabfd308e53074cc adjust-cache-deflate-buffer.patch cdf22d2da3328e116c379264886bd01fd3ad5cc45fe03dc6fd97bdc4794502598ee195c0b9d975fa264d6ac31c6fa108c0535c91800ecf4fcabfd308e53074cc adjust-cache-deflate-buffer.patch
cf849044d6cc7d2af4ff015208fb09d70bf9660538699797da21bda2ecb7c1892d312af83d05116afd826708d9caafb1d05a13f09139c558aea6fee931e3eee7 musl-fix-includes.patch cf849044d6cc7d2af4ff015208fb09d70bf9660538699797da21bda2ecb7c1892d312af83d05116afd826708d9caafb1d05a13f09139c558aea6fee931e3eee7 musl-fix-includes.patch
bd9539abe5ac6d3ff1f4f8a2155b85dce5f61fc4b10b718b51e7d5ec5674ebfef569cdfdffe981abe5eb0a49989e50a6ddf881486b03649a95b52620a944c9c0 add-use-elf-tls.patch 9aa207a38d538abbd8e7a7210e3081508563e85e8c27b2269b8f40fd62d9fc6fee0cb2f573a0e62c42f8ba0fb85740459b761f009d5991cfd9813d7614541908 add-use-elf-tls.patch
6a42ef5d60ccad7e39dee7b3a09b8a884548ce65af3fb17cd1bbd453cee0df7b367968b179e4b54fbc606b29753a1bab74f8c6136b1efaf4cfb9f084d9e76c66 time-fix.patch" 6a42ef5d60ccad7e39dee7b3a09b8a884548ce65af3fb17cd1bbd453cee0df7b367968b179e4b54fbc606b29753a1bab74f8c6136b1efaf4cfb9f084d9e76c66 time-fix.patch"

View file

@ -1,34 +1,28 @@
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
index 501957e35e1..8ee027f1a1e 100644 index 898d025..0da4fc5 100644
--- a/meson.build --- a/meson.build
+++ b/meson.build +++ b/meson.build
@@ -378,8 +378,10 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat @@ -387,7 +387,8 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
endif endif
# Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS. # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
-if host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29) -if host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29)
- pre_args += '-DUSE_ELF_TLS' +with_use_elf_tls = get_option('use-elf-tls')
+if host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29) +if with_use_elf_tls and host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29)
+ if get_option('use-elf-tls') pre_args += '-DUSE_ELF_TLS'
+ pre_args += '-DUSE_ELF_TLS'
+ endif
endif endif
if with_glx != 'disabled'
diff --git a/meson_options.txt b/meson_options.txt diff --git a/meson_options.txt b/meson_options.txt
index b768c15053c..381cfb435ba 100644 index 626baf3..6e4637c 100644
--- a/meson_options.txt --- a/meson_options.txt
+++ b/meson_options.txt +++ b/meson_options.txt
@@ -214,6 +214,12 @@ option( @@ -366,3 +366,9 @@ option(
choices : ['auto', 'disabled', 'dri', 'xlib', 'gallium-xlib'], value : 25,
description : 'Build support for GLX platform' description : 'Android Platform SDK version. Default: Nougat version.'
) )
+option( +option(
+ 'use-elf-tls', + 'use-elf-tls',
+ type : 'boolean', + type : 'boolean',
+ value : true, + value : false,
+ description : 'Build support for initial-exec TLS model on ELF platform' + description : 'Build support for initial-exec TLS model'
+) +)
option(
'egl',
type : 'combo',