summaryrefslogtreecommitdiff
path: root/media-libs/libsdl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/libsdl
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/libsdl')
-rw-r--r--media-libs/libsdl/Manifest13
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch47
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-bsd-joystick.patch28
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-caca.patch26
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch58
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-gamma.patch42
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-joystick.patch13
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-resizing.patch60
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch20
-rw-r--r--media-libs/libsdl/libsdl-1.2.15-r9.ebuild142
-rw-r--r--media-libs/libsdl/metadata.xml30
11 files changed, 479 insertions, 0 deletions
diff --git a/media-libs/libsdl/Manifest b/media-libs/libsdl/Manifest
new file mode 100644
index 000000000000..8f5c2abb6c67
--- /dev/null
+++ b/media-libs/libsdl/Manifest
@@ -0,0 +1,13 @@
+AUX libsdl-1.2.15-SDL_EnableUNICODE.patch 1542 SHA256 edaaef172891ee0d25700a5d1acdbd7a33dfdbdc9774329f4e1a1728b7af6231 SHA512 9a724a4156904d34c067b2f7640e110267bdcf457730674385d431d382625a6a4c012cd707fafba645125217bb09a8a496ae09d4352840f5babbc9c71dd49efc WHIRLPOOL 916aa2dbab5ffa6a8da43b62c55cc6c0aaa551c3e84f0c62a6a06b64e22aa754197f6b6688723bbc01a0e0944381660abc30482f13c05f3dc8ad8c9ef6cec5bf
+AUX libsdl-1.2.15-bsd-joystick.patch 1079 SHA256 e621c2c67b5e2774b69b207f4614250cd3994cd5d6e5612a248bba237c994b09 SHA512 18ba45c8e0f676852168bf2e13616777dc0616e976b459c93c1f4a41bf219b13cac8f63e1daa1038ea9d7a648888836fad268b3c076fa9416d5044ac2365b0cd WHIRLPOOL 8c1a0740b9e019b4fb50e0b03e4eb9821603e21b8abc74e789fed8ea208246355e7c7bfd997aef0d50efe2a2ea4f6d1444728239657cd12990352d87531b6d77
+AUX libsdl-1.2.15-caca.patch 1086 SHA256 4673baf63eeaf44eabc5e8c11305dfc074253ed584cfe1c5442e2ae2ff581bac SHA512 3b41306c21bca41f27a5a6857f958ba3d594c27ee36b865a7a5e08db871025fe5aab7177d72b8534cd53a7aa9f943e268e8a2453eb48cdadcbe8d40ad81d6a58 WHIRLPOOL c3d175d0f2ccb10a4db26d6a793151697d7c8923c6e0353432749d38284db49c12afc4e4c096a1f6f6a803d9e34eced9c66d31e7798c961d2632b74ea7115c2a
+AUX libsdl-1.2.15-const-xdata32.patch 2253 SHA256 b0560f37c8927d00cfb034580f15d08ebfd31bca38f470761957c02590b87f9e SHA512 f1804afb7e70f80a7262df8affc5c1c71b3da1a448085e88fc0b50df4fa293f595542e5456e988ba1477c8aaefea3ba81d7c3e729307da21ce3560b369abe327 WHIRLPOOL d32d5ad03a34b41bff6c693bbba7e65fce6e8346e66aaf9d58b157de04abed2e88744fa0ff26d26da882415b57d6612bb226171977cb313a36ce5dee18a6c46e
+AUX libsdl-1.2.15-gamma.patch 1339 SHA256 bdf3983a5854a9f46a9ada06dccc62b743418a7a770fd6614797c37d438a625c SHA512 0717e8eea7a9a1bcadb56c4a51023142d57718ccfff4e372faba3e28ce17b3e32caa8a8ffc8054c8b49bab566a44fd46f5eaf97b778ba6ec991d845d4ae464ce WHIRLPOOL 60e834947bc51ded07032dcc66eb1c78ed575513d8dbf4327943b926b0b22c164b56663886b489e5d6d09bab47222eecc8fe18b141bb7b1fd2e4338bac0bc9d2
+AUX libsdl-1.2.15-joystick.patch 315 SHA256 fa912a36cf6a0926e91a34efa756d3514bb42c1de834f416a52c4fa3ba777dd3 SHA512 653e7d2e2dbc4c945e4e4e43dc53f569164c8bbb1e4e9d9c2421cd7da13849d04439ef9cbcf6736c6e5d2aa695a1b24d314045eb3f817dcb1b6f2e93fbfb2e1a WHIRLPOOL 8bed5ac8999bfa1b7c4391643e24f73c7f81ceb602e6fce5d99ecf8aced67b551ee20db6df367ef3d9b252323417fca4eb6c192db95c535776d6d15d231d3503
+AUX libsdl-1.2.15-resizing.patch 2098 SHA256 0e4c2c4a11dbf611e317be4e866f99bde619eb1ca3942524e96b7ef94d8180f4 SHA512 afa82d81e03fe974b2c1a4f3c9ed48a15472784548c8e88f988bb03ea992e8ce86bbad74f7e5980dd1476139cf82180eda72e77041e065925cb373cda47c268b WHIRLPOOL a298ec48388f2f34dfd3c40a5912fc1ec47ff9a19983054f78544f6794873a42090010b4b606c9c9f2dfa7ea6ee447e87915a733e34431b7db7ae39a23c605ee
+AUX libsdl-1.2.15-sdl-config.patch 780 SHA256 1c73cc815ae4f6fdaee3dc899a9f38e9f29f88e3997070c9fba226b36dbed015 SHA512 c79b0b5674a2a70862425150d8b481f1a0ed0bc400bc69835e53932422583bdde061d1f72da8d3ad0aaaa4499126bc2770f11941435e6c848bd4d90d040a0d03 WHIRLPOOL 5762b64726808967cd51215b1fd04c3cd52baa9517b25c30c99e669d450f19666d7179c9c69bf8d6a09ac109d52148fee0bbaa458ab77aacddf793914faf1c80
+DIST SDL-1.2.15.tar.gz 3920622 SHA256 d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00 SHA512 ac392d916e6953b0925a7cbb0f232affea33339ef69b47a0a7898492afb9784b93138986df53d6da6d3e2ad79af1e9482df565ecca30f89428be0ae6851b1adc WHIRLPOOL 21b9aadb7b00002a6f3760902cd40aeb1b145228348b887049b40a435c2b9a1a3679a83100421e9634178b9da32d524371d6912c190a75e83ef3170ad45bc159
+EBUILD libsdl-1.2.15-r9.ebuild 4386 SHA256 ace3eaa75f36d1c67b7427a57f5bc168e3e6a2774de49e9f044cce922ce3ec59 SHA512 94285ca796ab2bc75424ce8496ed3d200cf6af7f5edd6e0da81298feb9581266bfb468f27f557e61239ca7bb6f47d20fc6ba9a43abe89bcae8d22980c5e41602 WHIRLPOOL f6cd12ad8e13c9efb0c3fa63387b53dc7904124df4d47442d7ef6981c9b37524a33da15d0ce28a254688b35b099e52a4997c2cb2f55a06805ca2107888c521ac
+MISC ChangeLog 4501 SHA256 7968477d855d2ed0d30fdae3cd26fd5b224499fb593558fa976445f5c8b38af8 SHA512 d4560f2dbf324167c178612139d406836482fbc3a4e112f3d982e1a18fb502b40f095fe571ad7942630b512ec80a7bfa0b2712f748824ab70f089dc723e2b084 WHIRLPOOL 1c2b2eaad4980d321c061801d224b241e665d94f9489d970556c582e3c07f1171cbb82fab3fff01ae95b790bc029cbdd130745665816df5d559772c02bc9be04
+MISC ChangeLog-2015 36218 SHA256 de0c5612429344d76a3b307cfa92c7b83651ea277e1927b003c537dbf61c0f3d SHA512 3bd6ca15cb7949bef33616be665387c232f9c49e58dc543ae5d9ffcf251c39ca173cf9279228397aeb1371ade2f3d5c8a240c87a397eae84261c43028058b295 WHIRLPOOL e0bda17ccbe27fd1897308f7706a026669118f79aa456e8d95f6b320e69d1274e3368de9d54801aff8453838c40ed6e27afdca627ecc708d2093d5af0d49a863
+MISC metadata.xml 1400 SHA256 ace73fcea6579cb86a23dcf96713896704c77d878ae22848511d08977275ab10 SHA512 6e10ca7d9a9a0b0d0dbf2de3077c67f80bf54e667424a9267109773fdafdfe4377f34cfbf2d4468d0293efa53d61b1c1e67a0004b9c3264e68c3018d826f357f WHIRLPOOL a5dc2e909b8fbef26ba9c6f7f1974d320cd19f160679248c7302e52b6288b46885427b382c0b09bc23e50477a97eb514be0024a9927ec9204174d91573a6a659
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch b/media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch
new file mode 100644
index 000000000000..bf68b2e44f44
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch
@@ -0,0 +1,47 @@
+
+diff -r 22a7f096bb9d -r 0aade9c0203f src/video/x11/SDL_x11events.c
+--- a/src/video/x11/SDL_x11events.c Sun Dec 01 00:00:17 2013 -0500
++++ b/src/video/x11/SDL_x11events.c Thu Apr 17 22:36:14 2014 -0700
+@@ -395,6 +395,8 @@
+ {
+ int posted;
+ XEvent xevent;
++ int orig_event_type;
++ KeyCode orig_keycode;
+
+ SDL_memset(&xevent, '\0', sizeof (XEvent)); /* valgrind fix. --ryan. */
+ XNextEvent(SDL_Display, &xevent);
+@@ -410,9 +412,29 @@
+ #ifdef X_HAVE_UTF8_STRING
+ /* If we are translating with IM, we need to pass all events
+ to XFilterEvent, and discard those filtered events immediately. */
++ orig_event_type = xevent.type;
++ if (orig_event_type == KeyPress || orig_event_type == KeyRelease) {
++ orig_keycode = xevent.xkey.keycode;
++ } else {
++ orig_keycode = 0;
++ }
+ if ( SDL_TranslateUNICODE
+ && SDL_IM != NULL
+ && XFilterEvent(&xevent, None) ) {
++ if (orig_keycode) {
++ SDL_keysym keysym;
++ static XComposeStatus state;
++ char keybuf[32];
++
++ keysym.scancode = xevent.xkey.keycode;
++ keysym.sym = X11_TranslateKeycode(SDL_Display, xevent.xkey.keycode);
++ keysym.mod = KMOD_NONE;
++ keysym.unicode = 0;
++ if (orig_event_type == KeyPress && XLookupString(&xevent.xkey, keybuf, sizeof(keybuf), NULL, &state))
++ keysym.unicode = (Uint8)keybuf[0];
++
++ SDL_PrivateKeyboard(orig_event_type == KeyPress ? SDL_PRESSED : SDL_RELEASED, &keysym);
++ }
+ return 0;
+ }
+ #endif
+
+
+
+
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-bsd-joystick.patch b/media-libs/libsdl/files/libsdl-1.2.15-bsd-joystick.patch
new file mode 100644
index 000000000000..0f3542529ba6
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-bsd-joystick.patch
@@ -0,0 +1,28 @@
+
+# HG changeset patch
+# User Sam Lantinga <slouken@libsdl.org>
+# Date 1329357968 18000
+# Node ID 62ff1c0a103f685774450be2e5338824a22078bd
+# Parent 8e98c714bb2ab96de4100a335dacf042963d5068
+FreeBSD compile fix
+
+Robert Millan
+
+src/joystick/bsd/SDL_sysjoystick.c makes the invalid assumption that
+__FreeBSD_kernel__ implies presence of "ucr_data" struct member. This
+breaks recent versions of FreeBSD 10-CURRENT, FreeBSD 9-STABLE and
+Debian GNU/kFreeBSD "wheezy/sid".
+
+diff -r 8e98c714bb2a -r 62ff1c0a103f src/joystick/bsd/SDL_sysjoystick.c
+--- a/src/joystick/bsd/SDL_sysjoystick.c Sat Feb 04 18:12:20 2012 -0500
++++ b/src/joystick/bsd/SDL_sysjoystick.c Wed Feb 15 21:06:08 2012 -0500
+@@ -148,7 +148,7 @@
+ static int report_alloc(struct report *, struct report_desc *, int);
+ static void report_free(struct report *);
+
+-#if defined(USBHID_UCR_DATA) || defined(__FreeBSD_kernel__)
++#if defined(USBHID_UCR_DATA)
+ #define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
+ #elif (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063))
+ #define REP_BUF_DATA(rep) ((rep)->buf->ugd_data)
+
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-caca.patch b/media-libs/libsdl/files/libsdl-1.2.15-caca.patch
new file mode 100644
index 000000000000..faf5ae132a96
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-caca.patch
@@ -0,0 +1,26 @@
+--- SDL-1.2.15/configure.in
++++ SDL-1.2.15/configure.in
+@@ -1507,11 +1507,10 @@
+ , enable_video_caca=no)
+ if test x$enable_video = xyes -a x$enable_video_caca = xyes; then
+ video_caca=no
+- AC_PATH_PROG(CACACONFIG, caca-config, no)
+- if test x$CACACONFIG != xno; then
++ PKG_PROG_PKG_CONFIG([0.20])
++ PKG_CHECK_MODULES(CACA, caca, has_caca_pc=yes, has_caca_pc=no])
++ if test x$has_caca_pc == xyes; then
+ AC_MSG_CHECKING(for libcaca support)
+- CACA_CFLAGS=`$CACACONFIG --cflags`
+- CACA_LDFLAGS=`$CACACONFIG --libs`
+ save_CFLAGS="$CFLAGS"
+ AC_TRY_COMPILE([
+ #include <caca.h>
+@@ -1524,7 +1523,7 @@
+ if test x$video_caca = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_CACA)
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $CACA_CFLAGS"
+- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $CACA_LDFLAGS"
++ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $CACA_LIBS"
+ SOURCES="$SOURCES $srcdir/src/video/caca/*.c"
+ fi
+ fi
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch b/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch
new file mode 100644
index 000000000000..ffe55348a6c6
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch
@@ -0,0 +1,58 @@
+# HG changeset patch
+# User Azamat H. Hackimov <azamat.hackimov@gmail.com>
+# Date 1370184533 -21600
+# Branch SDL-1.2
+# 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/media-libs/libsdl/files/libsdl-1.2.15-gamma.patch b/media-libs/libsdl/files/libsdl-1.2.15-gamma.patch
new file mode 100644
index 000000000000..a0582da9cecd
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-gamma.patch
@@ -0,0 +1,42 @@
+From 4b56fa058a45b7c804d1a5fcaf7a70db0bd0581c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <petr.pisar@atlas.cz>
+Date: Tue, 1 Jan 2013 21:25:15 +0100
+Subject: [PATCH] x11: Bypass SetGammaRamp when changing gamma
+
+Recent Xorg has broken dynamic colors setting, so calling SDL_SetGamme()
+does not have any effect here. Recent means xorg-server >= 1.7, since 2010.
+See <https://bugs.freedesktop.org/show_bug.cgi?id=27222>.
+---
+ src/video/SDL_gamma.c | 15 ++-------------
+ 1 files changed, 2 insertions(+), 13 deletions(-)
+
+--- a/src/video/SDL_gamma.c
++++ b/src/video/SDL_gamma.c
+@@ -92,22 +92,11 @@ static void CalculateGammaFromRamp(float *gamma, Uint16 *ramp)
+
+ int SDL_SetGamma(float red, float green, float blue)
+ {
+- int succeeded;
++ int succeeded = -1;
+ SDL_VideoDevice *video = current_video;
+ SDL_VideoDevice *this = current_video;
+
+- succeeded = -1;
+- /* Prefer using SetGammaRamp(), as it's more flexible */
+- {
+- Uint16 ramp[3][256];
+-
+- CalculateGammaRamp(red, ramp[0]);
+- CalculateGammaRamp(green, ramp[1]);
+- CalculateGammaRamp(blue, ramp[2]);
+- succeeded = SDL_SetGammaRamp(ramp[0], ramp[1], ramp[2]);
+- }
+- if ( (succeeded < 0) && video->SetGamma ) {
+- SDL_ClearError();
++ if ( video->SetGamma ) {
+ succeeded = video->SetGamma(this, red, green, blue);
+ }
+ return succeeded;
+--
+1.7.8.6
+
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-joystick.patch b/media-libs/libsdl/files/libsdl-1.2.15-joystick.patch
new file mode 100644
index 000000000000..70e585e50132
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-joystick.patch
@@ -0,0 +1,13 @@
+--- src/joystick/linux/SDL_sysjoystick.c.org
++++ src/joystick/linux/SDL_sysjoystick.c
+@@ -1106,6 +1106,10 @@ static __inline__ void EV_HandleEvents(S
+ }
+ break;
+ case EV_ABS:
++ if (code >= ABS_MISC) {
++ break;
++ }
++
+ switch (code) {
+ case ABS_HAT0X:
+ case ABS_HAT0Y:
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-resizing.patch b/media-libs/libsdl/files/libsdl-1.2.15-resizing.patch
new file mode 100644
index 000000000000..5112137a5a17
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-resizing.patch
@@ -0,0 +1,60 @@
+Description: Revert change that breaks window corner resizing
+ http://bugzilla.libsdl.org/show_bug.cgi?id=1430
+Author: Andrew Caudwell <acaudwell@gmail.com>
+Last-Update: 2012-04-10
+Bug-Debian: http://bugs.debian.org/665779
+
+--- a/src/video/x11/SDL_x11events.c
++++ b/src/video/x11/SDL_x11events.c
+@@ -57,12 +57,6 @@
+ static SDLKey MISC_keymap[256];
+ SDLKey X11_TranslateKeycode(Display *display, KeyCode kc);
+
+-/*
+- Pending resize target for ConfigureNotify (so outdated events don't
+- cause inappropriate resize events)
+-*/
+-int X11_PendingConfigureNotifyWidth = -1;
+-int X11_PendingConfigureNotifyHeight = -1;
+
+ #ifdef X_HAVE_UTF8_STRING
+ Uint32 Utf8ToUcs4(const Uint8 *utf8)
+@@ -825,16 +819,6 @@
+ #ifdef DEBUG_XEVENTS
+ printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height);
+ #endif
+- if ((X11_PendingConfigureNotifyWidth != -1) &&
+- (X11_PendingConfigureNotifyHeight != -1)) {
+- if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) &&
+- (xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) {
+- /* Event is from before the resize, so ignore. */
+- break;
+- }
+- X11_PendingConfigureNotifyWidth = -1;
+- X11_PendingConfigureNotifyHeight = -1;
+- }
+ if ( SDL_VideoSurface ) {
+ if ((xevent.xconfigure.width != SDL_VideoSurface->w) ||
+ (xevent.xconfigure.height != SDL_VideoSurface->h)) {
+--- a/src/video/x11/SDL_x11events_c.h
++++ b/src/video/x11/SDL_x11events_c.h
+@@ -27,8 +27,3 @@
+ extern void X11_InitOSKeymap(_THIS);
+ extern void X11_PumpEvents(_THIS);
+ extern void X11_SetKeyboardState(Display *display, const char *key_vec);
+-
+-/* Variables to be exported */
+-extern int X11_PendingConfigureNotifyWidth;
+-extern int X11_PendingConfigureNotifyHeight;
+-
+--- a/src/video/x11/SDL_x11video.c
++++ b/src/video/x11/SDL_x11video.c
+@@ -1182,8 +1182,6 @@
+ current = NULL;
+ goto done;
+ }
+- X11_PendingConfigureNotifyWidth = width;
+- X11_PendingConfigureNotifyHeight = height;
+ } else {
+ if (X11_CreateWindow(this,current,width,height,bpp,flags) < 0) {
+ current = NULL;
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch b/media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch
new file mode 100644
index 000000000000..f430428e6e90
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch
@@ -0,0 +1,20 @@
+Only output -L -rpath cruft if using a non-standard install location.
+
+Makes ABI / cross-compiling easier on the soul.
+
+--- sdl-config.in
++++ sdl-config.in
+@@ -44,7 +44,12 @@
+ echo -I@includedir@/SDL @SDL_CFLAGS@
+ ;;
+ @ENABLE_SHARED_TRUE@ --libs)
+-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
++@ENABLE_SHARED_TRUE@ if test x"${prefix}" != x"/usr" ; then
++@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@"
++@ENABLE_SHARED_TRUE@ else
++@ENABLE_SHARED_TRUE@ libdirs=""
++@ENABLE_SHARED_TRUE@ fi
++@ENABLE_SHARED_TRUE@ echo $libdirs @SDL_RLD_FLAGS@ @SDL_LIBS@
+ @ENABLE_SHARED_TRUE@ ;;
+ @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
+ @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
diff --git a/media-libs/libsdl/libsdl-1.2.15-r9.ebuild b/media-libs/libsdl/libsdl-1.2.15-r9.ebuild
new file mode 100644
index 000000000000..a387ccac9f87
--- /dev/null
+++ b/media-libs/libsdl/libsdl-1.2.15-r9.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools flag-o-matic multilib toolchain-funcs eutils multilib-minimal
+
+DESCRIPTION="Simple Direct Media Layer"
+HOMEPAGE="http://www.libsdl.org/"
+SRC_URI="http://www.libsdl.org/release/SDL-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+# WARNING:
+# If you turn on the custom-cflags use flag in USE and something breaks,
+# you pick up the pieces. Be prepared for bug reports to be marked INVALID.
+IUSE="oss alsa nas X dga xv xinerama fbcon tslib aalib opengl libcaca +sound +video +joystick custom-cflags pulseaudio static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ sound? ( >=media-libs/audiofile-0.3.5[${MULTILIB_USEDEP}] )
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ nas? (
+ >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}]
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ )
+ X? (
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ )
+ aalib? ( >=media-libs/aalib-1.4_rc5-r6[${MULTILIB_USEDEP}] )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
+ opengl? (
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ )
+ tslib? ( >=x11-libs/tslib-1.0-r3[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ nas? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )
+ X? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )
+ x86? ( || ( >=dev-lang/yasm-0.6.0 >=dev-lang/nasm-0.98.39-r3 ) )"
+
+S=${WORKDIR}/SDL-${PV}
+
+pkg_setup() {
+ if use custom-cflags ; then
+ ewarn "Since you've chosen to use possibly unsafe CFLAGS,"
+ ewarn "don't bother filing libsdl-related bugs until trying to remerge"
+ ewarn "libsdl without the custom-cflags use flag in USE."
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-sdl-config.patch \
+ "${FILESDIR}"/${P}-resizing.patch \
+ "${FILESDIR}"/${P}-joystick.patch \
+ "${FILESDIR}"/${P}-bsd-joystick.patch \
+ "${FILESDIR}"/${P}-gamma.patch \
+ "${FILESDIR}"/${P}-const-xdata32.patch \
+ "${FILESDIR}"/${P}-caca.patch \
+ "${FILESDIR}"/${P}-SDL_EnableUNICODE.patch
+ AT_M4DIR="${EPREFIX}/usr/share/aclocal acinclude" eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=
+ if use !x86 && use !x86-linux ; then
+ myconf="${myconf} --disable-nasm"
+ else
+ myconf="${myconf} --enable-nasm"
+ fi
+ use custom-cflags || strip-flags
+ use sound || myconf="${myconf} --disable-audio"
+ use video \
+ && myconf="${myconf} --enable-video-dummy" \
+ || myconf="${myconf} --disable-video"
+ use joystick || myconf="${myconf} --disable-joystick"
+
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable prefix rpath) \
+ --disable-arts \
+ --disable-esd \
+ --enable-events \
+ --enable-cdrom \
+ --enable-threads \
+ --enable-timers \
+ --enable-file \
+ --enable-cpuinfo \
+ --disable-alsa-shared \
+ --disable-esd-shared \
+ --disable-pulseaudio-shared \
+ --disable-arts-shared \
+ --disable-nas-shared \
+ --disable-osmesa-shared \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ $(use_enable pulseaudio) \
+ $(use_enable nas) \
+ $(use_enable X video-x11) \
+ $(use_enable dga) \
+ $(use_enable xv video-x11-xv) \
+ $(use_enable xinerama video-x11-xinerama) \
+ $(use_enable X video-x11-xrandr) \
+ $(use_enable dga video-dga) \
+ $(use_enable fbcon video-fbcon) \
+ --disable-video-ggi \
+ --disable-video-svga \
+ $(use_enable aalib video-aalib) \
+ $(use_enable libcaca video-caca) \
+ $(use_enable opengl video-opengl) \
+ --disable-video-ps3 \
+ $(use_enable tslib input-tslib) \
+ $(use_with X x) \
+ $(use_enable static-libs static) \
+ --disable-video-x11-xme \
+ --disable-video-directfb \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ use static-libs || prune_libtool_files --all
+ dodoc BUGS CREDITS README README-SDL.txt README.HG TODO WhatsNew
+ dohtml -r ./
+}
diff --git a/media-libs/libsdl/metadata.xml b/media-libs/libsdl/metadata.xml
new file mode 100644
index 000000000000..aede63475a7b
--- /dev/null
+++ b/media-libs/libsdl/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription>
+Simple DirectMedia Layer is a cross-platform multimedia library designed
+to provide low level access to audio, keyboard, mouse, joystick, 3D
+hardware via OpenGL, and 2D video framebuffer. It is used by MPEG
+playback software, emulators, and many popular games, including the
+award winning Linux port of "Civilization: Call To Power."
+
+Simple DirectMedia Layer supports Linux, Windows, BeOS, MacOS Classic,
+MacOS X, FreeBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. There is also
+code, but no official support, for Windows CE, AmigaOS, Dreamcast,
+Atari, NetBSD, AIX, OSF/Tru64, RISC OS, and SymbianOS.
+
+SDL is written in C, but works with C++ natively, and has bindings to
+several other languages, including Ada, Eiffel, Java, Lua, ML, Perl,
+PHP, Pike, Python, and Ruby.
+</longdescription>
+ <use>
+ <flag name="joystick">Control joystick support (disable at your own risk)</flag>
+ <flag name="sound">Control audio support (disable at your own risk)</flag>
+ <flag name="tslib">Build with tslib support for touchscreen devices</flag>
+ <flag name="video">Control video support (disable at your own risk)</flag>
+ </use>
+</pkgmetadata>