summaryrefslogtreecommitdiff
path: root/packages/x11-dri/mesa/files/fix-build-without-dri.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/x11-dri/mesa/files/fix-build-without-dri.patch')
-rw-r--r--packages/x11-dri/mesa/files/fix-build-without-dri.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/packages/x11-dri/mesa/files/fix-build-without-dri.patch b/packages/x11-dri/mesa/files/fix-build-without-dri.patch
new file mode 100644
index 0000000..d6ab841
--- /dev/null
+++ b/packages/x11-dri/mesa/files/fix-build-without-dri.patch
@@ -0,0 +1,29 @@
+Author: Rasmus Thomsen <cogitri@exherbo.org>
+Reason: Fix build without dri
+Upstream: No, not yet
+diff --git a/src/gallium/auxiliary/pipe-loader/meson.build b/src/gallium/auxiliary/pipe-loader/meson.build
+index 32e8188..31b3e7e 100644
+--- a/src/gallium/auxiliary/pipe-loader/meson.build
++++ b/src/gallium/auxiliary/pipe-loader/meson.build
+@@ -35,6 +35,12 @@ if with_gallium_drisw_kms
+ libpipe_loader_defines += '-DHAVE_PIPE_LOADER_KMS'
+ endif
+
++if with_dri == true
++ dri_args = '-DHAVE_PIPE_LOADER_DRI=1'
++else
++ dri_args = [ ]
++endif
++
+ libpipe_loader_static = static_library(
+ 'pipe_loader_static',
+ [files_pipe_loader, xmlpool_options_h],
+@@ -43,7 +49,7 @@ libpipe_loader_static = static_library(
+ inc_gallium_winsys,
+ ],
+ c_args : [
+- c_vis_args, '-DHAVE_PIPE_LOADER_DRI', '-DGALLIUM_STATIC_TARGETS=1',
++ c_vis_args, dri_args , '-DGALLIUM_STATIC_TARGETS=1',
+ libpipe_loader_defines,
+ ],
+ link_with : [libloader, libxmlconfig],