sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (3eb6bbcc0620e97191494e0046f6792987769662)
- From: Pavel Vinogradov <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (3eb6bbcc0620e97191494e0046f6792987769662)
- Date: Mon, 6 Dec 2021 03:05:56 +0000
GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemaage.org>:
graphics-libs/mesa/BUILD | 11 ++-
graphics-libs/mesa/CONFIGURE | 45
+++++++++++-----
graphics-libs/mesa/HISTORY | 6 ++
graphics-libs/mesa/PRE_BUILD | 1
graphics-libs/mesa/patches-scm/add-use-elf-tls.patch | 22 +++++++
graphics-libs/mesa/patches-stable/add-use-elf-tls.patch | 14 ++++
graphics-libs/mesa/patches/add-use-elf-tls.patch | 14 ----
7 files changed, 81 insertions(+), 32 deletions(-)
New commits:
commit 3eb6bbcc0620e97191494e0046f6792987769662
Author: Pavel Vinogradov <public AT sourcemaage.org>
Commit: Pavel Vinogradov <public AT sourcemaage.org>
graphics-libs/mesa: adapted to no DRI drivers build, split the patch for
scm branch to work, some cleanups
diff --git a/graphics-libs/mesa/BUILD b/graphics-libs/mesa/BUILD
index 6e6b62e..b74e7d8 100755
--- a/graphics-libs/mesa/BUILD
+++ b/graphics-libs/mesa/BUILD
@@ -23,8 +23,12 @@ esac &&
local vulkan=${MESA_VULKAN//none} &&
local gallium=${MESA_GALLIUM//none} &&
local dri=${MESA_DRI//none} &&
-OPTS+=" dri-drivers=${dri// /,} \
- gallium-drivers=${gallium// /,} \
+
+if [[ "${MESA_BRANCH}" == "stable" ]]; then
+ OPTS+=" dri-drivers=${dri// /,}"
+fi &&
+
+OPTS+=" gallium-drivers=${gallium// /,} \
vulkan-drivers=${vulkan// /,} \
platforms=${MESA_EGL// /,} \
glx=${MESA_GLX// /,} \
@@ -32,6 +36,5 @@ OPTS+=" dri-drivers=${dri// /,} \
swr-arches=${MESA_ARCH// /,} \
use-elf-tls=false \
$MESA_GLES1 $MESA_GLES2" &&
-echo "OPTS=$OPTS" &&
-PREFIX=/usr &&
+
default_build
diff --git a/graphics-libs/mesa/CONFIGURE b/graphics-libs/mesa/CONFIGURE
index f06e3dc..1cd9fc6 100755
--- a/graphics-libs/mesa/CONFIGURE
+++ b/graphics-libs/mesa/CONFIGURE
@@ -16,42 +16,60 @@ MESA_DRI=${MESA_DRI/swrast/}
. $GRIMOIRE/config_query_multi.function &&
. $GRIMOIRE/MESON_CONFIGURE &&
-config_query_multi MESA_GLX "glx build types, recommend dri" dri xlib
gallium-xlib &&
config_query_multi MESA_EGL "window systems to support,recommend x11" x11
wayland &&
-
config_query_multi MESA_DRM "which libdrm hardware" AMD INTEL NOUVEAU RADEON
&&
# only suggest drivers for specified hardware
-local AVAILABLE_DRI=""
local AVAILABLE_GALLIUM="svga swrast virgl zink"
local AVAILABLE_VULKAN="swrast"
if list_find "$MESA_DRM" AMD;then
AVAILABLE_VULKAN+=" amd"
fi &&
if list_find "$MESA_DRM" RADEON;then
- AVAILABLE_DRI+=" r100 r200"
AVAILABLE_GALLIUM+=" r300 r600 radeonsi"
fi &&
if list_find "$MESA_DRM" INTEL;then
- AVAILABLE_DRI+=" i915 i965"
AVAILABLE_GALLIUM+=" i915 iris"
AVAILABLE_VULKAN+=" intel"
fi &&
if list_find "$MESA_DRM" NOUVEAU;then
- AVAILABLE_DRI+=" nouveau"
AVAILABLE_GALLIUM+=" nouveau"
fi &&
+# Mesa has dropped DRI drivers. The code below (except in the else clause)
+# should be deleted when stable release with no DRI drivers will be out.
+if [[ "${MESA_BRANCH}" == "stable" ]]; then
+ local AVAILABLE_DRI="" &&
+
+ config_query_multi MESA_GLX "glx build types, recommend dri" dri xlib
gallium-xlib &&
+
+ if list_find "$MESA_DRM" RADEON;then
+ AVAILABLE_DRI+=" r100 r200"
+ fi &&
+ if list_find "$MESA_DRM" INTEL;then
+ AVAILABLE_DRI+=" i915 i965"
+ fi &&
+ if list_find "$MESA_DRM" NOUVEAU;then
+ AVAILABLE_DRI+=" nouveau"
+ fi &&
-if list_find "$MESA_GLX" dri;then
- config_query_multi MESA_DRI \
- "which DRI drivers to build?" \
- all $AVAILABLE_DRI &&
+ if list_find "$MESA_GLX" dri;then
+ config_query_multi MESA_DRI \
+ "which DRI drivers to build?" \
+ all $AVAILABLE_DRI &&
- if list_find "$MESA_DRI" all; then
- MESA_DRI="$AVAILABLE_DRI"
- fi
+ if list_find "$MESA_DRI" all; then
+ MESA_DRI="$AVAILABLE_DRI"
+ fi
+ fi &&
+ MESA_DRI="${MESA_DRI# }"
+else
+ list_remove MESA_GLX "gallium-xlib" &&
+ config_query_multi MESA_GLX "glx build types, recommend dri" dri xlib &&
+
+ persistent_remove MESA_DRI
fi &&
+
# Gallium support
message "${MESSAGE_COLOR}If you want to enable VDPAU you have to select at
least one of the r300, r600,$DEFAULT_COLOR" &&
@@ -85,6 +103,5 @@ config_query_multi MESA_ARCH "which arch" avx avx2 knl
skx &&
config_query_multi MESA_OMX "OMax support" auto disabled tizonia bellagio
# strip any leading spaces from the driver lists
-MESA_DRI="${MESA_DRI# }"
MESA_GALLIUM="${MESA_GALLIUM# }"
MESA_VULKAN="${MESA_VULKAN# }"
diff --git a/graphics-libs/mesa/HISTORY b/graphics-libs/mesa/HISTORY
index e163cf7..9b605c5 100644
--- a/graphics-libs/mesa/HISTORY
+++ b/graphics-libs/mesa/HISTORY
@@ -1,3 +1,9 @@
+2021-12-05 Pavel Vinogradov <public AT sourcemage.org>
+ * CONFIGURE, BUILD: adapted to no DRI drivers build (scm branch),
+ some cleanups
+ * PRE_BUILD, patches{,-{scm,stable}}/add-use-elf-tls.patch: split the
patch
+ for corresponding branches
+
2021-12-04 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 21.3.1
diff --git a/graphics-libs/mesa/PRE_BUILD b/graphics-libs/mesa/PRE_BUILD
index 387dbfb..c8a9fd7 100755
--- a/graphics-libs/mesa/PRE_BUILD
+++ b/graphics-libs/mesa/PRE_BUILD
@@ -1,6 +1,7 @@
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir "patches-${MESA_BRANCH}" &&
apply_patch_dir patches &&
if is_depends_enabled "$SPELL" smgl-gl_select; then
diff --git a/graphics-libs/mesa/patches-scm/add-use-elf-tls.patch
b/graphics-libs/mesa/patches-scm/add-use-elf-tls.patch
new file mode 100644
index 0000000..654431f
--- /dev/null
+++ b/graphics-libs/mesa/patches-scm/add-use-elf-tls.patch
@@ -0,0 +1,22 @@
+diff --git meson.build meson.build
+index e1e94e71049..96ab3fb3e45 100644
+--- a/meson.build
++++ b/meson.build
+@@ -481,6 +481,9 @@ foreach platform : _platforms
+ pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
+ endforeach
+
++use_elf_tls = false
++with_use_elf_tls = get_option('use-elf-tls')
++if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
with_use_elf_tls)
+ use_elf_tls = true
+ pre_args += '-DUSE_ELF_TLS'
+
+@@ -491,6 +494,7 @@ if with_platform_android and
get_option('platform-sdk-version') >= 29
+ c_args += '-fno-emulated-tls'
+ cpp_args += '-fno-emulated-tls'
+ endif
++endif
+
+ # -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly but
requires
+ # full toolchain (including libc) support.
diff --git a/graphics-libs/mesa/patches-stable/add-use-elf-tls.patch
b/graphics-libs/mesa/patches-stable/add-use-elf-tls.patch
new file mode 100644
index 0000000..851fa33
--- /dev/null
+++ b/graphics-libs/mesa/patches-stable/add-use-elf-tls.patch
@@ -0,0 +1,14 @@
+diff --git meson.build meson.build
+index e1e94e71049..96ab3fb3e45 100644
+--- a/meson.build
++++ b/meson.build
+@@ -447,7 +447,8 @@ endif
+
+ # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
+ use_elf_tls = false
+-if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
++with_use_elf_tls = get_option('use-elf-tls')
++if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
with_use_elf_tls and
+ (not with_platform_android or get_option('platform-sdk-version') >= 29)
and
+ (not with_platform_windows or not with_shared_glapi))
+ pre_args += '-DUSE_ELF_TLS'
diff --git a/graphics-libs/mesa/patches/add-use-elf-tls.patch
b/graphics-libs/mesa/patches/add-use-elf-tls.patch
index c61c3dc..2a8ae6d 100644
--- a/graphics-libs/mesa/patches/add-use-elf-tls.patch
+++ b/graphics-libs/mesa/patches/add-use-elf-tls.patch
@@ -2,20 +2,6 @@ Upstream: https://gitlab.freedesktop.org/mesa/mesa/issues/966
Origin: Void Linux
Status: Pending
-diff --git meson.build meson.build
-index e1e94e71049..96ab3fb3e45 100644
---- a/meson.build
-+++ b/meson.build
-@@ -447,7 +447,8 @@ endif
-
- # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
- use_elf_tls = false
--if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
-+with_use_elf_tls = get_option('use-elf-tls')
-+if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
with_use_elf_tls and
- (not with_platform_android or get_option('platform-sdk-version') >= 29)
and
- (not with_platform_windows or not with_shared_glapi))
- pre_args += '-DUSE_ELF_TLS'
diff --git meson_options.txt meson_options.txt
index a7030aba31e..966cfeca298 100644
--- a/meson_options.txt
- [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (3eb6bbcc0620e97191494e0046f6792987769662), Pavel Vinogradov, 12/05/2021
Archive powered by MHonArc 2.6.24.