summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2012-03-04 05:51:05 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2012-03-04 05:51:05 +0000
commit4285551fdbec103fb5dea235a225addd96a50ffa (patch)
treed16e7dc75490eac25d1f6f4ed817b628ac8af87f /media-libs/sdl-mixer
parentBump ghc to 7.4.1 (diff)
downloadgentoo-2-4285551fdbec103fb5dea235a225addd96a50ffa.tar.gz
gentoo-2-4285551fdbec103fb5dea235a225addd96a50ffa.tar.bz2
gentoo-2-4285551fdbec103fb5dea235a225addd96a50ffa.zip
add upstream patch for failure to load wav situation (bug #406739)
(Portage version: 2.1.10.44/cvs/Linux i686)
Diffstat (limited to 'media-libs/sdl-mixer')
-rw-r--r--media-libs/sdl-mixer/ChangeLog6
-rw-r--r--media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.patch35
-rw-r--r--media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild7
3 files changed, 46 insertions, 2 deletions
diff --git a/media-libs/sdl-mixer/ChangeLog b/media-libs/sdl-mixer/ChangeLog
index fb74010b7fd9..2fcc20677d88 100644
--- a/media-libs/sdl-mixer/ChangeLog
+++ b/media-libs/sdl-mixer/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-libs/sdl-mixer
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-mixer/ChangeLog,v 1.87 2012/02/08 18:41:32 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-mixer/ChangeLog,v 1.88 2012/03/04 05:51:05 mr_bones_ Exp $
+
+ 04 Mar 2012; Michael Sterrett <mr_bones_@gentoo.org> sdl-mixer-1.2.12.ebuild,
+ +files/sdl-mixer-1.2.12-wav.patch:
+ add upstream patch for failure to load wav situation (bug #406739)
08 Feb 2012; Michael Sterrett <mr_bones_@gentoo.org> sdl-mixer-1.2.12.ebuild:
correct modplug configure option (bug #402735)
diff --git a/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.patch b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.patch
new file mode 100644
index 000000000000..38914fd77f15
--- /dev/null
+++ b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/show_bug.cgi?id=406739
+Nikos Chantziaras 2012-03-03 03:13:39 EST
+
+There's a bug in the current version of SDL_mixer where failing to load a WAV sample will result in freeing a resource twice, resulting in an application crash. There is an upstream fix for this:
+
+http://hg.libsdl.org/SDL_mixer/rev/ea53a85853dd
+
+Upstream bug: http://bugzilla.libsdl.org/show_bug.cgi?id=1418
+
+--- a/mixer.c
++++ b/mixer.c
+@@ -610,13 +610,15 @@
+ break;
+ default:
+ SDL_SetError("Unrecognized sound file type");
+- return(0);
++ if ( freesrc ) {
++ SDL_RWclose(src);
++ }
++ loaded = NULL;
++ break;
+ }
+ if ( !loaded ) {
++ /* The individual loaders have closed src if needed */
+ SDL_free(chunk);
+- if ( freesrc ) {
+- SDL_RWclose(src);
+- }
+ return(NULL);
+ }
+
+
+
+
+
diff --git a/media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild b/media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild
index 5c720e189aa3..c576052903d7 100644
--- a/media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild
+++ b/media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild
@@ -1,8 +1,9 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild,v 1.3 2012/02/08 18:41:32 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-mixer/sdl-mixer-1.2.12.ebuild,v 1.4 2012/03/04 05:51:05 mr_bones_ Exp $
EAPI=4
+inherit eutils
MY_P=${P/sdl-/SDL_}
DESCRIPTION="Simple Direct Media Layer Mixer Library"
@@ -27,6 +28,10 @@ DEPEND=">=media-libs/libsdl-1.2.10
S=${WORKDIR}/${MY_P}
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-wav.patch
+}
+
src_configure() {
econf \
--disable-dependency-tracking \