diff options
author | Julian Ospald <hasufell@gentoo.org> | 2013-09-05 18:46:48 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2013-09-05 18:46:48 +0000 |
commit | a4635612f1baf9ef41e7093ce64c67b2787c5534 (patch) | |
tree | 88e6f81be42d858f6a4f0321cc7b93a6af849e46 /media-libs | |
parent | Clean up PYTHON_COMPAT from old implementations. (diff) | |
download | gentoo-2-a4635612f1baf9ef41e7093ce64c67b2787c5534.tar.gz gentoo-2-a4635612f1baf9ef41e7093ce64c67b2787c5534.tar.bz2 gentoo-2-a4635612f1baf9ef41e7093ce64c67b2787c5534.zip |
add threads useflag by backporting upstream fix
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/libsdl2/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/libsdl2/files/libsdl2-2.0.0-threads.patch | 64 | ||||
-rw-r--r-- | media-libs/libsdl2/libsdl2-2.0.0.ebuild | 12 |
3 files changed, 74 insertions, 8 deletions
diff --git a/media-libs/libsdl2/ChangeLog b/media-libs/libsdl2/ChangeLog index ed3608ebaa70..61130c2bba5d 100644 --- a/media-libs/libsdl2/ChangeLog +++ b/media-libs/libsdl2/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/libsdl2 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl2/ChangeLog,v 1.3 2013/08/31 14:34:50 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl2/ChangeLog,v 1.4 2013/09/05 18:46:48 hasufell Exp $ + + 05 Sep 2013; Julian Ospald <hasufell@gentoo.org> libsdl2-2.0.0.ebuild, + +files/libsdl2-2.0.0-threads.patch: + add threads useflag by backporting upstream fix 31 Aug 2013; Julian Ospald <hasufell@gentoo.org> libsdl2-2.0.0.ebuild: add custom-cflags useflag diff --git a/media-libs/libsdl2/files/libsdl2-2.0.0-threads.patch b/media-libs/libsdl2/files/libsdl2-2.0.0-threads.patch new file mode 100644 index 000000000000..48c3dadda475 --- /dev/null +++ b/media-libs/libsdl2/files/libsdl2-2.0.0-threads.patch @@ -0,0 +1,64 @@ + +# HG changeset patch +# User Sam Lantinga <slouken@libsdl.org> +# Date 1378390526 25200 +# Node ID e928464b98ec679471ea80d0d5fefe8b3406eef1 +# Parent 384d5ba7ee44f4c90ecb5b581113918a66b8371e +Fixed bug 2076 - OpenGL doesn't work with --disable-threads + +stepik-777 + +Thread local storage is used to store current window and current opengl context. OpenGL worked before this changeset: 7596 (45e5c263c096) + +diff -r 384d5ba7ee44 -r e928464b98ec src/thread/SDL_systhread.h +--- a/src/thread/SDL_systhread.h Thu Sep 05 07:02:27 2013 -0700 ++++ b/src/thread/SDL_systhread.h Thu Sep 05 07:15:26 2013 -0700 +@@ -26,6 +26,7 @@ + #define _SDL_systhread_h + + #include "SDL_thread.h" ++#include "SDL_thread_c.h" + + /* This function creates a thread, passing args to SDL_RunThread(), + saves a system-dependent thread id in thread->id, and returns 0 +diff -r 384d5ba7ee44 -r e928464b98ec src/thread/SDL_thread.c +--- a/src/thread/SDL_thread.c Thu Sep 05 07:02:27 2013 -0700 ++++ b/src/thread/SDL_thread.c Thu Sep 05 07:15:26 2013 -0700 +@@ -125,6 +125,7 @@ + SDL_TLSEntry *entry; + SDL_TLSData *storage = NULL; + ++#if !SDL_THREADS_DISABLED + if (!SDL_generic_TLS_mutex) { + static SDL_SpinLock tls_lock; + SDL_AtomicLock(&tls_lock); +@@ -139,6 +140,7 @@ + } + SDL_AtomicUnlock(&tls_lock); + } ++#endif /* SDL_THREADS_DISABLED */ + + SDL_MemoryBarrierAcquire(); + SDL_LockMutex(SDL_generic_TLS_mutex); +@@ -148,7 +150,9 @@ + break; + } + } ++#if !SDL_THREADS_DISABLED + SDL_UnlockMutex(SDL_generic_TLS_mutex); ++#endif + + return storage; + } +diff -r 384d5ba7ee44 -r e928464b98ec src/thread/SDL_thread_c.h +--- a/src/thread/SDL_thread_c.h Thu Sep 05 07:02:27 2013 -0700 ++++ b/src/thread/SDL_thread_c.h Thu Sep 05 07:15:26 2013 -0700 +@@ -23,6 +23,8 @@ + #ifndef _SDL_thread_c_h + #define _SDL_thread_c_h + ++#include "SDL_thread.h" ++ + /* Need the definitions of SYS_ThreadHandle */ + #if SDL_THREADS_DISABLED + #include "generic/SDL_systhread_c.h" diff --git a/media-libs/libsdl2/libsdl2-2.0.0.ebuild b/media-libs/libsdl2/libsdl2-2.0.0.ebuild index 7e17443eb508..496a8a42cb23 100644 --- a/media-libs/libsdl2/libsdl2-2.0.0.ebuild +++ b/media-libs/libsdl2/libsdl2-2.0.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl2/libsdl2-2.0.0.ebuild,v 1.2 2013/08/31 14:34:50 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl2/libsdl2-2.0.0.ebuild,v 1.3 2013/09/05 18:46:48 hasufell Exp $ EAPI=5 inherit autotools flag-o-matic toolchain-funcs eutils @@ -14,7 +14,7 @@ LICENSE="ZLIB" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="3dnow alsa altivec +audio custom-cflags dbus directfb fusionsound gles haptic +joystick mmx nas opengl oss pulseaudio sse sse2 static-libs tslib udev +video X xinerama xscreensaver" +IUSE="3dnow alsa altivec +audio custom-cflags dbus directfb fusionsound gles haptic +joystick mmx nas opengl oss pulseaudio sse sse2 static-libs +threads tslib udev +video X xinerama xscreensaver" REQUIRED_USE=" alsa? ( audio ) fusionsound? ( audio ) @@ -58,7 +58,8 @@ S=${WORKDIR}/${MY_P} src_prepare() { # https://bugzilla.libsdl.org/show_bug.cgi?id=1431 - epatch "${FILESDIR}"/${P}-static-libs.patch + epatch "${FILESDIR}"/${P}-static-libs.patch \ + "${FILESDIR}"/${P}-threads.patch AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf } @@ -77,9 +78,6 @@ src_configure() { fi # sorted by `./configure --help` - # - # --disable-threads broken - # https://bugzilla.libsdl.org/show_bug.cgi?id=2070 econf \ $(use_enable static-libs static) \ $(use_enable audio) \ @@ -89,7 +87,7 @@ src_configure() { $(use_enable joystick) \ $(use_enable haptic) \ --enable-power \ - --enable-threads \ + $(use_enable threads) \ --enable-timers \ --enable-file \ --disable-loadso \ |