You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
mesa: update to 24.3.2
This commit is contained in:
committed by
Mohamed Akram
parent
2fdeef7dca
commit
700867fa87
+34
-15
@@ -13,11 +13,11 @@ legacysupport.newest_darwin_requires_legacy 17
|
||||
name mesa
|
||||
conflicts gl-headers
|
||||
epoch 1
|
||||
version 22.1.7
|
||||
revision 2
|
||||
checksums rmd160 9c570f7e00527c662509ab6fb264caf2c780a4ea \
|
||||
sha256 da838eb2cf11d0e08d0e9944f6bd4d96987fdc59ea2856f8c70a31a82b355d89 \
|
||||
size 16109944
|
||||
version 24.3.2
|
||||
revision 0
|
||||
checksums rmd160 37e3482c994b41959837267f02a522dabe21bd2d \
|
||||
sha256 ad9f5f3a6d2169e4786254ee6eb5062f746d11b826739291205d360f1f3ff716 \
|
||||
size 30640276
|
||||
|
||||
categories x11 graphics
|
||||
maintainers {jeremyhu @jeremyhu} openmaintainer
|
||||
@@ -36,11 +36,12 @@ meson.wrap_mode nodownload
|
||||
set py_ver 3.12
|
||||
set py_ver_nodot [string map {. {}} ${py_ver}]
|
||||
|
||||
depends_build-append port:pkgconfig \
|
||||
depends_build-append path:bin/pkg-config:pkgconfig \
|
||||
port:flex \
|
||||
port:bison \
|
||||
port:py${py_ver_nodot}-mako \
|
||||
port:python${py_ver_nodot} \
|
||||
port:py${py_ver_nodot}-mako \
|
||||
port:py${py_ver_nodot}-yaml \
|
||||
port:xorg-xorgproto
|
||||
|
||||
depends_lib-append port:expat \
|
||||
@@ -48,19 +49,24 @@ depends_lib-append port:expat \
|
||||
port:xorg-libX11 \
|
||||
port:xorg-libXext \
|
||||
port:xorg-libXdamage \
|
||||
port:xorg-libXrandr \
|
||||
port:zlib \
|
||||
port:zstd
|
||||
|
||||
patchfiles patch-meson-spec-python.diff \
|
||||
patch-driver_extensions.diff \
|
||||
patch-pre-10.8-scandir.diff
|
||||
patch-pre-10.8-scandir.diff \
|
||||
patch-fix-build.diff \
|
||||
patch-fix-linking.diff
|
||||
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32658
|
||||
patchfiles-append patch-fix-32-bit.diff
|
||||
|
||||
# MP ticket 66269
|
||||
# the sizes of int and GLint are different on 10.4 PPC, at least
|
||||
# not sure how many systems this might affect, but all systems on buildbot were OK
|
||||
# restrict to Tiger for now, therefore
|
||||
platform darwin 8 {
|
||||
patchfiles-append patch-mesa-apple-cgi-int-differences.diff
|
||||
patchfiles-append patch-mesa-apple-cgi-int-differences.diff
|
||||
}
|
||||
|
||||
post-patch {
|
||||
@@ -68,16 +74,14 @@ post-patch {
|
||||
}
|
||||
|
||||
compiler.c_standard 2011
|
||||
compiler.cxx_standard 2014
|
||||
compiler.cxx_standard 2017
|
||||
# Build issues on mac OS 10.10
|
||||
# ../mesa-22.1.7/src/util/compiler.h:90:7: error: builtin feature check macro requires a parenthesized identifier
|
||||
# #elif HAS_CLANG_FALLTHROUGH
|
||||
compiler.blacklist-append {clang < 800}
|
||||
|
||||
configure.args -Dc_std=c11 \
|
||||
-Dosmesa=true \
|
||||
-Dllvm=disabled \
|
||||
-Dbuild-tests=false
|
||||
configure.args -Dosmesa=true \
|
||||
-Dgallium-drivers=softpipe
|
||||
|
||||
platform darwin {
|
||||
if {${os.major} < 9} {
|
||||
@@ -110,6 +114,21 @@ if {[string match *gcc* ${configure.compiler}]} {
|
||||
configure.cxxflags-append -fpermissive
|
||||
}
|
||||
|
||||
variant llvm description "enable the llvmpipe driver" {
|
||||
set llvm_ver 19
|
||||
depends_lib-append port:llvm-${llvm_ver}
|
||||
# for llvm-config
|
||||
configure.env-append PATH=${prefix}/libexec/llvm-${llvm_ver}/bin:$env(PATH)
|
||||
# for llvm-ar
|
||||
build.env-append PATH=${prefix}/libexec/llvm-${llvm_ver}/bin:$env(PATH)
|
||||
configure.args-replace -Dgallium-drivers=softpipe \
|
||||
-Dgallium-drivers=softpipe,llvmpipe
|
||||
}
|
||||
|
||||
if {${os.platform} ne "darwin" || ${os.major} > 10} {
|
||||
default_variants +llvm
|
||||
}
|
||||
|
||||
variant tests description "build tests" {
|
||||
# mesa uses it's own internal gtest version and fails with newer
|
||||
conflicts_build-append gtest
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
From 5259e83b1e6d1d0faf5a33cfd9b9ffd788ffe15f Mon Sep 17 00:00:00 2001
|
||||
From: Yonggang Luo <luoyonggang@gmail.com>
|
||||
Date: Thu, 28 Jul 2022 16:12:49 +0800
|
||||
Subject: [PATCH] gallium: Disable dri2 interface on OSX
|
||||
|
||||
Error message:
|
||||
Undefined symbols for architecture x86_64:
|
||||
"_dri_kms_driver_extensions", referenced from:
|
||||
_swkmsCreateNewScreen in libdri.a(dri_util.c.o)
|
||||
"_galliumdrm_driver_extensions", referenced from:
|
||||
_dri2CreateNewScreen in libdri.a(dri_util.c.o)
|
||||
ld: symbol(s) not found for architecture x86_64
|
||||
|
||||
Fixes: b6f7a4836ab ("dri: Fill in the driver extensions for the legacy createNewScreen paths")
|
||||
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6519
|
||||
|
||||
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
|
||||
Reviewed-by: Eric Engestrom <eric@igalia.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
|
||||
---
|
||||
meson.build | 4 ++++
|
||||
src/gallium/frontends/dri/dri_util.c | 4 ++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git meson.build meson.build
|
||||
index cdff0312e56..ff06cab8281 100644
|
||||
--- meson.build
|
||||
+++ meson.build
|
||||
@@ -1637,6 +1637,10 @@ if dep_libdrm.found()
|
||||
endif
|
||||
endif
|
||||
|
||||
+if with_dri2
|
||||
+ pre_args += '-DHAVE_DRI2'
|
||||
+endif
|
||||
+
|
||||
dep_libudev = dependency('libudev', required : false)
|
||||
if dep_libudev.found()
|
||||
pre_args += '-DHAVE_LIBUDEV'
|
||||
diff --git src/gallium/frontends/dri/dri_util.c src/gallium/frontends/dri/dri_util.c
|
||||
index 8d60526f45b..f96847098e4 100644
|
||||
--- src/gallium/frontends/dri/dri_util.c
|
||||
+++ src/gallium/frontends/dri/dri_util.c
|
||||
@@ -808,6 +808,8 @@ const __DRIcoreExtension driCoreExtension = {
|
||||
.unbindContext = driUnbindContext
|
||||
};
|
||||
|
||||
+#if HAVE_DRI2
|
||||
+
|
||||
/** DRI2 interface */
|
||||
const __DRIdri2Extension driDRI2Extension = {
|
||||
.base = { __DRI_DRI2, 4 },
|
||||
@@ -837,6 +839,8 @@ const __DRIdri2Extension swkmsDRI2Extension = {
|
||||
.createNewScreen2 = driCreateNewScreen2,
|
||||
};
|
||||
|
||||
+#endif
|
||||
+
|
||||
const __DRIswrastExtension driSWRastExtension = {
|
||||
.base = { __DRI_SWRAST, 4 },
|
||||
|
||||
--
|
||||
2.37.1
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
diff --git a/src/glx/apple/apple_glx_log.c b/src/glx/apple/apple_glx_log.c
|
||||
index e50ec966484fe6193270033693c43c81a3cf390e..4ea89bdfb3fefc7b8a037ea46195c23a475d33fd 100644
|
||||
--- src/glx/apple/apple_glx_log.c
|
||||
+++ src/glx/apple/apple_glx_log.c
|
||||
@@ -73,7 +73,7 @@ void _apple_glx_vlog(int level, const char *file, const char *function,
|
||||
uint64_t thread = 0;
|
||||
|
||||
if (pthread_is_threaded_np()) {
|
||||
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
|
||||
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 || defined(__POWERPC__)
|
||||
thread = (uint64_t)(uintptr_t)pthread_self();
|
||||
#elif MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
||||
if (&pthread_threadid_np) {
|
||||
diff --git a/src/util/os_misc.c b/src/util/os_misc.c
|
||||
index 4b7916634b3a828fa5d78dbe3d62107dec6e5981..3a318c5058db956b0747d55b026f27ac96e449c6 100644
|
||||
--- src/util/os_misc.c
|
||||
+++ src/util/os_misc.c
|
||||
@@ -390,12 +390,21 @@ os_get_available_system_memory(uint64_t *size)
|
||||
*size = status.ullAvailPhys;
|
||||
return (ret == true);
|
||||
#elif DETECT_OS_APPLE
|
||||
+# if defined(__i386__) || defined(__ppc__)
|
||||
+ vm_statistics_data_t vm_stats;
|
||||
+ mach_msg_type_number_t count = HOST_VM_INFO_COUNT;
|
||||
+ if (host_statistics(mach_host_self(), HOST_VM_INFO,
|
||||
+ (host_info_t)&vm_stats, &count) != KERN_SUCCESS) {
|
||||
+ return false;
|
||||
+ }
|
||||
+# else
|
||||
vm_statistics64_data_t vm_stats;
|
||||
mach_msg_type_number_t count = HOST_VM_INFO64_COUNT;
|
||||
if (host_statistics64(mach_host_self(), HOST_VM_INFO,
|
||||
(host_info64_t)&vm_stats, &count) != KERN_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
+# endif
|
||||
|
||||
*size = ((uint64_t)vm_stats.free_count + (uint64_t)vm_stats.inactive_count) * PAGE_SIZE;
|
||||
return true;
|
||||
@@ -0,0 +1,98 @@
|
||||
From e89eba0796b3469f1d2cdbb600309f6231a8169d Mon Sep 17 00:00:00 2001
|
||||
From: "duncan.hopkins" <duncan.hopkins@foundry.com>
|
||||
Date: Tue, 26 Nov 2024 10:18:28 +0000
|
||||
Subject: [PATCH] glx: change `#if` guard around `dri_common.h` to stop missing
|
||||
'driDestroyConfigs' symbol on MacOS builds.
|
||||
|
||||
Reviewed-By: Adam Jackson <ajax@redhat.com>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32568>
|
||||
---
|
||||
src/glx/glxext.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
|
||||
index b03554487c36b..433230a62664a 100644
|
||||
--- src/glx/glxext.c
|
||||
+++ src/glx/glxext.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "glxextensions.h"
|
||||
|
||||
#include "util/u_debug.h"
|
||||
-#ifndef GLX_USE_APPLEGL
|
||||
+#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
||||
#include "dri_common.h"
|
||||
#endif
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
From 1468907afa65f635c113a226b50e3a93cbe6d2f6 Mon Sep 17 00:00:00 2001
|
||||
From: "duncan.hopkins" <duncan.hopkins@foundry.com>
|
||||
Date: Mon, 16 Dec 2024 11:42:33 +0000
|
||||
Subject: [PATCH 1/2] glx: Guard some of the bind_extensions() code with the
|
||||
same conditions as `glx_screen`s `frontend_screen` member.
|
||||
|
||||
Configution like simple MacOS builds do not have `frontend_screen` and fail to build.
|
||||
|
||||
Fixes: 34dea2b38eb336e0414d60b168b9209e029a8cad ("glx: unify extension binding")
|
||||
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12317
|
||||
---
|
||||
src/glx/glxext.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
|
||||
index 8d7518e1f4786..1ed850cac89d8 100644
|
||||
--- src/glx/glxext.c
|
||||
+++ src/glx/glxext.c
|
||||
@@ -790,6 +790,7 @@ bind_extensions(struct glx_screen *psc, const char *driverName)
|
||||
__glXEnableDirectExtension(psc, "GLX_INTEL_swap_event");
|
||||
}
|
||||
|
||||
+#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
||||
mask = driGetAPIMask(psc->frontend_screen);
|
||||
|
||||
__glXEnableDirectExtension(psc, "GLX_ARB_create_context");
|
||||
@@ -846,6 +847,7 @@ bind_extensions(struct glx_screen *psc, const char *driverName)
|
||||
psc->keep_native_window_glx_drawable = keep_native_window_glx_drawable;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 924c41a1734fd47ef03e5bc730cc2fd2bc97d6b6 Mon Sep 17 00:00:00 2001
|
||||
From: "duncan.hopkins" <duncan.hopkins@foundry.com>
|
||||
Date: Mon, 16 Dec 2024 11:49:33 +0000
|
||||
Subject: [PATCH 2/2] glx: Add back in `applegl_create_display()` so the
|
||||
OpenGL.framework, on MacOS, pointer get setup.
|
||||
|
||||
Fixes: 4e8740370adaad5f8992c13262e1dfc66274d838 ("glx: rework __glXInitialize")
|
||||
---
|
||||
src/glx/glxext.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
|
||||
index 1ed850cac89d8..98e21a21b4362 100644
|
||||
--- src/glx/glxext.c
|
||||
+++ src/glx/glxext.c
|
||||
@@ -1080,6 +1080,13 @@ __glXInitialize(Display * dpy)
|
||||
glx_driver |= GLX_DRIVER_SW;
|
||||
#endif
|
||||
|
||||
+#if defined(GLX_USE_APPLEGL) && !defined(GLX_USE_APPLE)
|
||||
+ if (!applegl_create_display(dpyPriv)) {
|
||||
+ free(dpyPriv);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (!AllocAndFetchScreenConfigs(dpy, dpyPriv, glx_driver, !env)) {
|
||||
Bool fail = True;
|
||||
#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
--- src/gallium/targets/dri/meson.build.orig 2024-12-05 02:13:54
|
||||
+++ src/gallium/targets/dri/meson.build 2024-12-15 21:14:42
|
||||
@@ -68,6 +68,7 @@
|
||||
],
|
||||
install : true,
|
||||
name_suffix : libname_suffix,
|
||||
+ install_rpath : dep_llvm.found() ? dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir') : '',
|
||||
)
|
||||
|
||||
if with_gallium_va or with_gallium_vdpau
|
||||
--- src/gallium/targets/osmesa/meson.build.orig 2024-12-05 02:13:54
|
||||
+++ src/gallium/targets/osmesa/meson.build 2024-12-15 23:17:37
|
||||
@@ -45,6 +45,7 @@
|
||||
version : '8.0.0',
|
||||
darwin_versions : '9.0.0',
|
||||
install : true,
|
||||
+ install_rpath : dep_llvm.found() ? dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir') : '',
|
||||
)
|
||||
|
||||
if with_symbols_check
|
||||
--- src/glx/meson.build.orig 2024-12-05 02:13:54
|
||||
+++ src/glx/meson.build 2024-12-15 22:57:59
|
||||
@@ -144,4 +144,5 @@
|
||||
version : gl_lib_version,
|
||||
darwin_versions : '4.0.0',
|
||||
install : true,
|
||||
+ install_rpath: join_paths(get_option('prefix'), get_option('libdir')),
|
||||
)
|
||||
@@ -1,14 +1,5 @@
|
||||
--- meson.build.orig 2022-09-29 15:08:18.000000000 -0400
|
||||
+++ meson.build 2022-09-29 15:08:57.000000000 -0400
|
||||
@@ -22,7 +22,7 @@
|
||||
'mesa',
|
||||
['c', 'cpp'],
|
||||
version : run_command(
|
||||
- [find_program('python3', 'python'), 'bin/meson_get_version.py'],
|
||||
+ [find_program('@@python3@@'), 'bin/meson_get_version.py'],
|
||||
check : true
|
||||
).stdout(),
|
||||
license : 'MIT',
|
||||
@@ -1002,7 +1002,7 @@
|
||||
]
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user