ports: Replace SDL2 with sdl2-compat
There is no need to keep two SDL versions around
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
diff -ruN sdl12-compat-1.2.68/include/SDL/SDL_config.h sdl12-compat-1.2.68-banan_os/include/SDL/SDL_config.h
|
||||
--- sdl12-compat-1.2.68/include/SDL/SDL_config.h 2023-09-26 20:43:48.000000000 +0300
|
||||
+++ sdl12-compat-1.2.68-banan_os/include/SDL/SDL_config.h 2025-11-16 03:22:39.015867984 +0200
|
||||
@@ -73,7 +73,7 @@
|
||||
#define HAVE_MATH_H 1
|
||||
#endif
|
||||
|
||||
-#if defined(__linux__) || defined(__sun)
|
||||
+#if defined(__linux__) || defined(__sun) || defined(__banan_os__)
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
diff -ruN sdl12-compat-1.2.76/sdl-config.in sdl12-compat-1.2.76-banan_os/sdl-config.in
|
||||
--- sdl12-compat-1.2.76/sdl-config.in 2026-04-04 03:40:25.000000000 +0300
|
||||
+++ sdl12-compat-1.2.76-banan_os/sdl-config.in 2026-07-04 09:10:44.224259068 +0300
|
||||
@@ -7,11 +7,14 @@
|
||||
|
||||
# Copied and modified from SDL2's sdl2-compat.
|
||||
|
||||
-prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+# Get the canonical path of the folder containing this script
|
||||
+bindir=`cd -P -- "\`dirname -- "$0"\`" && printf '%s\n' "\`pwd -P\`"`
|
||||
+
|
||||
+prefix=`cd -P -- "$bindir/.." && printf '%s\n' "\`pwd -P\`"`
|
||||
exec_prefix=${prefix}
|
||||
exec_prefix_set=no
|
||||
-libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
-includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
+libdir=$prefix/lib
|
||||
+includedir=$prefix/include
|
||||
|
||||
@ENABLE_STATIC_FALSE@usage="\
|
||||
@ENABLE_STATIC_FALSE@Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
|
||||
21
ports/sdl12-compat/patches/0002-add-OS_GetExeName.patch
Normal file
21
ports/sdl12-compat/patches/0002-add-OS_GetExeName.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff -ruN sdl12-compat-1.2.76/src/SDL12_compat.c sdl12-compat-1.2.76-banan_os/src/SDL12_compat.c
|
||||
--- sdl12-compat-1.2.76/src/SDL12_compat.c 2026-04-04 03:40:25.000000000 +0300
|
||||
+++ sdl12-compat-1.2.76-banan_os/src/SDL12_compat.c 2026-07-04 09:13:14.105336073 +0300
|
||||
@@ -57,7 +57,7 @@
|
||||
#undef snprintf
|
||||
#undef vsnprintf
|
||||
|
||||
-#ifdef __linux__
|
||||
+#if defined(__linux__) || defined(__banan_os__)
|
||||
#include <unistd.h> /* for readlink() */
|
||||
#endif
|
||||
|
||||
@@ -1486,7 +1486,7 @@
|
||||
#endif
|
||||
};
|
||||
|
||||
-#ifdef __linux__
|
||||
+#if defined(__linux__) || defined(__banan_os__)
|
||||
static void OS_GetExeName(char *buf, const unsigned maxpath) {
|
||||
int ret;
|
||||
buf[0] = '\0';
|
||||
12
ports/sdl12-compat/patches/0003-define-HAVE_ALLOCA_H.patch
Normal file
12
ports/sdl12-compat/patches/0003-define-HAVE_ALLOCA_H.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -ruN sdl12-compat-1.2.76/include/SDL/SDL_config.h sdl12-compat-1.2.76-banan_os/include/SDL/SDL_config.h
|
||||
--- sdl12-compat-1.2.76/include/SDL/SDL_config.h 2026-04-04 03:40:25.000000000 +0300
|
||||
+++ sdl12-compat-1.2.76-banan_os/include/SDL/SDL_config.h 2026-07-04 09:21:56.688337719 +0300
|
||||
@@ -73,7 +73,7 @@
|
||||
#define HAVE_MATH_H 1
|
||||
#endif
|
||||
|
||||
-#if defined(__linux__) || defined(__sun)
|
||||
+#if defined(__linux__) || defined(__sun) || defined(__banan_os__)
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user