media-libs/sdl2-mixer: Patch to fix 2.0.2 smpeg build issue
authorJames Le Cuirot <chewi@gentoo.org>
Sat, 1 Sep 2018 14:13:40 +0000 (15:13 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Sat, 1 Sep 2018 14:13:50 +0000 (15:13 +0100)
Closes: https://bugs.gentoo.org/636014
Package-Manager: Portage-2.3.48, Repoman-2.3.10

media-libs/sdl2-mixer/files/sdl2-mixer-2.0.2-smpeg.patch [new file with mode: 0644]
media-libs/sdl2-mixer/sdl2-mixer-2.0.2.ebuild

diff --git a/media-libs/sdl2-mixer/files/sdl2-mixer-2.0.2-smpeg.patch b/media-libs/sdl2-mixer/files/sdl2-mixer-2.0.2-smpeg.patch
new file mode 100644 (file)
index 0000000..1377fed
--- /dev/null
@@ -0,0 +1,21 @@
+--- SDL2_mixer-2.0.2/music_smpeg-orig.c        2017-12-06 20:47:21.691153833 -0500
++++ SDL2_mixer-2.0.2/music_smpeg.c     2017-12-06 20:47:30.032153222 -0500
+@@ -138,7 +138,7 @@
+         SDL_free(music);
+         return NULL;
+     }
+-    smpeg.SMPEG_actualSpec(mp3, &music_spec);
++    smpeg.SMPEG_actualSpec(music->mp3, &music_spec);
+     music->freesrc = freesrc;
+     return music;
+--- SDL2_mixer-2.0.2/music_smpeg-orig.c        2017-12-06 21:03:44.907081811 -0500
++++ SDL2_mixer-2.0.2/music_smpeg.c     2017-12-06 23:34:36.696418752 -0500
+@@ -174,6 +174,7 @@
+     int left = (len - smpeg.SMPEG_playAudio(music->mp3, stream, len));
+     if (left > 0) {
+         stream += (len - left);
++    }
+     return left;
+ }
index 53e5155abeedb13a3f609cd1f9c7252b7778e350..440a2a2ff04d589a749eefc37a79338e0a29d975 100644 (file)
@@ -50,6 +50,10 @@ DEPEND="${RDEPEND}"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-smpeg.patch
+)
+
 multilib_src_configure() {
        local myeconfargs=(
                $(use_enable static-libs static)