media-libs/mesa: Add upstream patch to avoid build failure
authorMatt Turner <mattst88@gentoo.org>
Fri, 2 Nov 2018 21:23:03 +0000 (14:23 -0700)
committerMatt Turner <mattst88@gentoo.org>
Fri, 2 Nov 2018 21:23:52 +0000 (14:23 -0700)
Closes: https://bugs.gentoo.org/670094
Signed-off-by: Matt Turner <mattst88@gentoo.org>
media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch [new file with mode: 0644]
media-libs/mesa/mesa-18.2.4.ebuild

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 (file)
index 0000000..11d4f9c
--- /dev/null
@@ -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
+
index 2b4e1542fc5f4911abadb138e1e292266d1ef09c..16b4ad7ea3b8250d165bd1d8b244f6d63635ca60 100644 (file)
@@ -231,6 +231,10 @@ x86? (
        )
 )"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-meson-link-gallium-nine-with-pthreads.patch
+)
+
 llvm_check_deps() {
        local flags=${MULTILIB_USEDEP}
        if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi