commit:     76d3480fb1fac5c608a9873849e5bbd305d273d7
Author:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  5 20:47:44 2016 +0000
Commit:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
CommitDate: Tue Jan  5 22:38:04 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76d3480f

media-libs/sdl2-mixer: use upstream patch instead of sed hack to fix mp3 
configure code

Package-Manager: portage-2.2.26

 .../sdl2-mixer/files/sdl2-mixer-2.0.1-mp3.patch    | 39 ++++++++++++++++++++++
 media-libs/sdl2-mixer/sdl2-mixer-2.0.1.ebuild      |  7 ++--
 2 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/media-libs/sdl2-mixer/files/sdl2-mixer-2.0.1-mp3.patch 
b/media-libs/sdl2-mixer/files/sdl2-mixer-2.0.1-mp3.patch
new file mode 100644
index 0000000..6d617e0
--- /dev/null
+++ b/media-libs/sdl2-mixer/files/sdl2-mixer-2.0.1-mp3.patch
@@ -0,0 +1,39 @@
+
+diff -r f095b3477c8e -r 6afe73e1e74b configure.in
+--- a/configure.in     Sun Jan 03 09:25:52 2016 -0800
++++ b/configure.in     Mon Jan 04 21:40:14 2016 -0800
+@@ -609,7 +609,6 @@
+                 smpeg_lib=[`find_lib "libsmpeg2*.so.*"`]
+                 ;;
+         esac
+-        SOURCES="$SOURCES $srcdir/*_mp3.c"
+         EXTRA_CFLAGS="$EXTRA_CFLAGS -DMP3_MUSIC $SMPEG_CFLAGS"
+         if test x$enable_music_mp3_smpeg_shared = xyes && test x$smpeg_lib != 
x; then
+             echo "-- dynamic libsmpeg -> $smpeg_lib"
+@@ -637,11 +636,6 @@
+     AC_MSG_RESULT($have_libmad)
+     if test x$have_libmad = xyes; then
+         SOURCES="$SOURCES $srcdir/music_mad.c"
+-        if echo "$SOURCES" | grep "load_mp3.c" >/dev/null; then
+-            :
+-        else
+-            SOURCES="$SOURCES $srcdir/load_mp3.c"
+-        fi
+         EXTRA_CFLAGS="$EXTRA_CFLAGS -DMP3_MAD_MUSIC"
+         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmad"
+     else
+@@ -649,7 +643,9 @@
+     fi
+ fi
+ 
+-if test x$have_smpeg != xyes -a x$have_libmad != xyes; then
++if test x$have_smpeg = xyes -o x$have_libmad = xyes; then
++      SOURCES="$SOURCES $srcdir/*_mp3.c"
++else
+     AC_MSG_WARN([MP3 support disabled])
+ fi
+ 
+
+
+
+

diff --git a/media-libs/sdl2-mixer/sdl2-mixer-2.0.1.ebuild 
b/media-libs/sdl2-mixer/sdl2-mixer-2.0.1.ebuild
index 8fb8354..4814ca8 100644
--- a/media-libs/sdl2-mixer/sdl2-mixer-2.0.1.ebuild
+++ b/media-libs/sdl2-mixer/sdl2-mixer-2.0.1.ebuild
@@ -3,7 +3,7 @@
 # $Id$
 
 EAPI=5
-inherit eutils multilib-minimal
+inherit autotools eutils multilib-minimal
 
 MY_P=SDL2_mixer-${PV}
 DESCRIPTION="Simple Direct Media Layer Mixer Library"
@@ -52,8 +52,9 @@ DEPEND=${RDEPEND}
 S=${WORKDIR}/${MY_P}
 
 src_prepare() {
-       # ugly workaround to bad SOURCES building code (bug #570804)
-       sed -i -e '/echo.*load_mp3/s/load//' configure || die
+       # upstream patch to fix building with both smpeg and mad mp3 support 
(bug #570804)
+       epatch "${FILESDIR}"/${P}-mp3.patch
+       eautoreconf
 }
 
 multilib_src_configure() {

Reply via email to