...
  View open merge request
Commits (5)
{
"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 -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,
{
"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"
]
}
]
}
{
"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"
]
}
]
}
{
"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"
]
}
]
}
{
"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"
]
}
]
}
{
"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"
]
}
]
}
# 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
include Makefile.libretro
install: dosbox_svn_libretro.so
install -Dp -m755 dosbox_svn_libretro.so $(DESTDIR)$(prefix)/lib/libretro/dosbox_svn_libretro.so
[Libretro]
Type=Emulator
Version=1.0
Name=DOSBox
Module=dosbox_libretro.so
Name=DOSBox-SVN
Module=dosbox_svn_libretro.so
LibretroVersion=1
Authors=DOSBox Team;
Authors=DOSBox Team;fr500;
License=GPL-2.0+;
[Platform:MSDOS]
......
{
"name": "libretro-dosbox",
"name": "libretro-dosbox_svn",
"no-autogen": true,
"subdir": "libretro",
"make-args": [
"--makefile=Makefile.libretro",
"prefix=/app",
"core_installdir=/app/lib/libretro"
"--makefile=Makefile.install",
"prefix=/app"
],
"make-install-args": [
"--makefile=Makefile.libretro",
"prefix=/app",
"core_installdir=/app/lib/libretro"
"--makefile=Makefile.install",
"prefix=/app"
],
"post-install": [
/* TODO: Send that upstream */
"mkdir -p /app/lib/libretro/",
"install -m644 -p dosbox.libretro /app/lib/libretro/"
"install -m644 -p dosbox_svn.libretro /app/lib/libretro/"
],
"sources": [
{
"type": "git",
"url": "https://github.com/libretro/dosbox-libretro.git",
"commit": "51b0deba703f1283420103f217d63edf8f5a6f5b"
"url": "https://github.com/fr500/dosbox-svn.git",
"branch": "libretro"
},
{
"type": "file",
"path": "dosbox.libretro"
"path": "dosbox_svn-Makefile.install",
"dest-filename": "libretro/Makefile.install"
},
{
"type": "file",
"path": "dosbox_svn.libretro",
"dest-filename": "libretro/dosbox_svn.libretro"
}
]
}
diff -up lua-5.2.2/configure.ac.compat-module lua-5.2.2/configure.ac
--- lua-5.2.2/configure.ac.compat-module 2013-05-10 10:16:05.344137597 -0400
+++ lua-5.2.2/configure.ac 2013-05-10 10:16:05.357137596 -0400
@@ -11,6 +11,20 @@ AC_PROG_CC
AC_PROG_LIBTOOL
AC_ARG_WITH(
+ [compat-module],
+ [AC_HELP_STRING([--with-compat-module], [Enable LUA_COMPAT_MODULE functions [default=no]])],
+ [use_compat_module=$withval],
+ [use_compat_module=no]
+)
+
+COMPAT_DEFS="#undef LUA_COMPAT_ALL"
+if test "x$use_compat_module" == "xyes"; then
+ COMPAT_DEFS="#define LUA_COMPAT_5_1
+#define LUA_COMPAT_5_2"
+fi
+AC_SUBST(COMPAT_DEFS)
+
+AC_ARG_WITH(
[readline],
[AC_HELP_STRING([--with-readline], [Use readline for interpreter input [default=yes]])],
[use_readline=$withval],
diff -up lua-5.2.2/src/luaconf.h.template.in.compat-module lua-5.2.2/src/luaconf.h.template.in
--- lua-5.2.2/src/luaconf.h.template.in.compat-module 2013-05-10 10:25:42.586116963 -0400
+++ lua-5.2.2/src/luaconf.h.template.in 2013-05-10 10:26:29.957115269 -0400
@@ -15,6 +15,7 @@
@LUA_DL_DEFS@
@LUA_BUILD_AS_DLL_DEFS@
@READLINE_DEFS@
+@COMPAT_DEFS@
/*
{
"name": "lua",
"name": "lua-5.3",
"config-opts": [
"--with-compat-module"
],
"sources": [
{
"type": "archive",
"url": "http://www.lua.org/ftp/lua-5.3.4.tar.gz",
"url": "https://www.lua.org/ftp/lua-5.3.4.tar.gz",
"sha256": "f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c"
},
{
"type": "shell",
"commands": [ "mv src/luaconf.h src/luaconf.h.template.in" ]
},
/* Patches from the Fedora package */
{
"type": "patch",
"path": "lua-5.3.0-autotoolize.patch"
......@@ -19,6 +21,10 @@
"type": "patch",
"path": "lua-5.3.0-idsize.patch"
},
{
"type": "patch",
"path": "lua-5.3.0-configure-compat-module.patch"
},
{
"type": "shell",
"commands": [ "autoreconf -i" ]
......
......@@ -63,6 +63,12 @@
"/share/gir-1.0"
],
"modules" : [
/* 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
We build them first, because some of them are very big, and they
......@@ -70,7 +76,7 @@
"libretro-cores/libretro-blastem.json",
"libretro-cores/libretro-bsnes-mercury.json",
"libretro-cores/libretro-desmume2015.json",
"libretro-cores/libretro-dosbox.json",
"libretro-cores/libretro-dosbox_svn.json",
"libretro-cores/libretro-gambatte.json",
"libretro-cores/libretro-gearsystem.json",
"libretro-cores/libretro-handy.json",
......@@ -86,7 +92,6 @@
"libretro-cores/libretro-prosystem.json",
"libretro-cores/libretro-stella.json",
/* End libretro cores */
"org.lua.modules.json",
{
"name" : "tracker",
"buildsystem" : "meson",
......
......@@ -248,6 +248,9 @@ public class Games.RetroRunner : Object, Runner {
Application.try_make_dir (save_directory);
core.save_directory = save_directory;
// Reuse save directory for content directory
core.content_directory = save_directory;
core.log.connect (Retro.g_log);
view.set_core (core);
......