aboutsummaryrefslogtreecommitdiff
path: root/ports/mesa/dual-osmesa.patch
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2021-01-12 01:12:01 +0100
committerGitHub <noreply@github.com>2021-01-11 16:12:01 -0800
commit9c63f97fa1d4915a7dfc5f32d5cdb6ee8fe9bf8b (patch)
treea8d4c13f0367d95d68c0c8325d851f5b23605f82 /ports/mesa/dual-osmesa.patch
parentc7e96f2a5b73b3278b004aa88abec2f8ebfb43b5 (diff)
downloadvcpkg-9c63f97fa1d4915a7dfc5f32d5cdb6ee8fe9bf8b.tar.gz
vcpkg-9c63f97fa1d4915a7dfc5f32d5cdb6ee8fe9bf8b.zip
[mesa] new port (#14640)
* [mesa] new port * make mesa build more. * more fine tuning * fix x86 * add supports. * comment about EGL feature. * apply suggestion from CR. added opengl feature. error on disabled shared glapi if multiple GL APIs are selected. * fix boolean option * make sharedgl-api=true the hardcoded default * add suggestion from CR * add mesa:x64-windows-static=fail to ci.baseline.txt due to static crt and parts being a dynamic library. * apply CR sugesstion Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
Diffstat (limited to 'ports/mesa/dual-osmesa.patch')
-rw-r--r--ports/mesa/dual-osmesa.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/ports/mesa/dual-osmesa.patch b/ports/mesa/dual-osmesa.patch
new file mode 100644
index 000000000..8acebe64b
--- /dev/null
+++ b/ports/mesa/dual-osmesa.patch
@@ -0,0 +1,80 @@
+diff --git a/include/meson.build b/include/meson.build
+index a64d9373a92..22c50eb5eb7 100644
+--- a/include/meson.build
++++ b/include/meson.build
+@@ -89,7 +89,7 @@ if with_egl
+ )
+ endif
+
+-if with_osmesa != 'none'
++if with_osmesa != []
+ install_headers('GL/osmesa.h', subdir : 'GL')
+ endif
+
+diff --git a/meson.build b/meson.build
+index 898d025f066..d73818e7ce5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -444,7 +444,7 @@ if with_any_vk and (with_platform_x11 and not with_dri3)
+ error('Vulkan drivers require dri3 for X11 support')
+ endif
+ if with_dri
+- if with_glx == 'disabled' and not with_egl and not with_gbm and with_osmesa != 'classic'
++ if with_glx == 'disabled' and not with_egl and not with_gbm and not with_osmesa.contains('classic')
+ error('building dri drivers require at least one windowing system or classic osmesa')
+ endif
+ endif
+@@ -1508,8 +1508,8 @@ else
+ dep_unwind = null_dep
+ endif
+
+-if with_osmesa != 'none'
+- if with_osmesa == 'gallium' and not with_gallium_softpipe
++if with_osmesa != []
++ if with_osmesa.contains('gallium') and not with_gallium_softpipe
+ error('OSMesa gallium requires gallium softpipe or llvmpipe.')
+ endif
+ if host_machine.system() == 'windows'
+@@ -1710,10 +1710,10 @@ lines = ['',
+ with_gles2 ? 'yes' : 'no'),
+ ]
+
+-if with_osmesa != 'none'
++if with_osmesa != []
+ lines += ''
+ suffix = ''
+- if with_osmesa == 'gallium'
++ if with_osmesa.contains('gallium')
+ suffix = '(Gallium)'
+ endif
+ lines += 'OSMesa: lib' + osmesa_lib_name + suffix
+diff --git a/meson_options.txt b/meson_options.txt
+index 626baf3d5c2..cb3dc3b383f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -295,9 +295,9 @@ option(
+ )
+ option(
+ 'osmesa',
+- type : 'combo',
+- value : 'none',
+- choices : ['none', 'classic', 'gallium'],
++ type : 'array',
++ value : [],
++ choices : ['classic', 'gallium'],
+ description : 'Build OSmesa.'
+ )
+ option(
+diff --git a/src/mesa/meson.build b/src/mesa/meson.build
+index fa5c54cc6fb..f7b223862fa 100644
+--- a/src/mesa/meson.build
++++ b/src/mesa/meson.build
+@@ -744,7 +744,7 @@ libmesa_gallium = static_library(
+ )
+
+ subdir('drivers/dri')
+-if with_osmesa == 'classic'
++if with_osmesa.contains('classic')
+ subdir('drivers/osmesa')
+ endif
+ if with_glx == 'xlib'