aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2020-09-04 17:03:28 -0500
committerJory Pratt <anarchy@gentoo.org>2020-09-04 17:03:28 -0500
commit2a4337eff9d86aa71eaae25eba8275cead3830b3 (patch)
treeba5ee750716dff4958029a8f43ea8b9870e0895d /media-libs
parentsys-devel/gcc: Provide latest testing version (diff)
downloadmusl-2a4337eff9d86aa71eaae25eba8275cead3830b3.tar.gz
musl-2a4337eff9d86aa71eaae25eba8275cead3830b3.tar.bz2
musl-2a4337eff9d86aa71eaae25eba8275cead3830b3.zip
media-libs/mesa: Update tls patch for musl users
Package-Manager: Portage-3.0.5, Repoman-3.0.1 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/mesa/Manifest2
-rw-r--r--media-libs/mesa/files/mesa-20.2.0-add-disable-tls-support.patch44
-rw-r--r--media-libs/mesa/mesa-20.2.0_rc4.ebuild (renamed from media-libs/mesa/mesa-19.3.5.ebuild)98
-rw-r--r--media-libs/mesa/metadata.xml3
4 files changed, 105 insertions, 42 deletions
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index d4b8a71..2c19fa4 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,2 +1,2 @@
-DIST mesa-19.3.5.tar.xz 12064980 BLAKE2B a20ebfb149624f13951795e07154ab70dc1856a7a1261b339b0bdf0009511111756c88439e7b8729f768b0b4b298301b9a3c0c10d7f2fab3abd91649c12ba51c SHA512 413929573fab31e1bb2a1a04c0c770161c2db464a5aab3f0567d27603fff889ede70e1f6e197e7ff1c1639dc4cc543457bcf45761f0f8e6dffafccfa773a4e3f
DIST mesa-20.0.8.tar.xz 12360736 BLAKE2B 19e3f8a40b34b5f17ed76077c5d92f728a134b2479c43d86674ed1818ab99639a9b732041f67488251df808564f6abe5b587d756ef9c7c13dcada87cd0fc05de SHA512 d906330c412899907dd05a84034a929107fccaf3044814c4b1f30ba5690cbcf1587b5f17534c6345111f3cb7cf292afd5984a60486643ff6f534b57cec615374
+DIST mesa-20.2.0-rc4.tar.xz 13569628 BLAKE2B 54068c298a57f2c19113828e2e9b94dd15070ecc0c899f7e3dc527b27579e4f8c3c84c7b841c8d0b8313556cca41bfefd3e08b360dd0e364cbc29e0609ff6f3d SHA512 1f718bfbadbc15b7216864226adb737f3a4a7801dc60ca9294effd4be5f260fffd31c988eed9550e8a7a7430acb05ba0c7d65693c1f375eab4b95d2d029755bb
diff --git a/media-libs/mesa/files/mesa-20.2.0-add-disable-tls-support.patch b/media-libs/mesa/files/mesa-20.2.0-add-disable-tls-support.patch
new file mode 100644
index 0000000..bc4f5e9
--- /dev/null
+++ b/media-libs/mesa/files/mesa-20.2.0-add-disable-tls-support.patch
@@ -0,0 +1,44 @@
+From 97365c36582ad77db40e957931f29f958074edec Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 1 Sep 2020 18:04:56 -0500
+Subject: [PATCH] Allow to disable glx_tls for musl users
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ meson.build | 2 +-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 4f9c589..2c388e7 100644
+--- a/meson.build
++++ b/meson.build
+@@ -424,7 +424,7 @@ endif
+
+ # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
+ use_elf_tls = false
+-if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
++if get_option('elf-tls')
+ pre_args += '-DUSE_ELF_TLS'
+ use_elf_tls = true
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index 2d39d13..a3d1de5 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -313,6 +313,12 @@ option(
+ value : false,
+ description : 'Build an SELinux-aware Mesa'
+ )
++option(
++ 'elf-tls',
++ type : 'boolean',
++ value : true,
++ description : 'Enable thread-local storage in GLX and EGL'
++)
+ option(
+ 'osmesa',
+ type : 'combo',
+--
+2.28.0
+
diff --git a/media-libs/mesa/mesa-19.3.5.ebuild b/media-libs/mesa/mesa-20.2.0_rc4.ebuild
index f272c2b..7d2dc42 100644
--- a/media-libs/mesa/mesa-19.3.5.ebuild
+++ b/media-libs/mesa/mesa-20.2.0_rc4.ebuild
@@ -5,7 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
-inherit llvm meson multilib-minimal pax-utils python-any-r1
+inherit llvm meson multilib-minimal python-any-r1 linux-info
OPENGL_DIR="xorg-x11"
@@ -18,8 +18,8 @@ if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
inherit git-r3
else
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
+ SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
fi
LICENSE="MIT"
@@ -29,22 +29,21 @@ RESTRICT="
"
RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost vc4 virgl vivante vmware"
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
for card in ${VIDEO_CARDS}; do
IUSE_VIDEO_CARDS+=" video_cards_${card}"
done
IUSE="${IUSE_VIDEO_CARDS}
+classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
- lm-sensors opencl osmesa pax_kernel selinux test unwind vaapi valgrind
- vdpau vulkan vulkan-overlay wayland +X xa xvmc"
+ lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
+ vulkan-overlay wayland +X xa xvmc zink +zstd"
REQUIRED_USE="
d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
gles1? ( egl )
gles2? ( egl )
vulkan? ( dri3
- || ( video_cards_i965 video_cards_iris video_cards_radeonsi )
video_cards_radeonsi? ( llvm ) )
vulkan-overlay? ( vulkan )
wayland? ( egl gbm )
@@ -63,12 +62,14 @@ REQUIRED_USE="
video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
video_cards_r600? ( gallium )
video_cards_radeonsi? ( gallium llvm )
+ video_cards_v3d? ( gallium )
video_cards_vc4? ( gallium )
video_cards_virgl? ( gallium )
video_cards_vivante? ( gallium gbm )
video_cards_vmware? ( gallium )
xa? ( X )
xvmc? ( X )
+ zink? ( gallium vulkan )
"
LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
@@ -77,7 +78,7 @@ RDEPEND="
>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
libglvnd? (
- >=media-libs/libglvnd-1.2.0-r1[X?,${MULTILIB_USEDEP}]
+ >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
!app-eselect/eselect-opengl
)
!libglvnd? (
@@ -98,7 +99,7 @@ RDEPEND="
)
lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
opencl? (
- dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
+ >=virtual/opencl-3[${MULTILIB_USEDEP}]
dev-libs/libclc
virtual/libelf:0=[${MULTILIB_USEDEP}]
)
@@ -128,6 +129,8 @@ RDEPEND="
>=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
)
+ zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
"
for card in ${RADEON_CARDS}; do
RDEPEND="${RDEPEND}
@@ -146,13 +149,13 @@ RDEPEND="${RDEPEND}
# 1. List all the working slots (with min versions) in ||, newest first.
# 2. Update the := to specify *max* version, e.g. < 10.
# 3. Specify LLVM_MAX_SLOT, e.g. 9.
-LLVM_MAX_SLOT="9"
+LLVM_MAX_SLOT="10"
LLVM_DEPSTR="
|| (
+ sys-devel/llvm:10[${MULTILIB_USEDEP}]
sys-devel/llvm:9[${MULTILIB_USEDEP}]
- sys-devel/llvm:8[${MULTILIB_USEDEP}]
)
- sys-devel/llvm:=[${MULTILIB_USEDEP}]
+ <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
"
LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
@@ -227,7 +230,6 @@ BDEPEND="
)
sys-devel/bison
sys-devel/flex
- sys-devel/gettext
virtual/pkgconfig
$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
"
@@ -246,7 +248,7 @@ x86? (
)"
PATCHES=(
- "${FILESDIR}"/${PN}-19.3.0-add-disable-tls-support.patch
+ "${FILESDIR}"/${PN}-20.2.0-add-disable-tls-support.patch
)
llvm_check_deps() {
@@ -263,6 +265,14 @@ llvm_check_deps() {
}
pkg_pretend() {
+ if use vulkan; then
+ if ! use video_cards_i965 &&
+ ! use video_cards_iris &&
+ ! use video_cards_radeonsi; then
+ ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
+ fi
+ fi
+
if use opencl; then
if ! use video_cards_r600 &&
! use video_cards_radeonsi; then
@@ -329,7 +339,14 @@ pkg_setup() {
ewarn "detected! This can cause problems. For details, see bug 459306."
fi
- if use llvm; then
+ if use video_cards_i965 ||
+ use video_cards_iris ||
+ use video_cards_radeonsi; then
+ CONFIG_CHECK="~CHECKPOINT_RESTORE"
+ linux-info_pkg_setup
+ fi
+
+ if use gallium && use llvm; then
llvm_pkg_setup
fi
python-any-r1_pkg_setup
@@ -359,13 +376,16 @@ multilib_src_configure() {
fi
fi
- emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless )
+ local platforms
+ use X && platforms+="x11"
+ use wayland && platforms+=",wayland"
+ [[ -n $platforms ]] && emesonargs+=(-Dplatforms=${platforms#,})
if use gallium; then
emesonargs+=(
- $(meson_use llvm)
- $(meson_use lm-sensors lmsensors)
- $(meson_use unwind libunwind)
+ $(meson_feature llvm)
+ $(meson_feature lm-sensors lmsensors)
+ $(meson_feature unwind libunwind)
)
if use video_cards_iris ||
@@ -382,39 +402,40 @@ multilib_src_configure() {
if use video_cards_r600 ||
use video_cards_radeonsi ||
use video_cards_nouveau; then
- emesonargs+=($(meson_use vaapi gallium-va))
+ emesonargs+=($(meson_feature vaapi gallium-va))
use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
else
- emesonargs+=(-Dgallium-va=false)
+ emesonargs+=(-Dgallium-va=disabled)
fi
if use video_cards_r300 ||
use video_cards_r600 ||
use video_cards_radeonsi ||
use video_cards_nouveau; then
- emesonargs+=($(meson_use vdpau gallium-vdpau))
+ emesonargs+=($(meson_feature vdpau gallium-vdpau))
else
- emesonargs+=(-Dgallium-vdpau=false)
+ emesonargs+=(-Dgallium-vdpau=disabled)
fi
if use video_cards_freedreno ||
use video_cards_nouveau ||
use video_cards_vmware; then
- emesonargs+=($(meson_use xa gallium-xa))
+ emesonargs+=($(meson_feature xa gallium-xa))
else
- emesonargs+=(-Dgallium-xa=false)
+ emesonargs+=(-Dgallium-xa=disabled)
fi
if use video_cards_r600 ||
use video_cards_nouveau; then
- emesonargs+=($(meson_use xvmc gallium-xvmc))
+ emesonargs+=($(meson_feature xvmc gallium-xvmc))
else
- emesonargs+=(-Dgallium-xvmc=false)
+ emesonargs+=(-Dgallium-xvmc=disabled)
fi
if use video_cards_freedreno ||
use video_cards_lima ||
use video_cards_panfrost ||
+ use video_cards_v3d ||
use video_cards_vc4 ||
use video_cards_vivante; then
gallium_enable -- kmsro
@@ -422,10 +443,12 @@ multilib_src_configure() {
gallium_enable video_cards_lima lima
gallium_enable video_cards_panfrost panfrost
+ gallium_enable video_cards_v3d v3d
gallium_enable video_cards_vc4 vc4
gallium_enable video_cards_vivante etnaviv
gallium_enable video_cards_vmware svga
gallium_enable video_cards_nouveau nouveau
+ gallium_enable zink zink
# Only one i915 driver (classic vs gallium). Default to classic.
if ! use classic; then
@@ -461,11 +484,6 @@ multilib_src_configure() {
vulkan_enable video_cards_radeonsi amd
fi
- # x86 hardened pax_kernel needs glx-rts, bug 240956
- if [[ ${ABI} == x86 ]]; then
- emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
- fi
-
# Disable glx tls support on musl
if use elibc_musl; then
emesonargs+=( -Delf-tls=false )
@@ -487,18 +505,20 @@ multilib_src_configure() {
emesonargs+=(
$(meson_use test build-tests)
-Dglx=$(usex X dri disabled)
- -Dshared-glapi=true
- $(meson_use dri3)
- $(meson_use egl)
- $(meson_use gbm)
- $(meson_use gles1)
- $(meson_use gles2)
+ -Dshared-glapi=enabled
+ $(meson_feature dri3)
+ $(meson_feature egl)
+ $(meson_feature gbm)
+ $(meson_feature gles1)
+ $(meson_feature gles2)
$(meson_use libglvnd glvnd)
$(meson_use selinux)
+ $(meson_feature zstd)
-Dvalgrind=$(usex valgrind auto false)
-Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
+ $(meson_use vulkan vulkan-device-select-layer)
$(meson_use vulkan-overlay vulkan-overlay-layer)
--buildtype $(usex debug debug plain)
-Db_ndebug=$(usex debug false true)
@@ -512,8 +532,6 @@ multilib_src_compile() {
multilib_src_install() {
meson_src_install
-
- use libglvnd && rm -f "${D}"/usr/$(get_libdir)/pkgconfig/{egl,gl}.pc
}
multilib_src_install_all() {
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml
index 9e9a04a..8aecc5f 100644
--- a/media-libs/mesa/metadata.xml
+++ b/media-libs/mesa/metadata.xml
@@ -16,9 +16,9 @@
<flag name="gles2">Enable GLESv2 support.</flag>
<flag name="libglvnd">Use libglvnd for dispatch.</flag>
<flag name="llvm">Enable LLVM backend for Gallium3D.</flag>
+ <flag name="lm-sensors">Enable Gallium HUD lm-sensors support.</flag>
<flag name="opencl">Enable the Clover Gallium OpenCL state tracker.</flag>
<flag name="osmesa">Build the Mesa library for off-screen rendering.</flag>
- <flag name="pax_kernel">Enable if the user plans to run the package under a pax enabled hardened kernel</flag>
<flag name="valgrind">Compile in valgrind memory hints</flag>
<flag name="vdpau">Enable the VDPAU acceleration interface for the Gallium3D Video Layer.</flag>
<flag name="vulkan">Enable Vulkan drivers</flag>
@@ -26,6 +26,7 @@
<flag name="wayland">Enable support for dev-libs/wayland</flag>
<flag name="xa">Enable the XA (X Acceleration) API for Gallium3D.</flag>
<flag name="xvmc">Enable the XvMC acceleration interface for the Gallium3D Video Layer.</flag>
+ <flag name="zink">Enable the Zink OpenGL-over-Vulkan Gallium driver</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:mesa3d:mesa</remote-id>