changeset 351:8052b944a4a9

by now, libsdl 15 r4 is the latest and greatest
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 25 Sep 2013 12:49:36 +0200
parents 40430d2a0b27
children c417ea2d1eab 39622247dcf8
files media-libs/libsdl/Manifest media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch media-libs/libsdl/files/libsdl-1.2.15-gamma.patch media-libs/libsdl/libsdl-1.2.15-r2.ebuild media-libs/libsdl/libsdl-1.2.15-r4.ebuild
diffstat 5 files changed, 251 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/media-libs/libsdl/Manifest	Mon Sep 16 16:39:12 2013 +0200
+++ b/media-libs/libsdl/Manifest	Wed Sep 25 12:49:36 2013 +0200
@@ -1,5 +1,8 @@
+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-r2.ebuild 4112 SHA256 373b5b3fb7fd97aa0dd278fb0927b3fdb56118f58a7e44f6376b9edc99ce8988 SHA512 dad6ee545f731a7c6bfa41e2167386fe7e21fc12c408c14b0e6e982e04006c6488f7ed0feba509e77730d1c8649c51ac8a37e23d72ee50806123062727593e53 WHIRLPOOL 6d9d71472c5df5c9e1290e0f797621716cf23966a1ce6cd4b1f088f0232413cf1ad7bdecf7aa05f246666f9f1ef8f43a78fcf0112742a056d9e114d08aac61e2
+EBUILD libsdl-1.2.15-r2.ebuild 4138 SHA256 532d0b219b0faf290a7a2781a3e7edfff7d1cdf296dc4b38fb471f5945a35d17 SHA512 00c752fa86935db66ab344d5dfd7a3f3f4c86a001804542408eb43cd8954f8d5d111d3e27669dc28b589abdb89ac7f90daacbc186d6241d4656a24094b67e04c WHIRLPOOL aa9306ec49edd8620f8e5448a331c9f7a96d2192083763cc02fdf98bcc5abf905f689e4724ce2e56378afb55561949070f2f5f520ec209319894dc382ddd6bc9
+EBUILD libsdl-1.2.15-r4.ebuild 4215 SHA256 e9cd50c59cc9b0c261b24413db5403aadb2ae54e13f1601bbaa933bcdb856774 SHA512 15f776d342c2e653f992fcbea823c23ed251f4ed830b181ddc994c2379facdce002cb1c807a56bc74b10ffc71b07dc131e42120ffc009ce797ce8a16d3f2107b WHIRLPOOL 92eafbe3841f71987c88af600ca626193a4330eb2cc61653fb36cb4b1cec19b223a5e3a20f2ae83801b0e40c1cb38cd7a6ce0ff797c664da241e6a27ff3a621d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch	Wed Sep 25 12:49:36 2013 +0200
@@ -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
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-libs/libsdl/files/libsdl-1.2.15-gamma.patch	Wed Sep 25 12:49:36 2013 +0200
@@ -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
+
--- a/media-libs/libsdl/libsdl-1.2.15-r2.ebuild	Mon Sep 16 16:39:12 2013 +0200
+++ b/media-libs/libsdl/libsdl-1.2.15-r2.ebuild	Wed Sep 25 12:49:36 2013 +0200
@@ -108,6 +108,7 @@
 		--enable-timers \
 		--enable-file \
 		--enable-cpuinfo \
+		--disable-alsa-shared \
 		--disable-esd-shared \
 		--disable-pulseaudio-shared \
 		--disable-arts-shared \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-libs/libsdl/libsdl-1.2.15-r4.ebuild	Wed Sep 25 12:49:36 2013 +0200
@@ -0,0 +1,146 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.15-r4.ebuild,v 1.8 2013/09/23 19:18:38 ago Exp $
+
+EAPI=5
+inherit autotools flag-o-matic multilib toolchain-funcs eutils
+
+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 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 directfb ggi svga tslib aalib opengl libcaca +audio +video +joystick custom-cflags pulseaudio ps3 static-libs"
+
+RDEPEND="audio? ( >=media-libs/audiofile-0.1.9 )
+	alsa? ( media-libs/alsa-lib )
+	nas? (
+		media-libs/nas
+		x11-libs/libXt
+		x11-libs/libXext
+		x11-libs/libX11
+	)
+	X? (
+		x11-libs/libXt
+		x11-libs/libXext
+		x11-libs/libX11
+		x11-libs/libXrandr
+	)
+	directfb? ( >=dev-libs/DirectFB-0.9.19 )
+	ggi? ( >=media-libs/libggi-2.0_beta3 )
+	svga? ( >=media-libs/svgalib-1.4.2 )
+	aalib? ( media-libs/aalib )
+	libcaca? ( >=media-libs/libcaca-0.9-r1 )
+	opengl? ( virtual/opengl virtual/glu )
+	ppc64? ( ps3? ( sys-libs/libspe2 ) )
+	tslib? ( x11-libs/tslib )
+	pulseaudio? ( media-sound/pulseaudio )"
+DEPEND="${RDEPEND}
+	nas? (
+		x11-proto/xextproto
+		x11-proto/xproto
+	)
+	X? (
+		x11-proto/xextproto
+		x11-proto/xproto
+	)
+	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}-gamma.patch \
+		"${FILESDIR}"/${P}-const-xdata32.patch
+	AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
+}
+
+src_configure() {
+	local myconf=
+	if [[ $(tc-arch) != "x86" ]] ; then
+		myconf="${myconf} --disable-nasm"
+	else
+		myconf="${myconf} --enable-nasm"
+	fi
+	use custom-cflags || strip-flags
+	use audio || myconf="${myconf} --disable-audio"
+	use video \
+		&& myconf="${myconf} --enable-video-dummy" \
+		|| myconf="${myconf} --disable-video"
+	use joystick || myconf="${myconf} --disable-joystick"
+
+	local directfbconf="--disable-video-directfb"
+	if use directfb ; then
+		# since DirectFB can link against SDL and trigger a
+		# dependency loop, only link against DirectFB if it
+		# isn't broken #61592
+		echo 'int main(){}' > directfb-test.c
+		$(tc-getCC) directfb-test.c -ldirectfb 2>/dev/null \
+			&& directfbconf="--enable-video-directfb" \
+			|| ewarn "Disabling DirectFB since libdirectfb.so is broken"
+	fi
+
+	myconf="${myconf} ${directfbconf}"
+
+	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) \
+		$(use_enable ggi video-ggi) \
+		$(use_enable svga video-svga) \
+		$(use_enable aalib video-aalib) \
+		$(use_enable libcaca video-caca) \
+		$(use_enable opengl video-opengl) \
+		$(use_enable ps3 video-ps3) \
+		$(use_enable tslib input-tslib) \
+		$(use_with X x) \
+		$(use_enable static-libs static) \
+		--disable-video-x11-xme \
+		${myconf}
+}
+
+src_install() {
+	emake DESTDIR="${D}" install
+	use static-libs || prune_libtool_files --all
+	dodoc BUGS CREDITS README README-SDL.txt README.HG TODO WhatsNew
+	dohtml -r ./
+}