summaryrefslogtreecommitdiff
path: root/subprojects/shared-modules/SDL
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/shared-modules/SDL')
-rw-r--r--subprojects/shared-modules/SDL/SDL-1.2.15.json40
-rw-r--r--subprojects/shared-modules/SDL/SDL_Pango-0.1.2-API-adds.patch118
-rw-r--r--subprojects/shared-modules/SDL/SDL_image-1.2.12.json19
-rw-r--r--subprojects/shared-modules/SDL/SDL_mixer-1.2.12.json22
-rw-r--r--subprojects/shared-modules/SDL/SDL_net-1.2.8.json19
-rw-r--r--subprojects/shared-modules/SDL/SDL_pango-0.1.2.json23
-rw-r--r--subprojects/shared-modules/SDL/SDL_ttf-2.0.11.json22
-rw-r--r--subprojects/shared-modules/SDL/sdl-check-for-SDL_VIDEO_X11_BACKINGSTORE.patch24
-rw-r--r--subprojects/shared-modules/SDL/sdl-libx11-build.patch59
-rw-r--r--subprojects/shared-modules/SDL/sdl12-compat.json14
10 files changed, 360 insertions, 0 deletions
diff --git a/subprojects/shared-modules/SDL/SDL-1.2.15.json b/subprojects/shared-modules/SDL/SDL-1.2.15.json
new file mode 100644
index 00000000..4d00288b
--- /dev/null
+++ b/subprojects/shared-modules/SDL/SDL-1.2.15.json
@@ -0,0 +1,40 @@
+{
+ "name": "SDL1",
+ "rm-configure": true,
+ "config-opts": ["--disable-static"],
+ "cleanup": [
+ "/bin",
+ "/share/man",
+ "/share/aclocal",
+ "/include",
+ "/lib/pkgconfig",
+ "/lib/*.la",
+ "/lib/*.a"
+ ],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://www.libsdl.org/release/SDL-1.2.15.tar.gz",
+ "sha256": "d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00"
+ },
+ {
+ "type": "patch",
+ "path": "sdl-libx11-build.patch"
+ },
+ {
+ "type": "patch",
+ "path": "sdl-check-for-SDL_VIDEO_X11_BACKINGSTORE.patch"
+ },
+ {
+ "type": "script",
+ "dest-filename": "autogen.sh",
+ "commands": [
+ "sed -i -e 's/.*AM_PATH_ESD.*//' configure.in",
+ "cp -p /usr/share/automake-*/config.{sub,guess} build-scripts",
+ "aclocal",
+ "libtoolize",
+ "autoconf"
+ ]
+ }
+ ]
+}
diff --git a/subprojects/shared-modules/SDL/SDL_Pango-0.1.2-API-adds.patch b/subprojects/shared-modules/SDL/SDL_Pango-0.1.2-API-adds.patch
new file mode 100644
index 00000000..6b1f2d05
--- /dev/null
+++ b/subprojects/shared-modules/SDL/SDL_Pango-0.1.2-API-adds.patch
@@ -0,0 +1,118 @@
+diff -Naupr SDL_Pango-0.1.2.orig/src/SDL_Pango.c SDL_Pango-0.1.2/src/SDL_Pango.c
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c 2004-12-10 10:06:33.000000000 +0100
++++ SDL_Pango-0.1.2/src/SDL_Pango.c 2006-09-29 17:42:09.000000000 +0200
+@@ -723,13 +723,8 @@ SDLPango_CopyFTBitmapToSurface(
+ SDL_UnlockSurface(surface);
+ }
+
+-/*!
+- Create a context which contains Pango objects.
+-
+- @return A pointer to the context as a SDLPango_Context*.
+-*/
+ SDLPango_Context*
+-SDLPango_CreateContext()
++SDLPango_CreateContext_GivenFontDesc(const char* font_desc)
+ {
+ SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context));
+ G_CONST_RETURN char *charset;
+@@ -743,8 +738,7 @@ SDLPango_CreateContext()
+ pango_context_set_language (context->context, pango_language_from_string (charset));
+ pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR);
+
+- context->font_desc = pango_font_description_from_string(
+- MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
++ context->font_desc = pango_font_description_from_string(font_desc);
+
+ context->layout = pango_layout_new (context->context);
+
+@@ -762,6 +756,17 @@ SDLPango_CreateContext()
+ }
+
+ /*!
++ Create a context which contains Pango objects.
++
++ @return A pointer to the context as a SDLPango_Context*.
++*/
++SDLPango_Context*
++SDLPango_CreateContext()
++{
++ SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
++}
++
++/*!
+ Free a context.
+
+ @param *context [i/o] Context to be free
+@@ -1053,6 +1058,20 @@ SDLPango_SetMarkup(
+ pango_layout_set_font_description (context->layout, context->font_desc);
+ }
+
++void
++SDLPango_SetText_GivenAlignment(
++ SDLPango_Context *context,
++ const char *text,
++ int length,
++ SDLPango_Alignment alignment)
++{
++ pango_layout_set_attributes(context->layout, NULL);
++ pango_layout_set_text (context->layout, text, length);
++ pango_layout_set_auto_dir (context->layout, TRUE);
++ pango_layout_set_alignment (context->layout, alignment);
++ pango_layout_set_font_description (context->layout, context->font_desc);
++}
++
+ /*!
+ Set plain text to context.
+ Text must be utf-8.
+@@ -1067,11 +1086,7 @@ SDLPango_SetText(
+ const char *text,
+ int length)
+ {
+- pango_layout_set_attributes(context->layout, NULL);
+- pango_layout_set_text (context->layout, text, length);
+- pango_layout_set_auto_dir (context->layout, TRUE);
+- pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT);
+- pango_layout_set_font_description (context->layout, context->font_desc);
++ SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN_LEFT);
+ }
+
+ /*!
+diff -Naupr SDL_Pango-0.1.2.orig/src/SDL_Pango.h SDL_Pango-0.1.2/src/SDL_Pango.h
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h 2004-12-10 10:06:33.000000000 +0100
++++ SDL_Pango-0.1.2/src/SDL_Pango.h 2006-09-29 17:42:09.000000000 +0200
+@@ -109,12 +109,20 @@ typedef enum {
+ SDLPANGO_DIRECTION_NEUTRAL /*! Neutral */
+ } SDLPango_Direction;
+
+-
++/*!
++ Specifies alignment of text. See Pango reference for detail
++*/
++typedef enum {
++ SDLPANGO_ALIGN_LEFT,
++ SDLPANGO_ALIGN_CENTER,
++ SDLPANGO_ALIGN_RIGHT
++} SDLPango_Alignment;
+
+ extern DECLSPEC int SDLCALL SDLPango_Init();
+
+ extern DECLSPEC int SDLCALL SDLPango_WasInit();
+
++extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc);
+ extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext();
+
+ extern DECLSPEC void SDLCALL SDLPango_FreeContext(
+@@ -157,6 +165,12 @@ extern DECLSPEC void SDLCALL SDLPango_Se
+ const char *markup,
+ int length);
+
++extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment(
++ SDLPango_Context *context,
++ const char *text,
++ int length,
++ SDLPango_Alignment alignment);
++
+ extern DECLSPEC void SDLCALL SDLPango_SetText(
+ SDLPango_Context *context,
+ const char *markup,
diff --git a/subprojects/shared-modules/SDL/SDL_image-1.2.12.json b/subprojects/shared-modules/SDL/SDL_image-1.2.12.json
new file mode 100644
index 00000000..5e1692b6
--- /dev/null
+++ b/subprojects/shared-modules/SDL/SDL_image-1.2.12.json
@@ -0,0 +1,19 @@
+{
+ "name": "SDL_image",
+ "config-opts": ["--disable-static"],
+ "rm-configure": true,
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz",
+ "sha256": "0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699"
+ },
+ {
+ "type": "script",
+ "dest-filename": "autogen.sh",
+ "commands": [
+ "AUTOMAKE=\"automake --foreign\" autoreconf -vfi"
+ ]
+ }
+ ]
+}
diff --git a/subprojects/shared-modules/SDL/SDL_mixer-1.2.12.json b/subprojects/shared-modules/SDL/SDL_mixer-1.2.12.json
new file mode 100644
index 00000000..ba5a6276
--- /dev/null
+++ b/subprojects/shared-modules/SDL/SDL_mixer-1.2.12.json
@@ -0,0 +1,22 @@
+{
+ "name": "SDL_mixer",
+ "config-opts": ["--disable-static"],
+ "rm-configure": true,
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz",
+ "sha256": "1644308279a975799049e4826af2cfc787cad2abb11aa14562e402521f86992a"
+ },
+ {
+ "type": "script",
+ "dest-filename": "autogen.sh",
+ "commands": [
+ "rm acinclude/libtool.m4",
+ "rm acinclude/lt*",
+ "AUTOMAKE=\"automake --foreign\" autoreconf -vfi -I acinclude",
+ "cp -p /usr/share/automake-*/config.{sub,guess} build-scripts"
+ ]
+ }
+ ]
+}
diff --git a/subprojects/shared-modules/SDL/SDL_net-1.2.8.json b/subprojects/shared-modules/SDL/SDL_net-1.2.8.json
new file mode 100644
index 00000000..9d3e896c
--- /dev/null
+++ b/subprojects/shared-modules/SDL/SDL_net-1.2.8.json
@@ -0,0 +1,19 @@
+{
+ "name": "SDL_net",
+ "config-opts": ["--disable-static"],
+ "rm-configure": true,
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.tar.gz",
+ "sha256": "5f4a7a8bb884f793c278ac3f3713be41980c5eedccecff0260411347714facb4"
+ },
+ {
+ "type": "script",
+ "dest-filename": "autogen.sh",
+ "commands": [
+ "AUTOMAKE=\"automake --foreign\" autoreconf -vfi"
+ ]
+ }
+ ]
+}
diff --git a/subprojects/shared-modules/SDL/SDL_pango-0.1.2.json b/subprojects/shared-modules/SDL/SDL_pango-0.1.2.json
new file mode 100644
index 00000000..fdbef4d1
--- /dev/null
+++ b/subprojects/shared-modules/SDL/SDL_pango-0.1.2.json
@@ -0,0 +1,23 @@
+{
+ "name": "SDL_pango",
+ "config-opts": ["--disable-static"],
+ "rm-configure": true,
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://downloads.sourceforge.net/project/sdlpango/SDL_Pango/0.1.2/SDL_Pango-0.1.2.tar.gz",
+ "sha256": "7f75d3b97acf707c696ea126424906204ebfa07660162de925173cdd0257eba4"
+ },
+ {
+ "type": "patch",
+ "path": "SDL_Pango-0.1.2-API-adds.patch"
+ },
+ {
+ "type": "script",
+ "dest-filename": "autogen.sh",
+ "commands": [
+ "autoreconf -vfi"
+ ]
+ }
+ ]
+}
diff --git a/subprojects/shared-modules/SDL/SDL_ttf-2.0.11.json b/subprojects/shared-modules/SDL/SDL_ttf-2.0.11.json
new file mode 100644
index 00000000..c5a04d51
--- /dev/null
+++ b/subprojects/shared-modules/SDL/SDL_ttf-2.0.11.json
@@ -0,0 +1,22 @@
+{
+ "name": "SDL_ttf",
+ "config-opts": ["--disable-static"],
+ "rm-configure": true,
+ "config-opts": [
+ "ac_cv_path_FREETYPE_CONFIG=pkg-config freetype2"
+ ],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz",
+ "sha256": "724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7"
+ },
+ {
+ "type": "script",
+ "dest-filename": "autogen.sh",
+ "commands": [
+ "AUTOMAKE=\"automake --foreign\" autoreconf -vfi"
+ ]
+ }
+ ]
+}
diff --git a/subprojects/shared-modules/SDL/sdl-check-for-SDL_VIDEO_X11_BACKINGSTORE.patch b/subprojects/shared-modules/SDL/sdl-check-for-SDL_VIDEO_X11_BACKINGSTORE.patch
new file mode 100644
index 00000000..c29811d7
--- /dev/null
+++ b/subprojects/shared-modules/SDL/sdl-check-for-SDL_VIDEO_X11_BACKINGSTORE.patch
@@ -0,0 +1,24 @@
+Description: Do not harness backing store by default
+ xorg-server 1.15 enables backing store if composite extension is enabled
+ (default settings). Harnessing backing store through compositor leads to
+ tearing effect.
+ This patch reverts default harnessing backing store to conditional use if
+ SDL_VIDEO_X11_BACKINGSTORE environment variable exists.
+Origin: https://bugs.launchpad.net/ubuntu/+source/libsdl1.2/+bug/1280665/comments/1
+Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2383
+Bug-Debian: https://bugs.debian.org/747168
+
+--- a/src/video/x11/SDL_x11video.c
++++ b/src/video/x11/SDL_x11video.c
+@@ -1088,10 +1088,8 @@
+ }
+ }
+
+-#if 0 /* This is an experiment - are the graphics faster now? - nope. */
+ if ( SDL_getenv("SDL_VIDEO_X11_BACKINGSTORE") )
+-#endif
+- /* Cache the window in the server, when possible */
++ /* Cache the window in the server when possible, on request */
+ {
+ Screen *xscreen;
+ XSetWindowAttributes a;
diff --git a/subprojects/shared-modules/SDL/sdl-libx11-build.patch b/subprojects/shared-modules/SDL/sdl-libx11-build.patch
new file mode 100644
index 00000000..5bb14d4b
--- /dev/null
+++ b/subprojects/shared-modules/SDL/sdl-libx11-build.patch
@@ -0,0 +1,59 @@
+
+# HG changeset patch
+# User Azamat H. Hackimov <azamat.hackimov@gmail.com>
+# Date 1370184533 -21600
+# Node ID 91ad7b43317a6387e115ecdf63a49137f47e42c8
+# Parent f7fd5c3951b9ed922fdf696f7182e71b58a13268
+Fix compilation with libX11 >= 1.5.99.902.
+
+These changes fixes bug #1769 for SDL 1.2
+(http://bugzilla.libsdl.org/show_bug.cgi?id=1769).
+
+diff -r f7fd5c3951b9 -r 91ad7b43317a configure.in
+--- a/configure.in Wed Apr 17 00:56:53 2013 -0700
++++ b/configure.in Sun Jun 02 20:48:53 2013 +0600
+@@ -1169,6 +1169,17 @@
+ if test x$definitely_enable_video_x11_xrandr = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
+ fi
++ AC_MSG_CHECKING(for const parameter to _XData32)
++ have_const_param_xdata32=no
++ AC_TRY_COMPILE([
++ #include <X11/Xlibint.h>
++ extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
++ ],[
++ ],[
++ have_const_param_xdata32=yes
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
++ ])
++ AC_MSG_RESULT($have_const_param_xdata32)
+ fi
+ fi
+ }
+diff -r f7fd5c3951b9 -r 91ad7b43317a include/SDL_config.h.in
+--- a/include/SDL_config.h.in Wed Apr 17 00:56:53 2013 -0700
++++ b/include/SDL_config.h.in Sun Jun 02 20:48:53 2013 +0600
+@@ -283,6 +283,7 @@
+ #undef SDL_VIDEO_DRIVER_WINDIB
+ #undef SDL_VIDEO_DRIVER_WSCONS
+ #undef SDL_VIDEO_DRIVER_X11
++#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
+ #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE
+ #undef SDL_VIDEO_DRIVER_X11_DYNAMIC
+ #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
+diff -r f7fd5c3951b9 -r 91ad7b43317a src/video/x11/SDL_x11sym.h
+--- a/src/video/x11/SDL_x11sym.h Wed Apr 17 00:56:53 2013 -0700
++++ b/src/video/x11/SDL_x11sym.h Sun Jun 02 20:48:53 2013 +0600
+@@ -165,7 +165,11 @@
+ */
+ #ifdef LONG64
+ SDL_X11_MODULE(IO_32BIT)
++#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
++SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
++#else
+ SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
++#endif
+ SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
+ #endif
+
+
diff --git a/subprojects/shared-modules/SDL/sdl12-compat.json b/subprojects/shared-modules/SDL/sdl12-compat.json
new file mode 100644
index 00000000..c0227763
--- /dev/null
+++ b/subprojects/shared-modules/SDL/sdl12-compat.json
@@ -0,0 +1,14 @@
+{
+ "name": "sdl12-compat",
+ "buildsystem": "cmake-ninja",
+ "cleanup": [
+ "bin/sdl-config"
+ ],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://github.com/libsdl-org/sdl12-compat/archive/refs/tags/release-1.2.52.tar.gz",
+ "sha256": "5bd7942703575554670a8767ae030f7921a0ac3c5e2fd173a537b7c7a8599014"
+ }
+ ]
+}