Skip to content

Commit

Permalink
media-libs/sdl2-mixer: use upstream patch instead of sed hack to fix …
Browse files Browse the repository at this point in the history
…mp3 configure code

Package-Manager: portage-2.2.26
  • Loading branch information
Michael Sterrett committed Jan 5, 2016
1 parent 96c3937 commit 76d3480
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
39 changes: 39 additions & 0 deletions media-libs/sdl2-mixer/files/sdl2-mixer-2.0.1-mp3.patch
Original file line number Diff line number Diff line change
@@ -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





7 changes: 4 additions & 3 deletions media-libs/sdl2-mixer/sdl2-mixer-2.0.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 76d3480

Please sign in to comment.