summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-libs/libsdl
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-libs/libsdl')
-rw-r--r--media-libs/libsdl/Manifest1
-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-r8.ebuild142
-rw-r--r--media-libs/libsdl/libsdl-1.2.15-r9.ebuild143
-rw-r--r--media-libs/libsdl/metadata.xml27
12 files changed, 607 insertions, 0 deletions
diff --git a/media-libs/libsdl/Manifest b/media-libs/libsdl/Manifest
new file mode 100644
index 000000000000..939d75289880
--- /dev/null
+++ b/media-libs/libsdl/Manifest
@@ -0,0 +1 @@
+DIST SDL-1.2.15.tar.gz 3920622 SHA256 d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00 SHA512 ac392d916e6953b0925a7cbb0f232affea33339ef69b47a0a7898492afb9784b93138986df53d6da6d3e2ad79af1e9482df565ecca30f89428be0ae6851b1adc WHIRLPOOL 21b9aadb7b00002a6f3760902cd40aeb1b145228348b887049b40a435c2b9a1a3679a83100421e9634178b9da32d524371d6912c190a75e83ef3170ad45bc159
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-r8.ebuild b/media-libs/libsdl/libsdl-1.2.15-r8.ebuild
new file mode 100644
index 000000000000..72a40da1db02
--- /dev/null
+++ b/media-libs/libsdl/libsdl-1.2.15-r8.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+# 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
+ AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=
+ if use !x86 ; 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 \
+ --disable-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/libsdl-1.2.15-r9.ebuild b/media-libs/libsdl/libsdl-1.2.15-r9.ebuild
new file mode 100644
index 000000000000..3f44c27b2ae2
--- /dev/null
+++ b/media-libs/libsdl/libsdl-1.2.15-r9.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+# 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="/usr/share/aclocal acinclude" eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=
+ if use !x86 ; 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 \
+ --disable-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..32c5821fcc2f
--- /dev/null
+++ b/media-libs/libsdl/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <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>