# HG changeset patch # User Dirk Olmes # Date 1371710553 -7200 # Node ID 208cbe4d2de122ca9dbab4865fb4c3ec03952129 # Parent 560c63f95c62889553ecad7a301f99be1a6b603b maintain my own libsdl ebulid without --shared-alsa diff -r 560c63f95c62 -r 208cbe4d2de1 media-libs/libsdl/Manifest --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/libsdl/Manifest Thu Jun 20 08:42:33 2013 +0200 @@ -0,0 +1,5 @@ +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 diff -r 560c63f95c62 -r 208cbe4d2de1 media-libs/libsdl/files/libsdl-1.2.15-joystick.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/libsdl/files/libsdl-1.2.15-joystick.patch Thu Jun 20 08:42:33 2013 +0200 @@ -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 -r 560c63f95c62 -r 208cbe4d2de1 media-libs/libsdl/files/libsdl-1.2.15-resizing.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/libsdl/files/libsdl-1.2.15-resizing.patch Thu Jun 20 08:42:33 2013 +0200 @@ -0,0 +1,60 @@ +Description: Revert change that breaks window corner resizing + http://bugzilla.libsdl.org/show_bug.cgi?id=1430 +Author: Andrew Caudwell +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 -r 560c63f95c62 -r 208cbe4d2de1 media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch Thu Jun 20 08:42:33 2013 +0200 @@ -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 -r 560c63f95c62 -r 208cbe4d2de1 media-libs/libsdl/libsdl-1.2.15-r2.ebuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/libsdl/libsdl-1.2.15-r2.ebuild Thu Jun 20 08:42:33 2013 +0200 @@ -0,0 +1,145 @@ +# Copyright 1999-2012 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-r2.ebuild,v 1.9 2012/08/27 17:40:01 armin76 Exp $ + +EAPI=2 +inherit flag-o-matic multilib toolchain-funcs eutils libtool + +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." + epause 10 + fi +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-sdl-config.patch \ + "${FILESDIR}"/${P}-resizing.patch \ + "${FILESDIR}"/${P}-joystick.patch + + elibtoolize +} + +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-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 || die "emake install failed" + use static-libs || prune_libtool_files --all + dodoc BUGS CREDITS README README-SDL.txt README.HG TODO WhatsNew + dohtml -r ./ +}