aboutsummaryrefslogtreecommitdiff
path: root/ports/mesa
diff options
context:
space:
mode:
authorYury Bura <yurybura@gmail.com>2021-06-30 02:08:28 +0300
committerGitHub <noreply@github.com>2021-06-29 16:08:28 -0700
commitc482408411c875135023ef6ebf645e823233bbbb (patch)
tree28e7df7a773db241d6106e3c671f354e97ec86b1 /ports/mesa
parent75beef03d64893d685ec09346147965ee92e1f3f (diff)
downloadvcpkg-c482408411c875135023ef6ebf645e823233bbbb.tar.gz
vcpkg-c482408411c875135023ef6ebf645e823233bbbb.zip
[llvm] update to 12.0.0, enable zlib and libxml2 (#17302)
* [llvm] update to 12.0.0, enable zlib and libxml2 * [llvm] disable libxml2 by default, arm64-windows should be supported * [llvm] try to fix build with ffi on Windows #17663 * [llvm] re-enable libxml2 * [llvm] fix formatting * [llvm] overwrite version * [mesa] update to v21.1.0 * [llvm] update ci.baseline * [halide] update to the latest master commit * [llvm] disable libxml2 port until complete PR #15390 * update versions * [llvm] fix disabling of external libraries * update version * update ci.baseline * update ci.baseline * fix typo * [llvm] fix libxml2 (depends on #17945) * revert "[halide] update to the latest master commit" * update versions * [halide] fix zlib dependency for tools * update versions * [halide] update to official release v12.0.0 * update versions * [halide] update to v12.0.1 * update version * [mesa] remove llvm from defaults * update version * update ci.baseline * [mesa] update to v21.1.2 and fix build with LLVM on Windows * [llvm] allow to build libunwind project on Windows * update versions * [mesa] update ci.baseline.txt to disable x64-windows-static-md, may be fixed in the PR #18495
Diffstat (limited to 'ports/mesa')
-rw-r--r--ports/mesa/CONTROL32
-rw-r--r--ports/mesa/dual-osmesa-part2b.patch (renamed from ports/mesa/dual-osmesa-part2.patch)0
-rw-r--r--ports/mesa/dual-osmesa.patch80
-rw-r--r--ports/mesa/portfile.cmake26
-rw-r--r--ports/mesa/swravx512-post-static-link.patch (renamed from ports/mesa/swravx512.patch)22
-rw-r--r--ports/mesa/vcpkg.json99
6 files changed, 122 insertions, 137 deletions
diff --git a/ports/mesa/CONTROL b/ports/mesa/CONTROL
deleted file mode 100644
index 8ad3e5474..000000000
--- a/ports/mesa/CONTROL
+++ /dev/null
@@ -1,32 +0,0 @@
-Source: mesa
-Version: 20.2.2
-Port-Version: 1
-Homepage: https://www.mesa3d.org/
-Description: Mesa - The 3D Graphics Library
-Build-Depends: zlib, zstd, tool-meson
-Default-Features: default-features
-Supports: !(windows&arm)
-
-Feature: default-features
-Description: Platform dependent default features
-Build-Depends: mesa[core,llvm](x64), mesa[core,opengl], mesa[core,gles1], mesa[core,gles2]
-
-Feature: llvm
-Description: Build with llvmpipe
-Build-Depends: llvm[core]
-
-Feature: gles1
-Description: Build support for OpenGL ES 1.x
-Build-Depends: mesa[core]
-
-Feature: gles2
-Description: Build support for OpenGL ES 2.x and 3.x
-Build-Depends: mesa[core]
-
-Feature: opengl
-Description: Build support for OpenGL (all versions)
-Build-Depends: mesa[core]
-
-Feature: egl
-Description: Build support for EGL platform
-Build-Depends: mesa[core] \ No newline at end of file
diff --git a/ports/mesa/dual-osmesa-part2.patch b/ports/mesa/dual-osmesa-part2b.patch
index 6d39786d7..6d39786d7 100644
--- a/ports/mesa/dual-osmesa-part2.patch
+++ b/ports/mesa/dual-osmesa-part2b.patch
diff --git a/ports/mesa/dual-osmesa.patch b/ports/mesa/dual-osmesa.patch
deleted file mode 100644
index 8acebe64b..000000000
--- a/ports/mesa/dual-osmesa.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-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'
diff --git a/ports/mesa/portfile.cmake b/ports/mesa/portfile.cmake
index 9461dc2c5..0409a61d8 100644
--- a/ports/mesa/portfile.cmake
+++ b/ports/mesa/portfile.cmake
@@ -1,14 +1,14 @@
# Build-Depends: From X Window PR: zstd, drm (!windows), elfutils (!windows), wayland (!windows), wayland-protocols (!windows), xdamage, xshmfence (!windows), x11, xcb, xfixes, xext, xxf86vm, xrandr, xv, xvmc (!windows), egl-registry, opengl-registry, tool-meson
# Required LLVM modules: LLVM (modules: bitwriter, core, coroutines, engine, executionengine, instcombine, mcdisassembler, mcjit, scalaropts, transformutils) found: YES
-#patches are from https://github.com/pal1000/mesa-dist-win/tree/master/patches
-set(PATCHES dual-osmesa.patch
- dual-osmesa-part2.patch
- swravx512.patch
- )
+# Patches are from https://github.com/pal1000/mesa-dist-win/tree/master/patches
+set(PATCHES
+ # Fix swrAVX512 build
+ swravx512-post-static-link.patch
+)
vcpkg_check_linkage(ONLY_DYNAMIC_CRT)
-IF(VCPKG_TARGET_IS_WINDOWS)
+if(VCPKG_TARGET_IS_WINDOWS)
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled) # some parts of this port can only build as a shared library.
endif()
@@ -16,10 +16,10 @@ vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org
OUT_SOURCE_PATH SOURCE_PATH
REPO mesa/mesa
- REF df2977f871fc70ebd6be48c180d117189b5861b5 #v20.2.2
- SHA512 6c51d817fe265ea6405c4e8afbb516f30cf697d00cf39f162473ea8a59c202bcdfbfe4b6f7c4a6fd2d4e98eb4a1604cb5e0a02558338bf415e53fe5421cbfbbe
- HEAD_REF master # branch name
- PATCHES ${PATCHES} #patch name
+ REF mesa-21.1.2
+ SHA512 746ef292dd93ddd23ab34e18e87196db63302defd99357f31ac24876003c75b32cfa8ed38d0292271cd9142a056f6a6549ffcd0f086d0c69c4ff83ac7195188c
+ HEAD_REF master
+ PATCHES ${PATCHES}
)
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
@@ -115,9 +115,7 @@ list(APPEND MESA_OPTIONS -Dvalgrind=disabled)
list(APPEND MESA_OPTIONS -Dglvnd=false)
list(APPEND MESA_OPTIONS -Dglx=disabled)
list(APPEND MESA_OPTIONS -Dgbm=disabled)
-#list(APPEND MESA_OPTIONS -Dosmesa=['gallium','classic']) # classic has compiler errors.
-list(APPEND MESA_OPTIONS -Dosmesa=['gallium'])
-
+list(APPEND MESA_OPTIONS -Dosmesa=true)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
list(APPEND MESA_OPTIONS -Dshared-swr=false)
@@ -160,9 +158,9 @@ endif()
list(APPEND MESA_OPTIONS -Dshared-glapi=enabled) #shared GLAPI required when building two or more of the following APIs - opengl, gles1 gles2
-
if(VCPKG_TARGET_IS_WINDOWS)
list(APPEND MESA_OPTIONS -Dplatforms=['windows'])
+ list(APPEND MESA_OPTIONS -Dmicrosoft-clc=disabled)
endif()
vcpkg_configure_meson(
diff --git a/ports/mesa/swravx512.patch b/ports/mesa/swravx512-post-static-link.patch
index c1085252f..ac88d9bd7 100644
--- a/ports/mesa/swravx512.patch
+++ b/ports/mesa/swravx512-post-static-link.patch
@@ -1,17 +1,8 @@
diff --git a/src/gallium/drivers/swr/meson.build b/src/gallium/drivers/swr/meson.build
-index 2fad60365a3..dce7f656d64 100644
+index 11ea7d3f43e..f34e88b1eec 100644
--- a/src/gallium/drivers/swr/meson.build
+++ b/src/gallium/drivers/swr/meson.build
-@@ -249,7 +249,7 @@ endif
-
- if with_swr_arches.contains('knl')
- swr_knl_args = cpp.first_supported_argument(
-- '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512',
-+ '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512', '/arch:AVX512',
- )
- if swr_knl_args == []
- error('Cannot find KNL support for swr.')
-@@ -274,7 +274,7 @@ endif
+@@ -213,7 +213,7 @@ endif
if with_swr_arches.contains('skx')
swr_skx_args = cpp.first_supported_argument(
@@ -20,3 +11,12 @@ index 2fad60365a3..dce7f656d64 100644
)
if swr_skx_args == []
error('Cannot find SKX support for swr.')
+@@ -252,7 +252,7 @@ endif
+
+ if with_swr_arches.contains('knl')
+ swr_knl_args = cpp.first_supported_argument(
+- '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512',
++ '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512', '/arch:AVX512',
+ )
+ if swr_knl_args == []
+ error('Cannot find KNL support for swr.')
diff --git a/ports/mesa/vcpkg.json b/ports/mesa/vcpkg.json
new file mode 100644
index 000000000..60db1d7a7
--- /dev/null
+++ b/ports/mesa/vcpkg.json
@@ -0,0 +1,99 @@
+{
+ "name": "mesa",
+ "version": "21.1.2",
+ "description": "Mesa - The 3D Graphics Library",
+ "homepage": "https://www.mesa3d.org/",
+ "supports": "!(windows & arm)",
+ "dependencies": [
+ "tool-meson",
+ "zlib",
+ "zstd"
+ ],
+ "default-features": [
+ "default-features"
+ ],
+ "features": {
+ "default-features": {
+ "description": "Platform dependent default features",
+ "dependencies": [
+ {
+ "name": "mesa",
+ "default-features": false,
+ "features": [
+ "gles1"
+ ]
+ },
+ {
+ "name": "mesa",
+ "default-features": false,
+ "features": [
+ "gles2"
+ ]
+ },
+ {
+ "name": "mesa",
+ "default-features": false,
+ "features": [
+ "opengl"
+ ]
+ },
+ {
+ "name": "mesa",
+ "default-features": false,
+ "features": [
+ "llvm"
+ ],
+ "platform": "x64"
+ }
+ ]
+ },
+ "egl": {
+ "description": "Build support for EGL platform",
+ "dependencies": [
+ {
+ "name": "mesa",
+ "default-features": false
+ }
+ ]
+ },
+ "gles1": {
+ "description": "Build support for OpenGL ES 1.x",
+ "dependencies": [
+ {
+ "name": "mesa",
+ "default-features": false
+ }
+ ]
+ },
+ "gles2": {
+ "description": "Build support for OpenGL ES 2.x and 3.x",
+ "dependencies": [
+ {
+ "name": "mesa",
+ "default-features": false
+ }
+ ]
+ },
+ "llvm": {
+ "description": "Build with llvmpipe",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "libclc"
+ ]
+ }
+ ]
+ },
+ "opengl": {
+ "description": "Build support for OpenGL (all versions)",
+ "dependencies": [
+ {
+ "name": "mesa",
+ "default-features": false
+ }
+ ]
+ }
+ }
+}