[gnome-games/wip/exalm/dosbox-svn: 646/648] flatpak: Bundle SDL1
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/dosbox-svn: 646/648] flatpak: Bundle SDL1
- Date: Sat, 15 Feb 2020 18:08:06 +0000 (UTC)
commit 01eb3bd80d22c87c9046ca610549e2034dde3510
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sun Jan 20 15:29:46 2019 +0500
flatpak: Bundle SDL1
This is a dependency of dosbox_svn.
flatpak/SDL/SDL-1.2.15.json | 36 +++++++++
flatpak/SDL/SDL_Pango-0.1.2-API-adds.patch | 118 +++++++++++++++++++++++++++++
flatpak/SDL/SDL_image-1.2.12.json | 19 +++++
flatpak/SDL/SDL_mixer-1.2.12.json | 22 ++++++
flatpak/SDL/SDL_net-1.2.8.json | 19 +++++
flatpak/SDL/SDL_pango-0.1.2.json | 23 ++++++
flatpak/SDL/SDL_ttf-2.0.11.json | 19 +++++
flatpak/SDL/sdl-libx11-build.patch | 59 +++++++++++++++
flatpak/org.gnome.Games.json | 2 +
9 files changed, 317 insertions(+)
---
diff --git a/flatpak/SDL/SDL-1.2.15.json b/flatpak/SDL/SDL-1.2.15.json
new file mode 100644
index 00000000..975f8b80
--- /dev/null
+++ b/flatpak/SDL/SDL-1.2.15.json
@@ -0,0 +1,36 @@
+{
+ "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": "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/flatpak/SDL/SDL_Pango-0.1.2-API-adds.patch b/flatpak/SDL/SDL_Pango-0.1.2-API-adds.patch
new file mode 100644
index 00000000..f381f319
--- /dev/null
+++ b/flatpak/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/flatpak/SDL/SDL_image-1.2.12.json b/flatpak/SDL/SDL_image-1.2.12.json
new file mode 100644
index 00000000..5e1692b6
--- /dev/null
+++ b/flatpak/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/flatpak/SDL/SDL_mixer-1.2.12.json b/flatpak/SDL/SDL_mixer-1.2.12.json
new file mode 100644
index 00000000..ba5a6276
--- /dev/null
+++ b/flatpak/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/flatpak/SDL/SDL_net-1.2.8.json b/flatpak/SDL/SDL_net-1.2.8.json
new file mode 100644
index 00000000..9d3e896c
--- /dev/null
+++ b/flatpak/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/flatpak/SDL/SDL_pango-0.1.2.json b/flatpak/SDL/SDL_pango-0.1.2.json
new file mode 100644
index 00000000..fdbef4d1
--- /dev/null
+++ b/flatpak/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/flatpak/SDL/SDL_ttf-2.0.11.json b/flatpak/SDL/SDL_ttf-2.0.11.json
new file mode 100644
index 00000000..5e928e46
--- /dev/null
+++ b/flatpak/SDL/SDL_ttf-2.0.11.json
@@ -0,0 +1,19 @@
+{
+ "name": "SDL_ttf",
+ "config-opts": ["--disable-static"],
+ "rm-configure": true,
+ "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/flatpak/SDL/sdl-libx11-build.patch b/flatpak/SDL/sdl-libx11-build.patch
new file mode 100644
index 00000000..5bb14d4b
--- /dev/null
+++ b/flatpak/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/flatpak/org.gnome.Games.json b/flatpak/org.gnome.Games.json
index 01da6c09..8fc58e91 100644
--- a/flatpak/org.gnome.Games.json
+++ b/flatpak/org.gnome.Games.json
@@ -63,6 +63,8 @@
/* Common dependencies
They should be kept in sync with flathub's shared-modules */
+ "SDL/SDL-1.2.15.json",
+ "SDL/SDL_net-1.2.8.json",
"lua5.3/lua-5.3.2.json",
/* Emulator cores for libretro
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]