* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2016-03-14 2:22 Anthony G. Basile
0 siblings, 0 replies; 21+ messages in thread
From: Anthony G. Basile @ 2016-03-14 2:22 UTC (permalink / raw
To: gentoo-commits
commit: d9a5fd011e6dd17929a1d839b60f983c9f8121c7
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 14 02:32:39 2016 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Mar 14 02:32:39 2016 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=d9a5fd01
media-libs/mesa: in tree version 11.0.6 works
media-libs/mesa/Manifest | 12 -
media-libs/mesa/files/eselect-mesa.conf.8.1 | 38 -
media-libs/mesa/files/eselect-mesa.conf.9.2 | 39 -
media-libs/mesa/files/glx_ro_text_segm.patch | 28 -
media-libs/mesa/files/mesa-10-pthread.patch | 24 -
.../mesa-10.2-dont-require-llvm-for-r300.patch | 11 -
.../mesa/files/mesa-10.3.7-dont-use-clrsb.patch | 36 -
.../mesa/files/mesa-10.3.7-format_utils.c.patch | 1089 --------------------
.../mesa/files/mesa-10.5.1-fstat-include.patch | 37 -
media-libs/mesa/files/mesa-9.1.6-fpclassify.patch | 11 -
media-libs/mesa/mesa-10.3.7-r99.ebuild | 536 ----------
media-libs/mesa/metadata.xml | 34 -
12 files changed, 1895 deletions(-)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
deleted file mode 100644
index ca24f64..0000000
--- a/media-libs/mesa/Manifest
+++ /dev/null
@@ -1,12 +0,0 @@
-AUX eselect-mesa.conf.8.1 1622 SHA256 a7a4306084885dc624304a8893ca4f5645f7f1fe31322f9fb663e5a103f69221 SHA512 58eacf1304ebaa0116ea3c53fafdddb8c94738e31daad8546ac33b46dc51b81a6bccb48c167afe792c7fd41ca5054d8e66123f524b0623ad3e603ed4872f9dc4 WHIRLPOOL 7af55e3cb9448f4b3b4c463443e078a5559588371767e10b5890918d84bfeb16797f11ffabf9aaa205db70c550c5dfc18fe709b3a2e00746d93d4bf4944124b1
-AUX eselect-mesa.conf.9.2 1676 SHA256 bcf5f77140b4695f147d4cd3c2db4b954fb57eccfd4475c7f7c4866edda8436e SHA512 d0061359638c0d9729ba1035fd7740c84d59f538adc11af2ee671b5ddbc83c420159efbefcc39ea680f06d20507f1e1d76b528712a07baeca901a413ba7b55df WHIRLPOOL 0fc650223a1910305bb2c4b7b946ac8b83b5b1ba0b79b586a96303a369b30c9c03dc658a6e8e9a29c5c4605f3865e245be0a0e6a27c40ac37402e8a2616b3ace
-AUX glx_ro_text_segm.patch 731 SHA256 e36af5b530fdbe2b0e62a035bf4bf4baef267c3dc56133d1a58e56899ebffc5c SHA512 90d04d1268cc90e1c5596b49b143895eba99d4e7f7d9bb5f699725c1308e3995edac44e3f61536c7ce70ebf5df84a5a22c18fa84fb54fbddb339f908975bb43c WHIRLPOOL 42171ef67930bebdcfdfcb0c9370234791c6125be760b6419abfff44bd65899982167d6da4d6eb4198383438e6376b4b695109af158083b903071c545160d883
-AUX mesa-10-pthread.patch 695 SHA256 a355933736a39ce9b0e26412ac940377fc6b3eeb25737c53bf8d767fe34c5367 SHA512 7850b543fb8413b9abf65ab884588eb7b15782122253bc9f4baee8735775bfd6bade42c386f295c20c7d43484d9ce82597cf82c8bca97433ccec8816386cc275 WHIRLPOOL ad2b5163a556733f8772ab9bce0ea452ac8373c96dc9be82ab1cf7dd7c59eea9fc7bed90786f1e3237e1639852785ed836f42bcaed78447355a6693501c9560f
-AUX mesa-10.2-dont-require-llvm-for-r300.patch 547 SHA256 83cfeae33b1e8c84b37ed59c353000eb775978ae3d9035ba8ce4f63a167756fc SHA512 d1cb5a989aa001c99f353d27ab5b28ac05d60050614bbfd76ca5d312e00efcc2b1a2459d30d697b68119310c69512b4195afce6c0ed7f31fb9cf14689a740e27 WHIRLPOOL c06669942d275a9d9f132ec8f51d3ecf23d33cb89cb607ba3a7861f209f283b39a9568513b07e22f0dfcc99339a307d7b2a6b03f261ed583fd4518d3b4d0b464
-AUX mesa-10.3.7-dont-use-clrsb.patch 1140 SHA256 23626c6bf1e502f17f4b9236b512063b41bf52be64f56252f0fc5ce456824d58 SHA512 2d9dd9a56c3bab02e8ec1a1ab4d88c2855746d8243548f197cb43de6e980554447c75e53c07dcd270de7e1c282cf7fdf996e5102a24e47b75e484a18f99092e0 WHIRLPOOL 47b222fb61427bbe2a63ac4b738608e9c3491e6373c33e1d68c79198a111d7668b4cafbac9e58820e8cefae55dffca46ab57dbe91ad819feeb734c32f01020f0
-AUX mesa-10.3.7-format_utils.c.patch 34839 SHA256 81ec8d547d798aa5ef5dfc9f0685291af04f95882608f8e9db39a867f44ab431 SHA512 777597b41c37ced0fb375048cc30c4cac701c6020c70bd0f6fbbc2d6f2c1ac9ece0f6d411d81dd042be7f2fbc17e0536176d8230b93f9eed7d7ddf205ac98bb8 WHIRLPOOL 51a213c415d81250a2bc3ad117581b62c4eed13152a9550b2214a9c63f85a6559b1504e013ae0d8e56d5adcaff053c753aa833d7acbe10185d468fdfed5e1b72
-AUX mesa-10.5.1-fstat-include.patch 1008 SHA256 4d44da3882ae9ae7c5d255189e5ca86569337a53d6aece4c65344c753aa588d3 SHA512 6df3167efe198955198b4eb3e1c883f307ebbeb5ebaa63836f8bddf70173382454de6b0d9cb626bb20a5a649fe355a7d25ed5ce27348d5234df27fb9c920b4b4 WHIRLPOOL b05dee0366e35105a7eac143bd4b59e146b0ca369b522e58d2e9a08c8c35b79e929edeacf90154d826dc7ff40ebc7161cc3a6b663e0418388b8f5f5254747066
-AUX mesa-9.1.6-fpclassify.patch 618 SHA256 b02df9b6850d46d251dd51213800d6608195487d0bc91aac79df75616b7bd6d4 SHA512 e7f61451bb05caaeecbe19b24d3c44cecd54a3f10d40701973cf061dc5396c7dc0220c19396e73d5f8d8a8febf34789333476cca62566667d827ed5f68155d4b WHIRLPOOL 4df278e552808cf8656c1319518cd8e37ffd3189e482efae6401dfd43febe733a8e57135d1d4886906fc37b495762c92ca24e5a5f98fe7af59df405e54a4b946
-DIST MesaLib-10.3.7.tar.bz2 7287153 SHA256 43c6ced15e237cbb21b3082d7c0b42777c50c1f731d0d4b5efb5231063fb6a5b SHA512 bbc027c4146c42aaa160990f5281c71a342d32c10ba56f91da1a60dd4cb7d620ff49b72553d24bc1d87470e2baf9be81b5bdee9abe49d6acc57902fccb9e2e5f WHIRLPOOL 7fa32e70c6aabb84a06f2f852f77eac839aea08726c442742b3d3abdb94a0fd9f033439ab0cb16865f4ee14e1538cb86937856bbdfd1f9090e8e7c43eac52e03
-EBUILD mesa-10.3.7-r99.ebuild 14707 SHA256 5d7bc944628f494641d79bb39559d0e459f89770f7b2691d79c2f6420d3b7ab9 SHA512 ed82955c3d2741a73ec3082680e5c93b9708a3c159bb836e01298e88cdfc9028591d0050d8ef76dfeb4304f7c0c53e38aee5c130094bbff5d3b93ab609d26391 WHIRLPOOL 26430225f044f046f0229f62f3c3541f169c87b5141973edbc8ffbd6fa57231ba2479ab0d42be0b61ba4ae9dce140277099c20228da2ead18a7b0fd8d2b54423
-MISC metadata.xml 2031 SHA256 c73e1a9bc99045751417552228181f11eee19a5c654968ea353c50c3da96daa3 SHA512 b79ddf5ebd7832ff173528eda54d828ef2164b128386a586fa8e4f56edb3831316b67c5a89c7f575dce99ff83e52776d1fd324734853c5cb546bf58adbb014d0 WHIRLPOOL cd73d9e2cad9d61d68d46ecefb1b56fdd35adeb79cefcb8f150af203bc928e420fe673b4947d0c6e3a46d63e2aa2d88085edba229c387ab98a0b0bce59cf20c2
diff --git a/media-libs/mesa/files/eselect-mesa.conf.8.1 b/media-libs/mesa/files/eselect-mesa.conf.8.1
deleted file mode 100644
index 63a21aa..0000000
--- a/media-libs/mesa/files/eselect-mesa.conf.8.1
+++ /dev/null
@@ -1,38 +0,0 @@
-# mesa classic/gallium implementations in this release
-
-# Syntax description:
-# * MESA_IMPLEMENTATIONS contains a space-delimited list of switchable
-# classic/gallium implementations.
-# * MESA_DRIVERS is an associative array, for each member "foo" of
-# MESA_IMPLEMENTATIONS it contains the following elements:
-# foo,description - Human-readable description of the driver
-# foo,classicdriver - Filename of the classic driver
-# foo,galliumdriver - Filename of the gallium driver
-# foo,default - which of classic or gallium is chosen by default
-
-MESA_IMPLEMENTATIONS="i915 i965 r300 r600 sw"
-declare -A MESA_DRIVERS || die "MESA_DRIVERS already in environment and not associative."
-
-MESA_DRIVERS[i915,description]="i915 (Intel 915, 945)"
-MESA_DRIVERS[i915,classicdriver]="i915_dri.so"
-MESA_DRIVERS[i915,galliumdriver]="i915g_dri.so"
-MESA_DRIVERS[i915,default]="gallium"
-
-MESA_DRIVERS[i965,description]="i965 (Intel 965, G/Q3x, G/Q4x)"
-MESA_DRIVERS[i965,classicdriver]="i965_dri.so"
-MESA_DRIVERS[i965,default]="classic"
-
-MESA_DRIVERS[r300,description]="r300 (Radeon R300-R500)"
-MESA_DRIVERS[r300,classicdriver]="r300_dri.so"
-MESA_DRIVERS[r300,galliumdriver]="r300g_dri.so"
-MESA_DRIVERS[r300,default]="gallium"
-
-MESA_DRIVERS[r600,description]="r600 (Radeon R600-R700, Evergreen, Northern Islands)"
-MESA_DRIVERS[r600,classicdriver]="r600_dri.so"
-MESA_DRIVERS[r600,galliumdriver]="r600g_dri.so"
-MESA_DRIVERS[r600,default]="gallium"
-
-MESA_DRIVERS[sw,description]="sw (Software renderer)"
-MESA_DRIVERS[sw,classicdriver]="swrast_dri.so"
-MESA_DRIVERS[sw,galliumdriver]="swrastg_dri.so"
-MESA_DRIVERS[sw,default]="gallium"
diff --git a/media-libs/mesa/files/eselect-mesa.conf.9.2 b/media-libs/mesa/files/eselect-mesa.conf.9.2
deleted file mode 100644
index ff590f5..0000000
--- a/media-libs/mesa/files/eselect-mesa.conf.9.2
+++ /dev/null
@@ -1,39 +0,0 @@
-# mesa classic/gallium implementations in this release
-
-# Syntax description:
-# * MESA_IMPLEMENTATIONS contains a space-delimited list of switchable
-# classic/gallium implementations.
-# * MESA_DRIVERS is an associative array, for each member "foo" of
-# MESA_IMPLEMENTATIONS it contains the following elements:
-# foo,description - Human-readable description of the driver
-# foo,classicdriver - Filename of the classic driver
-# foo,galliumdriver - Filename of the gallium driver
-# foo,default - which of classic or gallium is chosen by default
-
-MESA_IMPLEMENTATIONS="i915 i965 r300 r600 sw"
-declare -A MESA_DRIVERS || die "MESA_DRIVERS already in environment and not associative."
-
-MESA_DRIVERS[i915,description]="i915 (Intel 915, 945)"
-MESA_DRIVERS[i915,classicdriver]="i915_dri.so"
-MESA_DRIVERS[i915,galliumdriver]="i915g_dri.so"
-MESA_DRIVERS[i915,default]="gallium"
-
-MESA_DRIVERS[i965,description]="i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)"
-MESA_DRIVERS[i965,classicdriver]="i965_dri.so"
-MESA_DRIVERS[i965,galliumdriver]="ilo_dri.so"
-MESA_DRIVERS[i965,default]="classic"
-
-MESA_DRIVERS[r300,description]="r300 (Radeon R300-R500)"
-MESA_DRIVERS[r300,classicdriver]="r300_dri.so"
-MESA_DRIVERS[r300,galliumdriver]="r300g_dri.so"
-MESA_DRIVERS[r300,default]="gallium"
-
-MESA_DRIVERS[r600,description]="r600 (Radeon R600-R700, Evergreen, Northern Islands)"
-MESA_DRIVERS[r600,classicdriver]="r600_dri.so"
-MESA_DRIVERS[r600,galliumdriver]="r600g_dri.so"
-MESA_DRIVERS[r600,default]="gallium"
-
-MESA_DRIVERS[sw,description]="sw (Software renderer)"
-MESA_DRIVERS[sw,classicdriver]="swrast_dri.so"
-MESA_DRIVERS[sw,galliumdriver]="swrastg_dri.so"
-MESA_DRIVERS[sw,default]="gallium"
diff --git a/media-libs/mesa/files/glx_ro_text_segm.patch b/media-libs/mesa/files/glx_ro_text_segm.patch
deleted file mode 100644
index 495b7dc..0000000
--- a/media-libs/mesa/files/glx_ro_text_segm.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-2011-02-09 Jeremy Huddleston <jeremyhu@freedesktop.org
-
- #240956
- * configure.ac add support to enable readonly test segment on x86
-
---- configure.ac.orig 2008-11-17 23:19:38.000000000 +0100
-+++ configure.ac 2008-11-17 23:20:17.000000000 +0100
-@@ -499,6 +499,20 @@
- enable_xcb=no
- fi
-
-+
-+dnl readonly text segment on x86 hardened platforms
-+AC_ARG_ENABLE([glx_rts],
-+ [AS_HELP_STRING([--enable-glx-rts],
-+ [on x86, use a readonly text segment for libGL @<:@default=disabled@:>@])],
-+ [enable_glx_rts="$enableval"],
-+ [enable_glx_rts=no])
-+if test "x$enable_glx_rts" = xyes; then
-+ DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
-+else
-+ enable_glx_rts=no
-+fi
-+
-+
- dnl
- dnl libGL configuration per driver
- dnl
diff --git a/media-libs/mesa/files/mesa-10-pthread.patch b/media-libs/mesa/files/mesa-10-pthread.patch
deleted file mode 100644
index 17a8bda..0000000
--- a/media-libs/mesa/files/mesa-10-pthread.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-mesa-10.patch from sabotage linux
-
---- ./include/c11/threads_posix.h.orig
-+++ ./include/c11/threads_posix.h
-@@ -178,7 +178,7 @@
- return thrd_error;
- pthread_mutexattr_init(&attr);
- if ((type & mtx_recursive) != 0) {
--#if defined(__linux__) || defined(__linux)
-+#if defined(__GLIBC__)
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
- #else
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
---- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig
-+++ ./src/gallium/winsys/svga/drm/vmw_screen.h
-@@ -34,7 +34,7 @@
- #ifndef VMW_SCREEN_H_
- #define VMW_SCREEN_H_
-
--
-+#include <sys/stat.h>
- #include "pipe/p_compiler.h"
- #include "pipe/p_state.h"
-
diff --git a/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch b/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch
deleted file mode 100644
index a85a3c1..0000000
--- a/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur a/configure.ac b/configure.ac
---- a/configure.ac 2014-03-03 04:05:33.110522943 +0100
-+++ b/configure.ac 2014-03-03 04:06:44.165518094 +0100
-@@ -1774,7 +1774,6 @@
- HAVE_GALLIUM_R300=yes
- PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
- gallium_require_drm_loader
-- gallium_require_llvm "Gallium R300"
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
- gallium_check_st "radeon/drm" "r300/dri" "" "" ""
- DRICOMMON_NEED_LIBDRM=yes
diff --git a/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch b/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch
deleted file mode 100644
index c38757d..0000000
--- a/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 32e98e8ef06f0bb6ad55f9fb5858be77c03367b0 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Mon, 2 Feb 2015 17:26:49 -0800
-Subject: [PATCH] gallium/util: Don't use __builtin_clrsb in util_last_bit().
-
-Unclear circumstances lead to undefined symbols on x86.
-
-Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=536916
-Cc: mesa-stable@lists.freedesktop.org
-Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
----
- src/gallium/auxiliary/util/u_math.h | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
-index 19c7343..ca6d0f1 100644
---- a/src/gallium/auxiliary/util/u_math.h
-+++ b/src/gallium/auxiliary/util/u_math.h
-@@ -561,14 +561,10 @@ util_last_bit(unsigned u)
- static INLINE unsigned
- util_last_bit_signed(int i)
- {
--#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(__INTEL_COMPILER)
-- return 31 - __builtin_clrsb(i);
--#else
- if (i >= 0)
- return util_last_bit(i);
- else
- return util_last_bit(~(unsigned)i);
--#endif
- }
-
- /* Destructively loop over all of the bits in a mask as in:
---
-2.0.4
-
diff --git a/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch b/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch
deleted file mode 100644
index e1fba03..0000000
--- a/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch
+++ /dev/null
@@ -1,1089 +0,0 @@
-From cfeb394224f2daeb2139cf4ec489a4dd8297a44d Mon Sep 17 00:00:00 2001
-From: Brian Paul <brianp@vmware.com>
-Date: Fri, 12 Sep 2014 08:31:15 -0600
-Subject: [PATCH] mesa: break up _mesa_swizzle_and_convert() to reduce compile
- time
-
-This reduces gcc -O3 compile time to 1/4 of what it was on my system.
-Reduces MSVC release build time too.
-
-Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
----
- src/mesa/main/format_utils.c | 1030 ++++++++++++++++++++++--------------------
- 1 file changed, 550 insertions(+), 480 deletions(-)
-
-diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c
-index 240e3bc..29d779a 100644
---- a/src/mesa/main/format_utils.c
-+++ b/src/mesa/main/format_utils.c
-@@ -352,9 +352,14 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels,
- */
- #define SWIZZLE_CONVERT(DST_TYPE, SRC_TYPE, CONV) \
- do { \
-+ const uint8_t swizzle_x = swizzle[0]; \
-+ const uint8_t swizzle_y = swizzle[1]; \
-+ const uint8_t swizzle_z = swizzle[2]; \
-+ const uint8_t swizzle_w = swizzle[3]; \
- const SRC_TYPE *typed_src = void_src; \
- DST_TYPE *typed_dst = void_dst; \
- DST_TYPE tmp[7]; \
-+ int s, j; \
- tmp[4] = 0; \
- tmp[5] = one; \
- switch (num_dst_channels) { \
-@@ -423,7 +428,527 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels,
- } \
- break; \
- } \
-- } while (0);
-+ } while (0)
-+
-+
-+static void
-+convert_float(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const float one = 1.0f;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ SWIZZLE_CONVERT(float, float, src);
-+ break;
-+ case GL_HALF_FLOAT:
-+ SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src));
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(float, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(float, int8_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(float, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(float, int16_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(float, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(float, int32_t, src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_half_float(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const uint16_t one = _mesa_float_to_half(1.0f);
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src));
-+ break;
-+ case GL_HALF_FLOAT:
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, src);
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_ubyte(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const uint8_t one = normalized ? UINT8_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ SWIZZLE_CONVERT(uint8_t, uint8_t, src);
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_byte(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const int8_t one = normalized ? INT8_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, float, src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ SWIZZLE_CONVERT(int8_t, int8_t, src);
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, int16_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, int32_t, src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_ushort(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const uint16_t one = normalized ? UINT16_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, src);
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_short(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const int16_t one = normalized ? INT16_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, float, src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, int8_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ SWIZZLE_CONVERT(int16_t, int16_t, src);
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, int32_t, src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+static void
-+convert_uint(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const uint32_t one = normalized ? UINT32_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ SWIZZLE_CONVERT(uint32_t, uint32_t, src);
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_int(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const int32_t one = normalized ? INT32_MAX : 12;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, float, src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, int8_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, int16_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ SWIZZLE_CONVERT(int32_t, int32_t, src);
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-
- /**
- * Convert between array-based color formats.
-@@ -478,499 +1003,44 @@ _mesa_swizzle_and_convert(void *void_dst, GLenum dst_type, int num_dst_channels,
- const void *void_src, GLenum src_type, int num_src_channels,
- const uint8_t swizzle[4], bool normalized, int count)
- {
-- int s, j;
-- register uint8_t swizzle_x, swizzle_y, swizzle_z, swizzle_w;
--
- if (swizzle_convert_try_memcpy(void_dst, dst_type, num_dst_channels,
- void_src, src_type, num_src_channels,
- swizzle, normalized, count))
- return;
-
-- swizzle_x = swizzle[0];
-- swizzle_y = swizzle[1];
-- swizzle_z = swizzle[2];
-- swizzle_w = swizzle[3];
--
- switch (dst_type) {
- case GL_FLOAT:
-- {
-- const float one = 1.0f;
-- switch (src_type) {
-- case GL_FLOAT:
-- SWIZZLE_CONVERT(float, float, src)
-- break;
-- case GL_HALF_FLOAT:
-- SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src))
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8))
-- } else {
-- SWIZZLE_CONVERT(float, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8))
-- } else {
-- SWIZZLE_CONVERT(float, int8_t, src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16))
-- } else {
-- SWIZZLE_CONVERT(float, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16))
-- } else {
-- SWIZZLE_CONVERT(float, int16_t, src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32))
-- } else {
-- SWIZZLE_CONVERT(float, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32))
-- } else {
-- SWIZZLE_CONVERT(float, int32_t, src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_float(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_HALF_FLOAT:
-- {
-- const uint16_t one = _mesa_float_to_half(1.0f);
-- switch (src_type) {
-- case GL_FLOAT:
-- SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src))
-- break;
-- case GL_HALF_FLOAT:
-- SWIZZLE_CONVERT(uint16_t, uint16_t, src)
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src))
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_half_float(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_UNSIGNED_BYTE:
-- {
-- const uint8_t one = normalized ? UINT8_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- SWIZZLE_CONVERT(uint8_t, uint8_t, src)
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_ubyte(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_BYTE:
-- {
-- const int8_t one = normalized ? INT8_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, float, src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- SWIZZLE_CONVERT(int8_t, int8_t, src)
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, int16_t, src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, int32_t, src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_byte(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_UNSIGNED_SHORT:
-- {
-- const uint16_t one = normalized ? UINT16_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- SWIZZLE_CONVERT(uint16_t, uint16_t, src)
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_ushort(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_SHORT:
-- {
-- const int16_t one = normalized ? INT16_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, float, src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, int8_t, src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- SWIZZLE_CONVERT(int16_t, int16_t, src)
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, int32_t, src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_short(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_UNSIGNED_INT:
-- {
-- const uint32_t one = normalized ? UINT32_MAX : 1;
-- switch (src_type) { case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- SWIZZLE_CONVERT(uint32_t, uint32_t, src)
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_uint(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_INT:
-- {
-- const int32_t one = normalized ? INT32_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, float, src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, int8_t, src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, int16_t, src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- SWIZZLE_CONVERT(int32_t, int32_t, src)
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_int(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- default:
- assert(!"Invalid channel type");
- }
---
-2.0.5
-
diff --git a/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch b/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch
deleted file mode 100644
index 212d00d..0000000
--- a/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 771cd266b9d00bdcf2cf7acaa3c8363c358d7478 Mon Sep 17 00:00:00 2001
-From: Emil Velikov <emil.l.velikov@gmail.com>
-Date: Wed, 11 Mar 2015 19:12:35 +0000
-Subject: loader: include <sys/stat.h> for non-sysfs builds
-
-Required by fstat(), otherwise we'll error out due to implicit function
-declaration.
-
-Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89530
-Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-Reported-by: Vadim Rutkovsky <vrutkovs@redhat.com>
-Tested-by: Vadim Rutkovsky <vrutkovs@redhat.com>
-
-diff --git a/src/loader/loader.c b/src/loader/loader.c
-index 9ff5115..17bf133 100644
---- a/src/loader/loader.c
-+++ b/src/loader/loader.c
-@@ -64,6 +64,7 @@
- * Rob Clark <robclark@freedesktop.org>
- */
-
-+#include <sys/stat.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <string.h>
-@@ -80,7 +81,6 @@
- #endif
- #endif
- #ifdef HAVE_SYSFS
--#include <sys/stat.h>
- #include <sys/types.h>
- #endif
- #include "loader.h"
---
-cgit v0.10.2
-
diff --git a/media-libs/mesa/files/mesa-9.1.6-fpclassify.patch b/media-libs/mesa/files/mesa-9.1.6-fpclassify.patch
deleted file mode 100644
index 3d606c9..0000000
--- a/media-libs/mesa/files/mesa-9.1.6-fpclassify.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- Mesa-9.1.6.org/src/mesa/main/querymatrix.c 2013-08-04 18:12:47.046000003 +0000
-+++ Mesa-9.1.6/src/mesa/main/querymatrix.c 2013-08-04 18:23:35.360000003 +0000
-@@ -71,7 +71,7 @@
- }
- }
-
--#elif defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \
-+#elif defined(fpclassify) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \
- defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \
- (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__) || \
- (defined(__sun) && defined(__GNUC__)) || defined(ANDROID) || defined(__HAIKU__)
diff --git a/media-libs/mesa/mesa-10.3.7-r99.ebuild b/media-libs/mesa/mesa-10.3.7-r99.ebuild
deleted file mode 100644
index 8581f62..0000000
--- a/media-libs/mesa/mesa-10.3.7-r99.ebuild
+++ /dev/null
@@ -1,536 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-10.3.7-r1.ebuild,v 1.4 2015/02/20 11:16:40 ago Exp $
-
-EAPI=5
-
-EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
-
-if [[ ${PV} = 9999* ]]; then
- GIT_ECLASS="git-r3"
- EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit base autotools multilib multilib-minimal flag-o-matic \
- python-any-r1 toolchain-funcs pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_PN="${PN/m/M}"
-MY_P="${MY_PN}-${PV/_/-}"
-MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
-
-FOLDER="${PV/.0/}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="http://mesa3d.sourceforge.net/"
-
-#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
-if [[ $PV = 9999* ]]; then
- SRC_URI="${SRC_PATCHES}"
-else
- SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
- ${SRC_PATCHES}"
-fi
-
-# The code is MIT/X11.
-# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc x86"
-RESTRICT="!bindist? ( bindist )"
-
-INTEL_CARDS="i915 i965 ilo intel"
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
-for card in ${VIDEO_CARDS}; do
- IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
- bindist +classic debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm +nptl
- opencl openvg osmesa pax_kernel openmax pic selinux
- +udev vdpau wayland xvmc xa kernel_FreeBSD kernel_linux"
-
-REQUIRED_USE="
- llvm? ( gallium )
- openvg? ( egl gallium )
- opencl? (
- gallium
- llvm
- )
- openmax? ( gallium )
- gles1? ( egl )
- gles2? ( egl )
- wayland? ( egl gbm )
- xa? ( gallium )
- video_cards_freedreno? ( gallium )
- video_cards_intel? ( || ( classic gallium ) )
- video_cards_i915? ( || ( classic gallium ) )
- video_cards_i965? ( classic )
- video_cards_ilo? ( gallium )
- video_cards_nouveau? ( || ( classic gallium ) )
- video_cards_radeon? ( || ( classic gallium ) )
- video_cards_r100? ( classic )
- video_cards_r200? ( classic )
- video_cards_r300? ( gallium )
- video_cards_r600? ( gallium )
- video_cards_radeonsi? ( gallium llvm )
- video_cards_vmware? ( gallium )
- ${PYTHON_REQUIRED_USE}
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56"
-# keep correct libdrm and dri2proto dep
-# keep blocks in rdepend for binpkg
-RDEPEND="
- !<x11-base/xorg-server-1.7
- !<=x11-proto/xf86driproto-2.0.3
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
- classic? ( app-eselect/eselect-mesa )
- gallium? ( app-eselect/eselect-mesa )
- >=app-eselect/eselect-opengl-1.2.7
- udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
- llvm? (
- video_cards_radeonsi? ( || (
- >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
- >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
- ) )
- video_cards_r600? ( || (
- >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
- >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
- ) )
- !video_cards_r600? (
- video_cards_radeon? ( || (
- >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
- >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
- ) )
- )
- >=sys-devel/llvm-3.3-r3:=[${MULTILIB_USEDEP}]
- <sys-devel/llvm-3.6
- video_cards_radeonsi? ( >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] )
- )
- opencl? (
- app-eselect/eselect-opencl
- dev-libs/libclc
- )
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
- vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
- wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
-"
-for card in ${INTEL_CARDS}; do
- RDEPEND="${RDEPEND}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- "
-done
-
-for card in ${RADEON_CARDS}; do
- RDEPEND="${RDEPEND}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
- "
-done
-
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- llvm? (
- video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
- )
- opencl? (
- >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
- >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
- >=sys-devel/gcc-4.6
- )
- sys-devel/bison
- sys-devel/flex
- sys-devel/gettext
- virtual/pkgconfig
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
- dri3? (
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
- )
- >=x11-proto/glproto-1.4.16-r1:=[${MULTILIB_USEDEP}]
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-# It is slow without texrels, if someone wants slow
-# mesa without texrels +pic use is worth the shot
-QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
-QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
-
-# Think about: ggi, fbcon, no-X configs
-
-pkg_setup() {
- # workaround toc-issue wrt #386545
- use ppc64 && append-flags -mminimal-toc
-
- # warning message for bug 459306
- if use llvm && has_version sys-devel/llvm[!debug=]; then
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
- ewarn "detected! This can cause problems. For details, see bug 459306."
- fi
-
- python-any-r1_pkg_setup
-}
-
-src_unpack() {
- default
- [[ $PV = 9999* ]] && git-r3_src_unpack
-}
-
-src_prepare() {
- # apply patches
- if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
- EPATCH_FORCE="yes" \
- EPATCH_SOURCE="${WORKDIR}/patches" \
- EPATCH_SUFFIX="patch" \
- epatch
- fi
-
- epatch "${FILESDIR}"/${PN}-10.3.7-dont-use-clrsb.patch
- epatch "${FILESDIR}"/${PN}-10.3.7-format_utils.c.patch
- epatch "${FILESDIR}"/${PN}-10.5.1-fstat-include.patch
-
- # relax the requirement that r300 must have llvm, bug 380303
- epatch "${FILESDIR}"/${PN}-10.2-dont-require-llvm-for-r300.patch
-
- # for musl
- epatch "${FILESDIR}"/${PN}-9.1.6-fpclassify.patch
- epatch "${FILESDIR}"/${PN}-10-pthread.patch
-
- # fix for hardened pax_kernel, bug 240956
- [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
-
- # Solaris needs some recent POSIX stuff in our case
- if [[ ${CHOST} == *-solaris* ]] ; then
- sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
- fi
-
- base_src_prepare
-
- eautoreconf
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myconf
-
- if use classic; then
- # Configurable DRI drivers
- driver_enable swrast
-
- # Intel code
- driver_enable video_cards_i915 i915
- driver_enable video_cards_i965 i965
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- driver_enable video_cards_intel i915 i965
- fi
-
- # Nouveau code
- driver_enable video_cards_nouveau nouveau
-
- # ATI code
- driver_enable video_cards_r100 radeon
- driver_enable video_cards_r200 r200
- if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- driver_enable video_cards_radeon radeon r200
- fi
- fi
-
- if use egl; then
- myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
- fi
-
- if use gallium; then
- myconf+="
- $(use_enable llvm gallium-llvm)
- $(use_enable openvg)
- $(use_enable openvg gallium-egl)
- $(use_enable openmax omx)
- $(use_enable vdpau)
- $(use_enable xa)
- $(use_enable xvmc)
- "
- gallium_enable swrast
- gallium_enable video_cards_vmware svga
- gallium_enable video_cards_nouveau nouveau
- gallium_enable video_cards_i915 i915
- gallium_enable video_cards_ilo ilo
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
- fi
-
- gallium_enable video_cards_r300 r300
- gallium_enable video_cards_r600 r600
- gallium_enable video_cards_radeonsi radeonsi
- if ! use video_cards_r300 && \
- ! use video_cards_r600; then
- gallium_enable video_cards_radeon r300 r600
- fi
-
- gallium_enable video_cards_freedreno freedreno
- # opencl stuff
- if use opencl; then
- myconf+="
- $(use_enable opencl)
- --with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
- --with-clang-libdir="${EPREFIX}/usr/lib"
- "
- fi
- fi
-
- # x86 hardened pax_kernel needs glx-rts, bug 240956
- if use pax_kernel; then
- myconf+="
- $(use_enable x86 glx-rts)
- "
- fi
-
- # on abi_x86_32 hardened we need to have asm disable
- if [[ ${ABI} == x86* ]] && use pic; then
- myconf+=" --disable-asm"
- fi
-
- # build fails with BSD indent, bug #428112
- use userland_GNU || export INDENT=cat
-
- econf \
- --enable-dri \
- --enable-glx \
- --enable-shared-glapi \
- $(use_enable !bindist texture-float) \
- $(use_enable debug) \
- $(use_enable dri3) \
- $(use_enable egl) \
- $(use_enable gbm) \
- $(use_enable gles1) \
- $(use_enable gles2) \
- $(use_enable nptl glx-tls) \
- $(use_enable osmesa) \
- $(use_enable !udev sysfs) \
- --enable-llvm-shared-libs \
- --with-dri-drivers=${DRI_DRIVERS} \
- --with-gallium-drivers=${GALLIUM_DRIVERS} \
- PYTHON2="${PYTHON}" \
- ${myconf}
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- # Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
- # because user can eselect desired GL provider.
- ebegin "Moving libGL and friends for dynamic switching"
- local x
- local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}/"
- dodir ${gl_dir}/{lib,extensions,include/GL}
- for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{la,a,so*}; do
- if [ -f ${x} -o -L ${x} ]; then
- mv -f "${x}" "${ED}${gl_dir}"/lib \
- || die "Failed to move ${x}"
- fi
- done
- for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
- if [ -f ${x} -o -L ${x} ]; then
- mv -f "${x}" "${ED}${gl_dir}"/include/GL \
- || die "Failed to move ${x}"
- fi
- done
- for x in "${ED}"/usr/include/{EGL,GLES*,VG,KHR}; do
- if [ -d ${x} ]; then
- mv -f "${x}" "${ED}${gl_dir}"/include \
- || die "Failed to move ${x}"
- fi
- done
- eend $?
-
- if use classic || use gallium; then
- ebegin "Moving DRI/Gallium drivers for dynamic switching"
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
- keepdir /usr/$(get_libdir)/dri
- dodir /usr/$(get_libdir)/mesa
- for x in ${gallium_drivers[@]}; do
- if [ -f "$(get_libdir)/gallium/${x}" ]; then
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
- || die "Failed to move ${x}"
- fi
- done
- if use classic; then
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
- fi
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
- if [ -f ${x} -o -L ${x} ]; then
- mv -f "${x}" "${x/dri/mesa}" \
- || die "Failed to move ${x}"
- fi
- done
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
- ln -s ../mesa/*.so . || die "Creating symlink failed"
- # remove symlinks to drivers known to eselect
- for x in ${gallium_drivers[@]}; do
- if [ -f ${x} -o -L ${x} ]; then
- rm "${x}" || die "Failed to remove ${x}"
- fi
- done
- popd
- eend $?
- fi
- if use opencl; then
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
- dodir ${cl_dir}/{lib,include}
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
- "${ED}"${cl_dir}
- fi
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
- mv -f "${ED}"/usr/include/CL \
- "${ED}"${cl_dir}/include
- fi
- eend $?
- fi
-
- if use openmax; then
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
- doenvd "${T}"/99mesaxdgomx
- keepdir /usr/share/mesa/xdg
- fi
-}
-
-multilib_src_install_all() {
- prune_libtool_files --all
- einstalldocs
-
- if use !bindist; then
- dodoc docs/patents.txt
- fi
-
- # Install config file for eselect mesa
- insinto /usr/share/mesa
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
-}
-
-multilib_src_test() {
- if use llvm; then
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
- pushd src/gallium/drivers/llvmpipe >/dev/null || die
- emake ${llvm_tests}
- pax-mark m ${llvm_tests}
- popd >/dev/null || die
- fi
- emake check
-}
-
-pkg_postinst() {
- # Switch to the xorg implementation.
- echo
- eselect opengl set --use-old ${OPENGL_DIR}
-
- # switch to xorg-x11 and back if necessary, bug #374647 comment 11
- OLD_IMPLEM="$(eselect opengl show)"
- if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then
- eselect opengl set ${OPENGL_DIR}
- eselect opengl set ${OLD_IMPLEM}
- fi
-
- # Select classic/gallium drivers
- if use classic || use gallium; then
- eselect mesa set --auto
- fi
-
- # Switch to mesa opencl
- if use opencl; then
- eselect opencl set --use-old ${PN}
- fi
-
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide
- if use openmax; then
- ebegin "Registering OpenMAX drivers"
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
- omxregister-bellagio
- eend $?
- fi
-
- # warn about patent encumbered texture-float
- if use !bindist; then
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
- elog "enabled. Please see patents.txt for an explanation."
- fi
-
- local using_radeon r_flag
- for r_flag in ${RADEON_CARDS}; do
- if use video_cards_${r_flag}; then
- using_radeon=1
- break
- fi
- done
-
- if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
- elog "Note that in order to have full S3TC support, it is necessary to install"
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
- elog "textures in some apps, and some others even require this to run."
- fi
-}
-
-pkg_prerm() {
- if use openmax; then
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
- fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- DRI_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- DRI_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
-
-gallium_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- GALLIUM_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- GALLIUM_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml
deleted file mode 100644
index 88120e5..0000000
--- a/media-libs/mesa/metadata.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>x11@gentoo.org</email>
- <name>X11</name>
- </maintainer>
- <use>
- <flag name="bindist">Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions.</flag>
- <flag name="classic">Build drivers based on the classic architecture.</flag>
- <flag name="d3d9">Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.</flag>
- <flag name="dri3">Enable DRI3 support.</flag>
- <flag name="egl">Enable EGL support.</flag>
- <flag name="gallium">Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.</flag>
- <flag name="gbm">Enable the Graphics Buffer Manager for EGL on KMS.</flag>
- <flag name="gles">Enable GLES (both v1 and v2) support.</flag>
- <flag name="gles1">Enable GLESv1 support.</flag>
- <flag name="gles2">Enable GLESv2 support.</flag>
- <flag name="llvm">Enable LLVM backend for Gallium3D.</flag>
- <flag name="opencl">Enable the Clover Gallium OpenCL state tracker.</flag>
- <flag name="openmax">Enable OpenMAX video decode/encode acceleration for Gallium3D.</flag>
- <flag name="openvg">Enable the OpenVG 2D acceleration API for Gallium3D.</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="pic">disable optimized assembly code that is not PIC friendly</flag>
- <flag name="vdpau">Enable the VDPAU acceleration interface for the Gallium3D Video Layer.</flag>
- <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>
- </use>
- <upstream>
- <remote-id type="sourceforge">mesa3d</remote-id>
- </upstream>
-</pkgmetadata>
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2017-05-10 0:41 Aric Belsito
0 siblings, 0 replies; 21+ messages in thread
From: Aric Belsito @ 2017-05-10 0:41 UTC (permalink / raw
To: gentoo-commits
commit: faef716d8dc501838e24b894e612c8ce2030da6b
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed May 10 00:40:03 2017 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed May 10 00:40:03 2017 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=faef716d
media-libs/mesa: add patch for missing header
media-libs/mesa/Manifest | 3 ++-
media-libs/mesa/files/mesa-17-missing-fcntl_h.patch | 11 +++++++++++
media-libs/mesa/mesa-17.1.0_rc4.ebuild | 1 +
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index ba868f0..63e85ab 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -2,6 +2,7 @@ AUX eselect-mesa.conf.9.2 1630 SHA256 c1ca0e3fddc12b49c5db1739f2d57a0afd6856824d
AUX mesa-11-execinfo.patch 3063 SHA256 150a0f8f6324db046538756fcf79a082fb1e64afe46bd679cc7965b0ebd71d15 SHA512 f30d4b79f5120dc8ff338a16b8c0c3cd1dc25dae3854f9e1c20eeb1a8115f48f01167dd11d316c788f715723815d37a21d65cf6026d65ef424335a481cb93090 WHIRLPOOL da15270c3efba6a1ff1968fa131f63b6d2472b05111a51d5da7d29095a9089f715d8b4bbfbba31e3858076b4ef6e5f3f9ed6c83b6faee44c48c4022756535489
AUX mesa-13-clover-Work-around-build-failure-with-AltiVec.patch 2317 SHA256 02dd7e59ea5d08d4a66b2f7353bb427b71ed8e6638b50da593d35165a032ac42 SHA512 6b3cd038c0a61b4d64ec0b645086d7cf2c74b97bd0febe5229c88d78e8dc3a4cbd2876a06ca2394f819dd04b0397722fc76c4ce5939c5c58f40ef0d2e2bcbe84 WHIRLPOOL 0200946c578dfb47782533052e86804c8534d2da056670dad0712e694ca22a6983e433f0a355f489472814969c74558f113b03f01c3fd4c3bb671f09a2bf49b0
AUX mesa-13-musl_endian.patch 417 SHA256 3686132ef3a57b607c223705a18f32da7fa7f58fecd5b118f3d7f5df3697cd11 SHA512 6b351de61e0d3ed5cc37233df8f915ca3e3d80291944556124c88408da2471c3b65fb5c355f1e78ca24a8ed1e007e3efd7c7fc52d08b509eaa66fc368b751ab2 WHIRLPOOL 7d1c0cfbb6a914df589c9f41939e6e7054aa6bfe8b2bed79e25a2d1bc44cb4d7b01a21b5e39aeeca27d9ebffdf0fb7f9af651a845316a131826521f11197ffc1
+AUX mesa-17-missing-fcntl_h.patch 385 SHA256 61fa64c296d22c0a490576ec595ee1a4bebd939c5d46336e5f56116e202b79a5 SHA512 fabaf5bb78731860d30dd698e45ed7ecaa62ea20fc85c0f0a344baae43ee71971b29f59dce9e32263b50b179e11f07acf9e5a48fe653eb2fea81c975f1a2d12f WHIRLPOOL 5aecce58799663d0906365fda445efb98357327fcd898e0fb01eccb11ca8f3b0fd993ba0008757cf598e13f447b2bcdc6f84d14dfaebf86e65ea65a61c59280a
DIST mesa-13.0.5.tar.xz 9171480 SHA256 bfcea7e2c801525a60895c8aff11aa68457ee9aa35d01a4638e1f310a3f5ef87 SHA512 db5f6a97b40ee6e45ba81280ab4543354e9f274c7112c5a43b8970244f329902a22f68d5eeddad5b64502507f462ffbcc028efc5dff93822adf95d30ba5903c1 WHIRLPOOL 164116608908331d4e8d69c4d2b92dc22e8e6d98725a20e8c2da5cc24b4e9ae9e05ee9c7209d55371b419e0f4e6c1d4752a46d149a968a6b83612aa77f7e480e
DIST mesa-13.0.6.tar.xz 9179236 SHA256 29ef104a7fc082d352b1599bd6cb1d040be424ccd22f5e0eb7ee9b0e9acd3597 SHA512 2455e044647f674c2f1dd524143b61b8630713fa929bbf6fe1c981436a9c08dc933553d638a22b32d2799afb77be746355b48b1b20af172141c5b63891e94441 WHIRLPOOL 1fdaaf29de96225cf41a3bdeb559a35cf20fda524f80985b2bfdc52095dcb7f6b320704b7ccf754a6f80555925a6a80dfa2b1115a4bdd9bdc1ebb672f115208a
DIST mesa-17.0.5.tar.xz 9492760 SHA256 668efa445d2f57a26e5c096b1965a685733a3b57d9c736f9d6460263847f9bfe SHA512 942fa62c9098bcd030856cd622696eae418f292addb912e1d558cf27d396f25c3f2000dae97a12d1ff233f1ea157497259442082005035bb27b9bafb2cfc33c3 WHIRLPOOL 84ed3198a5f36541ebe966d8375b240be6ff815817b8cd8cf136941122b69df2ab2a5cdad93a255e03653e05c1db805693fa2e58082bf575341acbc9e887b862
@@ -9,5 +10,5 @@ DIST mesa-17.1.0-rc4.tar.xz 9848344 SHA256 dadd8f28ca8f5c02ec456bb2919da59b36995
EBUILD mesa-13.0.5.ebuild 13658 SHA256 c2d8750e43354a05926dd17e7bba27a9c348ea49d723ed3a0045f5b8dd34f639 SHA512 30af415e1448909b0420080edf24b8006cc55d8b0b70d0d9b6f2c5f5d40b710c5ebb463f1203204de5e7e71bcb68564d490bd61be8c52362e0219d62074eb279 WHIRLPOOL de6f514c8d879c41b7f63429d45790f133b1c60412262f0b38bffc5cae69f8621bbbbc988fc851f5c764a7867a5a22885391f80ab342ff4e84cf5b2bf0798a2c
EBUILD mesa-13.0.6.ebuild 13584 SHA256 3bfff928951edec571894f54fada7bb718e95e94f82806764731d09522b5304d SHA512 1fb15e100deeb50f5de436e2ffe3e131ebe3badb820aa1ddef8cfa691426b42bd3fbe66fd55cd848f9c5f6de9b5dd396f6879813730fb0a234a96a818a71b1cc WHIRLPOOL 6a7d6a0c01a847bfdb8bdeb3fa7ff558e4f3ac77b6f3f4334037ab3098f7763fe26de34378a49a57cbbefdec6ab22952cb0c948517b0885d882e0b92626af585
EBUILD mesa-17.0.5.ebuild 13611 SHA256 06e11aa4c7e3a6bec9294c7028c907c5480dce3ee4c95052491712dbdb91a808 SHA512 0fcfdc77728a7ab3d629bee9f399a59c1d63c593a6987d71f2766c2f3aba813ee6e36795f2d518e3309a14147a093b1616ab2fe0dfcdf43a2fcc498d62fbc0a2 WHIRLPOOL 92aca377f74604808a5ea904dde89bc48f26e3607a8bd3acef00e2eac50f6a011f177a224fbcb542f94cbeebc00e4757aec4abe0e501f19f9263c90b26494deb
-EBUILD mesa-17.1.0_rc4.ebuild 13374 SHA256 e1a93c597fb7506fc5be4da299746a6e85e20d3983fbc7baf64126f3a7094686 SHA512 76c50af9f4166f88c9dfff40e7104221a756e8a4555ebc9131195c11dceb30f413867c7b90280ef20ee80699fdb056aa288cc63f5bdeac4237a769617ccc140a WHIRLPOOL 0024b4ce846fab73817fb0537eef29270386d732d40144170f59ddb691c076f2ce2295420b383e271c2d95d8c2011066d021061a600556e561cfb8fb0df52ae1
+EBUILD mesa-17.1.0_rc4.ebuild 13427 SHA256 bace7850de32ac996d6d50031da30146136926cff16973351246c65622808c32 SHA512 b0bf2912bdac3d1728def96e94f1d1ae88d125762433d2df40e8365e18ea6c79448fa597424294f28c449f46e7570e4a6342ef37ec17c67d219d806b3e8747a3 WHIRLPOOL 89828d7e3214ded7455103c90a0ec92940ab8249f2918f6cc8ccfa7096266fa4668fb3972eb489b9c852a9c1e3e7ed46115c95b1671d3cef0e0a5c95d2f4af41
MISC metadata.xml 2440 SHA256 98874315e8480a14f26b8395eb2573b85dbe402a8bb30a72aa2cc884bc0512a2 SHA512 47237a5fd95a9c58b1857b27da2558ecf46266630eeb7514db2f276f0a8c82a0751122d71a27b4949a1a66df75bbe9e5a833b1f12a86214614e6777849d4c5d8 WHIRLPOOL 5742264ad29f82e98a96044efb74fb230e7a8cc4d58ad569676e8ffc9a86873d5148de86e8a101a11ee465e204cae47f1ec8d50ba8a8c0d75070cb705a03eef8
diff --git a/media-libs/mesa/files/mesa-17-missing-fcntl_h.patch b/media-libs/mesa/files/mesa-17-missing-fcntl_h.patch
new file mode 100644
index 0000000..b0cfa84
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-missing-fcntl_h.patch
@@ -0,0 +1,11 @@
+diff -Naur mesa-17.1.0-rc4.orig/src/util/rand_xor.c mesa-17.1.0-rc4/src/util/rand_xor.c
+--- mesa-17.1.0-rc4.orig/src/util/rand_xor.c 2017-05-08 23:04:16.742060503 -0700
++++ mesa-17.1.0-rc4/src/util/rand_xor.c 2017-05-08 23:04:52.664702908 -0700
+@@ -25,6 +25,7 @@
+ #if defined(__linux__)
+ #include <sys/file.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ #else
+ #include <time.h>
+ #endif
diff --git a/media-libs/mesa/mesa-17.1.0_rc4.ebuild b/media-libs/mesa/mesa-17.1.0_rc4.ebuild
index 58baa66..745b660 100644
--- a/media-libs/mesa/mesa-17.1.0_rc4.ebuild
+++ b/media-libs/mesa/mesa-17.1.0_rc4.ebuild
@@ -200,6 +200,7 @@ pkg_setup() {
src_prepare() {
eapply "${FILESDIR}"/${PN}-11-execinfo.patch
eapply "${FILESDIR}"/${PN}-13-musl_endian.patch
+ eapply "${FILESDIR}"/${PN}-17-missing-fcntl_h.patch
eautoreconf
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2017-12-11 22:29 Aric Belsito
0 siblings, 0 replies; 21+ messages in thread
From: Aric Belsito @ 2017-12-11 22:29 UTC (permalink / raw
To: gentoo-commits
commit: 9322efe89c8b65579c2216ec96978dd5ad608753
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Mon Dec 11 22:29:23 2017 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Mon Dec 11 22:29:23 2017 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=9322efe8
media-libs/mesa: fix patch
media-libs/mesa/files/mesa-17-execinfo.patch | 77 ++++++++++++++++++++++++++++
media-libs/mesa/mesa-17.3.0.ebuild | 2 +-
2 files changed, 78 insertions(+), 1 deletion(-)
diff --git a/media-libs/mesa/files/mesa-17-execinfo.patch b/media-libs/mesa/files/mesa-17-execinfo.patch
new file mode 100644
index 0000000..87b2ce6
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-execinfo.patch
@@ -0,0 +1,77 @@
+diff -Naur mesa-17.3.0.orig/configure.ac mesa-17.3.0/configure.ac
+--- mesa-17.3.0.orig/configure.ac 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/configure.ac 2017-12-11 14:11:53.587811247 -0800
+@@ -794,6 +794,7 @@
+ AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
+ AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
+ AC_CHECK_FUNC([memfd_create], [DEFINES="$DEFINES -DHAVE_MEMFD_CREATE"])
++AC_CHECK_HEADER([execinfo.h], [DEFINES="$DEFINES -DHAVE_EXECINFO_H"])
+
+ AC_MSG_CHECKING([whether strtod has locale support])
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
+diff -Naur mesa-17.3.0.orig/src/gallium/auxiliary/util/u_debug_symbol.c mesa-17.3.0/src/gallium/auxiliary/util/u_debug_symbol.c
+--- mesa-17.3.0.orig/src/gallium/auxiliary/util/u_debug_symbol.c 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/gallium/auxiliary/util/u_debug_symbol.c 2017-12-11 14:13:52.780809112 -0800
+@@ -219,7 +219,7 @@
+ #endif /* PIPE_OS_WINDOWS */
+
+
+-#if defined(__GLIBC__) && !defined(__UCLIBC__)
++#if defined(HAVE_EXECINFO_H)
+
+ #include <execinfo.h>
+
+@@ -240,7 +240,7 @@
+ return TRUE;
+ }
+
+-#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */
++#endif /* defined(HAVE_EXECINFO_H) */
+
+
+ void
+@@ -252,7 +252,7 @@
+ }
+ #endif
+
+-#if defined(__GLIBC__) && !defined(__UCLIBC__)
++#if defined(HAVE_EXECINFO_H)
+ if (debug_symbol_name_glibc(addr, buf, size)) {
+ return;
+ }
+diff -Naur mesa-17.3.0.orig/src/mapi/glapi/gen/gl_gentable.py mesa-17.3.0/src/mapi/glapi/gen/gl_gentable.py
+--- mesa-17.3.0.orig/src/mapi/glapi/gen/gl_gentable.py 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/mapi/glapi/gen/gl_gentable.py 2017-12-11 14:11:53.587811247 -0800
+@@ -43,7 +43,7 @@
+ #endif
+
+ #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
+- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
++ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
+ #define USE_BACKTRACE
+ #endif
+
+diff -Naur mesa-17.3.0.orig/src/mapi/glapi/glapi_gentable.c mesa-17.3.0/src/mapi/glapi/glapi_gentable.c
+--- mesa-17.3.0.orig/src/mapi/glapi/glapi_gentable.c 2017-12-08 05:49:45.000000000 -0800
++++ mesa-17.3.0/src/mapi/glapi/glapi_gentable.c 2017-12-11 14:11:53.588811247 -0800
+@@ -36,7 +36,7 @@
+ #endif
+
+ #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \
+- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
++ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
+ #define USE_BACKTRACE
+ #endif
+
+diff -Naur mesa-17.3.0.orig/src/mesa/drivers/dri/i915/intel_regions.c mesa-17.3.0/src/mesa/drivers/dri/i915/intel_regions.c
+--- mesa-17.3.0.orig/src/mesa/drivers/dri/i915/intel_regions.c 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/mesa/drivers/dri/i915/intel_regions.c 2017-12-11 14:11:53.588811247 -0800
+@@ -57,7 +57,7 @@
+ */
+ #define DEBUG_BACKTRACE_SIZE 0
+
+-#if DEBUG_BACKTRACE_SIZE == 0
++#if DEBUG_BACKTRACE_SIZE == 0 || !defined(HAVE_EXECINFO_H)
+ /* Use the standard debug output */
+ #define _DBG(...) DBG(__VA_ARGS__)
+ #else
diff --git a/media-libs/mesa/mesa-17.3.0.ebuild b/media-libs/mesa/mesa-17.3.0.ebuild
index 1513134..49ae075 100644
--- a/media-libs/mesa/mesa-17.3.0.ebuild
+++ b/media-libs/mesa/mesa-17.3.0.ebuild
@@ -280,7 +280,7 @@ pkg_setup() {
}
src_prepare() {
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch
+ eapply "${FILESDIR}"/${PN}-17-execinfo.patch
eapply "${FILESDIR}"/${PN}-13-musl_endian.patch
eautoreconf
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2017-12-13 0:50 Aric Belsito
0 siblings, 0 replies; 21+ messages in thread
From: Aric Belsito @ 2017-12-13 0:50 UTC (permalink / raw
To: gentoo-commits
commit: 2508a62f0eb80f2c60e8fa5a9c461c3431348778
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Dec 13 00:50:10 2017 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Dec 13 00:50:10 2017 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=2508a62f
media-libs/mesa: add more musl compat patches
.../mesa/files/mesa-17-musl-invocation_name.patch | 47 ++++++++++++++++
media-libs/mesa/files/mesa-17-musl-pthread.patch | 49 +++++++++++++++++
media-libs/mesa/files/mesa-17-musl-string_h.patch | 63 ++++++++++++++++++++++
media-libs/mesa/mesa-17.3.0.ebuild | 5 +-
4 files changed, 163 insertions(+), 1 deletion(-)
diff --git a/media-libs/mesa/files/mesa-17-musl-invocation_name.patch b/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
new file mode 100644
index 0000000..80b02f5
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
@@ -0,0 +1,47 @@
+diff -Naur mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c mesa-17.3.0/src/gallium/auxiliary/os/os_process.c
+--- mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/gallium/auxiliary/os/os_process.c 2017-12-11 14:24:35.200797607 -0800
+@@ -32,7 +32,7 @@
+
+ #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ # include <windows.h>
+-#elif defined(__GLIBC__) || defined(__CYGWIN__)
++#elif defined(__linux__) || defined(__CYGWIN__)
+ # include <errno.h>
+ #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
+ # include <stdlib.h>
+@@ -84,7 +84,7 @@
+
+ name = lpProcessName;
+
+-#elif defined(__GLIBC__) || defined(__CYGWIN__)
++#elif defined(__linux__) || defined(__CYGWIN__)
+ name = program_invocation_short_name;
+ #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
+ /* *BSD and OS X */
+diff -Naur mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
+--- mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2017-12-11 14:23:35.312798680 -0800
+@@ -84,7 +84,7 @@
+ ret = os_get_process_name(cmdline, 63);
+ if (ret == FALSE)
+ strcpy(cmdline, nstr);
+-#if defined(__GLIBC__) || defined(__CYGWIN__)
++#if defined(__linux__) || defined(__CYGWIN__)
+ if (!strcmp(cmdline, "shader_runner")) {
+ const char *name;
+ /* hack to get better testname */
+diff -Naur mesa-17.3.0.orig/src/util/xmlconfig.c mesa-17.3.0/src/util/xmlconfig.c
+--- mesa-17.3.0.orig/src/util/xmlconfig.c 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/util/xmlconfig.c 2017-12-11 14:22:54.052799419 -0800
+@@ -40,8 +40,8 @@
+
+ #undef GET_PROGRAM_NAME
+
+-#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__)
+-# if !defined(__GLIBC__) || (__GLIBC__ < 2)
++#if defined(__linux__)
++# if defined(__GLIBC__) && (__GLIBC__ < 2)
+ /* These aren't declared in any libc5 header */
+ extern char *program_invocation_name, *program_invocation_short_name;
+ # endif
diff --git a/media-libs/mesa/files/mesa-17-musl-pthread.patch b/media-libs/mesa/files/mesa-17-musl-pthread.patch
new file mode 100644
index 0000000..a488b69
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl-pthread.patch
@@ -0,0 +1,49 @@
+diff -Naur mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c
+--- mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c 2017-12-11 14:24:00.264798233 -0800
+@@ -73,11 +73,8 @@
+ }
+
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
+ if (dbg_flags & DBG_TID)
+ tid = pthread_self();
+-# endif
+ #endif
+
+ if (dbg_flags & flag) {
+diff -Naur mesa-17.3.0.orig/src/util/u_thread.h mesa-17.3.0/src/util/u_thread.h
+--- mesa-17.3.0.orig/src/util/u_thread.h 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/util/u_thread.h 2017-12-11 14:19:54.898802627 -0800
+@@ -34,6 +34,7 @@
+
+ #ifdef HAVE_PTHREAD
+ #include <signal.h>
++#include <sys/prctl.h>
+ #endif
+
+
+@@ -61,10 +62,7 @@
+ static inline void u_thread_setname( const char *name )
+ {
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
+- pthread_setname_np(pthread_self(), name);
+-# endif
++ prctl(PR_SET_NAME, name);
+ #endif
+ (void)name;
+ }
+@@ -92,10 +90,7 @@
+ static inline bool u_thread_is_self(thrd_t thread)
+ {
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
+ return pthread_equal(pthread_self(), thread);
+-# endif
+ #endif
+ return false;
+ }
diff --git a/media-libs/mesa/files/mesa-17-musl-string_h.patch b/media-libs/mesa/files/mesa-17-musl-string_h.patch
new file mode 100644
index 0000000..f3ec9e9
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl-string_h.patch
@@ -0,0 +1,63 @@
+diff -Naur mesa-17.3.0.orig/src/compiler/glsl/glcpp/glcpp-parse.c mesa-17.3.0/src/compiler/glsl/glcpp/glcpp-parse.c
+--- mesa-17.3.0.orig/src/compiler/glsl/glcpp/glcpp-parse.c 2017-12-08 05:49:48.000000000 -0800
++++ mesa-17.3.0/src/compiler/glsl/glcpp/glcpp-parse.c 2017-12-11 14:07:34.299815890 -0800
+@@ -1220,7 +1220,7 @@
+ #if YYERROR_VERBOSE
+
+ # ifndef yystrlen
+-# if defined __GLIBC__ && defined _STRING_H
++# if defined __linux__ && defined _STRING_H
+ # define yystrlen strlen
+ # else
+ /* Return the length of YYSTR. */
+@@ -1236,7 +1236,7 @@
+ # endif
+
+ # ifndef yystpcpy
+-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
++# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
+ # define yystpcpy stpcpy
+ # else
+ /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+diff -Naur mesa-17.3.0.orig/src/compiler/glsl/glsl_parser.cpp mesa-17.3.0/src/compiler/glsl/glsl_parser.cpp
+--- mesa-17.3.0.orig/src/compiler/glsl/glsl_parser.cpp 2017-12-08 05:49:49.000000000 -0800
++++ mesa-17.3.0/src/compiler/glsl/glsl_parser.cpp 2017-12-11 14:07:04.530816423 -0800
+@@ -2815,7 +2815,7 @@
+ #if YYERROR_VERBOSE
+
+ # ifndef yystrlen
+-# if defined __GLIBC__ && defined _STRING_H
++# if defined __linux__ && defined _STRING_H
+ # define yystrlen strlen
+ # else
+ /* Return the length of YYSTR. */
+@@ -2831,7 +2831,7 @@
+ # endif
+
+ # ifndef yystpcpy
+-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
++# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
+ # define yystpcpy stpcpy
+ # else
+ /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+diff -Naur mesa-17.3.0.orig/src/mesa/program/program_parse.tab.c mesa-17.3.0/src/mesa/program/program_parse.tab.c
+--- mesa-17.3.0.orig/src/mesa/program/program_parse.tab.c 2017-12-08 05:49:53.000000000 -0800
++++ mesa-17.3.0/src/mesa/program/program_parse.tab.c 2017-12-11 14:10:08.621813126 -0800
+@@ -1440,7 +1440,7 @@
+ #if YYERROR_VERBOSE
+
+ # ifndef yystrlen
+-# if defined __GLIBC__ && defined _STRING_H
++# if defined __linux__ && defined _STRING_H
+ # define yystrlen strlen
+ # else
+ /* Return the length of YYSTR. */
+@@ -1456,7 +1456,7 @@
+ # endif
+
+ # ifndef yystpcpy
+-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
++# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
+ # define yystpcpy stpcpy
+ # else
+ /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
diff --git a/media-libs/mesa/mesa-17.3.0.ebuild b/media-libs/mesa/mesa-17.3.0.ebuild
index 49ae075..040450c 100644
--- a/media-libs/mesa/mesa-17.3.0.ebuild
+++ b/media-libs/mesa/mesa-17.3.0.ebuild
@@ -280,8 +280,11 @@ pkg_setup() {
}
src_prepare() {
- eapply "${FILESDIR}"/${PN}-17-execinfo.patch
eapply "${FILESDIR}"/${PN}-13-musl_endian.patch
+ eapply "${FILESDIR}"/${PN}-17-execinfo.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-pthread.patch
eautoreconf
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2017-12-29 22:23 Aric Belsito
0 siblings, 0 replies; 21+ messages in thread
From: Aric Belsito @ 2017-12-29 22:23 UTC (permalink / raw
To: gentoo-commits
commit: dfe00c6f1303354d45a20175c606e91b31e6e635
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Fri Dec 29 22:22:52 2017 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Fri Dec 29 22:22:52 2017 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=dfe00c6f
media-libs/mesa: bump musl_endian patch
Close #74
media-libs/mesa/files/mesa-17-musl_endian.patch | 12 ++++++++++++
media-libs/mesa/mesa-17.3.1.ebuild | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/media-libs/mesa/files/mesa-17-musl_endian.patch b/media-libs/mesa/files/mesa-17-musl_endian.patch
new file mode 100644
index 0000000..74e3d1d
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl_endian.patch
@@ -0,0 +1,12 @@
+diff -Naur mesa-17.3.1.orig/src/util/u_endian.h mesa-17.3.1/src/util/u_endian.h
+--- mesa-17.3.1.orig/src/util/u_endian.h 2017-12-29 14:19:33.532915798 -0800
++++ mesa-17.3.1/src/util/u_endian.h 2017-12-29 14:21:55.547913255 -0800
+@@ -27,7 +27,7 @@
+ #ifndef U_ENDIAN_H
+ #define U_ENDIAN_H
+
+-#if defined(__GLIBC__) || defined(ANDROID) || defined(__CYGWIN__)
++#if defined(__linux__) || defined(__CYGWIN__)
+ #include <endian.h>
+
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/media-libs/mesa/mesa-17.3.1.ebuild b/media-libs/mesa/mesa-17.3.1.ebuild
index 040450c..de726e6 100644
--- a/media-libs/mesa/mesa-17.3.1.ebuild
+++ b/media-libs/mesa/mesa-17.3.1.ebuild
@@ -280,7 +280,7 @@ pkg_setup() {
}
src_prepare() {
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch
+ eapply "${FILESDIR}"/${PN}-17-musl_endian.patch
eapply "${FILESDIR}"/${PN}-17-execinfo.patch
eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2018-01-24 21:25 Aric Belsito
0 siblings, 0 replies; 21+ messages in thread
From: Aric Belsito @ 2018-01-24 21:25 UTC (permalink / raw
To: gentoo-commits
commit: 8cb070d72b53b42298e2652bbe85343412775266
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Jan 24 21:24:50 2018 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Jan 24 21:24:50 2018 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=8cb070d7
media-libs/mesa: bump pthread patch
media-libs/mesa/files/mesa-18-musl-pthread.patch | 40 ++++++++++++++++++++++++
media-libs/mesa/mesa-18.0.0_rc2.ebuild | 2 +-
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/media-libs/mesa/files/mesa-18-musl-pthread.patch b/media-libs/mesa/files/mesa-18-musl-pthread.patch
new file mode 100644
index 0000000..2db1667
--- /dev/null
+++ b/media-libs/mesa/files/mesa-18-musl-pthread.patch
@@ -0,0 +1,40 @@
+diff -Naur mesa-18.0.0-rc2.orig/src/gallium/state_trackers/nine/nine_debug.c mesa-18.0.0-rc2/src/gallium/state_trackers/nine/nine_debug.c
+--- mesa-18.0.0-rc2.orig/src/gallium/state_trackers/nine/nine_debug.c 2018-01-24 13:20:13.287944874 -0800
++++ mesa-18.0.0-rc2/src/gallium/state_trackers/nine/nine_debug.c 2018-01-24 13:23:34.722941267 -0800
+@@ -73,8 +73,8 @@
+ }
+
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
++# if defined(__linux__) && !(defined(__GLIBC__) || \
++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
+ if (dbg_flags & DBG_TID)
+ tid = pthread_self();
+ # endif
+diff -Naur mesa-18.0.0-rc2.orig/src/util/u_thread.h mesa-18.0.0-rc2/src/util/u_thread.h
+--- mesa-18.0.0-rc2.orig/src/util/u_thread.h 2018-01-24 13:20:13.166944876 -0800
++++ mesa-18.0.0-rc2/src/util/u_thread.h 2018-01-24 13:24:11.028940616 -0800
+@@ -61,9 +61,8 @@
+ static inline void u_thread_setname( const char *name )
+ {
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
+- defined(__linux__)
++# if defined(__linux__) && !(defined(__GLIBC__) || \
++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
+ pthread_setname_np(pthread_self(), name);
+ # endif
+ #endif
+@@ -93,8 +92,8 @@
+ static inline bool u_thread_is_self(thrd_t thread)
+ {
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
++# if defined(__linux__) && !(defined(__GLIBC__) || \
++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
+ return pthread_equal(pthread_self(), thread);
+ # endif
+ #endif
diff --git a/media-libs/mesa/mesa-18.0.0_rc2.ebuild b/media-libs/mesa/mesa-18.0.0_rc2.ebuild
index a7bad53..4d4f517 100644
--- a/media-libs/mesa/mesa-18.0.0_rc2.ebuild
+++ b/media-libs/mesa/mesa-18.0.0_rc2.ebuild
@@ -285,7 +285,7 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-17-execinfo.patch
eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
- eapply "${FILESDIR}"/${PN}-17-musl-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
eautoreconf
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2018-07-08 21:58 Anthony G. Basile
0 siblings, 0 replies; 21+ messages in thread
From: Anthony G. Basile @ 2018-07-08 21:58 UTC (permalink / raw
To: gentoo-commits
commit: 9be4742d110d4699529517678273c18a68b3fb8e
Author: Jari Ronkainen <ronchaine <AT> gmail <DOT> com>
AuthorDate: Sun Jul 8 20:48:21 2018 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Jul 8 21:58:19 2018 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=9be4742d
Fix compiling radv: add missing #include <pthread.h>
.../mesa/files/mesa-18-musl-amdgpu-include-pthread.patch | 11 +++++++++++
media-libs/mesa/mesa-18.0.5.ebuild | 1 +
media-libs/mesa/mesa-18.1.1.ebuild | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/media-libs/mesa/files/mesa-18-musl-amdgpu-include-pthread.patch b/media-libs/mesa/files/mesa-18-musl-amdgpu-include-pthread.patch
new file mode 100644
index 0000000..7a0bde0
--- /dev/null
+++ b/media-libs/mesa/files/mesa-18-musl-amdgpu-include-pthread.patch
@@ -0,0 +1,11 @@
+diff -Naur mesa-18.1.3-orig/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h mesa-18.1.3/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+--- mesa-18.1.3-orig/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h 2018-07-08 22:01:10.758633781 +0300
++++ mesa-18.1.3/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h 2018-07-08 22:01:30.097631709 +0300
+@@ -32,6 +32,7 @@
+ #include "ac_gpu_info.h"
+ #include "addrlib/addrinterface.h"
+ #include <amdgpu.h>
++#include <pthread.h>
+ #include "util/list.h"
+
+ struct radv_amdgpu_winsys {
diff --git a/media-libs/mesa/mesa-18.0.5.ebuild b/media-libs/mesa/mesa-18.0.5.ebuild
index 24be0c0..173896a 100644
--- a/media-libs/mesa/mesa-18.0.5.ebuild
+++ b/media-libs/mesa/mesa-18.0.5.ebuild
@@ -274,6 +274,7 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
eautoreconf
diff --git a/media-libs/mesa/mesa-18.1.1.ebuild b/media-libs/mesa/mesa-18.1.1.ebuild
index 60501fc..2d6e3c7 100644
--- a/media-libs/mesa/mesa-18.1.1.ebuild
+++ b/media-libs/mesa/mesa-18.1.1.ebuild
@@ -275,7 +275,7 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
-
+ eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
eautoreconf
eapply_user
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2018-10-05 0:12 Anthony G. Basile
0 siblings, 0 replies; 21+ messages in thread
From: Anthony G. Basile @ 2018-10-05 0:12 UTC (permalink / raw
To: gentoo-commits
commit: dd04544dfaa4439e9e7b9e430a7d1f3012695c12
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 5 00:12:36 2018 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Oct 5 00:12:36 2018 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=dd04544d
media-libs/mesa: add version 18.2.1
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.10
media-libs/mesa/Manifest | 1 +
.../mesa/files/mesa-18-musl-invocation_name.patch | 12 +
media-libs/mesa/mesa-18.2.1.ebuild | 558 +++++++++++++++++++++
3 files changed, 571 insertions(+)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 267d401..8fedaa2 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,2 +1,3 @@
DIST mesa-18.1.6.tar.xz 11142884 BLAKE2B fdd156fe7debf5223285dfa238070a2bd7d8ec684dec168afab78b9d2d38d53c10d939aaa64f34c2910e542dce3869adfca6383fca6a854c6dd03287a044b0e3 SHA512 2966210800215f5ced2720691063a8519b51ebeab9fb1e99bde4b1bd7ccc719d6395a1c29f25c88efe62d1592cf14ceafc163aca349490b1f8cee81070d46fcc
DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa3600de78585487fb8e178c6987a72b79fb56e6c310757d157f9f85f12b73a6889bd361b51b62fb1dc1c20eecd SHA512 22db2950d25a3d9393e7c622c783bd177c21695569c8a95683bf77e92318e1db85672a134d4bea30c1f49a24e52bc3a2c1a0ac15deafb3a8fcbfb6de6a18adc2
+DIST mesa-18.2.1.tar.xz 11374476 BLAKE2B f0f3b766d68550f8c395a1b1d1ffc7a9e532c22ee6b91d698db33a270c152e03ab656d4219301bc2e0e95ba6f0583017c4361add928ad8ab26378a1ec6958f36 SHA512 d249bdf79aad36db9a8d291b3a1a100d283893ac741f58f85ae7e5c90ca25c37f80a5fa6fc57945ffeb0b67b788e7ea146543ec790b22f144578fc4c1525b84d
diff --git a/media-libs/mesa/files/mesa-18-musl-invocation_name.patch b/media-libs/mesa/files/mesa-18-musl-invocation_name.patch
new file mode 100644
index 0000000..f591d47
--- /dev/null
+++ b/media-libs/mesa/files/mesa-18-musl-invocation_name.patch
@@ -0,0 +1,12 @@
+diff -Naur mesa-18.2.1.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c mesa-18.2.1/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
+--- mesa-18.2.1.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2018-09-21 06:57:00.000000000 -0400
++++ mesa-18.2.1/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2018-10-04 20:06:47.074806047 -0400
+@@ -84,7 +84,7 @@
+ ret = os_get_process_name(cmdline, 63);
+ if (ret == FALSE)
+ strcpy(cmdline, nstr);
+-#if defined(__GLIBC__) || defined(__CYGWIN__)
++#if defined(__linux__) || defined(__CYGWIN__)
+ if (!strcmp(cmdline, "shader_runner")) {
+ const char *name;
+ /* hack to get better testname */
diff --git a/media-libs/mesa/mesa-18.2.1.ebuild b/media-libs/mesa/mesa-18.2.1.ebuild
new file mode 100644
index 0000000..e128919
--- /dev/null
+++ b/media-libs/mesa/mesa-18.2.1.ebuild
@@ -0,0 +1,558 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit llvm meson multilib-minimal pax-utils python-any-r1
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+ EXPERIMENTAL="true"
+ inherit git-r3
+else
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="
+ !test? ( test )
+"
+
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau 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 +llvm lm_sensors
+ opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
+ vulkan wayland xa xvmc"
+
+REQUIRED_USE="
+ d3d9? ( dri3 )
+ gles1? ( egl )
+ gles2? ( egl )
+ vulkan? ( dri3
+ || ( video_cards_i965 video_cards_radeonsi )
+ video_cards_radeonsi? ( llvm ) )
+ wayland? ( egl gbm )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_imx? ( gallium video_cards_vivante )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium )
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vc4? ( gallium )
+ video_cards_virgl? ( gallium )
+ video_cards_vivante? ( gallium gbm )
+ video_cards_vmware? ( gallium )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
+RDEPEND="
+ !app-eselect/eselect-mesa
+ >=app-eselect/eselect-opengl-1.3.0
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ gallium? (
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ )
+ lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
+ )
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ )
+ wayland? (
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+"
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+RDEPEND="${RDEPEND}
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
+"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more slot
+# simultaneously.
+#
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 7.
+# 3. Specify LLVM_MAX_SLOT, e.g. 6.
+LLVM_MAX_SLOT="7"
+LLVM_DEPSTR="
+ || (
+ sys-devel/llvm:7[${MULTILIB_USEDEP}]
+ sys-devel/llvm:6[${MULTILIB_USEDEP}]
+ sys-devel/llvm:5[${MULTILIB_USEDEP}]
+ sys-devel/llvm:4[${MULTILIB_USEDEP}]
+ >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
+ )
+ sys-devel/llvm:=[${MULTILIB_USEDEP}]
+"
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+RDEPEND="${RDEPEND}
+ llvm? (
+ opencl? (
+ video_cards_r600? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${CLANG_DEPSTR}
+ )
+ )
+ )
+ )
+ !opencl? (
+ video_cards_r600? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${LLVM_DEPSTR}
+ )
+ )
+ )
+ )
+ )
+"
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ opencl? (
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/bison
+ sys-devel/flex
+ sys-devel/gettext
+ virtual/pkgconfig
+ valgrind? ( dev-util/valgrind )
+ x11-base/xorg-proto
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ !pic? (
+ usr/lib*/libglapi.so.0.0.0
+ usr/lib*/libGLESv1_CM.so.1.0.0
+ usr/lib*/libGLESv2.so.2.0.0
+ usr/lib*/libGL.so.1.2.0
+ usr/lib*/libOSMesa.so.8.0.0
+ )
+)"
+
+llvm_check_deps() {
+ local flags=${MULTILIB_USEDEP}
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+ then
+ flags+=",llvm_targets_AMDGPU(-)"
+ fi
+
+ if use opencl; then
+ has_version "sys-devel/clang[${flags}]" || return 1
+ fi
+ has_version "sys-devel/llvm[${flags}]"
+}
+
+pkg_pretend() {
+ if use d3d9; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
+ fi
+ fi
+
+ if use opencl; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_radeonsi; then
+ ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
+ fi
+ fi
+
+ if use vaapi; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
+ fi
+ fi
+
+ if use vdpau; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
+ fi
+ fi
+
+ if use xa; then
+ if ! use video_cards_freedreno &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
+ fi
+ fi
+
+ if use xvmc; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
+ fi
+ fi
+
+ if ! use gallium; then
+ use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
+ use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
+ use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
+ use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
+ use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
+ use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
+ use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
+ use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
+ fi
+
+ if ! use llvm; then
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
+ fi
+}
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ if use llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-17-execinfo.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ #eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
+ eapply_user
+}
+
+multilib_src_configure() {
+ local emesonargs=()
+
+ if use classic; then
+ # Intel code
+ dri_driver_enable video_cards_i915 i915
+ dri_driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ dri_driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ dri_driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ dri_driver_enable video_cards_r100 r100
+ dri_driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ dri_driver_enable video_cards_radeon r100 r200
+ fi
+ fi
+
+ emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
+
+ if use gallium; then
+ emesonargs+=(
+ $(meson_use llvm)
+ $(meson_use lm_sensors lmsensors)
+ $(meson_use unwind libunwind)
+ )
+
+ if use video_cards_r300 ||
+ use video_cards_r600 ||
+ use video_cards_radeonsi ||
+ use video_cards_nouveau ||
+ use video_cards_vmware; then
+ emesonargs+=($(meson_use d3d9 gallium-nine))
+ else
+ emesonargs+=(-Dgallium-nine=false)
+ fi
+
+ if use video_cards_r600 ||
+ use video_cards_radeonsi ||
+ use video_cards_nouveau; then
+ emesonargs+=($(meson_use vaapi gallium-va))
+ use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
+ else
+ emesonargs+=(-Dgallium-va=false)
+ 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))
+ else
+ emesonargs+=(-Dgallium-vdpau=false)
+ fi
+
+ if use video_cards_freedreno ||
+ use video_cards_nouveau ||
+ use video_cards_vmware; then
+ emesonargs+=($(meson_use xa gallium-xa))
+ else
+ emesonargs+=(-Dgallium-xa=false)
+ fi
+
+ if use video_cards_r600 ||
+ use video_cards_nouveau; then
+ emesonargs+=($(meson_use xvmc gallium-xvmc))
+ else
+ emesonargs+=(-Dgallium-xvmc=false)
+ fi
+
+ 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 video_cards_imx imx
+
+ # Only one i915 driver (classic vs gallium). Default to classic.
+ if ! use classic; then
+ gallium_enable video_cards_i915 i915
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ emesonargs+=(
+ -Dgallium-opencl="$(usex opencl standalone disabled)"
+ )
+ fi
+
+ gallium_enable video_cards_virgl virgl
+ fi
+
+ if use vulkan; then
+ vulkan_enable video_cards_i965 intel
+ 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
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ emesonargs+=( -Dasm=false )
+ fi
+
+ if use gallium; then
+ gallium_enable -- swrast
+ emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
+ else
+ dri_driver_enable -- swrast
+ emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
+ fi
+
+ driver_list() {
+ local drivers="$(sort -u <<< "${1// /$'\n'}")"
+ echo "${drivers//$'\n'/,}"
+ }
+
+ emesonargs+=(
+ $(meson_use test build-tests)
+ -Dglx=dri
+ -Dshared-glapi=true
+ $(meson_use dri3)
+ $(meson_use egl)
+ $(meson_use gbm)
+ $(meson_use gles1)
+ $(meson_use gles2)
+ $(meson_use selinux)
+ -Dvalgrind=$(usex valgrind auto false)
+ -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
+ -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
+ -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
+ --buildtype $(usex debug debug plain)
+ -Db_ndebug=$(usex debug false true)
+ )
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ meson_src_compile
+}
+
+multilib_src_install() {
+ meson_src_install
+
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+}
+
+multilib_src_test() {
+ meson_src_test
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+}
+
+# $1 - VIDEO_CARDS flag (check skipped for "--")
+# other args - names of DRI drivers to enable
+dri_driver_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ DRI_DRIVERS+=("$@")
+ fi
+}
+
+gallium_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ GALLIUM_DRIVERS+=("$@")
+ fi
+}
+
+vulkan_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ VULKAN_DRIVERS+=("$@")
+ fi
+}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2018-10-29 11:48 Anthony G. Basile
0 siblings, 0 replies; 21+ messages in thread
From: Anthony G. Basile @ 2018-10-29 11:48 UTC (permalink / raw
To: gentoo-commits
commit: 5c0caeaae7e3e7be707d561b847fa52603fd5253
Author: callmetango <callmetango <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Sat Aug 25 11:52:07 2018 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Oct 29 11:48:16 2018 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=5c0caeaa
media-libs/mesa: increased stacksize to prevent segfaults
* increased stacksize to prevent segfaults as suggested by https://github.com/alpinelinux/aports/pull/4847
.../mesa/files/mesa-18-musl-larger-stacksize.patch | 52 ++
media-libs/mesa/mesa-18.1.6-r1.ebuild | 547 +++++++++++++++++++++
2 files changed, 599 insertions(+)
diff --git a/media-libs/mesa/files/mesa-18-musl-larger-stacksize.patch b/media-libs/mesa/files/mesa-18-musl-larger-stacksize.patch
new file mode 100644
index 0000000..cfc3bc5
--- /dev/null
+++ b/media-libs/mesa/files/mesa-18-musl-larger-stacksize.patch
@@ -0,0 +1,52 @@
+# [main/mesa: use larger stack size for new threads #4847](https://github.com/alpinelinux/aports/pull/4847)
+
+[prspkt (prspkt) · GitHub](https://github.com/prspkt) commented
+2018-07-25T12:34:00Z
+
+Since the introduction of the mesa 18.1.* series, applications that use OpenGL
+have been consistently segfaulting. I can locally reproduce using
+`community/mpv` for video playback. This has also been discovered
+[here](https://github.com/gentoo/musl/issues/136) and the
+[patch](https://github.com/void-linux/void-packages/blob/18838a6cd6b00b1d309d6cc712b7d54660597221/srcpkgs/libGL/patches/musl-stacksize.patch)
+was imported after following a discussion
+[here](https://github.com/void-linux/void-packages/issues/933).
+
+Increasing the stacksise consistently fixes the issue.
+
+## References
+
+[Segfaults with mesa-18.1.0_rc* · Issue #136 · gentoo/musl · GitHub](https://github.com/gentoo/musl/issues/136)
+[RetroArch segfaults after recent update of various gfx libraries: mesa-ati-dri, libGL, etc. · Issue #933 · void-linux/void-packages · GitHub](https://github.com/void-linux/void-packages/issues/933)
+
+--- a/include/c11/threads_posix.h
++++ b/include/c11/threads_posix.h
+@@ -281,15 +281,29 @@ static inline int
+ thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
+ {
+ struct impl_thrd_param *pack;
++#ifdef __GLIBC__
++ pthread_attr_t *attrp = NULL;
++#else
++ pthread_attr_t attr = { 0 };
++ pthread_attr_init(&attr);
++ pthread_attr_setstacksize(&attr, 8388608);
++ pthread_attr_t *attrp = &attr;
++#endif
+ assert(thr != NULL);
+ pack = (struct impl_thrd_param *)malloc(sizeof(struct impl_thrd_param));
+ if (!pack) return thrd_nomem;
+ pack->func = func;
+ pack->arg = arg;
+- if (pthread_create(thr, NULL, impl_thrd_routine, pack) != 0) {
++ if (pthread_create(thr, attrp, impl_thrd_routine, pack) != 0) {
++#ifndef __GLIBC__
++ pthread_attr_destroy(&attr);
++#endif
+ free(pack);
+ return thrd_error;
+ }
++#ifndef __GLIBC__
++ pthread_attr_destroy(&attr);
++#endif
+ return thrd_success;
+ }
diff --git a/media-libs/mesa/mesa-18.1.6-r1.ebuild b/media-libs/mesa/mesa-18.1.6-r1.ebuild
new file mode 100644
index 0000000..134fcaf
--- /dev/null
+++ b/media-libs/mesa/mesa-18.1.6-r1.ebuild
@@ -0,0 +1,547 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+
+if [[ ${PV} = 9999 ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+if [[ $PV == 9999 ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="!bindist? ( bindist )"
+
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
+ +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
+ vdpau vulkan wayland xvmc xa"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
+ video_cards_radeonsi? ( llvm ) )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_imx? ( gallium video_cards_vivante )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium )
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vc4? ( gallium )
+ video_cards_virgl? ( gallium )
+ video_cards_vivante? ( gallium gbm )
+ video_cards_vmware? ( gallium )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
+RDEPEND="
+ !app-eselect/eselect-mesa
+ >=app-eselect/eselect-opengl-1.3.0
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ openmax? (
+ >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
+ x11-misc/xdg-utils
+ )
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
+ )
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ wayland? (
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+"
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+RDEPEND="${RDEPEND}
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
+"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more slot
+# simultaneously.
+#
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 7.
+# 3. Specify LLVM_MAX_SLOT, e.g. 6.
+LLVM_MAX_SLOT="6"
+LLVM_DEPSTR="
+ || (
+ sys-devel/llvm:7[${MULTILIB_USEDEP}]
+ sys-devel/llvm:6[${MULTILIB_USEDEP}]
+ sys-devel/llvm:5[${MULTILIB_USEDEP}]
+ sys-devel/llvm:4[${MULTILIB_USEDEP}]
+ >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
+ )
+ sys-devel/llvm:=[${MULTILIB_USEDEP}]
+"
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+RDEPEND="${RDEPEND}
+ llvm? (
+ opencl? (
+ video_cards_r600? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${CLANG_DEPSTR}
+ )
+ )
+ )
+ )
+ !opencl? (
+ video_cards_r600? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${LLVM_DEPSTR}
+ )
+ )
+ )
+ )
+ )
+"
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ opencl? (
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ valgrind? ( dev-util/valgrind )
+ x11-base/xorg-proto
+ vulkan? (
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+ )
+"
+[[ ${PV} == 9999 ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ !pic? (
+ usr/lib*/libglapi.so.0.0.0
+ usr/lib*/libGLESv1_CM.so.1.1.0
+ usr/lib*/libGLESv2.so.2.0.0
+ usr/lib*/libGL.so.1.2.0
+ usr/lib*/libOSMesa.so.8.0.0
+ )
+)"
+
+llvm_check_deps() {
+ local flags=${MULTILIB_USEDEP}
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+ then
+ flags+=",llvm_targets_AMDGPU(-)"
+ fi
+
+ if use opencl; then
+ has_version "sys-devel/clang[${flags}]" || return 1
+ fi
+ has_version "sys-devel/llvm[${flags}]"
+}
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ if use llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-17-execinfo.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-larger-stacksize.patch
+ eapply_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm)
+ $(use_enable openmax omx-bellagio)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
+
+ gallium_enable swrast
+ 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 video_cards_i915 i915
+ gallium_enable video_cards_imx imx
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+
+ gallium_enable video_cards_virgl virgl
+ fi
+
+ if use vulkan; then
+ vulkan_enable video_cards_i965 intel
+ vulkan_enable video_cards_radeonsi radeon
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if [[ ${ABI} == x86 ]]; then
+ myconf+=" $(use_enable pax_kernel glx-read-only-text)"
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ if use gallium; then
+ myconf+=" $(use_enable osmesa gallium-osmesa)"
+ else
+ myconf+=" $(use_enable osmesa)"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable unwind libunwind) \
+ --enable-valgrind=$(usex valgrind auto no) \
+ --enable-llvm-shared-libs \
+ --disable-opencl-icd \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ --with-vulkan-drivers=${VULKAN_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use wayland; then
+ # These files are now provided by >=dev-libs/wayland-1.15.0
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
+ rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
+ fi
+
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name '*.la' -delete
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
+ elog "explanation."
+ fi
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+vulkan_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ VULKAN_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ VULKAN_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2018-11-09 13:16 Anthony G. Basile
0 siblings, 0 replies; 21+ messages in thread
From: Anthony G. Basile @ 2018-11-09 13:16 UTC (permalink / raw
To: gentoo-commits
commit: d49eaf79ff42b263d090dc0ae475a94178e526a7
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 9 13:16:30 2018 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Nov 9 13:16:30 2018 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=d49eaf79
media-libs/mesa: sync with upstream
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
media-libs/mesa/Manifest | 1 +
...2.4-meson-link-gallium-nine-with-pthreads.patch | 34 ++
media-libs/mesa/mesa-18.2.4.ebuild | 535 +++++++++++++++++++++
3 files changed, 570 insertions(+)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 8fedaa2..2e5ff61 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,3 +1,4 @@
DIST mesa-18.1.6.tar.xz 11142884 BLAKE2B fdd156fe7debf5223285dfa238070a2bd7d8ec684dec168afab78b9d2d38d53c10d939aaa64f34c2910e542dce3869adfca6383fca6a854c6dd03287a044b0e3 SHA512 2966210800215f5ced2720691063a8519b51ebeab9fb1e99bde4b1bd7ccc719d6395a1c29f25c88efe62d1592cf14ceafc163aca349490b1f8cee81070d46fcc
DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa3600de78585487fb8e178c6987a72b79fb56e6c310757d157f9f85f12b73a6889bd361b51b62fb1dc1c20eecd SHA512 22db2950d25a3d9393e7c622c783bd177c21695569c8a95683bf77e92318e1db85672a134d4bea30c1f49a24e52bc3a2c1a0ac15deafb3a8fcbfb6de6a18adc2
DIST mesa-18.2.1.tar.xz 11374476 BLAKE2B f0f3b766d68550f8c395a1b1d1ffc7a9e532c22ee6b91d698db33a270c152e03ab656d4219301bc2e0e95ba6f0583017c4361add928ad8ab26378a1ec6958f36 SHA512 d249bdf79aad36db9a8d291b3a1a100d283893ac741f58f85ae7e5c90ca25c37f80a5fa6fc57945ffeb0b67b788e7ea146543ec790b22f144578fc4c1525b84d
+DIST mesa-18.2.4.tar.xz 11377556 BLAKE2B b11c33ade744fb976862fecccbcc4c97196a005e40a00ef02bd8d409b66b3aa11f97baee13f2aa92f2d7c5461b2ef44beae3103687dea9ee29e92439a068f08a SHA512 088d43b087f4005752e4db75eaa6897e0fcb6de7b9a1f2d2b2ce3b5557d1dff829022e0092e8b1038ff01182c863ca0f26c97b9adde34bca462d3fa24502bfde
diff --git a/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch b/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch
new file mode 100644
index 0000000..11d4f9c
--- /dev/null
+++ b/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch
@@ -0,0 +1,34 @@
+From 7652931d33b36c93b2e84713baa8c283d568402e Mon Sep 17 00:00:00 2001
+From: Dylan Baker <dylan@pnwbakers.com>
+Date: Thu, 1 Nov 2018 14:12:57 -0700
+Subject: [PATCH] meson: link gallium nine with pthreads
+
+In some cases (not building with llvm, which automatically pulls in
+pthreads) nine needs to be directly linked with pthreads. Fixes building
+on x86 (32 bit) without llvm.
+
+Distro bug: https://bugs.gentoo.org/670094
+Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3
+ ("meson: build gallium nine state_tracker")
+Tested-by: Rafal Lalik <rafallalik@gmail.com>
+Reviewed-by: Matt Turner <mattst88@gmail.com>
+---
+ src/gallium/targets/d3dadapter9/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/targets/d3dadapter9/meson.build b/src/gallium/targets/d3dadapter9/meson.build
+index bd05b4f9692..bc72b1110a0 100644
+--- a/src/gallium/targets/d3dadapter9/meson.build
++++ b/src/gallium/targets/d3dadapter9/meson.build
+@@ -53,7 +53,7 @@ libgallium_nine = shared_library(
+ libswkmsdri,
+ ],
+ dependencies : [
+- dep_selinux, dep_expat, dep_libdrm, dep_llvm,
++ dep_selinux, dep_expat, dep_libdrm, dep_llvm, dep_thread,
+ driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
+ driver_i915, driver_svga,
+ ],
+--
+2.16.4
+
diff --git a/media-libs/mesa/mesa-18.2.4.ebuild b/media-libs/mesa/mesa-18.2.4.ebuild
new file mode 100644
index 0000000..ab4c917
--- /dev/null
+++ b/media-libs/mesa/mesa-18.2.4.ebuild
@@ -0,0 +1,535 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit llvm meson multilib-minimal pax-utils python-any-r1
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+ EXPERIMENTAL="true"
+ inherit git-r3
+else
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="
+ !test? ( test )
+"
+
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau 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 +llvm lm_sensors
+ opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
+ vulkan wayland xa xvmc"
+
+REQUIRED_USE="
+ d3d9? ( dri3 )
+ gles1? ( egl )
+ gles2? ( egl )
+ vulkan? ( dri3
+ || ( video_cards_i965 video_cards_radeonsi )
+ video_cards_radeonsi? ( llvm ) )
+ wayland? ( egl gbm )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_imx? ( gallium video_cards_vivante )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium )
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vc4? ( gallium )
+ video_cards_virgl? ( gallium )
+ video_cards_vivante? ( gallium gbm )
+ video_cards_vmware? ( gallium )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
+RDEPEND="
+ !app-eselect/eselect-mesa
+ >=app-eselect/eselect-opengl-1.3.0
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ gallium? (
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ )
+ lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
+ opencl? (
+ dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
+ )
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ )
+ wayland? (
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+"
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+RDEPEND="${RDEPEND}
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
+"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more slot
+# simultaneously.
+#
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 7.
+# 3. Specify LLVM_MAX_SLOT, e.g. 6.
+LLVM_MAX_SLOT="7"
+LLVM_DEPSTR="
+ || (
+ sys-devel/llvm:7[${MULTILIB_USEDEP}]
+ sys-devel/llvm:6[${MULTILIB_USEDEP}]
+ sys-devel/llvm:5[${MULTILIB_USEDEP}]
+ sys-devel/llvm:4[${MULTILIB_USEDEP}]
+ >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
+ )
+ sys-devel/llvm:=[${MULTILIB_USEDEP}]
+"
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+RDEPEND="${RDEPEND}
+ llvm? (
+ opencl? (
+ video_cards_r600? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${CLANG_DEPSTR}
+ )
+ )
+ )
+ )
+ !opencl? (
+ video_cards_r600? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${LLVM_DEPSTR}
+ )
+ )
+ )
+ )
+ )
+"
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ opencl? (
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/bison
+ sys-devel/flex
+ sys-devel/gettext
+ virtual/pkgconfig
+ valgrind? ( dev-util/valgrind )
+ x11-base/xorg-proto
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ !pic? (
+ usr/lib*/libglapi.so.0.0.0
+ usr/lib*/libGLESv1_CM.so.1.0.0
+ usr/lib*/libGLESv2.so.2.0.0
+ usr/lib*/libGL.so.1.2.0
+ usr/lib*/libOSMesa.so.8.0.0
+ )
+)"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-meson-link-gallium-nine-with-pthreads.patch
+ "${FILESDIR}"/${PN}-17-execinfo.patch
+ "${FILESDIR}"/${PN}-17-musl-string_h.patch
+ "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
+ "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
+)
+
+llvm_check_deps() {
+ local flags=${MULTILIB_USEDEP}
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+ then
+ flags+=",llvm_targets_AMDGPU(-)"
+ fi
+
+ if use opencl; then
+ has_version "sys-devel/clang[${flags}]" || return 1
+ fi
+ has_version "sys-devel/llvm[${flags}]"
+}
+
+pkg_pretend() {
+ if use d3d9; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
+ fi
+ fi
+
+ if use opencl; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_radeonsi; then
+ ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
+ fi
+ fi
+
+ if use vaapi; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
+ fi
+ fi
+
+ if use vdpau; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
+ fi
+ fi
+
+ if use xa; then
+ if ! use video_cards_freedreno &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
+ fi
+ fi
+
+ if use xvmc; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
+ fi
+ fi
+
+ if ! use gallium; then
+ use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
+ use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
+ use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
+ use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
+ use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
+ use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
+ use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
+ use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
+ fi
+
+ if ! use llvm; then
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
+ fi
+}
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ if use llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local emesonargs=()
+
+ if use classic; then
+ # Intel code
+ dri_driver_enable video_cards_i915 i915
+ dri_driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ dri_driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ dri_driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ dri_driver_enable video_cards_r100 r100
+ dri_driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ dri_driver_enable video_cards_radeon r100 r200
+ fi
+ fi
+
+ emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
+
+ if use gallium; then
+ emesonargs+=(
+ $(meson_use llvm)
+ $(meson_use lm_sensors lmsensors)
+ $(meson_use unwind libunwind)
+ )
+
+ if use video_cards_r300 ||
+ use video_cards_r600 ||
+ use video_cards_radeonsi ||
+ use video_cards_nouveau ||
+ use video_cards_vmware; then
+ emesonargs+=($(meson_use d3d9 gallium-nine))
+ else
+ emesonargs+=(-Dgallium-nine=false)
+ fi
+
+ if use video_cards_r600 ||
+ use video_cards_radeonsi ||
+ use video_cards_nouveau; then
+ emesonargs+=($(meson_use vaapi gallium-va))
+ use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
+ else
+ emesonargs+=(-Dgallium-va=false)
+ 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))
+ else
+ emesonargs+=(-Dgallium-vdpau=false)
+ fi
+
+ if use video_cards_freedreno ||
+ use video_cards_nouveau ||
+ use video_cards_vmware; then
+ emesonargs+=($(meson_use xa gallium-xa))
+ else
+ emesonargs+=(-Dgallium-xa=false)
+ fi
+
+ if use video_cards_r600 ||
+ use video_cards_nouveau; then
+ emesonargs+=($(meson_use xvmc gallium-xvmc))
+ else
+ emesonargs+=(-Dgallium-xvmc=false)
+ fi
+
+ 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 video_cards_imx imx
+
+ # Only one i915 driver (classic vs gallium). Default to classic.
+ if ! use classic; then
+ gallium_enable video_cards_i915 i915
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ gallium_enable video_cards_virgl virgl
+
+ # opencl stuff
+ emesonargs+=(
+ -Dgallium-opencl="$(usex opencl icd disabled)"
+ )
+ fi
+
+ if use vulkan; then
+ vulkan_enable video_cards_i965 intel
+ 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
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ emesonargs+=( -Dasm=false )
+ fi
+
+ if use gallium; then
+ gallium_enable -- swrast
+ emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
+ else
+ dri_driver_enable -- swrast
+ emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
+ fi
+
+ driver_list() {
+ local drivers="$(sort -u <<< "${1// /$'\n'}")"
+ echo "${drivers//$'\n'/,}"
+ }
+
+ emesonargs+=(
+ $(meson_use test build-tests)
+ -Dglx=dri
+ -Dshared-glapi=true
+ $(meson_use dri3)
+ $(meson_use egl)
+ $(meson_use gbm)
+ $(meson_use gles1)
+ $(meson_use gles2)
+ $(meson_use selinux)
+ -Dvalgrind=$(usex valgrind auto false)
+ -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
+ -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
+ -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
+ --buildtype $(usex debug debug plain)
+ -Db_ndebug=$(usex debug false true)
+ )
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ meson_src_compile
+}
+
+multilib_src_install() {
+ meson_src_install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+}
+
+multilib_src_test() {
+ meson_src_test
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+}
+
+# $1 - VIDEO_CARDS flag (check skipped for "--")
+# other args - names of DRI drivers to enable
+dri_driver_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ DRI_DRIVERS+=("$@")
+ fi
+}
+
+gallium_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ GALLIUM_DRIVERS+=("$@")
+ fi
+}
+
+vulkan_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ VULKAN_DRIVERS+=("$@")
+ fi
+}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2019-01-23 19:29 Anthony G. Basile
0 siblings, 0 replies; 21+ messages in thread
From: Anthony G. Basile @ 2019-01-23 19:29 UTC (permalink / raw
To: gentoo-commits
commit: 89c1adfdef658652e452c76a8b98931e4a2cf131
Author: stefson <herrtimson <AT> yahoo <DOT> de>
AuthorDate: Sat Jan 19 09:29:57 2019 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Jan 23 19:28:41 2019 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=89c1adfd
media-libs/mesa: revbump and sync with tree
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
media-libs/mesa/Manifest | 5 +-
media-libs/mesa/files/mesa-11-execinfo.patch | 68 ---
media-libs/mesa/files/mesa-13-musl_endian.patch | 12 -
.../mesa/files/mesa-17-musl-invocation_name.patch | 47 --
media-libs/mesa/files/mesa-17-musl-pthread.patch | 39 --
media-libs/mesa/files/mesa-17-musl_endian.patch | 12 -
.../mesa/files/mesa-18-intel-missing-time_t.patch | 11 -
.../mesa/files/mesa-18-missing-includes.patch | 53 --
...2.4-meson-link-gallium-nine-with-pthreads.patch | 34 --
media-libs/mesa/mesa-18.1.6-r1.ebuild | 520 -------------------
media-libs/mesa/mesa-18.1.6.ebuild | 519 -------------------
media-libs/mesa/mesa-18.1.9-r1.ebuild | 520 -------------------
media-libs/mesa/mesa-18.1.9.ebuild | 519 -------------------
media-libs/mesa/mesa-18.2.1.ebuild | 558 ---------------------
.../{mesa-18.2.4.ebuild => mesa-18.2.8.ebuild} | 17 +-
media-libs/mesa/metadata.xml | 1 -
16 files changed, 4 insertions(+), 2931 deletions(-)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 2e5ff61..aebf196 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,4 +1 @@
-DIST mesa-18.1.6.tar.xz 11142884 BLAKE2B fdd156fe7debf5223285dfa238070a2bd7d8ec684dec168afab78b9d2d38d53c10d939aaa64f34c2910e542dce3869adfca6383fca6a854c6dd03287a044b0e3 SHA512 2966210800215f5ced2720691063a8519b51ebeab9fb1e99bde4b1bd7ccc719d6395a1c29f25c88efe62d1592cf14ceafc163aca349490b1f8cee81070d46fcc
-DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa3600de78585487fb8e178c6987a72b79fb56e6c310757d157f9f85f12b73a6889bd361b51b62fb1dc1c20eecd SHA512 22db2950d25a3d9393e7c622c783bd177c21695569c8a95683bf77e92318e1db85672a134d4bea30c1f49a24e52bc3a2c1a0ac15deafb3a8fcbfb6de6a18adc2
-DIST mesa-18.2.1.tar.xz 11374476 BLAKE2B f0f3b766d68550f8c395a1b1d1ffc7a9e532c22ee6b91d698db33a270c152e03ab656d4219301bc2e0e95ba6f0583017c4361add928ad8ab26378a1ec6958f36 SHA512 d249bdf79aad36db9a8d291b3a1a100d283893ac741f58f85ae7e5c90ca25c37f80a5fa6fc57945ffeb0b67b788e7ea146543ec790b22f144578fc4c1525b84d
-DIST mesa-18.2.4.tar.xz 11377556 BLAKE2B b11c33ade744fb976862fecccbcc4c97196a005e40a00ef02bd8d409b66b3aa11f97baee13f2aa92f2d7c5461b2ef44beae3103687dea9ee29e92439a068f08a SHA512 088d43b087f4005752e4db75eaa6897e0fcb6de7b9a1f2d2b2ce3b5557d1dff829022e0092e8b1038ff01182c863ca0f26c97b9adde34bca462d3fa24502bfde
+DIST mesa-18.2.8.tar.xz 11385224 BLAKE2B c6fbf71e2ab6837f91dfa996cf7e89e9cae22e219cac56bd4201f7a62c787ddd2f65e7d162a329971018f0b1a796ee1a5b252ee6b43bb3b27a233d67b6cdf615 SHA512 04d5ada9ba3acea853def3ebcbb53ee76936a4cd4229ae753d2ce1b5cf543bea1e5764f2ef2b19735d47d041ba6b0582841bc89e2c9331fdfbd89386f599a1f7
diff --git a/media-libs/mesa/files/mesa-11-execinfo.patch b/media-libs/mesa/files/mesa-11-execinfo.patch
deleted file mode 100644
index 0eefba8..0000000
--- a/media-libs/mesa/files/mesa-11-execinfo.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-diff -Naur mesa-11.1.2.orig/configure.ac mesa-11.1.2/configure.ac
---- mesa-11.1.2.orig/configure.ac 2016-02-10 15:57:54.000000000 -0800
-+++ mesa-11.1.2/configure.ac 2016-03-09 13:27:47.979302937 -0800
-@@ -681,6 +681,7 @@
- AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
- AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
- AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
-+AC_CHECK_HEADER([execinfo.h], [DEFINES="$DEFINES -DHAVE_EXECINFO_H"])
-
- dnl Check to see if dlopen is in default libraries (like Solaris, which
- dnl has it in libc), or if libdl is needed to get it.
-diff -Naur mesa-11.1.2.orig/src/gallium/auxiliary/util/u_debug_symbol.c mesa-11.1.2/src/gallium/auxiliary/util/u_debug_symbol.c
---- mesa-11.1.2.orig/src/gallium/auxiliary/util/u_debug_symbol.c 2016-01-17 23:39:26.000000000 -0800
-+++ mesa-11.1.2/src/gallium/auxiliary/util/u_debug_symbol.c 2016-03-09 13:29:27.255060988 -0800
-@@ -219,7 +219,7 @@
- #endif /* PIPE_OS_WINDOWS */
-
-
--#if defined(__GLIBC__) && !defined(__UCLIBC__)
-+#if defined(HAVE_EXECINFO_H)
-
- #include <execinfo.h>
-
-@@ -240,7 +240,7 @@
- return TRUE;
- }
-
--#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */
-+#endif /* defined(HAVE_EXECINFO_H) */
-
-
- void
-diff -Naur mesa-11.1.2.orig/src/mapi/glapi/gen/gl_gentable.py mesa-11.1.2/src/mapi/glapi/gen/gl_gentable.py
---- mesa-11.1.2.orig/src/mapi/glapi/gen/gl_gentable.py 2016-02-10 15:57:54.000000000 -0800
-+++ mesa-11.1.2/src/mapi/glapi/gen/gl_gentable.py 2016-03-09 13:28:14.624506395 -0800
-@@ -44,7 +44,7 @@
- #endif
-
- #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
-- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
-+ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
- #define USE_BACKTRACE
- #endif
-
-diff -Naur mesa-11.1.2.orig/src/mapi/glapi/glapi_gentable.c mesa-11.1.2/src/mapi/glapi/glapi_gentable.c
---- mesa-11.1.2.orig/src/mapi/glapi/glapi_gentable.c 2016-02-10 16:24:49.000000000 -0800
-+++ mesa-11.1.2/src/mapi/glapi/glapi_gentable.c 2016-03-09 13:28:38.411688029 -0800
-@@ -36,7 +36,7 @@
- #endif
-
- #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \
-- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
-+ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
- #define USE_BACKTRACE
- #endif
-
-diff -Naur mesa-11.1.2.orig/src/mesa/drivers/dri/i915/intel_regions.c mesa-11.1.2/src/mesa/drivers/dri/i915/intel_regions.c
---- mesa-11.1.2.orig/src/mesa/drivers/dri/i915/intel_regions.c 2016-01-17 23:39:26.000000000 -0800
-+++ mesa-11.1.2/src/mesa/drivers/dri/i915/intel_regions.c 2016-03-09 13:30:18.483460168 -0800
-@@ -57,7 +57,7 @@
- */
- #define DEBUG_BACKTRACE_SIZE 0
-
--#if DEBUG_BACKTRACE_SIZE == 0
-+#if DEBUG_BACKTRACE_SIZE == 0 || !defined(HAVE_EXECINFO_H)
- /* Use the standard debug output */
- #define _DBG(...) DBG(__VA_ARGS__)
- #else
diff --git a/media-libs/mesa/files/mesa-13-musl_endian.patch b/media-libs/mesa/files/mesa-13-musl_endian.patch
deleted file mode 100644
index 1276605..0000000
--- a/media-libs/mesa/files/mesa-13-musl_endian.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur mesa-13.0.5.orig/src/util/u_endian.h mesa-13.0.5/src/util/u_endian.h
---- mesa-13.0.5.orig/src/util/u_endian.h 2017-03-19 12:40:43.808781967 -0700
-+++ mesa-13.0.5/src/util/u_endian.h 2017-03-19 12:49:01.731158551 -0700
-@@ -27,7 +27,7 @@
- #ifndef U_ENDIAN_H
- #define U_ENDIAN_H
-
--#if defined(__GLIBC__) || defined(ANDROID)
-+#if defined(__linux__)
- #include <endian.h>
-
- #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/media-libs/mesa/files/mesa-17-musl-invocation_name.patch b/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
deleted file mode 100644
index 80b02f5..0000000
--- a/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -Naur mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c mesa-17.3.0/src/gallium/auxiliary/os/os_process.c
---- mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c 2017-12-08 05:49:11.000000000 -0800
-+++ mesa-17.3.0/src/gallium/auxiliary/os/os_process.c 2017-12-11 14:24:35.200797607 -0800
-@@ -32,7 +32,7 @@
-
- #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
- # include <windows.h>
--#elif defined(__GLIBC__) || defined(__CYGWIN__)
-+#elif defined(__linux__) || defined(__CYGWIN__)
- # include <errno.h>
- #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
- # include <stdlib.h>
-@@ -84,7 +84,7 @@
-
- name = lpProcessName;
-
--#elif defined(__GLIBC__) || defined(__CYGWIN__)
-+#elif defined(__linux__) || defined(__CYGWIN__)
- name = program_invocation_short_name;
- #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
- /* *BSD and OS X */
-diff -Naur mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
---- mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2017-12-08 05:49:11.000000000 -0800
-+++ mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2017-12-11 14:23:35.312798680 -0800
-@@ -84,7 +84,7 @@
- ret = os_get_process_name(cmdline, 63);
- if (ret == FALSE)
- strcpy(cmdline, nstr);
--#if defined(__GLIBC__) || defined(__CYGWIN__)
-+#if defined(__linux__) || defined(__CYGWIN__)
- if (!strcmp(cmdline, "shader_runner")) {
- const char *name;
- /* hack to get better testname */
-diff -Naur mesa-17.3.0.orig/src/util/xmlconfig.c mesa-17.3.0/src/util/xmlconfig.c
---- mesa-17.3.0.orig/src/util/xmlconfig.c 2017-12-08 05:49:11.000000000 -0800
-+++ mesa-17.3.0/src/util/xmlconfig.c 2017-12-11 14:22:54.052799419 -0800
-@@ -40,8 +40,8 @@
-
- #undef GET_PROGRAM_NAME
-
--#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__)
--# if !defined(__GLIBC__) || (__GLIBC__ < 2)
-+#if defined(__linux__)
-+# if defined(__GLIBC__) && (__GLIBC__ < 2)
- /* These aren't declared in any libc5 header */
- extern char *program_invocation_name, *program_invocation_short_name;
- # endif
diff --git a/media-libs/mesa/files/mesa-17-musl-pthread.patch b/media-libs/mesa/files/mesa-17-musl-pthread.patch
deleted file mode 100644
index aac95af..0000000
--- a/media-libs/mesa/files/mesa-17-musl-pthread.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -Naur mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c
---- mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c 2017-12-12 16:55:53.885552821 -0800
-+++ mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c 2017-12-12 17:09:36.048538098 -0800
-@@ -73,8 +73,8 @@
- }
-
- #if defined(HAVE_PTHREAD)
--# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
-- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
-+# if defined(__linux__) && !(defined(__GLIBC__) || \
-+ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
- if (dbg_flags & DBG_TID)
- tid = pthread_self();
- # endif
-diff -Naur mesa-17.3.0.orig/src/util/u_thread.h mesa-17.3.0/src/util/u_thread.h
---- mesa-17.3.0.orig/src/util/u_thread.h 2017-12-12 16:55:53.915552820 -0800
-+++ mesa-17.3.0/src/util/u_thread.h 2017-12-12 17:09:34.079538133 -0800
-@@ -61,8 +61,8 @@
- static inline void u_thread_setname( const char *name )
- {
- #if defined(HAVE_PTHREAD)
--# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
-- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
-+# if defined(__linux__) && !(defined(__GLIBC__) || \
-+ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
- pthread_setname_np(pthread_self(), name);
- # endif
- #endif
-@@ -92,8 +92,8 @@
- static inline bool u_thread_is_self(thrd_t thread)
- {
- #if defined(HAVE_PTHREAD)
--# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
-- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
-+# if defined(__linux__) && !(defined(__GLIBC__) || \
-+ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
- return pthread_equal(pthread_self(), thread);
- # endif
- #endif
diff --git a/media-libs/mesa/files/mesa-17-musl_endian.patch b/media-libs/mesa/files/mesa-17-musl_endian.patch
deleted file mode 100644
index 74e3d1d..0000000
--- a/media-libs/mesa/files/mesa-17-musl_endian.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur mesa-17.3.1.orig/src/util/u_endian.h mesa-17.3.1/src/util/u_endian.h
---- mesa-17.3.1.orig/src/util/u_endian.h 2017-12-29 14:19:33.532915798 -0800
-+++ mesa-17.3.1/src/util/u_endian.h 2017-12-29 14:21:55.547913255 -0800
-@@ -27,7 +27,7 @@
- #ifndef U_ENDIAN_H
- #define U_ENDIAN_H
-
--#if defined(__GLIBC__) || defined(ANDROID) || defined(__CYGWIN__)
-+#if defined(__linux__) || defined(__CYGWIN__)
- #include <endian.h>
-
- #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/media-libs/mesa/files/mesa-18-intel-missing-time_t.patch b/media-libs/mesa/files/mesa-18-intel-missing-time_t.patch
deleted file mode 100644
index 353f8f2..0000000
--- a/media-libs/mesa/files/mesa-18-intel-missing-time_t.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur mesa-18.1.0-rc1.orig/src/mesa/drivers/dri/i965/brw_bufmgr.h mesa-18.1.0-rc1/src/mesa/drivers/dri/i965/brw_bufmgr.h
---- mesa-18.1.0-rc1.orig/src/mesa/drivers/dri/i965/brw_bufmgr.h 2018-04-22 12:42:46.505947484 -0700
-+++ mesa-18.1.0-rc1/src/mesa/drivers/dri/i965/brw_bufmgr.h 2018-04-22 12:44:09.720945994 -0700
-@@ -37,6 +37,7 @@
- #include <stdbool.h>
- #include <stdint.h>
- #include <stdio.h>
-+#include <time.h>
- #include "util/u_atomic.h"
- #include "util/list.h"
-
diff --git a/media-libs/mesa/files/mesa-18-missing-includes.patch b/media-libs/mesa/files/mesa-18-missing-includes.patch
deleted file mode 100644
index 3f7bd62..0000000
--- a/media-libs/mesa/files/mesa-18-missing-includes.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 456b660306e475a30f170a3bcecc0445124d7e2b Mon Sep 17 00:00:00 2001
-From:
-Date: Sun, 8 Jul 2018 03:57:11 -0500
-Subject: [PATCH] Fix all missing includes for mesa
-
-Signed-off-by:
----
- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h | 1 +
- src/gallium/winsys/svga/drm/vmw_screen.h | 2 +-
- src/util/rand_xor.c | 2 ++
- 3 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
-index d6af605..6eee83f 100644
---- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
-+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
-@@ -32,6 +32,7 @@
- #include "ac_gpu_info.h"
- #include "addrlib/addrinterface.h"
- #include <amdgpu.h>
-+#include <pthread.h>
- #include "util/list.h"
-
- struct radv_amdgpu_winsys {
-diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h
-index f21cabb..20d03f8 100644
---- a/src/gallium/winsys/svga/drm/vmw_screen.h
-+++ b/src/gallium/winsys/svga/drm/vmw_screen.h
-@@ -34,7 +34,7 @@
- #ifndef VMW_SCREEN_H_
- #define VMW_SCREEN_H_
-
--
-+#include <sys/stat.h>
- #include "pipe/p_compiler.h"
- #include "pipe/p_state.h"
-
-diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c
-index de04bbc..08d507f 100644
---- a/src/util/rand_xor.c
-+++ b/src/util/rand_xor.c
-@@ -24,6 +24,8 @@
-
- #if defined(__linux__)
- #include <sys/file.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
- #include <unistd.h>
- #include <fcntl.h>
- #else
---
-2.18.0
-
diff --git a/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch b/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch
deleted file mode 100644
index 11d4f9c..0000000
--- a/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 7652931d33b36c93b2e84713baa8c283d568402e Mon Sep 17 00:00:00 2001
-From: Dylan Baker <dylan@pnwbakers.com>
-Date: Thu, 1 Nov 2018 14:12:57 -0700
-Subject: [PATCH] meson: link gallium nine with pthreads
-
-In some cases (not building with llvm, which automatically pulls in
-pthreads) nine needs to be directly linked with pthreads. Fixes building
-on x86 (32 bit) without llvm.
-
-Distro bug: https://bugs.gentoo.org/670094
-Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3
- ("meson: build gallium nine state_tracker")
-Tested-by: Rafal Lalik <rafallalik@gmail.com>
-Reviewed-by: Matt Turner <mattst88@gmail.com>
----
- src/gallium/targets/d3dadapter9/meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/gallium/targets/d3dadapter9/meson.build b/src/gallium/targets/d3dadapter9/meson.build
-index bd05b4f9692..bc72b1110a0 100644
---- a/src/gallium/targets/d3dadapter9/meson.build
-+++ b/src/gallium/targets/d3dadapter9/meson.build
-@@ -53,7 +53,7 @@ libgallium_nine = shared_library(
- libswkmsdri,
- ],
- dependencies : [
-- dep_selinux, dep_expat, dep_libdrm, dep_llvm,
-+ dep_selinux, dep_expat, dep_libdrm, dep_llvm, dep_thread,
- driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
- driver_i915, driver_svga,
- ],
---
-2.16.4
-
diff --git a/media-libs/mesa/mesa-18.1.6-r1.ebuild b/media-libs/mesa/mesa-18.1.6-r1.ebuild
deleted file mode 100644
index 8e43662..0000000
--- a/media-libs/mesa/mesa-18.1.6-r1.ebuild
+++ /dev/null
@@ -1,520 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
-
-if [[ ${PV} = 9999 ]]; then
- GIT_ECLASS="git-r3"
- EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
-
-if [[ $PV == 9999 ]]; then
- SRC_URI=""
-else
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
- IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
- +llvm +nptl opencl osmesa pax_kernel pic selinux vaapi valgrind
- vdpau vulkan wayland xvmc xa"
-
-REQUIRED_USE="
- d3d9? ( dri3 gallium )
- llvm? ( gallium )
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
- gles1? ( egl )
- gles2? ( egl )
- vaapi? ( gallium )
- vdpau? ( gallium )
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
- video_cards_radeonsi? ( llvm ) )
- wayland? ( egl gbm )
- xa? ( gallium )
- video_cards_freedreno? ( gallium )
- video_cards_intel? ( classic )
- video_cards_i915? ( || ( classic gallium ) )
- video_cards_i965? ( classic )
- video_cards_imx? ( gallium video_cards_vivante )
- video_cards_nouveau? ( || ( classic gallium ) )
- video_cards_radeon? ( || ( classic gallium )
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
- video_cards_r100? ( classic )
- video_cards_r200? ( classic )
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
- video_cards_r600? ( gallium )
- video_cards_radeonsi? ( gallium llvm )
- video_cards_vc4? ( gallium )
- video_cards_virgl? ( gallium )
- video_cards_vivante? ( gallium gbm )
- video_cards_vmware? ( gallium )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
-RDEPEND="
- !app-eselect/eselect-mesa
- >=app-eselect/eselect-opengl-1.3.0
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
- llvm? (
- video_cards_radeonsi? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_r600? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_radeon? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- )
- opencl? (
- app-eselect/eselect-opencl
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- vaapi? (
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
- )
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
- wayland? (
- >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
- >=dev-libs/wayland-protocols-1.8
- )
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-
- video_cards_intel? (
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- )
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-"
-for card in ${RADEON_CARDS}; do
- RDEPEND="${RDEPEND}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
- "
-done
-RDEPEND="${RDEPEND}
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
-"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more slot
-# simultaneously.
-#
-# How to use it:
-# 1. List all the working slots (with min versions) in ||, newest first.
-# 2. Update the := to specify *max* version, e.g. < 7.
-# 3. Specify LLVM_MAX_SLOT, e.g. 6.
-LLVM_MAX_SLOT="6"
-LLVM_DEPSTR="
- || (
- sys-devel/llvm:7[${MULTILIB_USEDEP}]
- sys-devel/llvm:6[${MULTILIB_USEDEP}]
- sys-devel/llvm:5[${MULTILIB_USEDEP}]
- sys-devel/llvm:4[${MULTILIB_USEDEP}]
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
- )
- sys-devel/llvm:=[${MULTILIB_USEDEP}]
-"
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-RDEPEND="${RDEPEND}
- llvm? (
- opencl? (
- video_cards_r600? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${CLANG_DEPSTR}
- )
- )
- )
- )
- !opencl? (
- video_cards_r600? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${LLVM_DEPSTR}
- )
- )
- )
- )
- )
-"
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
-
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- opencl? (
- >=sys-devel/gcc-4.6
- )
- sys-devel/gettext
- virtual/pkgconfig
- valgrind? ( dev-util/valgrind )
- x11-base/xorg-proto
- vulkan? (
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
- )
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
- sys-devel/bison
- sys-devel/flex
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
- !pic? (
- usr/lib*/libglapi.so.0.0.0
- usr/lib*/libGLESv1_CM.so.1.1.0
- usr/lib*/libGLESv2.so.2.0.0
- usr/lib*/libGL.so.1.2.0
- usr/lib*/libOSMesa.so.8.0.0
- )
-)"
-
-llvm_check_deps() {
- local flags=${MULTILIB_USEDEP}
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
- then
- flags+=",llvm_targets_AMDGPU(-)"
- fi
-
- if use opencl; then
- has_version "sys-devel/clang[${flags}]" || return 1
- fi
- has_version "sys-devel/llvm[${flags}]"
-}
-
-pkg_setup() {
- # warning message for bug 459306
- if use llvm && has_version sys-devel/llvm[!debug=]; then
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
- ewarn "detected! This can cause problems. For details, see bug 459306."
- fi
-
- if use llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- eapply "${FILESDIR}"/${PN}-17-execinfo.patch
- eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
- eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
- eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
- eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
- eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
- eapply "${FILESDIR}"/${PN}-18-musl-larger-stacksize.patch
- eapply_user
- eautoreconf
-}
-
-multilib_src_configure() {
- local myconf
-
- if use classic; then
- # Configurable DRI drivers
- driver_enable swrast
-
- # Intel code
- driver_enable video_cards_i915 i915
- driver_enable video_cards_i965 i965
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- driver_enable video_cards_intel i915 i965
- fi
-
- # Nouveau code
- driver_enable video_cards_nouveau nouveau
-
- # ATI code
- driver_enable video_cards_r100 radeon
- driver_enable video_cards_r200 r200
- if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- driver_enable video_cards_radeon radeon r200
- fi
- fi
-
- if use egl; then
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
- fi
-
- if use gallium; then
- myconf+="
- $(use_enable d3d9 nine)
- $(use_enable llvm)
- $(use_enable vaapi va)
- $(use_enable vdpau)
- $(use_enable xa)
- $(use_enable xvmc)
- "
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
- gallium_enable swrast
- 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 video_cards_i915 i915
- gallium_enable video_cards_imx imx
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
- fi
-
- gallium_enable video_cards_r300 r300
- gallium_enable video_cards_r600 r600
- gallium_enable video_cards_radeonsi radeonsi
- if ! use video_cards_r300 && \
- ! use video_cards_r600; then
- gallium_enable video_cards_radeon r300 r600
- fi
-
- gallium_enable video_cards_freedreno freedreno
- # opencl stuff
- if use opencl; then
- myconf+="
- $(use_enable opencl)
- --with-clang-libdir="${EPREFIX}/usr/lib"
- "
- fi
-
- gallium_enable video_cards_virgl virgl
- fi
-
- if use vulkan; then
- vulkan_enable video_cards_i965 intel
- vulkan_enable video_cards_radeonsi radeon
- fi
-
- # x86 hardened pax_kernel needs glx-rts, bug 240956
- if [[ ${ABI} == x86 ]]; then
- myconf+=" $(use_enable pax_kernel glx-read-only-text)"
- fi
-
- # on abi_x86_32 hardened we need to have asm disable
- if [[ ${ABI} == x86* ]] && use pic; then
- myconf+=" --disable-asm"
- fi
-
- if use gallium; then
- myconf+=" $(use_enable osmesa gallium-osmesa)"
- else
- myconf+=" $(use_enable osmesa)"
- fi
-
- # build fails with BSD indent, bug #428112
- use userland_GNU || export INDENT=cat
-
- ECONF_SOURCE="${S}" \
- econf \
- --enable-dri \
- --enable-glx \
- --enable-shared-glapi \
- $(use_enable !bindist texture-float) \
- $(use_enable d3d9 nine) \
- $(use_enable debug) \
- $(use_enable dri3) \
- $(use_enable egl) \
- $(use_enable gbm) \
- $(use_enable gles1) \
- $(use_enable gles2) \
- $(use_enable nptl glx-tls) \
- $(use_enable unwind libunwind) \
- --enable-valgrind=$(usex valgrind auto no) \
- --enable-llvm-shared-libs \
- --disable-opencl-icd \
- --with-dri-drivers=${DRI_DRIVERS} \
- --with-gallium-drivers=${GALLIUM_DRIVERS} \
- --with-vulkan-drivers=${VULKAN_DRIVERS} \
- PYTHON2="${PYTHON}" \
- ${myconf}
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use wayland; then
- # These files are now provided by >=dev-libs/wayland-1.15.0
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
- rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
- fi
-
- if use opencl; then
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
- dodir ${cl_dir}/{lib,include}
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
- "${ED}"${cl_dir}
- fi
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
- mv -f "${ED}"/usr/include/CL \
- "${ED}"${cl_dir}/include
- fi
- eend $?
- fi
-}
-
-multilib_src_install_all() {
- find "${ED}" -name '*.la' -delete
- einstalldocs
-
- if use !bindist; then
- dodoc docs/patents.txt
- fi
-}
-
-multilib_src_test() {
- if use llvm; then
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
- pushd src/gallium/drivers/llvmpipe >/dev/null || die
- emake ${llvm_tests}
- pax-mark m ${llvm_tests}
- popd >/dev/null || die
- fi
- emake check
-}
-
-pkg_postinst() {
- # Switch to the xorg implementation.
- echo
- eselect opengl set --use-old ${OPENGL_DIR}
-
- # Switch to mesa opencl
- if use opencl; then
- eselect opencl set --use-old ${PN}
- fi
-
- # warn about patent encumbered texture-float
- if use !bindist; then
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
- elog "explanation."
- fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- DRI_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- DRI_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
-
-gallium_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- GALLIUM_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- GALLIUM_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
-
-vulkan_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- VULKAN_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- VULKAN_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
diff --git a/media-libs/mesa/mesa-18.1.6.ebuild b/media-libs/mesa/mesa-18.1.6.ebuild
deleted file mode 100644
index 3145d0d..0000000
--- a/media-libs/mesa/mesa-18.1.6.ebuild
+++ /dev/null
@@ -1,519 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
-
-if [[ ${PV} = 9999 ]]; then
- GIT_ECLASS="git-r3"
- EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
-
-if [[ $PV == 9999 ]]; then
- SRC_URI=""
-else
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="amd64 ~arm ~arm64 ~ppc x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
- IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
- +llvm +nptl opencl osmesa pax_kernel pic selinux vaapi valgrind
- vdpau vulkan wayland xvmc xa"
-
-REQUIRED_USE="
- d3d9? ( dri3 gallium )
- llvm? ( gallium )
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
- gles1? ( egl )
- gles2? ( egl )
- vaapi? ( gallium )
- vdpau? ( gallium )
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
- video_cards_radeonsi? ( llvm ) )
- wayland? ( egl gbm )
- xa? ( gallium )
- video_cards_freedreno? ( gallium )
- video_cards_intel? ( classic )
- video_cards_i915? ( || ( classic gallium ) )
- video_cards_i965? ( classic )
- video_cards_imx? ( gallium video_cards_vivante )
- video_cards_nouveau? ( || ( classic gallium ) )
- video_cards_radeon? ( || ( classic gallium )
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
- video_cards_r100? ( classic )
- video_cards_r200? ( classic )
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
- video_cards_r600? ( gallium )
- video_cards_radeonsi? ( gallium llvm )
- video_cards_vc4? ( gallium )
- video_cards_virgl? ( gallium )
- video_cards_vivante? ( gallium gbm )
- video_cards_vmware? ( gallium )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
-RDEPEND="
- !app-eselect/eselect-mesa
- >=app-eselect/eselect-opengl-1.3.0
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
- llvm? (
- video_cards_radeonsi? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_r600? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_radeon? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- )
- opencl? (
- app-eselect/eselect-opencl
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- vaapi? (
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
- )
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
- wayland? (
- >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
- >=dev-libs/wayland-protocols-1.8
- )
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-
- video_cards_intel? (
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- )
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-"
-for card in ${RADEON_CARDS}; do
- RDEPEND="${RDEPEND}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
- "
-done
-RDEPEND="${RDEPEND}
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
-"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more slot
-# simultaneously.
-#
-# How to use it:
-# 1. List all the working slots (with min versions) in ||, newest first.
-# 2. Update the := to specify *max* version, e.g. < 7.
-# 3. Specify LLVM_MAX_SLOT, e.g. 6.
-LLVM_MAX_SLOT="6"
-LLVM_DEPSTR="
- || (
- sys-devel/llvm:7[${MULTILIB_USEDEP}]
- sys-devel/llvm:6[${MULTILIB_USEDEP}]
- sys-devel/llvm:5[${MULTILIB_USEDEP}]
- sys-devel/llvm:4[${MULTILIB_USEDEP}]
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
- )
- sys-devel/llvm:=[${MULTILIB_USEDEP}]
-"
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-RDEPEND="${RDEPEND}
- llvm? (
- opencl? (
- video_cards_r600? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${CLANG_DEPSTR}
- )
- )
- )
- )
- !opencl? (
- video_cards_r600? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${LLVM_DEPSTR}
- )
- )
- )
- )
- )
-"
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
-
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- opencl? (
- >=sys-devel/gcc-4.6
- )
- sys-devel/gettext
- virtual/pkgconfig
- valgrind? ( dev-util/valgrind )
- x11-base/xorg-proto
- vulkan? (
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
- )
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
- sys-devel/bison
- sys-devel/flex
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
- !pic? (
- usr/lib*/libglapi.so.0.0.0
- usr/lib*/libGLESv1_CM.so.1.1.0
- usr/lib*/libGLESv2.so.2.0.0
- usr/lib*/libGL.so.1.2.0
- usr/lib*/libOSMesa.so.8.0.0
- )
-)"
-
-llvm_check_deps() {
- local flags=${MULTILIB_USEDEP}
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
- then
- flags+=",llvm_targets_AMDGPU(-)"
- fi
-
- if use opencl; then
- has_version "sys-devel/clang[${flags}]" || return 1
- fi
- has_version "sys-devel/llvm[${flags}]"
-}
-
-pkg_setup() {
- # warning message for bug 459306
- if use llvm && has_version sys-devel/llvm[!debug=]; then
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
- ewarn "detected! This can cause problems. For details, see bug 459306."
- fi
-
- if use llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- eapply "${FILESDIR}"/${PN}-17-execinfo.patch
- eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
- eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
- eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
- eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
- eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
- eapply_user
- eautoreconf
-}
-
-multilib_src_configure() {
- local myconf
-
- if use classic; then
- # Configurable DRI drivers
- driver_enable swrast
-
- # Intel code
- driver_enable video_cards_i915 i915
- driver_enable video_cards_i965 i965
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- driver_enable video_cards_intel i915 i965
- fi
-
- # Nouveau code
- driver_enable video_cards_nouveau nouveau
-
- # ATI code
- driver_enable video_cards_r100 radeon
- driver_enable video_cards_r200 r200
- if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- driver_enable video_cards_radeon radeon r200
- fi
- fi
-
- if use egl; then
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
- fi
-
- if use gallium; then
- myconf+="
- $(use_enable d3d9 nine)
- $(use_enable llvm)
- $(use_enable vaapi va)
- $(use_enable vdpau)
- $(use_enable xa)
- $(use_enable xvmc)
- "
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
- gallium_enable swrast
- 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 video_cards_i915 i915
- gallium_enable video_cards_imx imx
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
- fi
-
- gallium_enable video_cards_r300 r300
- gallium_enable video_cards_r600 r600
- gallium_enable video_cards_radeonsi radeonsi
- if ! use video_cards_r300 && \
- ! use video_cards_r600; then
- gallium_enable video_cards_radeon r300 r600
- fi
-
- gallium_enable video_cards_freedreno freedreno
- # opencl stuff
- if use opencl; then
- myconf+="
- $(use_enable opencl)
- --with-clang-libdir="${EPREFIX}/usr/lib"
- "
- fi
-
- gallium_enable video_cards_virgl virgl
- fi
-
- if use vulkan; then
- vulkan_enable video_cards_i965 intel
- vulkan_enable video_cards_radeonsi radeon
- fi
-
- # x86 hardened pax_kernel needs glx-rts, bug 240956
- if [[ ${ABI} == x86 ]]; then
- myconf+=" $(use_enable pax_kernel glx-read-only-text)"
- fi
-
- # on abi_x86_32 hardened we need to have asm disable
- if [[ ${ABI} == x86* ]] && use pic; then
- myconf+=" --disable-asm"
- fi
-
- if use gallium; then
- myconf+=" $(use_enable osmesa gallium-osmesa)"
- else
- myconf+=" $(use_enable osmesa)"
- fi
-
- # build fails with BSD indent, bug #428112
- use userland_GNU || export INDENT=cat
-
- ECONF_SOURCE="${S}" \
- econf \
- --enable-dri \
- --enable-glx \
- --enable-shared-glapi \
- $(use_enable !bindist texture-float) \
- $(use_enable d3d9 nine) \
- $(use_enable debug) \
- $(use_enable dri3) \
- $(use_enable egl) \
- $(use_enable gbm) \
- $(use_enable gles1) \
- $(use_enable gles2) \
- $(use_enable nptl glx-tls) \
- $(use_enable unwind libunwind) \
- --enable-valgrind=$(usex valgrind auto no) \
- --enable-llvm-shared-libs \
- --disable-opencl-icd \
- --with-dri-drivers=${DRI_DRIVERS} \
- --with-gallium-drivers=${GALLIUM_DRIVERS} \
- --with-vulkan-drivers=${VULKAN_DRIVERS} \
- PYTHON2="${PYTHON}" \
- ${myconf}
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use wayland; then
- # These files are now provided by >=dev-libs/wayland-1.15.0
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
- rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
- fi
-
- if use opencl; then
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
- dodir ${cl_dir}/{lib,include}
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
- "${ED}"${cl_dir}
- fi
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
- mv -f "${ED}"/usr/include/CL \
- "${ED}"${cl_dir}/include
- fi
- eend $?
- fi
-}
-
-multilib_src_install_all() {
- find "${ED}" -name '*.la' -delete
- einstalldocs
-
- if use !bindist; then
- dodoc docs/patents.txt
- fi
-}
-
-multilib_src_test() {
- if use llvm; then
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
- pushd src/gallium/drivers/llvmpipe >/dev/null || die
- emake ${llvm_tests}
- pax-mark m ${llvm_tests}
- popd >/dev/null || die
- fi
- emake check
-}
-
-pkg_postinst() {
- # Switch to the xorg implementation.
- echo
- eselect opengl set --use-old ${OPENGL_DIR}
-
- # Switch to mesa opencl
- if use opencl; then
- eselect opencl set --use-old ${PN}
- fi
-
- # warn about patent encumbered texture-float
- if use !bindist; then
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
- elog "explanation."
- fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- DRI_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- DRI_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
-
-gallium_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- GALLIUM_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- GALLIUM_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
-
-vulkan_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- VULKAN_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- VULKAN_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
diff --git a/media-libs/mesa/mesa-18.1.9-r1.ebuild b/media-libs/mesa/mesa-18.1.9-r1.ebuild
deleted file mode 100644
index ca6486f..0000000
--- a/media-libs/mesa/mesa-18.1.9-r1.ebuild
+++ /dev/null
@@ -1,520 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
-
-if [[ ${PV} = 9999 ]]; then
- GIT_ECLASS="git-r3"
- EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
-
-if [[ $PV == 9999 ]]; then
- SRC_URI=""
-else
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
- IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
- +llvm +nptl opencl osmesa pax_kernel pic selinux vaapi valgrind
- vdpau vulkan wayland xvmc xa"
-
-REQUIRED_USE="
- d3d9? ( dri3 gallium )
- llvm? ( gallium )
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
- gles1? ( egl )
- gles2? ( egl )
- vaapi? ( gallium )
- vdpau? ( gallium )
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
- video_cards_radeonsi? ( llvm ) )
- wayland? ( egl gbm )
- xa? ( gallium )
- video_cards_freedreno? ( gallium )
- video_cards_intel? ( classic )
- video_cards_i915? ( || ( classic gallium ) )
- video_cards_i965? ( classic )
- video_cards_imx? ( gallium video_cards_vivante )
- video_cards_nouveau? ( || ( classic gallium ) )
- video_cards_radeon? ( || ( classic gallium )
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
- video_cards_r100? ( classic )
- video_cards_r200? ( classic )
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
- video_cards_r600? ( gallium )
- video_cards_radeonsi? ( gallium llvm )
- video_cards_vc4? ( gallium )
- video_cards_virgl? ( gallium )
- video_cards_vivante? ( gallium gbm )
- video_cards_vmware? ( gallium )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
-RDEPEND="
- !app-eselect/eselect-mesa
- >=app-eselect/eselect-opengl-1.3.0
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
- llvm? (
- video_cards_radeonsi? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_r600? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_radeon? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- )
- opencl? (
- app-eselect/eselect-opencl
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- vaapi? (
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
- )
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
- wayland? (
- >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
- >=dev-libs/wayland-protocols-1.8
- )
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-
- video_cards_intel? (
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- )
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-"
-for card in ${RADEON_CARDS}; do
- RDEPEND="${RDEPEND}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
- "
-done
-RDEPEND="${RDEPEND}
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
-"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more slot
-# simultaneously.
-#
-# How to use it:
-# 1. List all the working slots (with min versions) in ||, newest first.
-# 2. Update the := to specify *max* version, e.g. < 7.
-# 3. Specify LLVM_MAX_SLOT, e.g. 6.
-LLVM_MAX_SLOT="6"
-LLVM_DEPSTR="
- || (
- sys-devel/llvm:7[${MULTILIB_USEDEP}]
- sys-devel/llvm:6[${MULTILIB_USEDEP}]
- sys-devel/llvm:5[${MULTILIB_USEDEP}]
- sys-devel/llvm:4[${MULTILIB_USEDEP}]
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
- )
- sys-devel/llvm:=[${MULTILIB_USEDEP}]
-"
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-RDEPEND="${RDEPEND}
- llvm? (
- opencl? (
- video_cards_r600? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${CLANG_DEPSTR}
- )
- )
- )
- )
- !opencl? (
- video_cards_r600? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${LLVM_DEPSTR}
- )
- )
- )
- )
- )
-"
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
-
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- opencl? (
- >=sys-devel/gcc-4.6
- )
- sys-devel/gettext
- virtual/pkgconfig
- valgrind? ( dev-util/valgrind )
- x11-base/xorg-proto
- vulkan? (
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
- )
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
- sys-devel/bison
- sys-devel/flex
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
- !pic? (
- usr/lib*/libglapi.so.0.0.0
- usr/lib*/libGLESv1_CM.so.1.1.0
- usr/lib*/libGLESv2.so.2.0.0
- usr/lib*/libGL.so.1.2.0
- usr/lib*/libOSMesa.so.8.0.0
- )
-)"
-
-llvm_check_deps() {
- local flags=${MULTILIB_USEDEP}
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
- then
- flags+=",llvm_targets_AMDGPU(-)"
- fi
-
- if use opencl; then
- has_version "sys-devel/clang[${flags}]" || return 1
- fi
- has_version "sys-devel/llvm[${flags}]"
-}
-
-pkg_setup() {
- # warning message for bug 459306
- if use llvm && has_version sys-devel/llvm[!debug=]; then
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
- ewarn "detected! This can cause problems. For details, see bug 459306."
- fi
-
- if use llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- eapply "${FILESDIR}"/${PN}-17-execinfo.patch
- eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
- eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
- eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
- eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
- eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
- eapply "${FILESDIR}"/${PN}-18-musl-larger-stacksize.patch
- eapply_user
- eautoreconf
-}
-
-multilib_src_configure() {
- local myconf
-
- if use classic; then
- # Configurable DRI drivers
- driver_enable swrast
-
- # Intel code
- driver_enable video_cards_i915 i915
- driver_enable video_cards_i965 i965
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- driver_enable video_cards_intel i915 i965
- fi
-
- # Nouveau code
- driver_enable video_cards_nouveau nouveau
-
- # ATI code
- driver_enable video_cards_r100 radeon
- driver_enable video_cards_r200 r200
- if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- driver_enable video_cards_radeon radeon r200
- fi
- fi
-
- if use egl; then
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
- fi
-
- if use gallium; then
- myconf+="
- $(use_enable d3d9 nine)
- $(use_enable llvm)
- $(use_enable vaapi va)
- $(use_enable vdpau)
- $(use_enable xa)
- $(use_enable xvmc)
- "
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
- gallium_enable swrast
- 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 video_cards_i915 i915
- gallium_enable video_cards_imx imx
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
- fi
-
- gallium_enable video_cards_r300 r300
- gallium_enable video_cards_r600 r600
- gallium_enable video_cards_radeonsi radeonsi
- if ! use video_cards_r300 && \
- ! use video_cards_r600; then
- gallium_enable video_cards_radeon r300 r600
- fi
-
- gallium_enable video_cards_freedreno freedreno
- # opencl stuff
- if use opencl; then
- myconf+="
- $(use_enable opencl)
- --with-clang-libdir="${EPREFIX}/usr/lib"
- "
- fi
-
- gallium_enable video_cards_virgl virgl
- fi
-
- if use vulkan; then
- vulkan_enable video_cards_i965 intel
- vulkan_enable video_cards_radeonsi radeon
- fi
-
- # x86 hardened pax_kernel needs glx-rts, bug 240956
- if [[ ${ABI} == x86 ]]; then
- myconf+=" $(use_enable pax_kernel glx-read-only-text)"
- fi
-
- # on abi_x86_32 hardened we need to have asm disable
- if [[ ${ABI} == x86* ]] && use pic; then
- myconf+=" --disable-asm"
- fi
-
- if use gallium; then
- myconf+=" $(use_enable osmesa gallium-osmesa)"
- else
- myconf+=" $(use_enable osmesa)"
- fi
-
- # build fails with BSD indent, bug #428112
- use userland_GNU || export INDENT=cat
-
- ECONF_SOURCE="${S}" \
- econf \
- --enable-dri \
- --enable-glx \
- --enable-shared-glapi \
- $(use_enable !bindist texture-float) \
- $(use_enable d3d9 nine) \
- $(use_enable debug) \
- $(use_enable dri3) \
- $(use_enable egl) \
- $(use_enable gbm) \
- $(use_enable gles1) \
- $(use_enable gles2) \
- $(use_enable nptl glx-tls) \
- $(use_enable unwind libunwind) \
- --enable-valgrind=$(usex valgrind auto no) \
- --enable-llvm-shared-libs \
- --disable-opencl-icd \
- --with-dri-drivers=${DRI_DRIVERS} \
- --with-gallium-drivers=${GALLIUM_DRIVERS} \
- --with-vulkan-drivers=${VULKAN_DRIVERS} \
- PYTHON2="${PYTHON}" \
- ${myconf}
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use wayland; then
- # These files are now provided by >=dev-libs/wayland-1.15.0
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
- rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
- fi
-
- if use opencl; then
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
- dodir ${cl_dir}/{lib,include}
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
- "${ED}"${cl_dir}
- fi
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
- mv -f "${ED}"/usr/include/CL \
- "${ED}"${cl_dir}/include
- fi
- eend $?
- fi
-}
-
-multilib_src_install_all() {
- find "${ED}" -name '*.la' -delete
- einstalldocs
-
- if use !bindist; then
- dodoc docs/patents.txt
- fi
-}
-
-multilib_src_test() {
- if use llvm; then
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
- pushd src/gallium/drivers/llvmpipe >/dev/null || die
- emake ${llvm_tests}
- pax-mark m ${llvm_tests}
- popd >/dev/null || die
- fi
- emake check
-}
-
-pkg_postinst() {
- # Switch to the xorg implementation.
- echo
- eselect opengl set --use-old ${OPENGL_DIR}
-
- # Switch to mesa opencl
- if use opencl; then
- eselect opencl set --use-old ${PN}
- fi
-
- # warn about patent encumbered texture-float
- if use !bindist; then
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
- elog "explanation."
- fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- DRI_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- DRI_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
-
-gallium_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- GALLIUM_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- GALLIUM_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
-
-vulkan_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- VULKAN_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- VULKAN_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
diff --git a/media-libs/mesa/mesa-18.1.9.ebuild b/media-libs/mesa/mesa-18.1.9.ebuild
deleted file mode 100644
index e61e3fd..0000000
--- a/media-libs/mesa/mesa-18.1.9.ebuild
+++ /dev/null
@@ -1,519 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
-
-if [[ ${PV} = 9999 ]]; then
- GIT_ECLASS="git-r3"
- EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
-
-if [[ $PV == 9999 ]]; then
- SRC_URI=""
-else
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
- IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
- +llvm +nptl opencl osmesa pax_kernel pic selinux vaapi valgrind
- vdpau vulkan wayland xvmc xa"
-
-REQUIRED_USE="
- d3d9? ( dri3 gallium )
- llvm? ( gallium )
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
- gles1? ( egl )
- gles2? ( egl )
- vaapi? ( gallium )
- vdpau? ( gallium )
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
- video_cards_radeonsi? ( llvm ) )
- wayland? ( egl gbm )
- xa? ( gallium )
- video_cards_freedreno? ( gallium )
- video_cards_intel? ( classic )
- video_cards_i915? ( || ( classic gallium ) )
- video_cards_i965? ( classic )
- video_cards_imx? ( gallium video_cards_vivante )
- video_cards_nouveau? ( || ( classic gallium ) )
- video_cards_radeon? ( || ( classic gallium )
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
- video_cards_r100? ( classic )
- video_cards_r200? ( classic )
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
- video_cards_r600? ( gallium )
- video_cards_radeonsi? ( gallium llvm )
- video_cards_vc4? ( gallium )
- video_cards_virgl? ( gallium )
- video_cards_vivante? ( gallium gbm )
- video_cards_vmware? ( gallium )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
-RDEPEND="
- !app-eselect/eselect-mesa
- >=app-eselect/eselect-opengl-1.3.0
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
- llvm? (
- video_cards_radeonsi? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_r600? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_radeon? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- )
- opencl? (
- app-eselect/eselect-opencl
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- vaapi? (
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
- )
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
- wayland? (
- >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
- >=dev-libs/wayland-protocols-1.8
- )
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-
- video_cards_intel? (
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- )
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-"
-for card in ${RADEON_CARDS}; do
- RDEPEND="${RDEPEND}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
- "
-done
-RDEPEND="${RDEPEND}
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
-"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more slot
-# simultaneously.
-#
-# How to use it:
-# 1. List all the working slots (with min versions) in ||, newest first.
-# 2. Update the := to specify *max* version, e.g. < 7.
-# 3. Specify LLVM_MAX_SLOT, e.g. 6.
-LLVM_MAX_SLOT="6"
-LLVM_DEPSTR="
- || (
- sys-devel/llvm:7[${MULTILIB_USEDEP}]
- sys-devel/llvm:6[${MULTILIB_USEDEP}]
- sys-devel/llvm:5[${MULTILIB_USEDEP}]
- sys-devel/llvm:4[${MULTILIB_USEDEP}]
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
- )
- sys-devel/llvm:=[${MULTILIB_USEDEP}]
-"
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-RDEPEND="${RDEPEND}
- llvm? (
- opencl? (
- video_cards_r600? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${CLANG_DEPSTR}
- )
- )
- )
- )
- !opencl? (
- video_cards_r600? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${LLVM_DEPSTR}
- )
- )
- )
- )
- )
-"
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
-
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- opencl? (
- >=sys-devel/gcc-4.6
- )
- sys-devel/gettext
- virtual/pkgconfig
- valgrind? ( dev-util/valgrind )
- x11-base/xorg-proto
- vulkan? (
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
- )
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
- sys-devel/bison
- sys-devel/flex
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
- !pic? (
- usr/lib*/libglapi.so.0.0.0
- usr/lib*/libGLESv1_CM.so.1.1.0
- usr/lib*/libGLESv2.so.2.0.0
- usr/lib*/libGL.so.1.2.0
- usr/lib*/libOSMesa.so.8.0.0
- )
-)"
-
-llvm_check_deps() {
- local flags=${MULTILIB_USEDEP}
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
- then
- flags+=",llvm_targets_AMDGPU(-)"
- fi
-
- if use opencl; then
- has_version "sys-devel/clang[${flags}]" || return 1
- fi
- has_version "sys-devel/llvm[${flags}]"
-}
-
-pkg_setup() {
- # warning message for bug 459306
- if use llvm && has_version sys-devel/llvm[!debug=]; then
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
- ewarn "detected! This can cause problems. For details, see bug 459306."
- fi
-
- if use llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- eapply "${FILESDIR}"/${PN}-17-execinfo.patch
- eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
- eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
- eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
- eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
- eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
- eapply_user
- eautoreconf
-}
-
-multilib_src_configure() {
- local myconf
-
- if use classic; then
- # Configurable DRI drivers
- driver_enable swrast
-
- # Intel code
- driver_enable video_cards_i915 i915
- driver_enable video_cards_i965 i965
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- driver_enable video_cards_intel i915 i965
- fi
-
- # Nouveau code
- driver_enable video_cards_nouveau nouveau
-
- # ATI code
- driver_enable video_cards_r100 radeon
- driver_enable video_cards_r200 r200
- if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- driver_enable video_cards_radeon radeon r200
- fi
- fi
-
- if use egl; then
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
- fi
-
- if use gallium; then
- myconf+="
- $(use_enable d3d9 nine)
- $(use_enable llvm)
- $(use_enable vaapi va)
- $(use_enable vdpau)
- $(use_enable xa)
- $(use_enable xvmc)
- "
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
- gallium_enable swrast
- 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 video_cards_i915 i915
- gallium_enable video_cards_imx imx
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
- fi
-
- gallium_enable video_cards_r300 r300
- gallium_enable video_cards_r600 r600
- gallium_enable video_cards_radeonsi radeonsi
- if ! use video_cards_r300 && \
- ! use video_cards_r600; then
- gallium_enable video_cards_radeon r300 r600
- fi
-
- gallium_enable video_cards_freedreno freedreno
- # opencl stuff
- if use opencl; then
- myconf+="
- $(use_enable opencl)
- --with-clang-libdir="${EPREFIX}/usr/lib"
- "
- fi
-
- gallium_enable video_cards_virgl virgl
- fi
-
- if use vulkan; then
- vulkan_enable video_cards_i965 intel
- vulkan_enable video_cards_radeonsi radeon
- fi
-
- # x86 hardened pax_kernel needs glx-rts, bug 240956
- if [[ ${ABI} == x86 ]]; then
- myconf+=" $(use_enable pax_kernel glx-read-only-text)"
- fi
-
- # on abi_x86_32 hardened we need to have asm disable
- if [[ ${ABI} == x86* ]] && use pic; then
- myconf+=" --disable-asm"
- fi
-
- if use gallium; then
- myconf+=" $(use_enable osmesa gallium-osmesa)"
- else
- myconf+=" $(use_enable osmesa)"
- fi
-
- # build fails with BSD indent, bug #428112
- use userland_GNU || export INDENT=cat
-
- ECONF_SOURCE="${S}" \
- econf \
- --enable-dri \
- --enable-glx \
- --enable-shared-glapi \
- $(use_enable !bindist texture-float) \
- $(use_enable d3d9 nine) \
- $(use_enable debug) \
- $(use_enable dri3) \
- $(use_enable egl) \
- $(use_enable gbm) \
- $(use_enable gles1) \
- $(use_enable gles2) \
- $(use_enable nptl glx-tls) \
- $(use_enable unwind libunwind) \
- --enable-valgrind=$(usex valgrind auto no) \
- --enable-llvm-shared-libs \
- --disable-opencl-icd \
- --with-dri-drivers=${DRI_DRIVERS} \
- --with-gallium-drivers=${GALLIUM_DRIVERS} \
- --with-vulkan-drivers=${VULKAN_DRIVERS} \
- PYTHON2="${PYTHON}" \
- ${myconf}
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use wayland; then
- # These files are now provided by >=dev-libs/wayland-1.15.0
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
- rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
- fi
-
- if use opencl; then
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
- dodir ${cl_dir}/{lib,include}
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
- "${ED}"${cl_dir}
- fi
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
- mv -f "${ED}"/usr/include/CL \
- "${ED}"${cl_dir}/include
- fi
- eend $?
- fi
-}
-
-multilib_src_install_all() {
- find "${ED}" -name '*.la' -delete
- einstalldocs
-
- if use !bindist; then
- dodoc docs/patents.txt
- fi
-}
-
-multilib_src_test() {
- if use llvm; then
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
- pushd src/gallium/drivers/llvmpipe >/dev/null || die
- emake ${llvm_tests}
- pax-mark m ${llvm_tests}
- popd >/dev/null || die
- fi
- emake check
-}
-
-pkg_postinst() {
- # Switch to the xorg implementation.
- echo
- eselect opengl set --use-old ${OPENGL_DIR}
-
- # Switch to mesa opencl
- if use opencl; then
- eselect opencl set --use-old ${PN}
- fi
-
- # warn about patent encumbered texture-float
- if use !bindist; then
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
- elog "explanation."
- fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- DRI_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- DRI_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
-
-gallium_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- GALLIUM_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- GALLIUM_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
-
-vulkan_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- VULKAN_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- VULKAN_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
-}
diff --git a/media-libs/mesa/mesa-18.2.1.ebuild b/media-libs/mesa/mesa-18.2.1.ebuild
deleted file mode 100644
index e128919..0000000
--- a/media-libs/mesa/mesa-18.2.1.ebuild
+++ /dev/null
@@ -1,558 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit llvm meson multilib-minimal pax-utils python-any-r1
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
- EXPERIMENTAL="true"
- inherit git-r3
-else
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="
- !test? ( test )
-"
-
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau 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 +llvm lm_sensors
- opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
- vulkan wayland xa xvmc"
-
-REQUIRED_USE="
- d3d9? ( dri3 )
- gles1? ( egl )
- gles2? ( egl )
- vulkan? ( dri3
- || ( video_cards_i965 video_cards_radeonsi )
- video_cards_radeonsi? ( llvm ) )
- wayland? ( egl gbm )
- video_cards_freedreno? ( gallium )
- video_cards_intel? ( classic )
- video_cards_i915? ( || ( classic gallium ) )
- video_cards_i965? ( classic )
- video_cards_imx? ( gallium video_cards_vivante )
- video_cards_nouveau? ( || ( classic gallium ) )
- video_cards_radeon? ( || ( classic gallium )
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
- video_cards_r100? ( classic )
- video_cards_r200? ( classic )
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
- video_cards_r600? ( gallium )
- video_cards_radeonsi? ( gallium llvm )
- video_cards_vc4? ( gallium )
- video_cards_virgl? ( gallium )
- video_cards_vivante? ( gallium gbm )
- video_cards_vmware? ( gallium )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
-RDEPEND="
- !app-eselect/eselect-mesa
- >=app-eselect/eselect-opengl-1.3.0
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
- gallium? (
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
- llvm? (
- video_cards_radeonsi? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_r600? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_radeon? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- )
- lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
- opencl? (
- app-eselect/eselect-opencl
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- vaapi? (
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
- )
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
- )
- wayland? (
- >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
- >=dev-libs/wayland-protocols-1.8
- )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-
- video_cards_intel? (
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- )
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-"
-for card in ${RADEON_CARDS}; do
- RDEPEND="${RDEPEND}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
- "
-done
-RDEPEND="${RDEPEND}
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
-"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more slot
-# simultaneously.
-#
-# How to use it:
-# 1. List all the working slots (with min versions) in ||, newest first.
-# 2. Update the := to specify *max* version, e.g. < 7.
-# 3. Specify LLVM_MAX_SLOT, e.g. 6.
-LLVM_MAX_SLOT="7"
-LLVM_DEPSTR="
- || (
- sys-devel/llvm:7[${MULTILIB_USEDEP}]
- sys-devel/llvm:6[${MULTILIB_USEDEP}]
- sys-devel/llvm:5[${MULTILIB_USEDEP}]
- sys-devel/llvm:4[${MULTILIB_USEDEP}]
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
- )
- sys-devel/llvm:=[${MULTILIB_USEDEP}]
-"
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-RDEPEND="${RDEPEND}
- llvm? (
- opencl? (
- video_cards_r600? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${CLANG_DEPSTR}
- )
- )
- )
- )
- !opencl? (
- video_cards_r600? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${LLVM_DEPSTR}
- )
- )
- )
- )
- )
-"
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
-
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- opencl? (
- >=sys-devel/gcc-4.6
- )
- sys-devel/bison
- sys-devel/flex
- sys-devel/gettext
- virtual/pkgconfig
- valgrind? ( dev-util/valgrind )
- x11-base/xorg-proto
- x11-libs/libXrandr[${MULTILIB_USEDEP}]
- $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
- !pic? (
- usr/lib*/libglapi.so.0.0.0
- usr/lib*/libGLESv1_CM.so.1.0.0
- usr/lib*/libGLESv2.so.2.0.0
- usr/lib*/libGL.so.1.2.0
- usr/lib*/libOSMesa.so.8.0.0
- )
-)"
-
-llvm_check_deps() {
- local flags=${MULTILIB_USEDEP}
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
- then
- flags+=",llvm_targets_AMDGPU(-)"
- fi
-
- if use opencl; then
- has_version "sys-devel/clang[${flags}]" || return 1
- fi
- has_version "sys-devel/llvm[${flags}]"
-}
-
-pkg_pretend() {
- if use d3d9; then
- if ! use video_cards_r300 &&
- ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau &&
- ! use video_cards_vmware; then
- ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
- fi
- fi
-
- if use opencl; then
- if ! use video_cards_r600 &&
- ! use video_cards_radeonsi; then
- ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
- fi
- fi
-
- if use vaapi; then
- if ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
- fi
- fi
-
- if use vdpau; then
- if ! use video_cards_r300 &&
- ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
- fi
- fi
-
- if use xa; then
- if ! use video_cards_freedreno &&
- ! use video_cards_nouveau &&
- ! use video_cards_vmware; then
- ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
- fi
- fi
-
- if use xvmc; then
- if ! use video_cards_r600 &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
- fi
- fi
-
- if ! use gallium; then
- use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
- use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
- use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
- use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
- use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
- use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
- use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
- use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
- fi
-
- if ! use llvm; then
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
- fi
-}
-
-pkg_setup() {
- # warning message for bug 459306
- if use llvm && has_version sys-devel/llvm[!debug=]; then
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
- ewarn "detected! This can cause problems. For details, see bug 459306."
- fi
-
- if use llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- eapply "${FILESDIR}"/${PN}-17-execinfo.patch
- eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
- eapply "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
- eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
- #eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
- eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
- eapply_user
-}
-
-multilib_src_configure() {
- local emesonargs=()
-
- if use classic; then
- # Intel code
- dri_driver_enable video_cards_i915 i915
- dri_driver_enable video_cards_i965 i965
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- dri_driver_enable video_cards_intel i915 i965
- fi
-
- # Nouveau code
- dri_driver_enable video_cards_nouveau nouveau
-
- # ATI code
- dri_driver_enable video_cards_r100 r100
- dri_driver_enable video_cards_r200 r200
- if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- dri_driver_enable video_cards_radeon r100 r200
- fi
- fi
-
- emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
-
- if use gallium; then
- emesonargs+=(
- $(meson_use llvm)
- $(meson_use lm_sensors lmsensors)
- $(meson_use unwind libunwind)
- )
-
- if use video_cards_r300 ||
- use video_cards_r600 ||
- use video_cards_radeonsi ||
- use video_cards_nouveau ||
- use video_cards_vmware; then
- emesonargs+=($(meson_use d3d9 gallium-nine))
- else
- emesonargs+=(-Dgallium-nine=false)
- fi
-
- if use video_cards_r600 ||
- use video_cards_radeonsi ||
- use video_cards_nouveau; then
- emesonargs+=($(meson_use vaapi gallium-va))
- use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
- else
- emesonargs+=(-Dgallium-va=false)
- 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))
- else
- emesonargs+=(-Dgallium-vdpau=false)
- fi
-
- if use video_cards_freedreno ||
- use video_cards_nouveau ||
- use video_cards_vmware; then
- emesonargs+=($(meson_use xa gallium-xa))
- else
- emesonargs+=(-Dgallium-xa=false)
- fi
-
- if use video_cards_r600 ||
- use video_cards_nouveau; then
- emesonargs+=($(meson_use xvmc gallium-xvmc))
- else
- emesonargs+=(-Dgallium-xvmc=false)
- fi
-
- 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 video_cards_imx imx
-
- # Only one i915 driver (classic vs gallium). Default to classic.
- if ! use classic; then
- gallium_enable video_cards_i915 i915
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
- fi
- fi
-
- gallium_enable video_cards_r300 r300
- gallium_enable video_cards_r600 r600
- gallium_enable video_cards_radeonsi radeonsi
- if ! use video_cards_r300 && \
- ! use video_cards_r600; then
- gallium_enable video_cards_radeon r300 r600
- fi
-
- gallium_enable video_cards_freedreno freedreno
- # opencl stuff
- if use opencl; then
- emesonargs+=(
- -Dgallium-opencl="$(usex opencl standalone disabled)"
- )
- fi
-
- gallium_enable video_cards_virgl virgl
- fi
-
- if use vulkan; then
- vulkan_enable video_cards_i965 intel
- 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
-
- # on abi_x86_32 hardened we need to have asm disable
- if [[ ${ABI} == x86* ]] && use pic; then
- emesonargs+=( -Dasm=false )
- fi
-
- if use gallium; then
- gallium_enable -- swrast
- emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
- else
- dri_driver_enable -- swrast
- emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
- fi
-
- driver_list() {
- local drivers="$(sort -u <<< "${1// /$'\n'}")"
- echo "${drivers//$'\n'/,}"
- }
-
- emesonargs+=(
- $(meson_use test build-tests)
- -Dglx=dri
- -Dshared-glapi=true
- $(meson_use dri3)
- $(meson_use egl)
- $(meson_use gbm)
- $(meson_use gles1)
- $(meson_use gles2)
- $(meson_use selinux)
- -Dvalgrind=$(usex valgrind auto false)
- -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
- -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
- -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
- --buildtype $(usex debug debug plain)
- -Db_ndebug=$(usex debug false true)
- )
- meson_src_configure
-}
-
-multilib_src_compile() {
- meson_src_compile
-}
-
-multilib_src_install() {
- meson_src_install
-
- if use opencl; then
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
- dodir ${cl_dir}/{lib,include}
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
- "${ED}"${cl_dir}
- fi
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
- mv -f "${ED}"/usr/include/CL \
- "${ED}"${cl_dir}/include
- fi
- eend $?
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-}
-
-multilib_src_test() {
- meson_src_test
-}
-
-pkg_postinst() {
- # Switch to the xorg implementation.
- echo
- eselect opengl set --use-old ${OPENGL_DIR}
-
- # Switch to mesa opencl
- if use opencl; then
- eselect opencl set --use-old ${PN}
- fi
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-dri_driver_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- DRI_DRIVERS+=("$@")
- fi
-}
-
-gallium_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- GALLIUM_DRIVERS+=("$@")
- fi
-}
-
-vulkan_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- VULKAN_DRIVERS+=("$@")
- fi
-}
diff --git a/media-libs/mesa/mesa-18.2.4.ebuild b/media-libs/mesa/mesa-18.2.8.ebuild
similarity index 96%
rename from media-libs/mesa/mesa-18.2.4.ebuild
rename to media-libs/mesa/mesa-18.2.8.ebuild
index ab4c917..39fa4bc 100644
--- a/media-libs/mesa/mesa-18.2.4.ebuild
+++ b/media-libs/mesa/mesa-18.2.8.ebuild
@@ -20,7 +20,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+ KEYWORDS="amd64 arm ~arm64 ~mips ppc x86"
fi
LICENSE="MIT"
@@ -41,7 +41,7 @@ IUSE="${IUSE_VIDEO_CARDS}
vulkan wayland xa xvmc"
REQUIRED_USE="
- d3d9? ( dri3 )
+ d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
gles1? ( egl )
gles2? ( egl )
vulkan? ( dri3
@@ -232,12 +232,12 @@ x86? (
)"
PATCHES=(
- "${FILESDIR}"/${P}-meson-link-gallium-nine-with-pthreads.patch
"${FILESDIR}"/${PN}-17-execinfo.patch
"${FILESDIR}"/${PN}-17-musl-string_h.patch
"${FILESDIR}"/${PN}-18-musl-invocation_name.patch
"${FILESDIR}"/${PN}-18-musl-pthread.patch
"${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
+ "${FILESDIR}"/${PN}-18-musl-larger-stacksize.patch
)
llvm_check_deps() {
@@ -254,16 +254,6 @@ llvm_check_deps() {
}
pkg_pretend() {
- if use d3d9; then
- if ! use video_cards_r300 &&
- ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau &&
- ! use video_cards_vmware; then
- ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
- fi
- fi
-
if use opencl; then
if ! use video_cards_r600 &&
! use video_cards_radeonsi; then
@@ -304,7 +294,6 @@ pkg_pretend() {
fi
if ! use gallium; then
- use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml
index f978f99..ea7584d 100644
--- a/media-libs/mesa/metadata.xml
+++ b/media-libs/mesa/metadata.xml
@@ -6,7 +6,6 @@
<name>X11</name>
</maintainer>
<use>
- <flag name="bindist">Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions.</flag>
<flag name="classic">Build drivers based on the classic architecture.</flag>
<flag name="d3d9">Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.</flag>
<flag name="dri3">Enable DRI3 support.</flag>
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2019-01-27 17:52 Anthony G. Basile
0 siblings, 0 replies; 21+ messages in thread
From: Anthony G. Basile @ 2019-01-27 17:52 UTC (permalink / raw
To: gentoo-commits
commit: 7a73006b48b30e36d961bd1417b1e7d5cc3e554f
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 27 17:48:19 2019 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Jan 27 17:52:05 2019 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7a73006b
Revert "media-libs/mesa: revbump and sync with tree"
This reverts commit 89c1adfdef658652e452c76a8b98931e4a2cf131.
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
media-libs/mesa/Manifest | 5 +-
media-libs/mesa/files/mesa-11-execinfo.patch | 68 +++
media-libs/mesa/files/mesa-13-musl_endian.patch | 12 +
.../mesa/files/mesa-17-musl-invocation_name.patch | 47 ++
media-libs/mesa/files/mesa-17-musl-pthread.patch | 39 ++
media-libs/mesa/files/mesa-17-musl_endian.patch | 12 +
.../mesa/files/mesa-18-intel-missing-time_t.patch | 11 +
.../mesa/files/mesa-18-missing-includes.patch | 53 +++
...2.4-meson-link-gallium-nine-with-pthreads.patch | 34 ++
media-libs/mesa/mesa-18.1.6-r1.ebuild | 520 +++++++++++++++++++++
media-libs/mesa/mesa-18.1.6.ebuild | 519 ++++++++++++++++++++
media-libs/mesa/mesa-18.1.9-r1.ebuild | 520 +++++++++++++++++++++
media-libs/mesa/mesa-18.1.9.ebuild | 519 ++++++++++++++++++++
.../{mesa-18.2.8.ebuild => mesa-18.2.1.ebuild} | 70 ++-
.../{mesa-18.2.8.ebuild => mesa-18.2.4.ebuild} | 17 +-
media-libs/mesa/metadata.xml | 1 +
16 files changed, 2425 insertions(+), 22 deletions(-)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index aebf196..2e5ff61 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1 +1,4 @@
-DIST mesa-18.2.8.tar.xz 11385224 BLAKE2B c6fbf71e2ab6837f91dfa996cf7e89e9cae22e219cac56bd4201f7a62c787ddd2f65e7d162a329971018f0b1a796ee1a5b252ee6b43bb3b27a233d67b6cdf615 SHA512 04d5ada9ba3acea853def3ebcbb53ee76936a4cd4229ae753d2ce1b5cf543bea1e5764f2ef2b19735d47d041ba6b0582841bc89e2c9331fdfbd89386f599a1f7
+DIST mesa-18.1.6.tar.xz 11142884 BLAKE2B fdd156fe7debf5223285dfa238070a2bd7d8ec684dec168afab78b9d2d38d53c10d939aaa64f34c2910e542dce3869adfca6383fca6a854c6dd03287a044b0e3 SHA512 2966210800215f5ced2720691063a8519b51ebeab9fb1e99bde4b1bd7ccc719d6395a1c29f25c88efe62d1592cf14ceafc163aca349490b1f8cee81070d46fcc
+DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa3600de78585487fb8e178c6987a72b79fb56e6c310757d157f9f85f12b73a6889bd361b51b62fb1dc1c20eecd SHA512 22db2950d25a3d9393e7c622c783bd177c21695569c8a95683bf77e92318e1db85672a134d4bea30c1f49a24e52bc3a2c1a0ac15deafb3a8fcbfb6de6a18adc2
+DIST mesa-18.2.1.tar.xz 11374476 BLAKE2B f0f3b766d68550f8c395a1b1d1ffc7a9e532c22ee6b91d698db33a270c152e03ab656d4219301bc2e0e95ba6f0583017c4361add928ad8ab26378a1ec6958f36 SHA512 d249bdf79aad36db9a8d291b3a1a100d283893ac741f58f85ae7e5c90ca25c37f80a5fa6fc57945ffeb0b67b788e7ea146543ec790b22f144578fc4c1525b84d
+DIST mesa-18.2.4.tar.xz 11377556 BLAKE2B b11c33ade744fb976862fecccbcc4c97196a005e40a00ef02bd8d409b66b3aa11f97baee13f2aa92f2d7c5461b2ef44beae3103687dea9ee29e92439a068f08a SHA512 088d43b087f4005752e4db75eaa6897e0fcb6de7b9a1f2d2b2ce3b5557d1dff829022e0092e8b1038ff01182c863ca0f26c97b9adde34bca462d3fa24502bfde
diff --git a/media-libs/mesa/files/mesa-11-execinfo.patch b/media-libs/mesa/files/mesa-11-execinfo.patch
new file mode 100644
index 0000000..0eefba8
--- /dev/null
+++ b/media-libs/mesa/files/mesa-11-execinfo.patch
@@ -0,0 +1,68 @@
+diff -Naur mesa-11.1.2.orig/configure.ac mesa-11.1.2/configure.ac
+--- mesa-11.1.2.orig/configure.ac 2016-02-10 15:57:54.000000000 -0800
++++ mesa-11.1.2/configure.ac 2016-03-09 13:27:47.979302937 -0800
+@@ -681,6 +681,7 @@
+ AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
+ AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
+ AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
++AC_CHECK_HEADER([execinfo.h], [DEFINES="$DEFINES -DHAVE_EXECINFO_H"])
+
+ dnl Check to see if dlopen is in default libraries (like Solaris, which
+ dnl has it in libc), or if libdl is needed to get it.
+diff -Naur mesa-11.1.2.orig/src/gallium/auxiliary/util/u_debug_symbol.c mesa-11.1.2/src/gallium/auxiliary/util/u_debug_symbol.c
+--- mesa-11.1.2.orig/src/gallium/auxiliary/util/u_debug_symbol.c 2016-01-17 23:39:26.000000000 -0800
++++ mesa-11.1.2/src/gallium/auxiliary/util/u_debug_symbol.c 2016-03-09 13:29:27.255060988 -0800
+@@ -219,7 +219,7 @@
+ #endif /* PIPE_OS_WINDOWS */
+
+
+-#if defined(__GLIBC__) && !defined(__UCLIBC__)
++#if defined(HAVE_EXECINFO_H)
+
+ #include <execinfo.h>
+
+@@ -240,7 +240,7 @@
+ return TRUE;
+ }
+
+-#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */
++#endif /* defined(HAVE_EXECINFO_H) */
+
+
+ void
+diff -Naur mesa-11.1.2.orig/src/mapi/glapi/gen/gl_gentable.py mesa-11.1.2/src/mapi/glapi/gen/gl_gentable.py
+--- mesa-11.1.2.orig/src/mapi/glapi/gen/gl_gentable.py 2016-02-10 15:57:54.000000000 -0800
++++ mesa-11.1.2/src/mapi/glapi/gen/gl_gentable.py 2016-03-09 13:28:14.624506395 -0800
+@@ -44,7 +44,7 @@
+ #endif
+
+ #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
+- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
++ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
+ #define USE_BACKTRACE
+ #endif
+
+diff -Naur mesa-11.1.2.orig/src/mapi/glapi/glapi_gentable.c mesa-11.1.2/src/mapi/glapi/glapi_gentable.c
+--- mesa-11.1.2.orig/src/mapi/glapi/glapi_gentable.c 2016-02-10 16:24:49.000000000 -0800
++++ mesa-11.1.2/src/mapi/glapi/glapi_gentable.c 2016-03-09 13:28:38.411688029 -0800
+@@ -36,7 +36,7 @@
+ #endif
+
+ #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \
+- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
++ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
+ #define USE_BACKTRACE
+ #endif
+
+diff -Naur mesa-11.1.2.orig/src/mesa/drivers/dri/i915/intel_regions.c mesa-11.1.2/src/mesa/drivers/dri/i915/intel_regions.c
+--- mesa-11.1.2.orig/src/mesa/drivers/dri/i915/intel_regions.c 2016-01-17 23:39:26.000000000 -0800
++++ mesa-11.1.2/src/mesa/drivers/dri/i915/intel_regions.c 2016-03-09 13:30:18.483460168 -0800
+@@ -57,7 +57,7 @@
+ */
+ #define DEBUG_BACKTRACE_SIZE 0
+
+-#if DEBUG_BACKTRACE_SIZE == 0
++#if DEBUG_BACKTRACE_SIZE == 0 || !defined(HAVE_EXECINFO_H)
+ /* Use the standard debug output */
+ #define _DBG(...) DBG(__VA_ARGS__)
+ #else
diff --git a/media-libs/mesa/files/mesa-13-musl_endian.patch b/media-libs/mesa/files/mesa-13-musl_endian.patch
new file mode 100644
index 0000000..1276605
--- /dev/null
+++ b/media-libs/mesa/files/mesa-13-musl_endian.patch
@@ -0,0 +1,12 @@
+diff -Naur mesa-13.0.5.orig/src/util/u_endian.h mesa-13.0.5/src/util/u_endian.h
+--- mesa-13.0.5.orig/src/util/u_endian.h 2017-03-19 12:40:43.808781967 -0700
++++ mesa-13.0.5/src/util/u_endian.h 2017-03-19 12:49:01.731158551 -0700
+@@ -27,7 +27,7 @@
+ #ifndef U_ENDIAN_H
+ #define U_ENDIAN_H
+
+-#if defined(__GLIBC__) || defined(ANDROID)
++#if defined(__linux__)
+ #include <endian.h>
+
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/media-libs/mesa/files/mesa-17-musl-invocation_name.patch b/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
new file mode 100644
index 0000000..80b02f5
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
@@ -0,0 +1,47 @@
+diff -Naur mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c mesa-17.3.0/src/gallium/auxiliary/os/os_process.c
+--- mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/gallium/auxiliary/os/os_process.c 2017-12-11 14:24:35.200797607 -0800
+@@ -32,7 +32,7 @@
+
+ #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ # include <windows.h>
+-#elif defined(__GLIBC__) || defined(__CYGWIN__)
++#elif defined(__linux__) || defined(__CYGWIN__)
+ # include <errno.h>
+ #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
+ # include <stdlib.h>
+@@ -84,7 +84,7 @@
+
+ name = lpProcessName;
+
+-#elif defined(__GLIBC__) || defined(__CYGWIN__)
++#elif defined(__linux__) || defined(__CYGWIN__)
+ name = program_invocation_short_name;
+ #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
+ /* *BSD and OS X */
+diff -Naur mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
+--- mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2017-12-11 14:23:35.312798680 -0800
+@@ -84,7 +84,7 @@
+ ret = os_get_process_name(cmdline, 63);
+ if (ret == FALSE)
+ strcpy(cmdline, nstr);
+-#if defined(__GLIBC__) || defined(__CYGWIN__)
++#if defined(__linux__) || defined(__CYGWIN__)
+ if (!strcmp(cmdline, "shader_runner")) {
+ const char *name;
+ /* hack to get better testname */
+diff -Naur mesa-17.3.0.orig/src/util/xmlconfig.c mesa-17.3.0/src/util/xmlconfig.c
+--- mesa-17.3.0.orig/src/util/xmlconfig.c 2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/util/xmlconfig.c 2017-12-11 14:22:54.052799419 -0800
+@@ -40,8 +40,8 @@
+
+ #undef GET_PROGRAM_NAME
+
+-#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__)
+-# if !defined(__GLIBC__) || (__GLIBC__ < 2)
++#if defined(__linux__)
++# if defined(__GLIBC__) && (__GLIBC__ < 2)
+ /* These aren't declared in any libc5 header */
+ extern char *program_invocation_name, *program_invocation_short_name;
+ # endif
diff --git a/media-libs/mesa/files/mesa-17-musl-pthread.patch b/media-libs/mesa/files/mesa-17-musl-pthread.patch
new file mode 100644
index 0000000..aac95af
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl-pthread.patch
@@ -0,0 +1,39 @@
+diff -Naur mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c
+--- mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c 2017-12-12 16:55:53.885552821 -0800
++++ mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c 2017-12-12 17:09:36.048538098 -0800
+@@ -73,8 +73,8 @@
+ }
+
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
++# if defined(__linux__) && !(defined(__GLIBC__) || \
++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
+ if (dbg_flags & DBG_TID)
+ tid = pthread_self();
+ # endif
+diff -Naur mesa-17.3.0.orig/src/util/u_thread.h mesa-17.3.0/src/util/u_thread.h
+--- mesa-17.3.0.orig/src/util/u_thread.h 2017-12-12 16:55:53.915552820 -0800
++++ mesa-17.3.0/src/util/u_thread.h 2017-12-12 17:09:34.079538133 -0800
+@@ -61,8 +61,8 @@
+ static inline void u_thread_setname( const char *name )
+ {
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
++# if defined(__linux__) && !(defined(__GLIBC__) || \
++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
+ pthread_setname_np(pthread_self(), name);
+ # endif
+ #endif
+@@ -92,8 +92,8 @@
+ static inline bool u_thread_is_self(thrd_t thread)
+ {
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
++# if defined(__linux__) && !(defined(__GLIBC__) || \
++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
+ return pthread_equal(pthread_self(), thread);
+ # endif
+ #endif
diff --git a/media-libs/mesa/files/mesa-17-musl_endian.patch b/media-libs/mesa/files/mesa-17-musl_endian.patch
new file mode 100644
index 0000000..74e3d1d
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl_endian.patch
@@ -0,0 +1,12 @@
+diff -Naur mesa-17.3.1.orig/src/util/u_endian.h mesa-17.3.1/src/util/u_endian.h
+--- mesa-17.3.1.orig/src/util/u_endian.h 2017-12-29 14:19:33.532915798 -0800
++++ mesa-17.3.1/src/util/u_endian.h 2017-12-29 14:21:55.547913255 -0800
+@@ -27,7 +27,7 @@
+ #ifndef U_ENDIAN_H
+ #define U_ENDIAN_H
+
+-#if defined(__GLIBC__) || defined(ANDROID) || defined(__CYGWIN__)
++#if defined(__linux__) || defined(__CYGWIN__)
+ #include <endian.h>
+
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/media-libs/mesa/files/mesa-18-intel-missing-time_t.patch b/media-libs/mesa/files/mesa-18-intel-missing-time_t.patch
new file mode 100644
index 0000000..353f8f2
--- /dev/null
+++ b/media-libs/mesa/files/mesa-18-intel-missing-time_t.patch
@@ -0,0 +1,11 @@
+diff -Naur mesa-18.1.0-rc1.orig/src/mesa/drivers/dri/i965/brw_bufmgr.h mesa-18.1.0-rc1/src/mesa/drivers/dri/i965/brw_bufmgr.h
+--- mesa-18.1.0-rc1.orig/src/mesa/drivers/dri/i965/brw_bufmgr.h 2018-04-22 12:42:46.505947484 -0700
++++ mesa-18.1.0-rc1/src/mesa/drivers/dri/i965/brw_bufmgr.h 2018-04-22 12:44:09.720945994 -0700
+@@ -37,6 +37,7 @@
+ #include <stdbool.h>
+ #include <stdint.h>
+ #include <stdio.h>
++#include <time.h>
+ #include "util/u_atomic.h"
+ #include "util/list.h"
+
diff --git a/media-libs/mesa/files/mesa-18-missing-includes.patch b/media-libs/mesa/files/mesa-18-missing-includes.patch
new file mode 100644
index 0000000..3f7bd62
--- /dev/null
+++ b/media-libs/mesa/files/mesa-18-missing-includes.patch
@@ -0,0 +1,53 @@
+From 456b660306e475a30f170a3bcecc0445124d7e2b Mon Sep 17 00:00:00 2001
+From:
+Date: Sun, 8 Jul 2018 03:57:11 -0500
+Subject: [PATCH] Fix all missing includes for mesa
+
+Signed-off-by:
+---
+ src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h | 1 +
+ src/gallium/winsys/svga/drm/vmw_screen.h | 2 +-
+ src/util/rand_xor.c | 2 ++
+ 3 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+index d6af605..6eee83f 100644
+--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
++++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+@@ -32,6 +32,7 @@
+ #include "ac_gpu_info.h"
+ #include "addrlib/addrinterface.h"
+ #include <amdgpu.h>
++#include <pthread.h>
+ #include "util/list.h"
+
+ struct radv_amdgpu_winsys {
+diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h
+index f21cabb..20d03f8 100644
+--- a/src/gallium/winsys/svga/drm/vmw_screen.h
++++ b/src/gallium/winsys/svga/drm/vmw_screen.h
+@@ -34,7 +34,7 @@
+ #ifndef VMW_SCREEN_H_
+ #define VMW_SCREEN_H_
+
+-
++#include <sys/stat.h>
+ #include "pipe/p_compiler.h"
+ #include "pipe/p_state.h"
+
+diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c
+index de04bbc..08d507f 100644
+--- a/src/util/rand_xor.c
++++ b/src/util/rand_xor.c
+@@ -24,6 +24,8 @@
+
+ #if defined(__linux__)
+ #include <sys/file.h>
++#include <sys/types.h>
++#include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #else
+--
+2.18.0
+
diff --git a/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch b/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch
new file mode 100644
index 0000000..11d4f9c
--- /dev/null
+++ b/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch
@@ -0,0 +1,34 @@
+From 7652931d33b36c93b2e84713baa8c283d568402e Mon Sep 17 00:00:00 2001
+From: Dylan Baker <dylan@pnwbakers.com>
+Date: Thu, 1 Nov 2018 14:12:57 -0700
+Subject: [PATCH] meson: link gallium nine with pthreads
+
+In some cases (not building with llvm, which automatically pulls in
+pthreads) nine needs to be directly linked with pthreads. Fixes building
+on x86 (32 bit) without llvm.
+
+Distro bug: https://bugs.gentoo.org/670094
+Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3
+ ("meson: build gallium nine state_tracker")
+Tested-by: Rafal Lalik <rafallalik@gmail.com>
+Reviewed-by: Matt Turner <mattst88@gmail.com>
+---
+ src/gallium/targets/d3dadapter9/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/targets/d3dadapter9/meson.build b/src/gallium/targets/d3dadapter9/meson.build
+index bd05b4f9692..bc72b1110a0 100644
+--- a/src/gallium/targets/d3dadapter9/meson.build
++++ b/src/gallium/targets/d3dadapter9/meson.build
+@@ -53,7 +53,7 @@ libgallium_nine = shared_library(
+ libswkmsdri,
+ ],
+ dependencies : [
+- dep_selinux, dep_expat, dep_libdrm, dep_llvm,
++ dep_selinux, dep_expat, dep_libdrm, dep_llvm, dep_thread,
+ driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
+ driver_i915, driver_svga,
+ ],
+--
+2.16.4
+
diff --git a/media-libs/mesa/mesa-18.1.6-r1.ebuild b/media-libs/mesa/mesa-18.1.6-r1.ebuild
new file mode 100644
index 0000000..8e43662
--- /dev/null
+++ b/media-libs/mesa/mesa-18.1.6-r1.ebuild
@@ -0,0 +1,520 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+
+if [[ ${PV} = 9999 ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+if [[ $PV == 9999 ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="!bindist? ( bindist )"
+
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
+ +llvm +nptl opencl osmesa pax_kernel pic selinux vaapi valgrind
+ vdpau vulkan wayland xvmc xa"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
+ video_cards_radeonsi? ( llvm ) )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_imx? ( gallium video_cards_vivante )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium )
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vc4? ( gallium )
+ video_cards_virgl? ( gallium )
+ video_cards_vivante? ( gallium gbm )
+ video_cards_vmware? ( gallium )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
+RDEPEND="
+ !app-eselect/eselect-mesa
+ >=app-eselect/eselect-opengl-1.3.0
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
+ )
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ wayland? (
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+"
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+RDEPEND="${RDEPEND}
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
+"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more slot
+# simultaneously.
+#
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 7.
+# 3. Specify LLVM_MAX_SLOT, e.g. 6.
+LLVM_MAX_SLOT="6"
+LLVM_DEPSTR="
+ || (
+ sys-devel/llvm:7[${MULTILIB_USEDEP}]
+ sys-devel/llvm:6[${MULTILIB_USEDEP}]
+ sys-devel/llvm:5[${MULTILIB_USEDEP}]
+ sys-devel/llvm:4[${MULTILIB_USEDEP}]
+ >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
+ )
+ sys-devel/llvm:=[${MULTILIB_USEDEP}]
+"
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+RDEPEND="${RDEPEND}
+ llvm? (
+ opencl? (
+ video_cards_r600? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${CLANG_DEPSTR}
+ )
+ )
+ )
+ )
+ !opencl? (
+ video_cards_r600? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${LLVM_DEPSTR}
+ )
+ )
+ )
+ )
+ )
+"
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ opencl? (
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ valgrind? ( dev-util/valgrind )
+ x11-base/xorg-proto
+ vulkan? (
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+ )
+"
+[[ ${PV} == 9999 ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ !pic? (
+ usr/lib*/libglapi.so.0.0.0
+ usr/lib*/libGLESv1_CM.so.1.1.0
+ usr/lib*/libGLESv2.so.2.0.0
+ usr/lib*/libGL.so.1.2.0
+ usr/lib*/libOSMesa.so.8.0.0
+ )
+)"
+
+llvm_check_deps() {
+ local flags=${MULTILIB_USEDEP}
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+ then
+ flags+=",llvm_targets_AMDGPU(-)"
+ fi
+
+ if use opencl; then
+ has_version "sys-devel/clang[${flags}]" || return 1
+ fi
+ has_version "sys-devel/llvm[${flags}]"
+}
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ if use llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-17-execinfo.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-larger-stacksize.patch
+ eapply_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
+
+ gallium_enable swrast
+ 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 video_cards_i915 i915
+ gallium_enable video_cards_imx imx
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+
+ gallium_enable video_cards_virgl virgl
+ fi
+
+ if use vulkan; then
+ vulkan_enable video_cards_i965 intel
+ vulkan_enable video_cards_radeonsi radeon
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if [[ ${ABI} == x86 ]]; then
+ myconf+=" $(use_enable pax_kernel glx-read-only-text)"
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ if use gallium; then
+ myconf+=" $(use_enable osmesa gallium-osmesa)"
+ else
+ myconf+=" $(use_enable osmesa)"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable unwind libunwind) \
+ --enable-valgrind=$(usex valgrind auto no) \
+ --enable-llvm-shared-libs \
+ --disable-opencl-icd \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ --with-vulkan-drivers=${VULKAN_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use wayland; then
+ # These files are now provided by >=dev-libs/wayland-1.15.0
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
+ rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
+ fi
+
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name '*.la' -delete
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
+ elog "explanation."
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+vulkan_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ VULKAN_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ VULKAN_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-18.1.6.ebuild b/media-libs/mesa/mesa-18.1.6.ebuild
new file mode 100644
index 0000000..3145d0d
--- /dev/null
+++ b/media-libs/mesa/mesa-18.1.6.ebuild
@@ -0,0 +1,519 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+
+if [[ ${PV} = 9999 ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+if [[ $PV == 9999 ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
+ KEYWORDS="amd64 ~arm ~arm64 ~ppc x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="!bindist? ( bindist )"
+
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
+ +llvm +nptl opencl osmesa pax_kernel pic selinux vaapi valgrind
+ vdpau vulkan wayland xvmc xa"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
+ video_cards_radeonsi? ( llvm ) )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_imx? ( gallium video_cards_vivante )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium )
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vc4? ( gallium )
+ video_cards_virgl? ( gallium )
+ video_cards_vivante? ( gallium gbm )
+ video_cards_vmware? ( gallium )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
+RDEPEND="
+ !app-eselect/eselect-mesa
+ >=app-eselect/eselect-opengl-1.3.0
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
+ )
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ wayland? (
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+"
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+RDEPEND="${RDEPEND}
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
+"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more slot
+# simultaneously.
+#
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 7.
+# 3. Specify LLVM_MAX_SLOT, e.g. 6.
+LLVM_MAX_SLOT="6"
+LLVM_DEPSTR="
+ || (
+ sys-devel/llvm:7[${MULTILIB_USEDEP}]
+ sys-devel/llvm:6[${MULTILIB_USEDEP}]
+ sys-devel/llvm:5[${MULTILIB_USEDEP}]
+ sys-devel/llvm:4[${MULTILIB_USEDEP}]
+ >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
+ )
+ sys-devel/llvm:=[${MULTILIB_USEDEP}]
+"
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+RDEPEND="${RDEPEND}
+ llvm? (
+ opencl? (
+ video_cards_r600? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${CLANG_DEPSTR}
+ )
+ )
+ )
+ )
+ !opencl? (
+ video_cards_r600? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${LLVM_DEPSTR}
+ )
+ )
+ )
+ )
+ )
+"
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ opencl? (
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ valgrind? ( dev-util/valgrind )
+ x11-base/xorg-proto
+ vulkan? (
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+ )
+"
+[[ ${PV} == 9999 ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ !pic? (
+ usr/lib*/libglapi.so.0.0.0
+ usr/lib*/libGLESv1_CM.so.1.1.0
+ usr/lib*/libGLESv2.so.2.0.0
+ usr/lib*/libGL.so.1.2.0
+ usr/lib*/libOSMesa.so.8.0.0
+ )
+)"
+
+llvm_check_deps() {
+ local flags=${MULTILIB_USEDEP}
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+ then
+ flags+=",llvm_targets_AMDGPU(-)"
+ fi
+
+ if use opencl; then
+ has_version "sys-devel/clang[${flags}]" || return 1
+ fi
+ has_version "sys-devel/llvm[${flags}]"
+}
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ if use llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-17-execinfo.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
+ eapply_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
+
+ gallium_enable swrast
+ 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 video_cards_i915 i915
+ gallium_enable video_cards_imx imx
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+
+ gallium_enable video_cards_virgl virgl
+ fi
+
+ if use vulkan; then
+ vulkan_enable video_cards_i965 intel
+ vulkan_enable video_cards_radeonsi radeon
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if [[ ${ABI} == x86 ]]; then
+ myconf+=" $(use_enable pax_kernel glx-read-only-text)"
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ if use gallium; then
+ myconf+=" $(use_enable osmesa gallium-osmesa)"
+ else
+ myconf+=" $(use_enable osmesa)"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable unwind libunwind) \
+ --enable-valgrind=$(usex valgrind auto no) \
+ --enable-llvm-shared-libs \
+ --disable-opencl-icd \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ --with-vulkan-drivers=${VULKAN_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use wayland; then
+ # These files are now provided by >=dev-libs/wayland-1.15.0
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
+ rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
+ fi
+
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name '*.la' -delete
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
+ elog "explanation."
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+vulkan_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ VULKAN_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ VULKAN_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-18.1.9-r1.ebuild b/media-libs/mesa/mesa-18.1.9-r1.ebuild
new file mode 100644
index 0000000..ca6486f
--- /dev/null
+++ b/media-libs/mesa/mesa-18.1.9-r1.ebuild
@@ -0,0 +1,520 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+
+if [[ ${PV} = 9999 ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+if [[ $PV == 9999 ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="!bindist? ( bindist )"
+
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
+ +llvm +nptl opencl osmesa pax_kernel pic selinux vaapi valgrind
+ vdpau vulkan wayland xvmc xa"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
+ video_cards_radeonsi? ( llvm ) )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_imx? ( gallium video_cards_vivante )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium )
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vc4? ( gallium )
+ video_cards_virgl? ( gallium )
+ video_cards_vivante? ( gallium gbm )
+ video_cards_vmware? ( gallium )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
+RDEPEND="
+ !app-eselect/eselect-mesa
+ >=app-eselect/eselect-opengl-1.3.0
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
+ )
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ wayland? (
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+"
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+RDEPEND="${RDEPEND}
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
+"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more slot
+# simultaneously.
+#
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 7.
+# 3. Specify LLVM_MAX_SLOT, e.g. 6.
+LLVM_MAX_SLOT="6"
+LLVM_DEPSTR="
+ || (
+ sys-devel/llvm:7[${MULTILIB_USEDEP}]
+ sys-devel/llvm:6[${MULTILIB_USEDEP}]
+ sys-devel/llvm:5[${MULTILIB_USEDEP}]
+ sys-devel/llvm:4[${MULTILIB_USEDEP}]
+ >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
+ )
+ sys-devel/llvm:=[${MULTILIB_USEDEP}]
+"
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+RDEPEND="${RDEPEND}
+ llvm? (
+ opencl? (
+ video_cards_r600? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${CLANG_DEPSTR}
+ )
+ )
+ )
+ )
+ !opencl? (
+ video_cards_r600? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${LLVM_DEPSTR}
+ )
+ )
+ )
+ )
+ )
+"
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ opencl? (
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ valgrind? ( dev-util/valgrind )
+ x11-base/xorg-proto
+ vulkan? (
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+ )
+"
+[[ ${PV} == 9999 ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ !pic? (
+ usr/lib*/libglapi.so.0.0.0
+ usr/lib*/libGLESv1_CM.so.1.1.0
+ usr/lib*/libGLESv2.so.2.0.0
+ usr/lib*/libGL.so.1.2.0
+ usr/lib*/libOSMesa.so.8.0.0
+ )
+)"
+
+llvm_check_deps() {
+ local flags=${MULTILIB_USEDEP}
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+ then
+ flags+=",llvm_targets_AMDGPU(-)"
+ fi
+
+ if use opencl; then
+ has_version "sys-devel/clang[${flags}]" || return 1
+ fi
+ has_version "sys-devel/llvm[${flags}]"
+}
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ if use llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-17-execinfo.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-larger-stacksize.patch
+ eapply_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
+
+ gallium_enable swrast
+ 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 video_cards_i915 i915
+ gallium_enable video_cards_imx imx
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+
+ gallium_enable video_cards_virgl virgl
+ fi
+
+ if use vulkan; then
+ vulkan_enable video_cards_i965 intel
+ vulkan_enable video_cards_radeonsi radeon
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if [[ ${ABI} == x86 ]]; then
+ myconf+=" $(use_enable pax_kernel glx-read-only-text)"
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ if use gallium; then
+ myconf+=" $(use_enable osmesa gallium-osmesa)"
+ else
+ myconf+=" $(use_enable osmesa)"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable unwind libunwind) \
+ --enable-valgrind=$(usex valgrind auto no) \
+ --enable-llvm-shared-libs \
+ --disable-opencl-icd \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ --with-vulkan-drivers=${VULKAN_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use wayland; then
+ # These files are now provided by >=dev-libs/wayland-1.15.0
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
+ rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
+ fi
+
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name '*.la' -delete
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
+ elog "explanation."
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+vulkan_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ VULKAN_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ VULKAN_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-18.1.9.ebuild b/media-libs/mesa/mesa-18.1.9.ebuild
new file mode 100644
index 0000000..e61e3fd
--- /dev/null
+++ b/media-libs/mesa/mesa-18.1.9.ebuild
@@ -0,0 +1,519 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+
+if [[ ${PV} = 9999 ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+if [[ $PV == 9999 ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
+ KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="!bindist? ( bindist )"
+
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
+ +llvm +nptl opencl osmesa pax_kernel pic selinux vaapi valgrind
+ vdpau vulkan wayland xvmc xa"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
+ video_cards_radeonsi? ( llvm ) )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_imx? ( gallium video_cards_vivante )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium )
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vc4? ( gallium )
+ video_cards_virgl? ( gallium )
+ video_cards_vivante? ( gallium gbm )
+ video_cards_vmware? ( gallium )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
+RDEPEND="
+ !app-eselect/eselect-mesa
+ >=app-eselect/eselect-opengl-1.3.0
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
+ )
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ wayland? (
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+"
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+RDEPEND="${RDEPEND}
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
+"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more slot
+# simultaneously.
+#
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 7.
+# 3. Specify LLVM_MAX_SLOT, e.g. 6.
+LLVM_MAX_SLOT="6"
+LLVM_DEPSTR="
+ || (
+ sys-devel/llvm:7[${MULTILIB_USEDEP}]
+ sys-devel/llvm:6[${MULTILIB_USEDEP}]
+ sys-devel/llvm:5[${MULTILIB_USEDEP}]
+ sys-devel/llvm:4[${MULTILIB_USEDEP}]
+ >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
+ )
+ sys-devel/llvm:=[${MULTILIB_USEDEP}]
+"
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+RDEPEND="${RDEPEND}
+ llvm? (
+ opencl? (
+ video_cards_r600? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${CLANG_DEPSTR}
+ )
+ )
+ )
+ )
+ !opencl? (
+ video_cards_r600? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${LLVM_DEPSTR}
+ )
+ )
+ )
+ )
+ )
+"
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ opencl? (
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ valgrind? ( dev-util/valgrind )
+ x11-base/xorg-proto
+ vulkan? (
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+ )
+"
+[[ ${PV} == 9999 ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ !pic? (
+ usr/lib*/libglapi.so.0.0.0
+ usr/lib*/libGLESv1_CM.so.1.1.0
+ usr/lib*/libGLESv2.so.2.0.0
+ usr/lib*/libGL.so.1.2.0
+ usr/lib*/libOSMesa.so.8.0.0
+ )
+)"
+
+llvm_check_deps() {
+ local flags=${MULTILIB_USEDEP}
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+ then
+ flags+=",llvm_targets_AMDGPU(-)"
+ fi
+
+ if use opencl; then
+ has_version "sys-devel/clang[${flags}]" || return 1
+ fi
+ has_version "sys-devel/llvm[${flags}]"
+}
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ if use llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-17-execinfo.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
+ eapply_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
+
+ gallium_enable swrast
+ 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 video_cards_i915 i915
+ gallium_enable video_cards_imx imx
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+
+ gallium_enable video_cards_virgl virgl
+ fi
+
+ if use vulkan; then
+ vulkan_enable video_cards_i965 intel
+ vulkan_enable video_cards_radeonsi radeon
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if [[ ${ABI} == x86 ]]; then
+ myconf+=" $(use_enable pax_kernel glx-read-only-text)"
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ if use gallium; then
+ myconf+=" $(use_enable osmesa gallium-osmesa)"
+ else
+ myconf+=" $(use_enable osmesa)"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable unwind libunwind) \
+ --enable-valgrind=$(usex valgrind auto no) \
+ --enable-llvm-shared-libs \
+ --disable-opencl-icd \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ --with-vulkan-drivers=${VULKAN_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use wayland; then
+ # These files are now provided by >=dev-libs/wayland-1.15.0
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
+ rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
+ rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
+ fi
+
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name '*.la' -delete
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
+ elog "explanation."
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+vulkan_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ VULKAN_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ VULKAN_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-18.2.8.ebuild b/media-libs/mesa/mesa-18.2.1.ebuild
similarity index 89%
copy from media-libs/mesa/mesa-18.2.8.ebuild
copy to media-libs/mesa/mesa-18.2.1.ebuild
index 39fa4bc..e128919 100644
--- a/media-libs/mesa/mesa-18.2.8.ebuild
+++ b/media-libs/mesa/mesa-18.2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -20,7 +20,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="amd64 arm ~arm64 ~mips ppc x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
fi
LICENSE="MIT"
@@ -41,7 +41,7 @@ IUSE="${IUSE_VIDEO_CARDS}
vulkan wayland xa xvmc"
REQUIRED_USE="
- d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
+ d3d9? ( dri3 )
gles1? ( egl )
gles2? ( egl )
vulkan? ( dri3
@@ -95,7 +95,7 @@ RDEPEND="
)
lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
opencl? (
- dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
+ app-eselect/eselect-opencl
dev-libs/libclc
virtual/libelf:0=[${MULTILIB_USEDEP}]
)
@@ -231,15 +231,6 @@ x86? (
)
)"
-PATCHES=(
- "${FILESDIR}"/${PN}-17-execinfo.patch
- "${FILESDIR}"/${PN}-17-musl-string_h.patch
- "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
- "${FILESDIR}"/${PN}-18-musl-pthread.patch
- "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
- "${FILESDIR}"/${PN}-18-musl-larger-stacksize.patch
-)
-
llvm_check_deps() {
local flags=${MULTILIB_USEDEP}
if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
@@ -254,6 +245,16 @@ llvm_check_deps() {
}
pkg_pretend() {
+ if use d3d9; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
+ fi
+ fi
+
if use opencl; then
if ! use video_cards_r600 &&
! use video_cards_radeonsi; then
@@ -294,6 +295,7 @@ pkg_pretend() {
fi
if ! use gallium; then
+ use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
@@ -322,6 +324,16 @@ pkg_setup() {
python-any-r1_pkg_setup
}
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-17-execinfo.patch
+ eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ #eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
+ eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
+ eapply_user
+}
+
multilib_src_configure() {
local emesonargs=()
@@ -422,12 +434,14 @@ multilib_src_configure() {
fi
gallium_enable video_cards_freedreno freedreno
- gallium_enable video_cards_virgl virgl
-
# opencl stuff
- emesonargs+=(
- -Dgallium-opencl="$(usex opencl icd disabled)"
- )
+ if use opencl; then
+ emesonargs+=(
+ -Dgallium-opencl="$(usex opencl standalone disabled)"
+ )
+ fi
+
+ gallium_enable video_cards_virgl virgl
fi
if use vulkan; then
@@ -484,6 +498,21 @@ multilib_src_compile() {
multilib_src_install() {
meson_src_install
+
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
}
multilib_src_install_all() {
@@ -498,6 +527,11 @@ pkg_postinst() {
# Switch to the xorg implementation.
echo
eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
}
# $1 - VIDEO_CARDS flag (check skipped for "--")
diff --git a/media-libs/mesa/mesa-18.2.8.ebuild b/media-libs/mesa/mesa-18.2.4.ebuild
similarity index 96%
rename from media-libs/mesa/mesa-18.2.8.ebuild
rename to media-libs/mesa/mesa-18.2.4.ebuild
index 39fa4bc..ab4c917 100644
--- a/media-libs/mesa/mesa-18.2.8.ebuild
+++ b/media-libs/mesa/mesa-18.2.4.ebuild
@@ -20,7 +20,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="amd64 arm ~arm64 ~mips ppc x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
fi
LICENSE="MIT"
@@ -41,7 +41,7 @@ IUSE="${IUSE_VIDEO_CARDS}
vulkan wayland xa xvmc"
REQUIRED_USE="
- d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
+ d3d9? ( dri3 )
gles1? ( egl )
gles2? ( egl )
vulkan? ( dri3
@@ -232,12 +232,12 @@ x86? (
)"
PATCHES=(
+ "${FILESDIR}"/${P}-meson-link-gallium-nine-with-pthreads.patch
"${FILESDIR}"/${PN}-17-execinfo.patch
"${FILESDIR}"/${PN}-17-musl-string_h.patch
"${FILESDIR}"/${PN}-18-musl-invocation_name.patch
"${FILESDIR}"/${PN}-18-musl-pthread.patch
"${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
- "${FILESDIR}"/${PN}-18-musl-larger-stacksize.patch
)
llvm_check_deps() {
@@ -254,6 +254,16 @@ llvm_check_deps() {
}
pkg_pretend() {
+ if use d3d9; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
+ fi
+ fi
+
if use opencl; then
if ! use video_cards_r600 &&
! use video_cards_radeonsi; then
@@ -294,6 +304,7 @@ pkg_pretend() {
fi
if ! use gallium; then
+ use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml
index ea7584d..f978f99 100644
--- a/media-libs/mesa/metadata.xml
+++ b/media-libs/mesa/metadata.xml
@@ -6,6 +6,7 @@
<name>X11</name>
</maintainer>
<use>
+ <flag name="bindist">Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions.</flag>
<flag name="classic">Build drivers based on the classic architecture.</flag>
<flag name="d3d9">Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.</flag>
<flag name="dri3">Enable DRI3 support.</flag>
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2019-07-02 17:27 Jory Pratt
0 siblings, 0 replies; 21+ messages in thread
From: Jory Pratt @ 2019-07-02 17:27 UTC (permalink / raw
To: gentoo-commits
commit: 60e4a8942f1e6ab43491beab75db633bb53bc857
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 2 17:27:36 2019 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Tue Jul 2 17:27:36 2019 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=60e4a894
media-libs/mesa: Fix stack overflow issues with musl, upstream patch
Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
.../files/mesa-19.1.0-cache_stack_overflow.patch | 56 ++++++++++++++++++++++
.../{mesa-19.1.1.ebuild => mesa-19.1.1-r1.ebuild} | 1 +
2 files changed, 57 insertions(+)
diff --git a/media-libs/mesa/files/mesa-19.1.0-cache_stack_overflow.patch b/media-libs/mesa/files/mesa-19.1.0-cache_stack_overflow.patch
new file mode 100644
index 0000000..3d6a8df
--- /dev/null
+++ b/media-libs/mesa/files/mesa-19.1.0-cache_stack_overflow.patch
@@ -0,0 +1,56 @@
+From 594d2ec43022871f3b9ad2737e9d7bb97991b2bb Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Mon, 17 Jun 2019 09:57:46 -0500
+Subject: [PATCH] The disk cache code tries to allocate a 256 Kbyte buffer on
+ the stack. Since musl only gives 80 Kbyte of stack space per thread, this
+ causes a trap.
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ src/util/disk_cache.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
+index 9977c38..c23abdb 100644
+--- a/src/util/disk_cache.c
++++ b/src/util/disk_cache.c
+@@ -732,7 +732,7 @@ static size_t
+ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
+ const char *filename)
+ {
+- unsigned char out[BUFSIZE];
++ unsigned char *out;
+
+ /* allocate deflate state */
+ z_stream strm;
+@@ -749,6 +749,11 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
+ /* compress until end of in_data */
+ size_t compressed_size = 0;
+ int flush;
++
++ out = calloc(1, BUFSIZE);
++ if (out == NULL)
++ return 0;
++
+ do {
+ int remaining = in_data_size - BUFSIZE;
+ flush = remaining > 0 ? Z_NO_FLUSH : Z_FINISH;
+@@ -770,6 +775,7 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
+ ssize_t written = write_all(dest, out, have);
+ if (written == -1) {
+ (void)deflateEnd(&strm);
++ free(out);
+ return 0;
+ }
+ } while (strm.avail_out == 0);
+@@ -784,6 +790,7 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
+
+ /* clean up and return */
+ (void)deflateEnd(&strm);
++ free(out);
+ return compressed_size;
+ }
+
+--
+2.22.0
+
diff --git a/media-libs/mesa/mesa-19.1.1.ebuild b/media-libs/mesa/mesa-19.1.1-r1.ebuild
similarity index 99%
rename from media-libs/mesa/mesa-19.1.1.ebuild
rename to media-libs/mesa/mesa-19.1.1-r1.ebuild
index 759f4d0..a7bff8c 100644
--- a/media-libs/mesa/mesa-19.1.1.ebuild
+++ b/media-libs/mesa/mesa-19.1.1-r1.ebuild
@@ -244,6 +244,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-18-musl-invocation_name.patch
"${FILESDIR}"/${PN}-18-musl-pthread.patch
"${FILESDIR}"/${PN}-18.2.4-add-disable-tls-support.patch
+ "${FILESDIR}"/${PN}-19.1.0-cache_stack_overflow.patch
)
llvm_check_deps() {
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2019-08-11 22:46 Jory Pratt
0 siblings, 0 replies; 21+ messages in thread
From: Jory Pratt @ 2019-08-11 22:46 UTC (permalink / raw
To: gentoo-commits
commit: 72f1b5f8ad45bcc86fab7ca18d6f49a4aea4ee26
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 11 22:46:39 2019 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Sun Aug 11 22:46:39 2019 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=72f1b5f8
media-libs/mesa: use patch from upstream for musl support
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
.../mesa/files/mesa-19.1.4-musl-upstream-fix.patch | 227 +++++++++++++++++++++
media-libs/mesa/mesa-19.1.4.ebuild | 3 +-
2 files changed, 228 insertions(+), 2 deletions(-)
diff --git a/media-libs/mesa/files/mesa-19.1.4-musl-upstream-fix.patch b/media-libs/mesa/files/mesa-19.1.4-musl-upstream-fix.patch
new file mode 100644
index 0000000..5c02abd
--- /dev/null
+++ b/media-libs/mesa/files/mesa-19.1.4-musl-upstream-fix.patch
@@ -0,0 +1,227 @@
+From 9c411e020d164563fb6fcd92a28a435277bf0745 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Wed, 24 Jul 2019 18:26:49 -0700
+Subject: [PATCH 1/5] util: Drop preprocessor guards for glibc-2.12
+
+glibc-2.12 was released in 2010. No one is building new Mesa against 9
+year old glibc, and removing these checks allows the code to work on
+other C libraries like musl.
+
+Acked-by: Eric Engestrom <eric.engestrom@intel.com>
+---
+ src/util/u_thread.h | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/src/util/u_thread.h b/src/util/u_thread.h
+index a46c18d3db2..8c8cc803199 100644
+--- a/src/util/u_thread.h
++++ b/src/util/u_thread.h
+@@ -61,11 +61,7 @@ static inline thrd_t u_thread_create(int (*routine)(void *), void *param)
+ static inline void u_thread_setname( const char *name )
+ {
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
+- defined(__linux__)
+ pthread_setname_np(pthread_self(), name);
+-# endif
+ #endif
+ (void)name;
+ }
+@@ -150,10 +146,7 @@ u_thread_get_time_nano(thrd_t thread)
+ static inline bool u_thread_is_self(thrd_t thread)
+ {
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
+ return pthread_equal(pthread_self(), thread);
+-# endif
+ #endif
+ return false;
+ }
+--
+2.21.0
+
+
+From 9cc4311d86a797bba26448bcaf24db4887c6ec8d Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Wed, 24 Jul 2019 18:28:38 -0700
+Subject: [PATCH 2/5] st/nine: Drop preprocessor guards for glibc-2.12
+
+Same rationale as the previous patch, but additionally these checks just
+seem entirely unnecessary. pthread_self() has been used in Mesa since at
+least 1999.
+
+Acked-by: Eric Engestrom <eric.engestrom@intel.com>
+---
+ src/gallium/state_trackers/nine/nine_debug.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/gallium/state_trackers/nine/nine_debug.c b/src/gallium/state_trackers/nine/nine_debug.c
+index 904a40fde83..784d535d213 100644
+--- a/src/gallium/state_trackers/nine/nine_debug.c
++++ b/src/gallium/state_trackers/nine/nine_debug.c
+@@ -73,11 +73,8 @@ _nine_debug_printf( unsigned long flag,
+ }
+
+ #if defined(HAVE_PTHREAD)
+-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
+ if (dbg_flags & DBG_TID)
+ tid = pthread_self();
+-# endif
+ #endif
+
+ if (dbg_flags & flag) {
+--
+2.21.0
+
+
+From c96407f37ef8325db11ae5fdb16e372cbc663bf4 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Wed, 24 Jul 2019 18:44:35 -0700
+Subject: [PATCH 3/5] meson: Test for random_r()
+
+It's better to test for needed functions instead of using external
+knowledge about presence in this or that C library.
+
+Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
+---
+ meson.build | 2 +-
+ src/glx/glxhash.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 542c35d525b..8dc431cfc5b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1029,7 +1029,7 @@ foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h'
+ endif
+ endforeach
+
+-foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_create']
++foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_create', 'random_r']
+ if cc.has_function(f)
+ pre_args += '-DHAVE_@0@'.format(f.to_upper())
+ endif
+diff --git a/src/glx/glxhash.c b/src/glx/glxhash.c
+index b76ec323459..5a89bf99b1c 100644
+--- a/src/glx/glxhash.c
++++ b/src/glx/glxhash.c
+@@ -88,7 +88,7 @@
+
+ #define HASH_ALLOC malloc
+ #define HASH_FREE free
+-#ifndef __GLIBC__
++#ifndef HAVE_RANDOM_R
+ #define HASH_RANDOM_DECL char *ps, rs[256]
+ #define HASH_RANDOM_INIT(seed) ps = initstate(seed, rs, sizeof(rs))
+ #define HASH_RANDOM random()
+--
+2.21.0
+
+
+From 597bddad47e831474a33cde054c40bbd2cbc0600 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Mon, 29 Jul 2019 15:31:34 -0700
+Subject: [PATCH 4/5] scons: Test for random_r()
+
+Suggested-by: Eric Engestrom <eric.engestrom@intel.com>
+---
+ scons/gallium.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/scons/gallium.py b/scons/gallium.py
+index 27727612d14..6d5b2fccc17 100755
+--- a/scons/gallium.py
++++ b/scons/gallium.py
+@@ -368,6 +368,9 @@ def generate(env):
+ if check_functions(env, ['strtod_l', 'strtof_l']):
+ cppdefines += ['HAVE_STRTOD_L']
+
++ if check_functions(env, 'random_r'):
++ cppdefines += ['HAVE_RANDOM_R']
++
+ if check_functions(env, ['timespec_get']):
+ cppdefines += ['HAVE_TIMESPEC_GET']
+
+--
+2.21.0
+
+
+From c9b86cf52692f1d76314dce345080af8ce786792 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Mon, 29 Jul 2019 13:51:55 -0700
+Subject: [PATCH 5/5] meson: Test for program_invocation_name
+
+program_invocation_name and program_invocation_short_name are both GNU
+extensions. I don't believe one can exist without the other, so only
+check for program_invocation_name.
+
+Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
+---
+ meson.build | 7 +++++++
+ src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c | 2 +-
+ src/util/u_process.c | 8 ++------
+ 3 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 8dc431cfc5b..c9f96e7135d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1035,6 +1035,13 @@ foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_crea
+ endif
+ endforeach
+
++if cc.has_header_symbol('errno.h', 'program_invocation_name',
++ args : '-D_GNU_SOURCE')
++ pre_args += '-DHAVE_PROGRAM_INVOCATION_NAME'
++elif with_tools.contains('intel')
++ error('Intel tools require the program_invocation_name variable')
++endif
++
+ # strtod locale support
+ if cc.links('''
+ #define _GNU_SOURCE
+diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
+index 58005df5595..42a58a6dcc1 100644
+--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
++++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
+@@ -125,7 +125,7 @@ static int virgl_vtest_send_init(struct virgl_vtest_winsys *vws)
+ ret = os_get_process_name(cmdline, 63);
+ if (ret == FALSE)
+ strcpy(cmdline, nstr);
+-#if defined(__GLIBC__) || defined(__CYGWIN__)
++#if defined(HAVE_PROGRAM_INVOCATION_NAME)
+ if (!strcmp(cmdline, "shader_runner")) {
+ const char *name;
+ /* hack to get better testname */
+diff --git a/src/util/u_process.c b/src/util/u_process.c
+index 94c975df396..cbccf48ed01 100644
+--- a/src/util/u_process.c
++++ b/src/util/u_process.c
+@@ -32,11 +32,7 @@
+
+ #undef GET_PROGRAM_NAME
+
+-#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__)
+-# if !defined(__GLIBC__) || (__GLIBC__ < 2)
+-/* These aren't declared in any libc5 header */
+-extern char *program_invocation_name, *program_invocation_short_name;
+-# endif
++#if defined(__linux__) && defined(HAVE_PROGRAM_INVOCATION_NAME)
+ static const char *
+ __getProgramName()
+ {
+@@ -79,7 +75,7 @@ __getProgramName()
+ return program_invocation_name;
+ }
+ # define GET_PROGRAM_NAME() __getProgramName()
+-#elif defined(__CYGWIN__)
++#elif defined(HAVE_PROGRAM_INVOCATION_NAME)
+ # define GET_PROGRAM_NAME() program_invocation_short_name
+ #elif defined(__FreeBSD__) && (__FreeBSD__ >= 2)
+ # include <osreldate.h>
+--
+2.21.0
+
diff --git a/media-libs/mesa/mesa-19.1.4.ebuild b/media-libs/mesa/mesa-19.1.4.ebuild
index 5333c84..5ce4189 100644
--- a/media-libs/mesa/mesa-19.1.4.ebuild
+++ b/media-libs/mesa/mesa-19.1.4.ebuild
@@ -240,8 +240,7 @@ x86? (
)"
PATCHES=(
- "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
- "${FILESDIR}"/${PN}-18-musl-pthread.patch
+ "${FILESDIR}"/${PN}-19.1.4-musl-upstream-fix.patch
"${FILESDIR}"/${PN}-18.2.4-add-disable-tls-support.patch
)
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2019-11-06 19:35 Jory Pratt
0 siblings, 0 replies; 21+ messages in thread
From: Jory Pratt @ 2019-11-06 19:35 UTC (permalink / raw
To: gentoo-commits
commit: e469db71bba882406494285fbc022a4360ac6afa
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 6 19:35:29 2019 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Wed Nov 6 19:35:29 2019 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=e469db71
media-libs/mesa: Version bump, update tls patch
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
media-libs/mesa/Manifest | 1 +
.../mesa-19.3.0-add-disable-tls-support.patch | 44 ++
media-libs/mesa/mesa-19.3.0_rc2.ebuild | 557 +++++++++++++++++++++
3 files changed, 602 insertions(+)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 8de8894..e435168 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,2 +1,3 @@
DIST mesa-19.1.7.tar.xz 10941152 BLAKE2B 6be14ddac404668bdd8b7b8756388019c3610ac41b65a7723a419b97b7eccbca666ad6d904f4cde186c4b171e056636a8a6a5727e30963c8fa177d7861bd6cfb SHA512 0865b5f91e5daa00e1da2b3d8b65fe5d2ff6332372bf8fec7d671d05d8d64ec5a7abea1858cdfc506c76b7226d2bea0af3426565f156b796d8e0f949ea33dc15
DIST mesa-19.2.2.tar.xz 11456352 BLAKE2B b0900a486d5883759dc395a25195c46fbc90d0388840099d515713a3c1e27560ea6cf9f6bfc5987c9704593b174e26f49a4cd08ff1260b1c1b2197b56c6919b6 SHA512 a3269052c2dfb5404180d1aebd68f5b9b0cc136d634ba89fed3f60fcc9b279072e09ee2db9b485375d39e886209053841df920c9d0b975e0de2825e3da4164a5
+DIST mesa-19.3.0-rc2.tar.xz 11790920 BLAKE2B a1cf1b504cdd818aff33b739159dd715af2d30f346f396b9b7634096b74d77a798f302c044241bc42191b318c6314342f2fa670ec0f92279a50d1a0f7993fd71 SHA512 bc198c8cb625b59e11e7bc15e4021ac42733f297f30eb5a08e6fe9830df6f47416a5e8239a249ec2ce5038928fe63aacf5c6647edadf0ef8bb98ff2e9f85a66a
diff --git a/media-libs/mesa/files/mesa-19.3.0-add-disable-tls-support.patch b/media-libs/mesa/files/mesa-19.3.0-add-disable-tls-support.patch
new file mode 100644
index 0000000..1686d88
--- /dev/null
+++ b/media-libs/mesa/files/mesa-19.3.0-add-disable-tls-support.patch
@@ -0,0 +1,44 @@
+From 6be4bac8f5a7c8c0ae0f95582e9905f485095988 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Wed, 6 Nov 2019 13:26:34 -0600
+Subject: [PATCH] Add option to control elf-tls
+
+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 898d025..568f32c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -387,7 +387,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
+ endif
+
+ # 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 get_option('elf-tls')
+ pre_args += '-DUSE_ELF_TLS'
+ endif
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 626baf3..d30a238 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -293,6 +293,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.24.0
+
diff --git a/media-libs/mesa/mesa-19.3.0_rc2.ebuild b/media-libs/mesa/mesa-19.3.0_rc2.ebuild
new file mode 100644
index 0000000..40a76d1
--- /dev/null
+++ b/media-libs/mesa/mesa-19.3.0_rc2.ebuild
@@ -0,0 +1,557 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_5 python3_6 python3_7 )
+
+inherit llvm meson multilib-minimal pax-utils python-any-r1
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="
+ !test? ( test )
+"
+
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost 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"
+
+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 )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_iris? ( gallium )
+ video_cards_lima? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_panfrost? ( gallium )
+ video_cards_radeon? ( || ( classic gallium )
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vc4? ( gallium )
+ video_cards_virgl? ( gallium )
+ video_cards_vivante? ( gallium gbm )
+ video_cards_vmware? ( gallium )
+ xa? ( X )
+ xvmc? ( X )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
+RDEPEND="
+ !app-eselect/eselect-mesa
+ >=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[${MULTILIB_USEDEP}]
+ !app-eselect/eselect-opengl
+ )
+ !libglvnd? (
+ >=app-eselect/eselect-opengl-1.3.0
+ )
+ gallium? (
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ )
+ lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
+ opencl? (
+ dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
+ )
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ )
+ wayland? (
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ )
+"
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+RDEPEND="${RDEPEND}
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
+"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more slot
+# simultaneously.
+#
+# How to use it:
+# 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_DEPSTR="
+ || (
+ sys-devel/llvm:9[${MULTILIB_USEDEP}]
+ sys-devel/llvm:8[${MULTILIB_USEDEP}]
+ sys-devel/llvm:7[${MULTILIB_USEDEP}]
+ )
+ sys-devel/llvm:=[${MULTILIB_USEDEP}]
+"
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+RDEPEND="${RDEPEND}
+ gallium? (
+ llvm? (
+ opencl? (
+ video_cards_r600? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${CLANG_DEPSTR}
+ )
+ )
+ )
+ )
+ !opencl? (
+ video_cards_r600? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${LLVM_DEPSTR}
+ )
+ )
+ )
+ )
+ )
+ )
+"
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
+
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )
+ X? (
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-base/xorg-proto
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ opencl? (
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/bison
+ sys-devel/flex
+ sys-devel/gettext
+ virtual/pkgconfig
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ usr/lib*/libglapi.so.0.0.0
+ usr/lib*/libGLESv1_CM.so.1.1.0
+ usr/lib*/libGLESv2.so.2.0.0
+ usr/lib*/libGL.so.1.2.0
+ usr/lib*/libOSMesa.so.8.0.0
+ libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
+)"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-19.3.0-add-disable-tls-support.patch
+)
+
+llvm_check_deps() {
+ local flags=${MULTILIB_USEDEP}
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+ then
+ flags+=",llvm_targets_AMDGPU(-)"
+ fi
+
+ if use opencl; then
+ has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
+ fi
+ has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
+}
+
+pkg_pretend() {
+ if use opencl; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_radeonsi; then
+ ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
+ fi
+ fi
+
+ if use vaapi; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
+ fi
+ fi
+
+ if use vdpau; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
+ fi
+ fi
+
+ if use xa; then
+ if ! use video_cards_freedreno &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
+ fi
+ fi
+
+ if use xvmc; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
+ fi
+ fi
+
+ if ! use gallium; then
+ use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
+ use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
+ use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
+ use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
+ use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
+ use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
+ use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
+ fi
+
+ if ! use llvm; then
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
+ fi
+}
+
+python_check_deps() {
+ has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ if use llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local emesonargs=()
+
+ if use classic; then
+ # Intel code
+ dri_driver_enable video_cards_i915 i915
+ dri_driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ dri_driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ dri_driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ dri_driver_enable video_cards_r100 r100
+ dri_driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ dri_driver_enable video_cards_radeon r100 r200
+ fi
+ fi
+
+ emesonargs+=( -Dplatforms=surfaceless$(use X && echo ",x11")$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
+
+ if use gallium; then
+ emesonargs+=(
+ $(meson_use llvm)
+ $(meson_use lm-sensors lmsensors)
+ $(meson_use unwind libunwind)
+ )
+
+ if use video_cards_iris ||
+ use video_cards_r300 ||
+ use video_cards_r600 ||
+ use video_cards_radeonsi ||
+ use video_cards_nouveau ||
+ use video_cards_vmware; then
+ emesonargs+=($(meson_use d3d9 gallium-nine))
+ else
+ emesonargs+=(-Dgallium-nine=false)
+ fi
+
+ if use video_cards_r600 ||
+ use video_cards_radeonsi ||
+ use video_cards_nouveau; then
+ emesonargs+=($(meson_use vaapi gallium-va))
+ use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
+ else
+ emesonargs+=(-Dgallium-va=false)
+ 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))
+ else
+ emesonargs+=(-Dgallium-vdpau=false)
+ fi
+
+ if use video_cards_freedreno ||
+ use video_cards_nouveau ||
+ use video_cards_vmware; then
+ emesonargs+=($(meson_use xa gallium-xa))
+ else
+ emesonargs+=(-Dgallium-xa=false)
+ fi
+
+ if use video_cards_r600 ||
+ use video_cards_nouveau; then
+ emesonargs+=($(meson_use xvmc gallium-xvmc))
+ else
+ emesonargs+=(-Dgallium-xvmc=false)
+ fi
+
+ if use video_cards_freedreno ||
+ use video_cards_lima ||
+ use video_cards_panfrost ||
+ use video_cards_vc4 ||
+ use video_cards_vivante; then
+ gallium_enable -- kmsro
+ fi
+
+ gallium_enable video_cards_lima lima
+ gallium_enable video_cards_panfrost panfrost
+ gallium_enable video_cards_vc4 vc4
+ gallium_enable video_cards_vivante etnaviv
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+
+ # Only one i915 driver (classic vs gallium). Default to classic.
+ if ! use classic; then
+ gallium_enable video_cards_i915 i915
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+ fi
+
+ gallium_enable video_cards_iris iris
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ gallium_enable video_cards_virgl virgl
+
+ # opencl stuff
+ emesonargs+=(
+ -Dgallium-opencl="$(usex opencl icd disabled)"
+ )
+ fi
+
+ if use vulkan; then
+ vulkan_enable video_cards_i965 intel
+ vulkan_enable video_cards_iris intel
+ 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 )
+ fi
+
+ if use gallium; then
+ gallium_enable -- swrast
+ emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
+ else
+ dri_driver_enable -- swrast
+ emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
+ fi
+
+ driver_list() {
+ local drivers="$(sort -u <<< "${1// /$'\n'}")"
+ echo "${drivers//$'\n'/,}"
+ }
+
+ 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)
+ $(meson_use libglvnd glvnd)
+ $(meson_use selinux)
+ -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-overlay vulkan-overlay-layer)
+ --buildtype $(usex debug debug plain)
+ -Db_ndebug=$(usex debug false true)
+ )
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ meson_src_compile
+}
+
+multilib_src_install() {
+ meson_src_install
+
+ use libglvnd && rm -f "${D}"/usr/$(get_libdir)/pkgconfig/{egl,gl}.pc
+}
+
+multilib_src_install_all() {
+ einstalldocs
+}
+
+multilib_src_test() {
+ meson test -v -C "${BUILD_DIR}" -t 100
+}
+
+pkg_postinst() {
+ if ! use libglvnd; then
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+ fi
+}
+
+# $1 - VIDEO_CARDS flag (check skipped for "--")
+# other args - names of DRI drivers to enable
+dri_driver_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ DRI_DRIVERS+=("$@")
+ fi
+}
+
+gallium_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ GALLIUM_DRIVERS+=("$@")
+ fi
+}
+
+vulkan_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ VULKAN_DRIVERS+=("$@")
+ fi
+}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2020-03-09 0:53 Jory Pratt
0 siblings, 0 replies; 21+ messages in thread
From: Jory Pratt @ 2020-03-09 0:53 UTC (permalink / raw
To: gentoo-commits
commit: 7ab86a4088b0c178d41613b9628d1fdee31d6e3f
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 9 00:53:41 2020 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Mon Mar 9 00:53:41 2020 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7ab86a40
media-libs/mesa: sync with ::gentoo
Package-Manager: Portage-2.3.93, Repoman-2.3.20
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
media-libs/mesa/Manifest | 1 -
media-libs/mesa/files/eselect-mesa.conf.9.2 | 38 --
.../mesa-18.2.4-add-disable-tls-support.patch | 46 --
media-libs/mesa/files/mesa-19.0.8-execinfo.patch | 97 ----
.../mesa/files/mesa-19.0.8-heap-allocation.patch | 66 ---
.../mesa-19.2.0-add-disable-tls-support.patch | 45 --
media-libs/mesa/mesa-19.2.8.ebuild | 557 ---------------------
.../{mesa-19.3.4.ebuild => mesa-19.3.4-r1.ebuild} | 10 +-
.../{mesa-20.0.1.ebuild => mesa-20.0.1-r1.ebuild} | 4 +-
9 files changed, 7 insertions(+), 857 deletions(-)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index dd634a2..e9603fa 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,3 +1,2 @@
-DIST mesa-19.2.8.tar.xz 11462168 BLAKE2B c49d6d3d10b4c85534a75e4bea29fc8b7526c784af5068764de623d40cbb59ecb96beb1969fa1a13815b6bd259bb98faaf42e4969792c6a75ce702d4b2e57155 SHA512 9bedc2f1a5296da96c1a2a491edaea701e70f683b26eac076e8cbef2230156d5d5ddb2330c3a2530afd4982a9893d76ded8d54bc73a98c846de0c3dfa3634c43
DIST mesa-19.3.4.tar.xz 11968288 BLAKE2B be39a2ca08d91f8afbc2f3a47d596b14445fac62600f64d627b23d63b340b002bc05246eece95e19b33485a92c01f7980fff52b2375b7a2053161e0aa87d0b38 SHA512 2bbb3dc8f1d839f11fe12cc959393cd69607fa6714b2166b80299e0559d2d3b0ac38ed4e15ac3e5f472264eb24536d1901d350f7409f3a7e00d6f4ccbb2312fb
DIST mesa-20.0.1.tar.xz 12174080 BLAKE2B bc25d95b6737006d755384cfe759439819fadfacf441db723247fd5d0c7dad1daa84695dfdf86319ba2ac68ac2d66f48dc396e8d7e8c579faa7fbdda4391636f SHA512 9e005ebbb699c1ad83b73c503c467907958a3d9cad644d8f7ac95804fd265debcf563784a1054c8e0bf40106e33b13185607e8270a197e9ddc34c50b1b2c4d82
diff --git a/media-libs/mesa/files/eselect-mesa.conf.9.2 b/media-libs/mesa/files/eselect-mesa.conf.9.2
deleted file mode 100644
index 18bfaff..0000000
--- a/media-libs/mesa/files/eselect-mesa.conf.9.2
+++ /dev/null
@@ -1,38 +0,0 @@
-# mesa classic/gallium implementations in this release
-
-# Syntax description:
-# * MESA_IMPLEMENTATIONS contains a space-delimited list of switchable
-# classic/gallium implementations.
-# * MESA_DRIVERS is an associative array, for each member "foo" of
-# MESA_IMPLEMENTATIONS it contains the following elements:
-# foo,description - Human-readable description of the driver
-# foo,classicdriver - Filename of the classic driver
-# foo,galliumdriver - Filename of the gallium driver
-# foo,default - which of classic or gallium is chosen by default
-
-MESA_IMPLEMENTATIONS="i915 i965 r300 r600 sw"
-declare -A MESA_DRIVERS || die "MESA_DRIVERS already in environment and not associative."
-
-MESA_DRIVERS[i915,description]="i915 (Intel 915, 945)"
-MESA_DRIVERS[i915,classicdriver]="i915_dri.so"
-MESA_DRIVERS[i915,galliumdriver]="i915g_dri.so"
-MESA_DRIVERS[i915,default]="gallium"
-
-MESA_DRIVERS[i965,description]="i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)"
-MESA_DRIVERS[i965,classicdriver]="i965_dri.so"
-MESA_DRIVERS[i965,default]="classic"
-
-MESA_DRIVERS[r300,description]="r300 (Radeon R300-R500)"
-MESA_DRIVERS[r300,classicdriver]="r300_dri.so"
-MESA_DRIVERS[r300,galliumdriver]="r300g_dri.so"
-MESA_DRIVERS[r300,default]="gallium"
-
-MESA_DRIVERS[r600,description]="r600 (Radeon R600-R700, Evergreen, Northern Islands)"
-MESA_DRIVERS[r600,classicdriver]="r600_dri.so"
-MESA_DRIVERS[r600,galliumdriver]="r600g_dri.so"
-MESA_DRIVERS[r600,default]="gallium"
-
-MESA_DRIVERS[sw,description]="sw (Software renderer)"
-MESA_DRIVERS[sw,classicdriver]="swrast_dri.so"
-MESA_DRIVERS[sw,galliumdriver]="swrastg_dri.so"
-MESA_DRIVERS[sw,default]="gallium"
diff --git a/media-libs/mesa/files/mesa-18.2.4-add-disable-tls-support.patch b/media-libs/mesa/files/mesa-18.2.4-add-disable-tls-support.patch
deleted file mode 100644
index 7eebc0d..0000000
--- a/media-libs/mesa/files/mesa-18.2.4-add-disable-tls-support.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From beca1b215950f4e917c21f916fd3c16fb09fb3fa Mon Sep 17 00:00:00 2001
-From: root <root@bull.penguingeek>
-Date: Wed, 6 Mar 2019 15:52:59 -0600
-Subject: [PATCH] Allow disable tls for musl
-
----
- meson.build | 5 ++++-
- meson_options.txt | 6 ++++++
- 2 files changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 5b0eea1..d6a7675 100644
---- a/meson.build
-+++ b/meson.build
-@@ -327,7 +327,10 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless)
- endif
- endif
-
--pre_args += '-DGLX_USE_TLS'
-+if get_option('glx-tls')
-+ pre_args += '-DGLX_USE_TLS'
-+endif
-+
- if with_glx != 'disabled'
- if not (with_platform_x11 and with_any_opengl)
- error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
-diff --git a/meson_options.txt b/meson_options.txt
-index 5bb560b..3b721a6 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -277,6 +277,12 @@ option(
- choices : ['none', 'classic', 'gallium'],
- description : 'Build OSmesa.'
- )
-+option(
-+ 'glx-tls',
-+ type : 'boolean',
-+ value : true,
-+ description : 'Enable thread-local storage in GLX and EGL'
-+)
- option(
- 'osmesa-bits',
- type : 'combo',
---
-2.21.0
-
diff --git a/media-libs/mesa/files/mesa-19.0.8-execinfo.patch b/media-libs/mesa/files/mesa-19.0.8-execinfo.patch
deleted file mode 100644
index 217739d..0000000
--- a/media-libs/mesa/files/mesa-19.0.8-execinfo.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 10e8d466011076a0453368cb976d9f6b06af0e94 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Tue, 7 May 2019 21:47:40 -0500
-Subject: [PATCH] meson: Search for execinfo.h
-
-Rather than checking __GLIBC__/__UCLIBC__ macros as a proxy for
-execinfo.h presence, just check directly. This allows the build to work
-on musl.
-
-Reviewed-by: Matt Turner <mattst88@gmail.com>
-Reviewed-by: Eric Anholt <eric@anholt.net>
-Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
----
- meson.build | 2 +-
- src/gallium/auxiliary/util/u_debug_symbol.c | 8 ++++----
- src/mapi/glapi/gen/gl_gentable.py | 2 +-
- src/mesa/drivers/dri/i915/intel_regions.c | 2 +-
- 4 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index a2978117409..a0c965efc32 100644
---- a/meson.build
-+++ b/meson.build
-@@ -1036,7 +1036,7 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major')
- pre_args += '-DMAJOR_IN_MKDEV'
- endif
-
--foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h']
-+foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'execinfo.h']
- if cc.compiles('#include <@0@>'.format(h), name : '@0@'.format(h))
- pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
- endif
-diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
-index 22e6c8ce771..d8380b76bf6 100644
---- a/src/gallium/auxiliary/util/u_debug_symbol.c
-+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
-@@ -219,7 +219,7 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
- #endif /* PIPE_OS_WINDOWS */
-
-
--#if defined(__GLIBC__) && !defined(__UCLIBC__)
-+#if defined(HAVE_EXECINFO_H)
-
- #include <execinfo.h>
-
-@@ -240,7 +240,7 @@ debug_symbol_name_glibc(const void *addr, char* buf, unsigned size)
- return TRUE;
- }
-
--#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */
-+#endif /* defined(HAVE_EXECINFO_H) */
-
-
- void
-@@ -252,11 +252,11 @@ debug_symbol_name(const void *addr, char* buf, unsigned size)
- }
- #endif
-
--#if defined(__GLIBC__) && !defined(__UCLIBC__)
-+#if defined(HAVE_EXECINFO_H)
- if (debug_symbol_name_glibc(addr, buf, size)) {
- return;
- }
--#endif
-+#endif /* defined(HAVE_EXECINFO_H) */
-
- util_snprintf(buf, size, "%p", addr);
- buf[size - 1] = 0;
-diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py
-index 9d8923cf8db..92e1a546cff 100644
---- a/src/mapi/glapi/gen/gl_gentable.py
-+++ b/src/mapi/glapi/gen/gl_gentable.py
-@@ -45,7 +45,7 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i
- #endif
-
- #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
-- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
-+ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
- #define USE_BACKTRACE
- #endif
-
-diff --git a/src/mesa/drivers/dri/i915/intel_regions.c b/src/mesa/drivers/dri/i915/intel_regions.c
-index fee734801cd..803ea9326e8 100644
---- a/src/mesa/drivers/dri/i915/intel_regions.c
-+++ b/src/mesa/drivers/dri/i915/intel_regions.c
-@@ -57,7 +57,7 @@
- */
- #define DEBUG_BACKTRACE_SIZE 0
-
--#if DEBUG_BACKTRACE_SIZE == 0
-+#if DEBUG_BACKTRACE_SIZE == 0 || !defined(HAVE_EXECINFO_H)
- /* Use the standard debug output */
- #define _DBG(...) DBG(__VA_ARGS__)
- #else
---
-2.21.0
-
diff --git a/media-libs/mesa/files/mesa-19.0.8-heap-allocation.patch b/media-libs/mesa/files/mesa-19.0.8-heap-allocation.patch
deleted file mode 100644
index 90e30e0..0000000
--- a/media-libs/mesa/files/mesa-19.0.8-heap-allocation.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From fd7b7f14d857f96cf3b2e9d8405dbbfa30dc261a Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Mon, 10 Jun 2019 11:48:02 -0700
-Subject: [PATCH] util: Heap-allocate 256K zlib buffer
-
-The disk cache code tries to allocate a 256 Kbyte buffer on the stack.
-Since musl only gives 80 Kbyte of stack space per thread, this causes a
-trap.
-
-See https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread-stack-size
-
-(In musl-1.1.21 the default stack size has increased to 128K)
-
-[mattst88]: Original author unknown, but I think this is small enough
- that it is not copyrightable.
-Reviewed-by: Matt Turner <mattst88@gmail.com>
-Reviewed-by: Eric Anholt <eric@anholt.net>
-Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
----
- src/util/disk_cache.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
-index 9977c385de1..bc3becfe535 100644
---- a/src/util/disk_cache.c
-+++ b/src/util/disk_cache.c
-@@ -732,7 +732,7 @@ static size_t
- deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
- const char *filename)
- {
-- unsigned char out[BUFSIZE];
-+ unsigned char *out;
-
- /* allocate deflate state */
- z_stream strm;
-@@ -749,6 +749,11 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
- /* compress until end of in_data */
- size_t compressed_size = 0;
- int flush;
-+
-+ out = malloc(BUFSIZE * sizeof(unsigned char));
-+ if (out == NULL)
-+ return 0;
-+
- do {
- int remaining = in_data_size - BUFSIZE;
- flush = remaining > 0 ? Z_NO_FLUSH : Z_FINISH;
-@@ -770,6 +775,7 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
- ssize_t written = write_all(dest, out, have);
- if (written == -1) {
- (void)deflateEnd(&strm);
-+ free(out);
- return 0;
- }
- } while (strm.avail_out == 0);
-@@ -784,6 +790,7 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
-
- /* clean up and return */
- (void)deflateEnd(&strm);
-+ free(out);
- return compressed_size;
- }
-
---
-2.21.0
-
diff --git a/media-libs/mesa/files/mesa-19.2.0-add-disable-tls-support.patch b/media-libs/mesa/files/mesa-19.2.0-add-disable-tls-support.patch
deleted file mode 100644
index c5d7db2..0000000
--- a/media-libs/mesa/files/mesa-19.2.0-add-disable-tls-support.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 9054be01240cf9d9e8a92fc7289e2d861bf530d6 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Thu, 22 Aug 2019 14:42:59 -0500
-Subject: [PATCH] Add option to control elf-tls
-
-Signed-off-by: Jory Pratt <anarchy@gentoo.org>
----
- meson.build | 3 +--
- meson_options.txt | 6 ++++++
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index bf61511..328ff66 100644
---- a/meson.build
-+++ b/meson.build
-@@ -377,8 +377,7 @@ 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.
--if not with_platform_android or get_option('platform-sdk-version') >= 29
-+if get_option('elf-tls')
- pre_args += '-DUSE_ELF_TLS'
- endif
-
-diff --git a/meson_options.txt b/meson_options.txt
-index b768c15..2c19e9e 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -285,6 +285,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.23.0
-
diff --git a/media-libs/mesa/mesa-19.2.8.ebuild b/media-libs/mesa/mesa-19.2.8.ebuild
deleted file mode 100644
index 7edf98d..0000000
--- a/media-libs/mesa/mesa-19.2.8.ebuild
+++ /dev/null
@@ -1,557 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_6 python3_7 )
-
-inherit llvm meson multilib-minimal pax-utils python-any-r1
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
-
-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"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="
- !test? ( test )
-"
-
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost 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"
-
-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 )
- video_cards_freedreno? ( gallium )
- video_cards_intel? ( classic )
- video_cards_i915? ( || ( classic gallium ) )
- video_cards_i965? ( classic )
- video_cards_iris? ( gallium )
- video_cards_lima? ( gallium )
- video_cards_nouveau? ( || ( classic gallium ) )
- video_cards_panfrost? ( gallium )
- video_cards_radeon? ( || ( classic gallium )
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
- video_cards_r100? ( classic )
- video_cards_r200? ( classic )
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
- video_cards_r600? ( gallium )
- video_cards_radeonsi? ( gallium llvm )
- video_cards_vc4? ( gallium )
- video_cards_virgl? ( gallium )
- video_cards_vivante? ( gallium gbm )
- video_cards_vmware? ( gallium )
- xa? ( X )
- xvmc? ( X )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.99"
-RDEPEND="
- !app-eselect/eselect-mesa
- >=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[${MULTILIB_USEDEP}]
- !app-eselect/eselect-opengl
- )
- !libglvnd? (
- >=app-eselect/eselect-opengl-1.3.0
- )
- gallium? (
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
- llvm? (
- video_cards_radeonsi? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_r600? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_radeon? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- )
- lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
- opencl? (
- dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- vaapi? (
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
- )
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
- )
- selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
- wayland? (
- >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
- >=dev-libs/wayland-protocols-1.8
- )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-
- video_cards_intel? (
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- )
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
- X? (
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
- )
-"
-for card in ${RADEON_CARDS}; do
- RDEPEND="${RDEPEND}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
- "
-done
-RDEPEND="${RDEPEND}
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
-"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more slot
-# simultaneously.
-#
-# How to use it:
-# 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="10"
-LLVM_DEPSTR="
- || (
- sys-devel/llvm:10[${MULTILIB_USEDEP}]
- sys-devel/llvm:9[${MULTILIB_USEDEP}]
- sys-devel/llvm:8[${MULTILIB_USEDEP}]
- sys-devel/llvm:7[${MULTILIB_USEDEP}]
- )
- sys-devel/llvm:=[${MULTILIB_USEDEP}]
-"
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-RDEPEND="${RDEPEND}
- llvm? (
- opencl? (
- video_cards_r600? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${CLANG_DEPSTR}
- )
- )
- )
- )
- !opencl? (
- video_cards_r600? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${LLVM_DEPSTR}
- )
- )
- )
- )
- )
-"
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
-
-DEPEND="${RDEPEND}
- valgrind? ( dev-util/valgrind )
- X? (
- x11-libs/libXrandr[${MULTILIB_USEDEP}]
- x11-base/xorg-proto
- )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- opencl? (
- >=sys-devel/gcc-4.6
- )
- sys-devel/bison
- sys-devel/flex
- sys-devel/gettext
- virtual/pkgconfig
- $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
- usr/lib*/libglapi.so.0.0.0
- usr/lib*/libGLESv1_CM.so.1.1.0
- usr/lib*/libGLESv2.so.2.0.0
- usr/lib*/libGL.so.1.2.0
- usr/lib*/libOSMesa.so.8.0.0
- libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
-)"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-19.2.0-add-disable-tls-support.patch
-)
-
-llvm_check_deps() {
- local flags=${MULTILIB_USEDEP}
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
- then
- flags+=",llvm_targets_AMDGPU(-)"
- fi
-
- if use opencl; then
- has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
- fi
- has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
-}
-
-pkg_pretend() {
- if use opencl; then
- if ! use video_cards_r600 &&
- ! use video_cards_radeonsi; then
- ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
- fi
- fi
-
- if use vaapi; then
- if ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
- fi
- fi
-
- if use vdpau; then
- if ! use video_cards_r300 &&
- ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
- fi
- fi
-
- if use xa; then
- if ! use video_cards_freedreno &&
- ! use video_cards_nouveau &&
- ! use video_cards_vmware; then
- ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
- fi
- fi
-
- if use xvmc; then
- if ! use video_cards_r600 &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
- fi
- fi
-
- if ! use gallium; then
- use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
- use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
- use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
- use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
- use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
- use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
- use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
- fi
-
- if ! use llvm; then
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
- fi
-}
-
-python_check_deps() {
- has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # warning message for bug 459306
- if use llvm && has_version sys-devel/llvm[!debug=]; then
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
- ewarn "detected! This can cause problems. For details, see bug 459306."
- fi
-
- if use llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local emesonargs=()
-
- if use classic; then
- # Intel code
- dri_driver_enable video_cards_i915 i915
- dri_driver_enable video_cards_i965 i965
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- dri_driver_enable video_cards_intel i915 i965
- fi
-
- # Nouveau code
- dri_driver_enable video_cards_nouveau nouveau
-
- # ATI code
- dri_driver_enable video_cards_r100 r100
- dri_driver_enable video_cards_r200 r200
- if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- dri_driver_enable video_cards_radeon r100 r200
- fi
- fi
-
- emesonargs+=( -Dplatforms=surfaceless$(use X && echo ",x11")$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
-
- if use gallium; then
- emesonargs+=(
- $(meson_use llvm)
- $(meson_use lm-sensors lmsensors)
- $(meson_use unwind libunwind)
- )
-
- if use video_cards_iris ||
- use video_cards_r300 ||
- use video_cards_r600 ||
- use video_cards_radeonsi ||
- use video_cards_nouveau ||
- use video_cards_vmware; then
- emesonargs+=($(meson_use d3d9 gallium-nine))
- else
- emesonargs+=(-Dgallium-nine=false)
- fi
-
- if use video_cards_r600 ||
- use video_cards_radeonsi ||
- use video_cards_nouveau; then
- emesonargs+=($(meson_use vaapi gallium-va))
- use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
- else
- emesonargs+=(-Dgallium-va=false)
- 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))
- else
- emesonargs+=(-Dgallium-vdpau=false)
- fi
-
- if use video_cards_freedreno ||
- use video_cards_nouveau ||
- use video_cards_vmware; then
- emesonargs+=($(meson_use xa gallium-xa))
- else
- emesonargs+=(-Dgallium-xa=false)
- fi
-
- if use video_cards_r600 ||
- use video_cards_nouveau; then
- emesonargs+=($(meson_use xvmc gallium-xvmc))
- else
- emesonargs+=(-Dgallium-xvmc=false)
- fi
-
- if use video_cards_freedreno ||
- use video_cards_lima ||
- use video_cards_panfrost ||
- use video_cards_vc4 ||
- use video_cards_vivante; then
- gallium_enable -- kmsro
- fi
-
- gallium_enable video_cards_lima lima
- gallium_enable video_cards_panfrost panfrost
- gallium_enable video_cards_vc4 vc4
- gallium_enable video_cards_vivante etnaviv
- gallium_enable video_cards_vmware svga
- gallium_enable video_cards_nouveau nouveau
-
- # Only one i915 driver (classic vs gallium). Default to classic.
- if ! use classic; then
- gallium_enable video_cards_i915 i915
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
- fi
- fi
-
- gallium_enable video_cards_iris iris
-
- gallium_enable video_cards_r300 r300
- gallium_enable video_cards_r600 r600
- gallium_enable video_cards_radeonsi radeonsi
- if ! use video_cards_r300 && \
- ! use video_cards_r600; then
- gallium_enable video_cards_radeon r300 r600
- fi
-
- gallium_enable video_cards_freedreno freedreno
- gallium_enable video_cards_virgl virgl
-
- # opencl stuff
- emesonargs+=(
- -Dgallium-opencl="$(usex opencl icd disabled)"
- )
- fi
-
- if use vulkan; then
- vulkan_enable video_cards_i965 intel
- vulkan_enable video_cards_iris intel
- vulkan_enable video_cards_radeonsi amd
- fi
-
- # Disable glx tls support on musl
- if use elibc_musl; then
- emesonargs+=( -Delf-tls=false )
- fi
-
- # x86 hardened pax_kernel needs glx-rts, bug 240956
- if [[ ${ABI} == x86 ]]; then
- emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
- fi
-
- if use gallium; then
- gallium_enable -- swrast
- emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
- else
- dri_driver_enable -- swrast
- emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
- fi
-
- driver_list() {
- local drivers="$(sort -u <<< "${1// /$'\n'}")"
- echo "${drivers//$'\n'/,}"
- }
-
- 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)
- $(meson_use libglvnd glvnd)
- $(meson_use selinux)
- -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-overlay vulkan-overlay-layer)
- --buildtype $(usex debug debug plain)
- -Db_ndebug=$(usex debug false true)
- )
- meson_src_configure
-}
-
-multilib_src_compile() {
- meson_src_compile
-}
-
-multilib_src_install() {
- meson_src_install
-
- use libglvnd && rm -f "${D}"/usr/$(get_libdir)/pkgconfig/{egl,gl}.pc
-}
-
-multilib_src_install_all() {
- einstalldocs
-}
-
-multilib_src_test() {
- meson test -v -C "${BUILD_DIR}" -t 100
-}
-
-pkg_postinst() {
- if ! use libglvnd; then
- # Switch to the xorg implementation.
- echo
- eselect opengl set --use-old ${OPENGL_DIR}
- fi
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-dri_driver_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- DRI_DRIVERS+=("$@")
- fi
-}
-
-gallium_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- GALLIUM_DRIVERS+=("$@")
- fi
-}
-
-vulkan_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- VULKAN_DRIVERS+=("$@")
- fi
-}
diff --git a/media-libs/mesa/mesa-19.3.4.ebuild b/media-libs/mesa/mesa-19.3.4-r1.ebuild
similarity index 97%
rename from media-libs/mesa/mesa-19.3.4.ebuild
rename to media-libs/mesa/mesa-19.3.4-r1.ebuild
index 1a64e15..f272c2b 100644
--- a/media-libs/mesa/mesa-19.3.4.ebuild
+++ b/media-libs/mesa/mesa-19.3.4-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_6 python3_7 )
+PYTHON_COMPAT=( python3_{6,7,8} )
inherit llvm meson multilib-minimal pax-utils python-any-r1
@@ -19,7 +19,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
+ KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
fi
LICENSE="MIT"
@@ -35,7 +35,7 @@ for card in ${VIDEO_CARDS}; do
done
IUSE="${IUSE_VIDEO_CARDS}
- +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 libglvnd +llvm
+ +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"
@@ -77,7 +77,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[${MULTILIB_USEDEP}]
+ >=media-libs/libglvnd-1.2.0-r1[X?,${MULTILIB_USEDEP}]
!app-eselect/eselect-opengl
)
!libglvnd? (
@@ -359,7 +359,7 @@ multilib_src_configure() {
fi
fi
- emesonargs+=( -Dplatforms=surfaceless$(use X && echo ",x11")$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
+ emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless )
if use gallium; then
emesonargs+=(
diff --git a/media-libs/mesa/mesa-20.0.1.ebuild b/media-libs/mesa/mesa-20.0.1-r1.ebuild
similarity index 98%
rename from media-libs/mesa/mesa-20.0.1.ebuild
rename to media-libs/mesa/mesa-20.0.1-r1.ebuild
index ceb44d7..7eca79f 100644
--- a/media-libs/mesa/mesa-20.0.1.ebuild
+++ b/media-libs/mesa/mesa-20.0.1-r1.ebuild
@@ -77,7 +77,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[${MULTILIB_USEDEP}]
+ >=media-libs/libglvnd-1.2.0-r1[X?,${MULTILIB_USEDEP}]
!app-eselect/eselect-opengl
)
!libglvnd? (
@@ -360,7 +360,7 @@ multilib_src_configure() {
fi
fi
- emesonargs+=( -Dplatforms=surfaceless$(use X && echo ",x11")$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
+ emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless )
if use gallium; then
emesonargs+=(
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2020-09-19 12:45 Jory Pratt
0 siblings, 0 replies; 21+ messages in thread
From: Jory Pratt @ 2020-09-19 12:45 UTC (permalink / raw
To: gentoo-commits
commit: 1ba1da570f5206d2d7537b8a63004c0085a9c9cb
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 19 12:44:43 2020 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Sat Sep 19 12:44:43 2020 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=1ba1da57
media-libs/mesa: Sync stable with ::gentoo
Package-Manager: Portage-3.0.7, Repoman-3.0.1
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
media-libs/mesa/Manifest | 2 +-
...ort.patch => mesa-20.1.7-add-disable-tls-support.patch} | 7 ++++---
media-libs/mesa/{mesa-20.0.8.ebuild => mesa-20.1.7.ebuild} | 14 ++++++--------
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 2c19fa4..be18333 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,2 +1,2 @@
-DIST mesa-20.0.8.tar.xz 12360736 BLAKE2B 19e3f8a40b34b5f17ed76077c5d92f728a134b2479c43d86674ed1818ab99639a9b732041f67488251df808564f6abe5b587d756ef9c7c13dcada87cd0fc05de SHA512 d906330c412899907dd05a84034a929107fccaf3044814c4b1f30ba5690cbcf1587b5f17534c6345111f3cb7cf292afd5984a60486643ff6f534b57cec615374
+DIST mesa-20.1.7.tar.xz 12825368 BLAKE2B 2fedda518ff29bfda49af12d714dc258e48fca3492d2327ce5080d11bbaea5ad646d438f3e2d5ddabeffae83211976fb15001c650cd6ab4052ab09d97342afdc SHA512 5ff614c3f7568db7673cd2398615e5398c7f50093abdabd0730e07fe9c358310793fea3f130058110c9a2aa284c6efd207e1bdca3d1a1ba46fb18d76e34f361a
DIST mesa-20.2.0-rc4.tar.xz 13569628 BLAKE2B 54068c298a57f2c19113828e2e9b94dd15070ecc0c899f7e3dc527b27579e4f8c3c84c7b841c8d0b8313556cca41bfefd3e08b360dd0e364cbc29e0609ff6f3d SHA512 1f718bfbadbc15b7216864226adb737f3a4a7801dc60ca9294effd4be5f260fffd31c988eed9550e8a7a7430acb05ba0c7d65693c1f375eab4b95d2d029755bb
diff --git a/media-libs/mesa/files/mesa-19.3.0-add-disable-tls-support.patch b/media-libs/mesa/files/mesa-20.1.7-add-disable-tls-support.patch
similarity index 80%
rename from media-libs/mesa/files/mesa-19.3.0-add-disable-tls-support.patch
rename to media-libs/mesa/files/mesa-20.1.7-add-disable-tls-support.patch
index 1686d88..b64b429 100644
--- a/media-libs/mesa/files/mesa-19.3.0-add-disable-tls-support.patch
+++ b/media-libs/mesa/files/mesa-20.1.7-add-disable-tls-support.patch
@@ -10,14 +10,14 @@ Signed-off-by: Jory Pratt <anarchy@gentoo.org>
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
-index 898d025..568f32c 100644
+index 4eda551..87fe071 100644
--- a/meson.build
+++ b/meson.build
-@@ -387,7 +387,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
+@@ -427,7 +427,7 @@ else
endif
# 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 not ['windows', 'freebsd'].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'
endif
@@ -42,3 +42,4 @@ index 626baf3..d30a238 100644
--
2.24.0
+
diff --git a/media-libs/mesa/mesa-20.0.8.ebuild b/media-libs/mesa/mesa-20.1.7.ebuild
similarity index 96%
rename from media-libs/mesa/mesa-20.0.8.ebuild
rename to media-libs/mesa/mesa-20.1.7.ebuild
index c378ffa..20f6629 100644
--- a/media-libs/mesa/mesa-20.0.8.ebuild
+++ b/media-libs/mesa/mesa-20.1.7.ebuild
@@ -18,7 +18,7 @@ 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"
+ SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
fi
@@ -151,7 +151,6 @@ LLVM_DEPSTR="
|| (
sys-devel/llvm:10[${MULTILIB_USEDEP}]
sys-devel/llvm:9[${MULTILIB_USEDEP}]
- sys-devel/llvm:8[${MULTILIB_USEDEP}]
)
<sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
"
@@ -247,7 +246,7 @@ x86? (
)"
PATCHES=(
- "${FILESDIR}"/${PN}-19.3.0-add-disable-tls-support.patch
+ "${FILESDIR}"/${PN}-20.1.7-add-disable-tls-support.patch
)
llvm_check_deps() {
@@ -338,11 +337,9 @@ pkg_setup() {
ewarn "detected! This can cause problems. For details, see bug 459306."
fi
- # os_same_file_description requires the kcmp syscall,
- # which is only available with CONFIG_CHECKPOINT_RESTORE=y.
- # Currently only AMDGPU utilizes this function, so only AMDGPU users would
- # get a spooky warning message if the syscall fails.
- if use gallium && use video_cards_radeonsi; then
+ if use video_cards_i965 ||
+ use video_cards_iris ||
+ use video_cards_radeonsi; then
CONFIG_CHECK="~CHECKPOINT_RESTORE"
linux-info_pkg_setup
fi
@@ -513,6 +510,7 @@ multilib_src_configure() {
-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)
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2021-03-10 15:06 Jory Pratt
0 siblings, 0 replies; 21+ messages in thread
From: Jory Pratt @ 2021-03-10 15:06 UTC (permalink / raw
To: gentoo-commits
commit: d3ff9b98f75ebcb9a2822ac2a485a78eb71aab76
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 10 15:06:27 2021 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Wed Mar 10 15:06:27 2021 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=d3ff9b98
media-libs/mesa: unbreak intel users build
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
.../mesa/files/mesa-20.3.4-intel-git_sha1.patch | 25 ++++++++++++++++++++++
media-libs/mesa/mesa-20.3.4.ebuild | 1 +
2 files changed, 26 insertions(+)
diff --git a/media-libs/mesa/files/mesa-20.3.4-intel-git_sha1.patch b/media-libs/mesa/files/mesa-20.3.4-intel-git_sha1.patch
new file mode 100644
index 0000000..2919d57
--- /dev/null
+++ b/media-libs/mesa/files/mesa-20.3.4-intel-git_sha1.patch
@@ -0,0 +1,25 @@
+From 4ffaff669266dd5b633d2e44ca842c49f0a1d2fb Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Wed, 10 Mar 2021 08:48:37 -0600
+Subject: [PATCH] ensure git_sha1.h is generated for use
+
+---
+ src/intel/common/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/intel/common/meson.build b/src/intel/common/meson.build
+index 66e0967..422d22a 100644
+--- a/src/intel/common/meson.build
++++ b/src/intel/common/meson.build
+@@ -42,7 +42,7 @@ files_libintel_common = files(
+ )
+
+ libintel_common = static_library(
+- ['intel_common', genX_xml_h],
++ ['intel_common', genX_xml_h, sha1_h],
+ files_libintel_common,
+ include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel],
+ c_args : [no_override_init_args],
+--
+2.26.2
+
diff --git a/media-libs/mesa/mesa-20.3.4.ebuild b/media-libs/mesa/mesa-20.3.4.ebuild
index 1810be3..acdeb09 100644
--- a/media-libs/mesa/mesa-20.3.4.ebuild
+++ b/media-libs/mesa/mesa-20.3.4.ebuild
@@ -243,6 +243,7 @@ x86? (
PATCHES=(
"${FILESDIR}"/${PN}-20.2.0-add-disable-tls-support.patch
+ "${FILESDIR}"/${PN}-20.3.4-intel-git_sha1.patch
)
llvm_check_deps() {
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2021-07-06 13:17 Jory Pratt
0 siblings, 0 replies; 21+ messages in thread
From: Jory Pratt @ 2021-07-06 13:17 UTC (permalink / raw
To: gentoo-commits
commit: 2e16e06ccc9a0030fd0ab4958352d5f28f1e3e1f
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 6 13:16:21 2021 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Tue Jul 6 13:16:21 2021 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=2e16e06c
media-libs/mesa: disable tls_glx support for musl
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
media-libs/mesa/Manifest | 1 +
.../mesa-21.1.4-add-disable-tls-support.patch | 42 ++
media-libs/mesa/mesa-21.1.4-r1.ebuild | 563 +++++++++++++++++++++
3 files changed, 606 insertions(+)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 0583fc1..fd1089e 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1 +1,2 @@
DIST mesa-21.0.3.tar.xz 14710004 BLAKE2B f2165da4487824931d8ff90e4f13624546a297b0d3577d69b7cfd6078a965282b4a732cb720cbb08ea83a3a987603cfe67876fb18022fa444b011fcc9b7df352 SHA512 4a8aee48a8ea7f32e8aa3bbbd91db26c6053b9a43e62ff88256929e6bc147884f0fef988726b5a3d59d7008663f017c746a0352fd3fcc1c476b8190af4a2531f
+DIST mesa-21.1.4.tar.xz 15254812 BLAKE2B 7ec6177ad4fb6f053553b634c9ff03c5d618d0212fd77c2fda8803197bef529c74ccf3c3ae75a810ba1d57862f08405c6df702e41f6cb0fd202833ce7b9efef0 SHA512 1f4e2d8ba2c3c02bad5468687752d7e87d6e79c4a0e6ec4b2741a57fb270d18ae4712aaa07a9e09a2d3348540f5a26cdbe05464cd52adb8df1e2e28a581b2b53
diff --git a/media-libs/mesa/files/mesa-21.1.4-add-disable-tls-support.patch b/media-libs/mesa/files/mesa-21.1.4-add-disable-tls-support.patch
new file mode 100644
index 0000000..8e7089c
--- /dev/null
+++ b/media-libs/mesa/files/mesa-21.1.4-add-disable-tls-support.patch
@@ -0,0 +1,42 @@
+From a9b290ecff1ed3fdfd95bae551ce47dea8fa13fb Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 6 Jul 2021 07:54:09 -0500
+Subject: [PATCH] Add disable glx support for musl
+
+---
+ meson.build | 4 +++-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index e1e94e7..b355f94 100644
+--- a/meson.build
++++ b/meson.build
+@@ -447,7 +447,9 @@ 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 with_use_elf_tls and
++ (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) 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/meson_options.txt b/meson_options.txt
+index a7030ab..73bd28e 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -465,3 +465,9 @@ option(
+ value : true,
+ description : 'use msse2 flag for mingw x86. Default: true',
+ )
++option(
++ 'use-elf-tls',
++ type : 'boolean',
++ value : false,
++ description : 'Build support for initial-exec TLS model'
++)
+--
+2.31.1
+
diff --git a/media-libs/mesa/mesa-21.1.4-r1.ebuild b/media-libs/mesa/mesa-21.1.4-r1.ebuild
new file mode 100644
index 0000000..4fb400e
--- /dev/null
+++ b/media-libs/mesa/mesa-21.1.4-r1.ebuild
@@ -0,0 +1,563 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit llvm meson-multilib python-any-r1 linux-info
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+ inherit git-r3
+else
+ SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
+ KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="
+ !test? ( test )
+"
+
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+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 +llvm
+ 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 )
+ osmesa? ( gallium )
+ vulkan? ( dri3
+ video_cards_radeonsi? ( llvm ) )
+ vulkan-overlay? ( vulkan )
+ wayland? ( egl gbm )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_iris? ( gallium )
+ video_cards_lima? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_panfrost? ( gallium )
+ video_cards_radeon? ( || ( classic gallium )
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ 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.105"
+RDEPEND="
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
+ gallium? (
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ )
+ lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
+ opencl? (
+ >=virtual/opencl-3[${MULTILIB_USEDEP}]
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ )
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ )
+ selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
+ wayland? (
+ >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=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}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+RDEPEND="${RDEPEND}
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
+"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling one than more slot
+# simultaneously.
+#
+# How to use it:
+# 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="12"
+LLVM_DEPSTR="
+ || (
+ sys-devel/llvm:12[${MULTILIB_USEDEP}]
+ sys-devel/llvm:11[${MULTILIB_USEDEP}]
+ sys-devel/llvm:10[${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}
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
+RDEPEND="${RDEPEND}
+ gallium? (
+ llvm? (
+ opencl? (
+ video_cards_r600? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${CLANG_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${CLANG_DEPSTR}
+ )
+ )
+ )
+ )
+ !opencl? (
+ video_cards_r600? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ !video_cards_r600? (
+ video_cards_radeonsi? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeonsi? (
+ video_cards_radeon? (
+ ${LLVM_DEPSTR_AMDGPU}
+ )
+ )
+ )
+ !video_cards_r600? (
+ !video_cards_radeon? (
+ !video_cards_radeonsi? (
+ ${LLVM_DEPSTR}
+ )
+ )
+ )
+ )
+ )
+ )
+"
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
+
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )
+ X? (
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-base/xorg-proto
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ opencl? (
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
+ wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] )
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ usr/lib*/libglapi.so.0.0.0
+ usr/lib*/libGLESv1_CM.so.1.1.0
+ usr/lib*/libGLESv2.so.2.0.0
+ usr/lib*/libGL.so.1.2.0
+ usr/lib*/libOSMesa.so.8.0.0
+ usr/lib/libGLX_mesa.so.0.0.0
+)"
+
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-21.1.4-add-disable-tls-support.patch
+)
+
+llvm_check_deps() {
+ local flags=${MULTILIB_USEDEP}
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+ then
+ flags+=",llvm_targets_AMDGPU(-)"
+ fi
+
+ if use opencl; then
+ has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
+ fi
+ has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
+}
+
+pkg_pretend() {
+ if use vulkan; then
+ if ! use video_cards_i965 &&
+ ! use video_cards_iris &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_v3d; then
+ ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d"
+ fi
+ fi
+
+ if use opencl; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_radeonsi; then
+ ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
+ fi
+ fi
+
+ if use vaapi; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
+ fi
+ fi
+
+ if use vdpau; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
+ fi
+ fi
+
+ if use xa; then
+ if ! use video_cards_freedreno &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
+ fi
+ fi
+
+ if use xvmc; then
+ if ! use video_cards_r600 &&
+ ! use video_cards_nouveau; then
+ ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
+ fi
+ fi
+
+ if ! use gallium; then
+ use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
+ use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
+ use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
+ use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
+ use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
+ use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
+ use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
+ fi
+
+ if ! use llvm; then
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
+ fi
+
+ if use osmesa && ! use llvm; then
+ ewarn "OSMesa will be slow without enabling USE=llvm"
+ fi
+}
+
+python_check_deps() {
+ has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ if use video_cards_i965 ||
+ use video_cards_iris ||
+ use video_cards_radeonsi; then
+ if kernel_is -ge 5 11 3; then
+ CONFIG_CHECK="~KCMP"
+ elif kernel_is -ge 5 11; then
+ CONFIG_CHECK="~CHECKPOINT_RESTORE"
+ elif kernel_is -ge 5 10 20; then
+ CONFIG_CHECK="~KCMP"
+ else
+ CONFIG_CHECK="~CHECKPOINT_RESTORE"
+ fi
+ linux-info_pkg_setup
+ fi
+
+ if use gallium && use llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local emesonargs=()
+
+ if use classic; then
+ # Intel code
+ dri_driver_enable video_cards_i915 i915
+ dri_driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ dri_driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ dri_driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ dri_driver_enable video_cards_r100 r100
+ dri_driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ dri_driver_enable video_cards_radeon r100 r200
+ fi
+ fi
+
+ local platforms
+ use X && platforms+="x11"
+ use wayland && platforms+=",wayland"
+ emesonargs+=(-Dplatforms=${platforms#,})
+
+ if use X || use egl; then
+ emesonargs+=(-Dglvnd=true)
+ else
+ emesonargs+=(-Dglvnd=false)
+ fi
+
+ # Disable glx tls support on musl
+ if use elibc_musl; then
+ emesonargs+=( -Delf-tls=false )
+ fi
+
+ if use gallium; then
+ emesonargs+=(
+ $(meson_feature llvm)
+ $(meson_feature lm-sensors lmsensors)
+ $(meson_feature unwind libunwind)
+ )
+
+ if use video_cards_iris ||
+ use video_cards_r300 ||
+ use video_cards_r600 ||
+ use video_cards_radeonsi ||
+ use video_cards_nouveau ||
+ use video_cards_vmware; then
+ emesonargs+=($(meson_use d3d9 gallium-nine))
+ else
+ emesonargs+=(-Dgallium-nine=false)
+ fi
+
+ if use video_cards_r600 ||
+ use video_cards_radeonsi ||
+ use video_cards_nouveau; then
+ emesonargs+=($(meson_feature vaapi gallium-va))
+ use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
+ else
+ 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_feature vdpau gallium-vdpau))
+ else
+ emesonargs+=(-Dgallium-vdpau=disabled)
+ fi
+
+ if use video_cards_freedreno ||
+ use video_cards_nouveau ||
+ use video_cards_vmware; then
+ emesonargs+=($(meson_feature xa gallium-xa))
+ else
+ emesonargs+=(-Dgallium-xa=disabled)
+ fi
+
+ if use video_cards_r600 ||
+ use video_cards_nouveau; then
+ emesonargs+=($(meson_feature xvmc gallium-xvmc))
+ else
+ 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
+ fi
+
+ gallium_enable -- swrast
+ 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
+ gallium_enable video_cards_i915 i915
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+ fi
+
+ gallium_enable video_cards_iris iris
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ gallium_enable video_cards_virgl virgl
+
+ # opencl stuff
+ emesonargs+=(
+ -Dgallium-opencl="$(usex opencl icd disabled)"
+ )
+ fi
+
+ if use vulkan; then
+ vulkan_enable video_cards_i965 intel
+ vulkan_enable video_cards_iris intel
+ vulkan_enable video_cards_radeonsi amd
+ vulkan_enable video_cards_v3d broadcom
+ fi
+
+ driver_list() {
+ local drivers="$(sort -u <<< "${1// /$'\n'}")"
+ echo "${drivers//$'\n'/,}"
+ }
+
+ emesonargs+=(
+ $(meson_use test build-tests)
+ -Dglx=$(usex X dri disabled)
+ -Dshared-glapi=enabled
+ $(meson_feature dri3)
+ $(meson_feature egl)
+ $(meson_feature gbm)
+ $(meson_feature gles1)
+ $(meson_feature gles2)
+ $(meson_use osmesa)
+ $(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)
+ )
+ meson_src_configure
+}
+
+multilib_src_test() {
+ meson_src_test -t 100
+}
+
+# $1 - VIDEO_CARDS flag (check skipped for "--")
+# other args - names of DRI drivers to enable
+dri_driver_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ DRI_DRIVERS+=("$@")
+ fi
+}
+
+gallium_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ GALLIUM_DRIVERS+=("$@")
+ fi
+}
+
+vulkan_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ VULKAN_DRIVERS+=("$@")
+ fi
+}
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2021-08-20 14:14 Jory Pratt
0 siblings, 0 replies; 21+ messages in thread
From: Jory Pratt @ 2021-08-20 14:14 UTC (permalink / raw
To: gentoo-commits
commit: 4d48a2d4742d2b6f61418374c27390ae83196a96
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 20 14:14:40 2021 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Fri Aug 20 14:14:40 2021 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=4d48a2d4
media-libs/mesa: sync with current stable ::gentoo
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
media-libs/mesa/Manifest | 3 +-
.../mesa-21.0.3-add-disable-tls-support.patch | 41 --
media-libs/mesa/mesa-21.1.4-r1.ebuild | 562 ---------------------
.../{mesa-21.1.6.ebuild => mesa-21.1.7.ebuild} | 2 +-
4 files changed, 2 insertions(+), 606 deletions(-)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 125d371..513939a 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,2 +1 @@
-DIST mesa-21.1.4.tar.xz 15254812 BLAKE2B 7ec6177ad4fb6f053553b634c9ff03c5d618d0212fd77c2fda8803197bef529c74ccf3c3ae75a810ba1d57862f08405c6df702e41f6cb0fd202833ce7b9efef0 SHA512 1f4e2d8ba2c3c02bad5468687752d7e87d6e79c4a0e6ec4b2741a57fb270d18ae4712aaa07a9e09a2d3348540f5a26cdbe05464cd52adb8df1e2e28a581b2b53
-DIST mesa-21.1.6.tar.xz 15371108 BLAKE2B fb44778cc552d96bcc4e73c82c28a2a763be99d67e2d8cdea36e7b8e589b36afc2315ec0f984003c52bd27956baf2d6ddf787f34beae41c4944d95fc6cbcb05c SHA512 5daf389aad4fe7ab3574f6af3aabc62ba8b3034004a0a0853dcc18ef6c8003d2f2195cc377dc57b30863ae4cf158149e3156247445ca2b11e401700011cb878c
+DIST mesa-21.1.7.tar.xz 15391776 BLAKE2B a9138f189ef953d5efa4e287fbbe795ef2539c113dc7e0f565d3f35dcfaa59ab08674bf37fda196ba34e5963637c3ebb133db40b558bd275e29c8387b1acfdfa SHA512 1fd677437f292c30fbf08bfef8c1088557841f426090ccba20ab2a222b08fb5c3ec48a7a0301466e03a23019d09414c700a4f5e299479cacd6972a9f3ba030c8
diff --git a/media-libs/mesa/files/mesa-21.0.3-add-disable-tls-support.patch b/media-libs/mesa/files/mesa-21.0.3-add-disable-tls-support.patch
deleted file mode 100644
index e6f9e18..0000000
--- a/media-libs/mesa/files/mesa-21.0.3-add-disable-tls-support.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 7af845bca9eafb67b32c2f5e2de7bc2a56772aa4 Mon Sep 17 00:00:00 2001
-From:
-Date: Fri, 28 May 2021 11:48:26 -0500
-Subject: [PATCH] Allow to disable glx_tls for musl users
-
----
- meson.build | 3 ++-
- meson_options.txt | 6 ++++++
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 26cfd01..38d4802 100644
---- a/meson.build
-+++ b/meson.build
-@@ -448,7 +448,8 @@ 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', 'haiku'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
-+with_use_elf_tls = get_option('use-elf-tls')
-+if with_use_elf_tls and not ['windows', 'freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
- pre_args += '-DUSE_ELF_TLS'
- use_elf_tls = true
- endif
-diff --git a/meson_options.txt b/meson_options.txt
-index fc73f6e..edd3886 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -464,3 +464,9 @@ option(
- value : true,
- description : 'use msse2 flag for mingw x86. Default: true',
- )
-+option(
-+ 'use-elf-tls',
-+ type : 'boolean',
-+ value : false,
-+ description : 'Build support for initial-exec TLS model'
-+)
---
-2.31.1
-
diff --git a/media-libs/mesa/mesa-21.1.4-r1.ebuild b/media-libs/mesa/mesa-21.1.4-r1.ebuild
deleted file mode 100644
index 74aa23a..0000000
--- a/media-libs/mesa/mesa-21.1.4-r1.ebuild
+++ /dev/null
@@ -1,562 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
- inherit git-r3
-else
- SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
- KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="
- !test? ( test )
-"
-
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-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 +llvm
- 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 )
- osmesa? ( gallium )
- vulkan? ( dri3
- video_cards_radeonsi? ( llvm ) )
- vulkan-overlay? ( vulkan )
- wayland? ( egl gbm )
- video_cards_freedreno? ( gallium )
- video_cards_intel? ( classic )
- video_cards_i915? ( || ( classic gallium ) )
- video_cards_i965? ( classic )
- video_cards_iris? ( gallium )
- video_cards_lima? ( gallium )
- video_cards_nouveau? ( || ( classic gallium ) )
- video_cards_panfrost? ( gallium )
- video_cards_radeon? ( || ( classic gallium )
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
- video_cards_r100? ( classic )
- video_cards_r200? ( classic )
- 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.105"
-RDEPEND="
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
- >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
- gallium? (
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
- llvm? (
- video_cards_radeonsi? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_r600? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_radeon? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- )
- lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
- opencl? (
- >=virtual/opencl-3[${MULTILIB_USEDEP}]
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- vaapi? (
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
- )
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
- )
- selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
- wayland? (
- >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
- >=dev-libs/wayland-protocols-1.8
- )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
- video_cards_intel? (
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- )
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
- X? (
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
- >=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}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
- "
-done
-RDEPEND="${RDEPEND}
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
-"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more slot
-# simultaneously.
-#
-# How to use it:
-# 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="12"
-LLVM_DEPSTR="
- || (
- sys-devel/llvm:12[${MULTILIB_USEDEP}]
- sys-devel/llvm:11[${MULTILIB_USEDEP}]
- sys-devel/llvm:10[${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}
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-RDEPEND="${RDEPEND}
- gallium? (
- llvm? (
- opencl? (
- video_cards_r600? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${CLANG_DEPSTR}
- )
- )
- )
- )
- !opencl? (
- video_cards_r600? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${LLVM_DEPSTR}
- )
- )
- )
- )
- )
- )
-"
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
-
-DEPEND="${RDEPEND}
- valgrind? ( dev-util/valgrind )
- X? (
- x11-libs/libXrandr[${MULTILIB_USEDEP}]
- x11-base/xorg-proto
- )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- opencl? (
- >=sys-devel/gcc-4.6
- )
- sys-devel/bison
- sys-devel/flex
- virtual/pkgconfig
- $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
- wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
- usr/lib*/libglapi.so.0.0.0
- usr/lib*/libGLESv1_CM.so.1.1.0
- usr/lib*/libGLESv2.so.2.0.0
- usr/lib*/libGL.so.1.2.0
- usr/lib*/libOSMesa.so.8.0.0
- usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-21.1.4-add-disable-tls-support.patch
-)
-
-llvm_check_deps() {
- local flags=${MULTILIB_USEDEP}
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
- then
- flags+=",llvm_targets_AMDGPU(-)"
- fi
-
- if use opencl; then
- has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
- fi
- has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
-}
-
-pkg_pretend() {
- if use vulkan; then
- if ! use video_cards_i965 &&
- ! use video_cards_iris &&
- ! use video_cards_radeonsi &&
- ! use video_cards_v3d; then
- ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d"
- fi
- fi
-
- if use opencl; then
- if ! use video_cards_r600 &&
- ! use video_cards_radeonsi; then
- ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
- fi
- fi
-
- if use vaapi; then
- if ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
- fi
- fi
-
- if use vdpau; then
- if ! use video_cards_r300 &&
- ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
- fi
- fi
-
- if use xa; then
- if ! use video_cards_freedreno &&
- ! use video_cards_nouveau &&
- ! use video_cards_vmware; then
- ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
- fi
- fi
-
- if use xvmc; then
- if ! use video_cards_r600 &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
- fi
- fi
-
- if ! use gallium; then
- use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
- use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
- use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
- use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
- use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
- use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
- use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
- fi
-
- if ! use llvm; then
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
- fi
-
- if use osmesa && ! use llvm; then
- ewarn "OSMesa will be slow without enabling USE=llvm"
- fi
-}
-
-python_check_deps() {
- has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # warning message for bug 459306
- if use llvm && has_version sys-devel/llvm[!debug=]; then
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
- ewarn "detected! This can cause problems. For details, see bug 459306."
- fi
-
- if use video_cards_i965 ||
- use video_cards_iris ||
- use video_cards_radeonsi; then
- if kernel_is -ge 5 11 3; then
- CONFIG_CHECK="~KCMP"
- elif kernel_is -ge 5 11; then
- CONFIG_CHECK="~CHECKPOINT_RESTORE"
- elif kernel_is -ge 5 10 20; then
- CONFIG_CHECK="~KCMP"
- else
- CONFIG_CHECK="~CHECKPOINT_RESTORE"
- fi
- linux-info_pkg_setup
- fi
-
- if use gallium && use llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local emesonargs=()
-
- if use classic; then
- # Intel code
- dri_driver_enable video_cards_i915 i915
- dri_driver_enable video_cards_i965 i965
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- dri_driver_enable video_cards_intel i915 i965
- fi
-
- # Nouveau code
- dri_driver_enable video_cards_nouveau nouveau
-
- # ATI code
- dri_driver_enable video_cards_r100 r100
- dri_driver_enable video_cards_r200 r200
- if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- dri_driver_enable video_cards_radeon r100 r200
- fi
- fi
-
- local platforms
- use X && platforms+="x11"
- use wayland && platforms+=",wayland"
- emesonargs+=(-Dplatforms=${platforms#,})
-
- if use X || use egl; then
- emesonargs+=(-Dglvnd=true)
- else
- emesonargs+=(-Dglvnd=false)
- fi
-
- # Disable glx tls support on musl
- if use elibc_musl; then
- emesonargs+=( -Delf-tls=false )
- fi
-
- if use gallium; then
- emesonargs+=(
- $(meson_feature llvm)
- $(meson_feature lm-sensors lmsensors)
- $(meson_feature unwind libunwind)
- )
-
- if use video_cards_iris ||
- use video_cards_r300 ||
- use video_cards_r600 ||
- use video_cards_radeonsi ||
- use video_cards_nouveau ||
- use video_cards_vmware; then
- emesonargs+=($(meson_use d3d9 gallium-nine))
- else
- emesonargs+=(-Dgallium-nine=false)
- fi
-
- if use video_cards_r600 ||
- use video_cards_radeonsi ||
- use video_cards_nouveau; then
- emesonargs+=($(meson_feature vaapi gallium-va))
- use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
- else
- 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_feature vdpau gallium-vdpau))
- else
- emesonargs+=(-Dgallium-vdpau=disabled)
- fi
-
- if use video_cards_freedreno ||
- use video_cards_nouveau ||
- use video_cards_vmware; then
- emesonargs+=($(meson_feature xa gallium-xa))
- else
- emesonargs+=(-Dgallium-xa=disabled)
- fi
-
- if use video_cards_r600 ||
- use video_cards_nouveau; then
- emesonargs+=($(meson_feature xvmc gallium-xvmc))
- else
- 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
- fi
-
- gallium_enable -- swrast
- 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
- gallium_enable video_cards_i915 i915
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
- fi
- fi
-
- gallium_enable video_cards_iris iris
-
- gallium_enable video_cards_r300 r300
- gallium_enable video_cards_r600 r600
- gallium_enable video_cards_radeonsi radeonsi
- if ! use video_cards_r300 && \
- ! use video_cards_r600; then
- gallium_enable video_cards_radeon r300 r600
- fi
-
- gallium_enable video_cards_freedreno freedreno
- gallium_enable video_cards_virgl virgl
-
- # opencl stuff
- emesonargs+=(
- -Dgallium-opencl="$(usex opencl icd disabled)"
- )
- fi
-
- if use vulkan; then
- vulkan_enable video_cards_i965 intel
- vulkan_enable video_cards_iris intel
- vulkan_enable video_cards_radeonsi amd
- vulkan_enable video_cards_v3d broadcom
- fi
-
- driver_list() {
- local drivers="$(sort -u <<< "${1// /$'\n'}")"
- echo "${drivers//$'\n'/,}"
- }
-
- emesonargs+=(
- $(meson_use test build-tests)
- -Dglx=$(usex X dri disabled)
- -Dshared-glapi=enabled
- $(meson_feature dri3)
- $(meson_feature egl)
- $(meson_feature gbm)
- $(meson_feature gles1)
- $(meson_feature gles2)
- $(meson_use osmesa)
- $(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)
- )
- meson_src_configure
-}
-
-multilib_src_test() {
- meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-dri_driver_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- DRI_DRIVERS+=("$@")
- fi
-}
-
-gallium_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- GALLIUM_DRIVERS+=("$@")
- fi
-}
-
-vulkan_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- VULKAN_DRIVERS+=("$@")
- fi
-}
diff --git a/media-libs/mesa/mesa-21.1.6.ebuild b/media-libs/mesa/mesa-21.1.7.ebuild
similarity index 99%
rename from media-libs/mesa/mesa-21.1.6.ebuild
rename to media-libs/mesa/mesa-21.1.7.ebuild
index ceeef25..242a045 100644
--- a/media-libs/mesa/mesa-21.1.6.ebuild
+++ b/media-libs/mesa/mesa-21.1.7.ebuild
@@ -19,7 +19,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 x86"
+ KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
fi
LICENSE="MIT"
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2022-07-19 1:08 Anthony G. Basile
0 siblings, 0 replies; 21+ messages in thread
From: Anthony G. Basile @ 2022-07-19 1:08 UTC (permalink / raw
To: gentoo-commits
commit: 1af02d54f2f2b0d41b8e176a8156d7e1d37acdf9
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 19 01:07:57 2022 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Jul 19 01:07:57 2022 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=1af02d54
media-libs/mesa: in tree version 22.0.5 works
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
media-libs/mesa/Manifest | 1 -
media-libs/mesa/files/mesa-tls-2.patch | 60 ---
.../files/mesa-tls-3-fix-non-initial-exec.patch | 122 -----
media-libs/mesa/files/mesa-tls.patch | 134 -----
media-libs/mesa/mesa-21.3.7.ebuild | 566 ---------------------
media-libs/mesa/metadata.xml | 33 --
6 files changed, 916 deletions(-)
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
deleted file mode 100644
index 1e36ad7d..00000000
--- a/media-libs/mesa/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST mesa-21.3.7.tar.xz 16569592 BLAKE2B 7c5a3f144b1ce9e8bbb3560ae2bf46afda9d5c4a3e7b825d406f9a5090dfd51e2b3cc6ee2c10df09c817f5836ffbd09bfc86fbaf63bcc907caef290fd44baee6 SHA512 0991543e9435457fa4d077517408b3f197be32ed61a6c7ca34ddb3906eed208791f1a57227f74115f99df18e612efab1d2c6809b7cf426d273633b53d4aefc88
diff --git a/media-libs/mesa/files/mesa-tls-2.patch b/media-libs/mesa/files/mesa-tls-2.patch
deleted file mode 100644
index c849e27d..00000000
--- a/media-libs/mesa/files/mesa-tls-2.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 60d95c5d0feef4e4b2820a26c4708aff10f5730d Mon Sep 17 00:00:00 2001
-From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
-Date: Thu, 2 Sep 2021 12:19:53 -0400
-Subject: [PATCH] Auto-enable TLSDESC support
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-TLSDESC speeds up access to dynamic TLS. This is especially important
-for non-glibc targets, but is also helpful for non-initial-exec TLS
-variables.
-
-The entry asm does not support TLSDESC, but it only accesses
-initial-exec symbols, so it is not necessary to handle that separately.
-
-Acked-by: Tapani Pälli <tapani.palli@intel.com>
-Acked-by: Jesse Natalie <jenatali@microsoft.com>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12722>
----
- meson.build | 24 ++++++++++++++++++++++++
- 1 file changed, 24 insertions(+)
-
-diff --git a/meson.build b/meson.build
-index a7ace23677c..29f0c3f3912 100644
---- a/meson.build
-+++ b/meson.build
-@@ -520,6 +520,30 @@ if not with_platform_windows or not with_shared_glapi
- c_args += '-fno-emulated-tls'
- cpp_args += '-fno-emulated-tls'
- endif
-+
-+ # -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly but requires
-+ # full toolchain (including libc) support.
-+ have_mtls_dialect = false
-+ foreach c_arg : get_option('c_args')
-+ if c_arg.startswith('-mtls-dialect=')
-+ have_mtls_dialect = true
-+ break
-+ endif
-+ endforeach
-+ if not have_mtls_dialect
-+ # need .run to check libc support. meson aborts when calling .run when
-+ # cross-compiling, but because this is just an optimization we can skip it
-+ if meson.is_cross_build()
-+ warning('cannot auto-detect -mtls-dialect when cross-compiling, using compiler default')
-+ else
-+ # -fpic to force dynamic tls, otherwise TLS relaxation defeats check
-+ gnu2_test = cc.run('int __thread x; int main() { return x; }', args: ['-mtls-dialect=gnu2', '-fpic'], name: '-mtls-dialect=gnu2')
-+ if gnu2_test.returncode() == 0
-+ c_args += '-mtls-dialect=gnu2'
-+ cpp_args += '-mtls-dialect=gnu2'
-+ endif
-+ endif
-+ endif
- endif
-
- if with_glx != 'disabled'
---
-GitLab
-
diff --git a/media-libs/mesa/files/mesa-tls-3-fix-non-initial-exec.patch b/media-libs/mesa/files/mesa-tls-3-fix-non-initial-exec.patch
deleted file mode 100644
index 4ae45ca0..00000000
--- a/media-libs/mesa/files/mesa-tls-3-fix-non-initial-exec.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 3aab34171d464f907ed4488ab87c48270381ecde Mon Sep 17 00:00:00 2001
-From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
-Date: Tue, 23 Nov 2021 15:24:38 -0500
-Subject: [PATCH] Fix TSD stubs for non-initial-exec case (fixes #5667).
-
-ppc64le TSD disabled for now since I am insufficiently familiar with ppc
-asm. x86 pthread stubs deleted because adding USE_ELF_TLS to the #if is
-isn't worth the effort since it only saves a single function call on
-initial entry (TSD stubs are not used for read-only text now). also
-potentially fix non-pthread TSD builds (_glapi_Dispatch was undefined),
-but untested (could still be broken).
-
-Tested-by: Jesse Natalie <jenatali@microsoft.com>
-Tested-by: Jan Beich <jbeich@freebsd.org>
-Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13935>
----
- src/mapi/entry.c | 5 ++---
- src/mapi/entry_x86_tsd.h | 2 +-
- src/mapi/glapi/gen/gl_x86_asm.py | 28 +++-------------------------
- 3 files changed, 6 insertions(+), 29 deletions(-)
-
-diff --git a/src/mapi/entry.c b/src/mapi/entry.c
-index b120eae31a1..5ebd85011c6 100644
---- a/src/mapi/entry.c
-+++ b/src/mapi/entry.c
-@@ -47,8 +47,6 @@
- #endif
-
- /* REALLY_INITIAL_EXEC implies USE_ELF_TLS and __GNUC__ */
--/* Use TSD stubs for non-IE ELF TLS even though first access is slower because
-- * future accesses will be patched */
- #if defined(USE_X86_ASM) && defined(REALLY_INITIAL_EXEC)
- #include "entry_x86_tls.h"
- #elif defined(USE_X86_ASM) && !defined(GLX_X86_READONLY_TEXT) && defined(__GNUC__)
-@@ -57,7 +55,8 @@
- #include "entry_x86-64_tls.h"
- #elif defined(USE_PPC64LE_ASM) && UTIL_ARCH_LITTLE_ENDIAN && defined(REALLY_INITIAL_EXEC)
- #include "entry_ppc64le_tls.h"
--#elif defined(USE_PPC64LE_ASM) && UTIL_ARCH_LITTLE_ENDIAN && defined(__GNUC__)
-+/* ppc64le non-IE TSD stubs are possible but not currently implemented */
-+#elif defined(USE_PPC64LE_ASM) && UTIL_ARCH_LITTLE_ENDIAN && !defined(USE_ELF_TLS) && defined(__GNUC__)
- #include "entry_ppc64le_tsd.h"
- #else
-
-diff --git a/src/mapi/entry_x86_tsd.h b/src/mapi/entry_x86_tsd.h
-index f5d9c41253f..2aa724a70f3 100644
---- a/src/mapi/entry_x86_tsd.h
-+++ b/src/mapi/entry_x86_tsd.h
-@@ -69,7 +69,7 @@ __asm__(".balign 32\n"
- "popl %ecx\n\t" \
- "addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx\n\t" \
- LOC_END_SET_ECX \
-- "movl " ENTRY_CURRENT_TABLE "@GOT(%ecx), %eax\n\t" \
-+ "movl _glapi_Dispatch@GOT(%ecx), %eax\n\t" \
- "mov (%eax), %eax\n\t" \
- "testl %eax, %eax\n\t" \
- "jne 1f\n\t" \
-diff --git a/src/mapi/glapi/gen/gl_x86_asm.py b/src/mapi/glapi/gen/gl_x86_asm.py
-index 4b10db37d7f..057aa54ba3f 100644
---- a/src/mapi/glapi/gen/gl_x86_asm.py
-+++ b/src/mapi/glapi/gen/gl_x86_asm.py
-@@ -70,7 +70,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
- print('#endif')
- print('')
- print('')
-- print('#ifdef USE_ELF_TLS')
-+ print('#ifdef REALLY_INITIAL_EXEC')
- print('')
- print('#ifdef GLX_X86_READONLY_TEXT')
- print('# define CTX_INSNS MOV_L(GS:(EAX), EAX)')
-@@ -86,17 +86,6 @@ class PrintGenericStubs(gl_XML.gl_print_base):
- print('\tCTX_INSNS ; \\')
- print('\tJMP(GL_OFFSET(off))')
- print('')
-- print('#elif defined(HAVE_PTHREAD)')
-- print('# define GL_STUB(fn,off,fn_alt)\t\t\t\\')
-- print('ALIGNTEXT16;\t\t\t\t\t\t\\')
-- print('GLOBL_FN(GL_PREFIX(fn, fn_alt));\t\t\t\\')
-- print('GL_PREFIX(fn, fn_alt):\t\t\t\t\t\\')
-- print('\tMOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ;\t\\')
-- print('\tTEST_L(EAX, EAX) ;\t\t\t\t\\')
-- print('\tJE(1f) ;\t\t\t\t\t\\')
-- print('\tJMP(GL_OFFSET(off)) ;\t\t\t\t\\')
-- print('1:\tCALL(_x86_get_dispatch) ;\t\t\t\\')
-- print('\tJMP(GL_OFFSET(off))')
- print('#else')
- print('# define GL_STUB(fn,off,fn_alt)\t\t\t\\')
- print('ALIGNTEXT16;\t\t\t\t\t\t\\')
-@@ -121,7 +110,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
- print('')
- print('SEG_TEXT')
- print('')
-- print('#ifdef USE_ELF_TLS')
-+ print('#ifdef REALLY_INITIAL_EXEC')
- print('')
- print('\tGLOBL\tGLNAME(_x86_get_dispatch)')
- print('\tHIDDEN(GLNAME(_x86_get_dispatch))')
-@@ -133,19 +122,8 @@ class PrintGenericStubs(gl_XML.gl_print_base):
- print('\tmovl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax')
- print('\tret')
- print('')
-- print('#elif defined(HAVE_PTHREAD)')
-- print('EXTERN GLNAME(_glapi_Dispatch)')
-- print('EXTERN GLNAME(_gl_DispatchTSD)')
-- print('EXTERN GLNAME(pthread_getspecific)')
-- print('')
-- print('ALIGNTEXT16')
-- print('GLNAME(_x86_get_dispatch):')
-- print('\tSUB_L(CONST(24), ESP)')
-- print('\tPUSH_L(GLNAME(_gl_DispatchTSD))')
-- print('\tCALL(GLNAME(pthread_getspecific))')
-- print('\tADD_L(CONST(28), ESP)')
-- print('\tRET')
- print('#else')
-+ print('EXTERN GLNAME(_glapi_Dispatch)')
- print('EXTERN GLNAME(_glapi_get_dispatch)')
- print('#endif')
- print('')
---
-GitLab
-
diff --git a/media-libs/mesa/files/mesa-tls.patch b/media-libs/mesa/files/mesa-tls.patch
deleted file mode 100644
index f445c934..00000000
--- a/media-libs/mesa/files/mesa-tls.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From 8570a2a280587a1e43ac11ad46ad62dfdd6c7b39 Mon Sep 17 00:00:00 2001
-From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
-Date: Thu, 2 Sep 2021 11:58:32 -0400
-Subject: [PATCH] Use initial-exec TLS for glibc only, enable TLS elsewhere
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It is not portable to use initial-exec TLS in dlopened libraries. glibc
-and FreeBSD allocate extra memory for extra initial-exec variables
-specifically for libGL, but other libcs including musl do not.
-
-Keep initial-exec disabled on FreeBSD since it is apparently broken for
-some reason:
-
-https://gitlab.freedesktop.org/mesa/mesa/-/issues/966#note_394512
-https://github.com/jbeich/mesa/commit/81dbdb15d55054242eded0eb2f32621d583c1aaf
-
-Enable TLS on OpenBSD and Haiku based on the u_thread.h comment that
-emutls is better than pthread_getspecific, which seems plausible given
-that emutls has strictly more information to work with.
-
-Fixes #966.
-
-Acked-by: Tapani Pälli <tapani.palli@intel.com>
-Acked-by: Jesse Natalie <jenatali@microsoft.com>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12722>
----
- meson.build | 7 ++-----
- src/mapi/entry.c | 28 ++++++++++++++--------------
- src/util/u_thread.h | 16 ++++++----------
- 3 files changed, 22 insertions(+), 29 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index cf2b5f4b939..a7ace23677c 100644
---- a/meson.build
-+++ b/meson.build
-@@ -508,15 +508,12 @@ foreach platform : _platforms
- pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
- endforeach
-
--# 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
-- (not with_platform_android or get_option('platform-sdk-version') >= 29) and
-- (not with_platform_windows or not with_shared_glapi))
-+if not with_platform_windows or not with_shared_glapi
- pre_args += '-DUSE_ELF_TLS'
- use_elf_tls = true
-
-- if with_platform_android
-+ if with_platform_android and get_option('platform-sdk-version') >= 29
- # By default the NDK compiler, at least, emits emutls references instead of
- # ELF TLS, even when building targeting newer API levels. Make it actually do
- # ELF TLS instead.
-diff --git a/src/mapi/entry.c b/src/mapi/entry.c
-index 7ff3c8f8c8c..b120eae31a1 100644
---- a/src/mapi/entry.c
-+++ b/src/mapi/entry.c
-@@ -31,6 +31,7 @@
- #include "entry.h"
- #include "u_current.h"
- #include "util/u_endian.h"
-+#include "util/u_thread.h"
-
- #define _U_STRINGIFY(x) #x
- #define U_STRINGIFY(x) _U_STRINGIFY(x)
-@@ -45,20 +46,19 @@
- #define ENTRY_CURRENT_TABLE_GET U_STRINGIFY(u_current_get_table_internal)
- #endif
-
--#if defined(USE_X86_ASM) && defined(__GNUC__)
--# ifdef USE_ELF_TLS
--# include "entry_x86_tls.h"
--# else
--# include "entry_x86_tsd.h"
--# endif
--#elif defined(USE_X86_64_ASM) && defined(__GNUC__) && defined(USE_ELF_TLS)
--# include "entry_x86-64_tls.h"
--#elif defined(USE_PPC64LE_ASM) && defined(__GNUC__) && UTIL_ARCH_LITTLE_ENDIAN
--# ifdef USE_ELF_TLS
--# include "entry_ppc64le_tls.h"
--# else
--# include "entry_ppc64le_tsd.h"
--# endif
-+/* REALLY_INITIAL_EXEC implies USE_ELF_TLS and __GNUC__ */
-+/* Use TSD stubs for non-IE ELF TLS even though first access is slower because
-+ * future accesses will be patched */
-+#if defined(USE_X86_ASM) && defined(REALLY_INITIAL_EXEC)
-+#include "entry_x86_tls.h"
-+#elif defined(USE_X86_ASM) && !defined(GLX_X86_READONLY_TEXT) && defined(__GNUC__)
-+#include "entry_x86_tsd.h"
-+#elif defined(USE_X86_64_ASM) && defined(REALLY_INITIAL_EXEC)
-+#include "entry_x86-64_tls.h"
-+#elif defined(USE_PPC64LE_ASM) && UTIL_ARCH_LITTLE_ENDIAN && defined(REALLY_INITIAL_EXEC)
-+#include "entry_ppc64le_tls.h"
-+#elif defined(USE_PPC64LE_ASM) && UTIL_ARCH_LITTLE_ENDIAN && defined(__GNUC__)
-+#include "entry_ppc64le_tsd.h"
- #else
-
- static inline const struct _glapi_table *
-diff --git a/src/util/u_thread.h b/src/util/u_thread.h
-index 0fb474f32ba..a4215452d35 100644
---- a/src/util/u_thread.h
-+++ b/src/util/u_thread.h
-@@ -75,19 +75,15 @@
- * still want to use normal TLS (which involves a function call, but not the
- * expensive pthread_getspecific() or its equivalent).
- */
-+#ifdef USE_ELF_TLS
- #ifdef _MSC_VER
- #define __THREAD_INITIAL_EXEC __declspec(thread)
--#elif defined(ANDROID)
--/* Android 29 gained ELF TLS support, but it doesn't support initial-exec and
-- * it will throw:
-- *
-- * dlopen failed: TLS symbol "(null)" in dlopened
-- * "/vendor/lib64/egl/libEGL_mesa.so" referenced from
-- * "/vendor/lib64/egl/libEGL_mesa.so" using IE access model.
-- */
--#define __THREAD_INITIAL_EXEC __thread
--#else
-+#elif defined(__GLIBC__)
- #define __THREAD_INITIAL_EXEC __thread __attribute__((tls_model("initial-exec")))
-+#define REALLY_INITIAL_EXEC
-+#else
-+#define __THREAD_INITIAL_EXEC __thread
-+#endif
- #endif
-
- static inline int
---
-GitLab
-
diff --git a/media-libs/mesa/mesa-21.3.7.ebuild b/media-libs/mesa/mesa-21.3.7.ebuild
deleted file mode 100644
index 9412c3c5..00000000
--- a/media-libs/mesa/mesa-21.3.7.ebuild
+++ /dev/null
@@ -1,566 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
- inherit git-r3
-else
- SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
- KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="
- !test? ( test )
-"
-
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} crocus 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 cpu_flags_x86_sse2 d3d9 debug +egl +gallium +gbm gles1 +gles2 +llvm
- lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
- vulkan-overlay wayland +X xa xvmc zink +zstd"
-
-REQUIRED_USE="
- d3d9? ( || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
- gles1? ( egl )
- gles2? ( egl )
- osmesa? ( gallium )
- vulkan? ( video_cards_radeonsi? ( llvm ) )
- vulkan-overlay? ( vulkan )
- wayland? ( egl gbm )
- video_cards_crocus? ( gallium )
- video_cards_freedreno? ( gallium )
- video_cards_intel? ( classic )
- video_cards_i915? ( || ( classic gallium ) )
- video_cards_i965? ( classic )
- video_cards_iris? ( gallium )
- video_cards_lima? ( gallium )
- video_cards_nouveau? ( || ( classic gallium ) )
- video_cards_panfrost? ( gallium )
- video_cards_radeon? ( || ( classic gallium )
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
- video_cards_r100? ( classic )
- video_cards_r200? ( classic )
- 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.107"
-RDEPEND="
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
- >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
- gallium? (
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
- llvm? (
- video_cards_radeonsi? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_r600? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- video_cards_radeon? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- )
- lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
- opencl? (
- >=virtual/opencl-3[${MULTILIB_USEDEP}]
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- vaapi? (
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
- )
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
- )
- selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
- wayland? (
- >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
- >=dev-libs/wayland-protocols-1.8
- )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
- video_cards_intel? (
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- )
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
- vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
- X? (
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
- >=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}
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
- "
-done
-RDEPEND="${RDEPEND}
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
-"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more slot
-# simultaneously.
-#
-# How to use it:
-# 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="13"
-LLVM_DEPSTR="
- || (
- sys-devel/llvm:13[${MULTILIB_USEDEP}]
- sys-devel/llvm:12[${MULTILIB_USEDEP}]
- sys-devel/llvm:11[${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}
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
-RDEPEND="${RDEPEND}
- gallium? (
- llvm? (
- opencl? (
- video_cards_r600? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${CLANG_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${CLANG_DEPSTR}
- )
- )
- )
- )
- !opencl? (
- video_cards_r600? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- !video_cards_r600? (
- video_cards_radeonsi? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- !video_cards_r600? (
- !video_cards_radeonsi? (
- video_cards_radeon? (
- ${LLVM_DEPSTR_AMDGPU}
- )
- )
- )
- !video_cards_r600? (
- !video_cards_radeon? (
- !video_cards_radeonsi? (
- ${LLVM_DEPSTR}
- )
- )
- )
- )
- )
- )
-"
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
-
-DEPEND="${RDEPEND}
- valgrind? ( dev-util/valgrind )
- X? (
- x11-libs/libXrandr[${MULTILIB_USEDEP}]
- x11-base/xorg-proto
- )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- opencl? (
- >=sys-devel/gcc-4.6
- )
- sys-devel/bison
- sys-devel/flex
- virtual/pkgconfig
- $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
- wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
- usr/lib*/libglapi.so.0.0.0
- usr/lib*/libGLESv1_CM.so.1.1.0
- usr/lib*/libGLESv2.so.2.0.0
- usr/lib*/libGL.so.1.2.0
- usr/lib*/libOSMesa.so.8.0.0
- usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-PATCHES=(
- "${FILESDIR}"/mesa-tls.patch
- "${FILESDIR}"/mesa-tls-2.patch
- "${FILESDIR}"/mesa-tls-3-fix-non-initial-exec.patch
-)
-
-llvm_check_deps() {
- local flags=${MULTILIB_USEDEP}
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
- then
- flags+=",llvm_targets_AMDGPU(-)"
- fi
-
- if use opencl; then
- has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
- fi
- has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
-}
-
-pkg_pretend() {
- if use vulkan; then
- if ! use video_cards_freedreno &&
- ! use video_cards_i965 &&
- ! use video_cards_iris &&
- ! use video_cards_radeonsi &&
- ! use video_cards_v3d; then
- ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, i965, iris, radeonsi, or v3d"
- fi
- fi
-
- if use opencl; then
- if ! use video_cards_r600 &&
- ! use video_cards_radeonsi; then
- ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
- fi
- fi
-
- if use vaapi; then
- if ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
- fi
- fi
-
- if use vdpau; then
- if ! use video_cards_r300 &&
- ! use video_cards_r600 &&
- ! use video_cards_radeonsi &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
- fi
- fi
-
- if use xa; then
- if ! use video_cards_freedreno &&
- ! use video_cards_nouveau &&
- ! use video_cards_vmware; then
- ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
- fi
- fi
-
- if use xvmc; then
- if ! use video_cards_r600 &&
- ! use video_cards_nouveau; then
- ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
- fi
- fi
-
- if ! use gallium; then
- use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
- use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
- use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
- use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
- use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
- use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
- use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
- fi
-
- if ! use llvm; then
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
- fi
-
- if use osmesa && ! use llvm; then
- ewarn "OSMesa will be slow without enabling USE=llvm"
- fi
-}
-
-python_check_deps() {
- has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # warning message for bug 459306
- if use llvm && has_version sys-devel/llvm[!debug=]; then
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
- ewarn "detected! This can cause problems. For details, see bug 459306."
- fi
-
- if use video_cards_i965 ||
- use video_cards_iris ||
- use video_cards_radeonsi; then
- if kernel_is -ge 5 11 3; then
- CONFIG_CHECK="~KCMP"
- elif kernel_is -ge 5 11; then
- CONFIG_CHECK="~CHECKPOINT_RESTORE"
- elif kernel_is -ge 5 10 20; then
- CONFIG_CHECK="~KCMP"
- else
- CONFIG_CHECK="~CHECKPOINT_RESTORE"
- fi
- linux-info_pkg_setup
- fi
-
- if use gallium && use llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local emesonargs=()
-
- if use classic; then
- # Intel code
- dri_driver_enable video_cards_i915 i915
- dri_driver_enable video_cards_i965 i965
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- dri_driver_enable video_cards_intel i915 i965
- fi
-
- # Nouveau code
- dri_driver_enable video_cards_nouveau nouveau
-
- # ATI code
- dri_driver_enable video_cards_r100 r100
- dri_driver_enable video_cards_r200 r200
- if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- dri_driver_enable video_cards_radeon r100 r200
- fi
- fi
-
- local platforms
- use X && platforms+="x11"
- use wayland && platforms+=",wayland"
- emesonargs+=(-Dplatforms=${platforms#,})
-
- if use X || use egl; then
- emesonargs+=(-Dglvnd=true)
- else
- emesonargs+=(-Dglvnd=false)
- fi
-
- if use gallium; then
- emesonargs+=(
- $(meson_feature llvm)
- $(meson_feature lm-sensors lmsensors)
- $(meson_feature unwind libunwind)
- )
-
- if use video_cards_iris ||
- use video_cards_r300 ||
- use video_cards_r600 ||
- use video_cards_radeonsi ||
- use video_cards_nouveau ||
- use video_cards_vmware; then
- emesonargs+=($(meson_use d3d9 gallium-nine))
- else
- emesonargs+=(-Dgallium-nine=false)
- fi
-
- if use video_cards_r600 ||
- use video_cards_radeonsi ||
- use video_cards_nouveau; then
- emesonargs+=($(meson_feature vaapi gallium-va))
- use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
- else
- 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_feature vdpau gallium-vdpau))
- else
- emesonargs+=(-Dgallium-vdpau=disabled)
- fi
-
- if use video_cards_freedreno ||
- use video_cards_nouveau ||
- use video_cards_vmware; then
- emesonargs+=($(meson_feature xa gallium-xa))
- else
- emesonargs+=(-Dgallium-xa=disabled)
- fi
-
- if use video_cards_r600 ||
- use video_cards_nouveau; then
- emesonargs+=($(meson_feature xvmc gallium-xvmc))
- else
- 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
- fi
-
- gallium_enable -- swrast
- 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
- gallium_enable video_cards_i915 i915
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
- fi
- fi
-
- gallium_enable video_cards_crocus crocus
- gallium_enable video_cards_iris iris
-
- gallium_enable video_cards_r300 r300
- gallium_enable video_cards_r600 r600
- gallium_enable video_cards_radeonsi radeonsi
- if ! use video_cards_r300 && \
- ! use video_cards_r600; then
- gallium_enable video_cards_radeon r300 r600
- fi
-
- gallium_enable video_cards_freedreno freedreno
- gallium_enable video_cards_virgl virgl
-
- # opencl stuff
- emesonargs+=(
- -Dgallium-opencl="$(usex opencl icd disabled)"
- )
- fi
-
- if use vulkan; then
- vulkan_enable video_cards_freedreno freedreno
- vulkan_enable video_cards_i965 intel
- vulkan_enable video_cards_iris intel
- vulkan_enable video_cards_radeonsi amd
- vulkan_enable video_cards_v3d broadcom
- fi
-
- driver_list() {
- local drivers="$(sort -u <<< "${1// /$'\n'}")"
- echo "${drivers//$'\n'/,}"
- }
-
- local vulkan_layers
- use vulkan && vulkan_layers+="device-select"
- use vulkan-overlay && vulkan_layers+=",overlay"
- emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
- emesonargs+=(
- $(meson_use test build-tests)
- -Dglx=$(usex X dri disabled)
- -Dshared-glapi=enabled
- -Ddri3=enabled
- $(meson_feature egl)
- $(meson_feature gbm)
- $(meson_feature gles1)
- $(meson_feature gles2)
- $(meson_use osmesa)
- $(meson_use selinux)
- $(meson_feature zstd)
- $(meson_use video_cards_crocus prefer-crocus)
- $(meson_use video_cards_iris prefer-iris)
- $(meson_use cpu_flags_x86_sse2 sse2)
- -Dvalgrind=$(usex valgrind auto disabled)
- -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
- -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
- -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
- --buildtype $(usex debug debug plain)
- -Db_ndebug=$(usex debug false true)
- )
- meson_src_configure
-}
-
-multilib_src_test() {
- meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-dri_driver_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- DRI_DRIVERS+=("$@")
- fi
-}
-
-gallium_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- GALLIUM_DRIVERS+=("$@")
- fi
-}
-
-vulkan_enable() {
- if [[ $1 == -- ]] || use $1; then
- shift
- VULKAN_DRIVERS+=("$@")
- fi
-}
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml
deleted file mode 100644
index 2b18aba1..00000000
--- a/media-libs/mesa/metadata.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>x11@gentoo.org</email>
- <name>X11</name>
- </maintainer>
- <use>
- <flag name="classic">Build drivers based on the classic architecture.</flag>
- <flag name="d3d9">Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.</flag>
- <flag name="egl">Enable EGL support.</flag>
- <flag name="gallium">Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.</flag>
- <flag name="gbm">Enable the Graphics Buffer Manager for EGL on KMS.</flag>
- <flag name="gles1">Enable GLESv1 support.</flag>
- <flag name="gles2">Enable GLESv2 support.</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="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>
- <flag name="vulkan-overlay">Build vulkan-overlay-layer which displays Frames Per Second and other statistics</flag>
- <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>
- <remote-id type="sourceforge">mesa3d</remote-id>
- </upstream>
-</pkgmetadata>
^ permalink raw reply related [flat|nested] 21+ messages in thread
end of thread, other threads:[~2022-07-19 1:08 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-09 13:16 [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2022-07-19 1:08 Anthony G. Basile
2021-08-20 14:14 Jory Pratt
2021-07-06 13:17 Jory Pratt
2021-03-10 15:06 Jory Pratt
2020-09-19 12:45 Jory Pratt
2020-03-09 0:53 Jory Pratt
2019-11-06 19:35 Jory Pratt
2019-08-11 22:46 Jory Pratt
2019-07-02 17:27 Jory Pratt
2019-01-27 17:52 Anthony G. Basile
2019-01-23 19:29 Anthony G. Basile
2018-10-29 11:48 Anthony G. Basile
2018-10-05 0:12 Anthony G. Basile
2018-07-08 21:58 Anthony G. Basile
2018-01-24 21:25 Aric Belsito
2017-12-29 22:23 Aric Belsito
2017-12-13 0:50 Aric Belsito
2017-12-11 22:29 Aric Belsito
2017-05-10 0:41 Aric Belsito
2016-03-14 2:22 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox