forked from macports/macports-ports
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f63743d
commit 33c0520
Showing
2 changed files
with
92 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,76 @@ | ||
--- include/SDL_config_macosx.h 2023-07-02 01:04:05.000000000 +0800 | ||
+++ include/SDL_config_macosx.h 2023-07-23 05:28:30.000000000 +0800 | ||
From 93d4278f572935eaacd4bd0b0176afc6c9178b14 Mon Sep 17 00:00:00 2001 | ||
From: Sergey Fedorov <[email protected]> | ||
Date: Fri, 29 Nov 2024 07:09:49 +0800 | ||
Subject: [PATCH] Sort out X11/OpenGL | ||
|
||
--- | ||
configure | 28 +++++++++++++++------------- | ||
include/SDL_config_macosx.h | 14 ++++++++------ | ||
src/video/x11/SDL_x11opengl.c | 9 ++++++++- | ||
3 files changed, 31 insertions(+), 20 deletions(-) | ||
|
||
diff --git configure configure | ||
index cbae11e23..60605c44d 100755 | ||
--- configure | ||
+++ configure | ||
@@ -23776,10 +23776,10 @@ fi | ||
# This isn't necessary for X11, but fixes GLX detection | ||
if test "x$x_includes" = xNONE && \ | ||
test "x$x_libraries" = xNONE && \ | ||
- test -d /opt/X11/include && \ | ||
- test -d /opt/X11/lib; then | ||
- x_includes="/opt/X11/include" | ||
- x_libraries="/opt/X11/lib" | ||
+ test -d @PREFIX@/include && \ | ||
+ test -d @PREFIX@/lib; then | ||
+ x_includes="@PREFIX@/include" | ||
+ x_libraries="@PREFIX@/lib" | ||
fi | ||
;; | ||
esac | ||
@@ -23876,6 +23876,8 @@ fi | ||
# Standard set of common directories for X headers. | ||
# Check X11 before X11Rn because it is often a symlink to the current release. | ||
ac_x_header_dirs=' | ||
+@PREFIX@/include | ||
+ | ||
/usr/X11/include | ||
/usr/X11R7/include | ||
/usr/X11R6/include | ||
@@ -24518,15 +24520,15 @@ fi | ||
|
||
case "$host" in | ||
*-*-darwin*) | ||
- # Apple now puts this in /opt/X11 | ||
- x11_lib='/opt/X11/lib/libX11.6.dylib' | ||
- x11ext_lib='/opt/X11/lib/libXext.6.dylib' | ||
- xcursor_lib='/opt/X11/lib/libXcursor.1.dylib' | ||
- xinput_lib='/opt/X11/lib/libXi.6.dylib' | ||
- xfixes_lib='/opt/X11/lib/libXfixes.3.dylib' | ||
- xrandr_lib='/opt/X11/lib/libXrandr.2.dylib' | ||
- xrender_lib='/opt/X11/lib/libXrender.1.dylib' | ||
- xss_lib='/opt/X11/lib/libXss.1.dylib' | ||
+ # MacPorts puts this in @PREFIX@ | ||
+ x11_lib='@PREFIX@/lib/libX11.6.dylib' | ||
+ x11ext_lib='@PREFIX@/lib/libXext.6.dylib' | ||
+ xcursor_lib='@PREFIX@/lib/libXcursor.1.dylib' | ||
+ xinput_lib='@PREFIX@/lib/libXi.6.dylib' | ||
+ xfixes_lib='@PREFIX@/lib/libXfixes.3.dylib' | ||
+ xrandr_lib='@PREFIX@/lib/libXrandr.2.dylib' | ||
+ xrender_lib='@PREFIX@/lib/libXrender.1.dylib' | ||
+ xss_lib='@PREFIX@/lib/libXss.1.dylib' | ||
;; | ||
*-*-openbsd*) | ||
x11_lib='libX11.so' | ||
diff --git include/SDL_config_macosx.h include/SDL_config_macosx.h | ||
index 2db760a9f..aea6a0c99 100644 | ||
--- include/SDL_config_macosx.h | ||
+++ include/SDL_config_macosx.h | ||
@@ -182,14 +182,16 @@ | ||
#define SDL_TIMER_UNIX 1 | ||
|
||
/* Enable various video drivers */ | ||
+#if !defined(__POWERPC__) | ||
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 | ||
#define SDL_VIDEO_DRIVER_COCOA 1 | ||
+#endif | ||
#define SDL_VIDEO_DRIVER_DUMMY 1 | ||
|
@@ -23,15 +89,26 @@ | |
#define SDL_VIDEO_DRIVER_X11_XDBE 1 | ||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1 | ||
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1 | ||
|
||
--- src/video/x11/SDL_x11opengl.c 2023-07-02 01:04:05.000000000 +0800 | ||
+++ src/video/x11/SDL_x11opengl.c 2023-07-23 07:49:24.000000000 +0800 | ||
@@ -40,7 +40,8 @@ | ||
diff --git src/video/x11/SDL_x11opengl.c src/video/x11/SDL_x11opengl.c | ||
index da252615f..2255c479f 100644 | ||
--- src/video/x11/SDL_x11opengl.c | ||
+++ src/video/x11/SDL_x11opengl.c | ||
@@ -21,6 +21,10 @@ | ||
*/ | ||
#include "../../SDL_internal.h" | ||
|
||
+#if defined(__MACOSX__) | ||
+#include <AvailabilityMacros.h> | ||
+#endif | ||
+ | ||
#ifdef SDL_VIDEO_DRIVER_X11 | ||
|
||
#include "SDL_x11video.h" | ||
@@ -40,7 +44,7 @@ | ||
*/ | ||
#define DEFAULT_OPENGL "libGL.so" | ||
#elif defined(__MACOSX__) | ||
-#define DEFAULT_OPENGL "/opt/X11/lib/libGL.1.dylib" | ||
+#include <AvailabilityMacros.h> | ||
+#define DEFAULT_OPENGL "@PREFIX@/lib/libGL.1.dylib" | ||
#elif defined(__QNXNTO__) | ||
#define DEFAULT_OPENGL "libGL.so.3" | ||
|