From 53e63b00dc34e26a80af0d69514293026031bbc1 Mon Sep 17 00:00:00 2001 From: Michael Sterrett Date: Mon, 2 Jan 2012 21:39:19 +0000 Subject: [PATCH] add upstream patch for playing some midi files (bug #397333) Package-Manager: portage-2.1.10.41/cvs/Linux i686 --- media-libs/sdl-mixer/ChangeLog | 10 ++- media-libs/sdl-mixer/Manifest | 14 +---- .../files/sdl-mixer-1.2.11-midi.patch | 40 ++++++++++++ .../sdl-mixer/sdl-mixer-1.2.11-r2.ebuild | 62 +++++++++++++++++++ 4 files changed, 113 insertions(+), 13 deletions(-) create mode 100644 media-libs/sdl-mixer/files/sdl-mixer-1.2.11-midi.patch create mode 100644 media-libs/sdl-mixer/sdl-mixer-1.2.11-r2.ebuild diff --git a/media-libs/sdl-mixer/ChangeLog b/media-libs/sdl-mixer/ChangeLog index 1afd95b1a2cd..a9058fbc8af7 100644 --- a/media-libs/sdl-mixer/ChangeLog +++ b/media-libs/sdl-mixer/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/sdl-mixer -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-mixer/ChangeLog,v 1.83 2011/12/09 21:16:44 tupone Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-mixer/ChangeLog,v 1.84 2012/01/02 21:39:19 mr_bones_ Exp $ + +*sdl-mixer-1.2.11-r2 (02 Jan 2012) + + 02 Jan 2012; Michael Sterrett + +sdl-mixer-1.2.11-r2.ebuild, +files/sdl-mixer-1.2.11-midi.patch: + add upstream patch for playing some midi files (bug #397333) 09 Dec 2011; Tupone Alfredo sdl-mixer-1.2.11-r1.ebuild, metadata.xml: diff --git a/media-libs/sdl-mixer/Manifest b/media-libs/sdl-mixer/Manifest index 8a7ac7e86e0b..efc0bc667ae9 100644 --- a/media-libs/sdl-mixer/Manifest +++ b/media-libs/sdl-mixer/Manifest @@ -1,15 +1,7 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - +AUX sdl-mixer-1.2.11-midi.patch 779 RMD160 aaeeb0e11e002f5648f6079943c2969cd668436a SHA1 8c2cf4d016781f317c328526ac6edff41b18d06f SHA256 267535c82e1e97f4407b02cf7a21c98a1f89fdd431a8698cffa69afacdd44ef5 AUX sdl-mixer-1.2.11-multilib.patch 1247 RMD160 76f4d4c32bcfd1367dda5e82816d5adc7ff9c1f4 SHA1 05fc2f40e177fd92c27f67a7661f273efca53169 SHA256 76ab56747d29bdae932394f8e501ce22f470096268e0b8cc63ea4335c837976c DIST SDL_mixer-1.2.11.tar.gz 2690654 RMD160 559355116a1c380edf71879da0dbcf5359f05476 SHA1 ef5d45160babeb51eafa7e4019cec38324ee1a5d SHA256 86145ac39cac6d2c6169c226f937648dca5e89dcd828751763dd174fa9af9cf9 EBUILD sdl-mixer-1.2.11-r1.ebuild 1951 RMD160 ed55ecb18b9953302b1a13088539a7a4c5e342a3 SHA1 e2fd96ad1f66c58af006ebbef62850ac8de324c8 SHA256 7b43f2fb558ed816b37da24eb4d62346518ceb791a3eb67dee1c479631f68431 -MISC ChangeLog 10973 RMD160 36199f333b3246364c50443bdb8d81643daafe55 SHA1 f858596f7564b7f9158ef66e8640baf787835cb8 SHA256 fa44a51e6afd2bf1541d396df0eb0550fbf18d0cd7bda5212a788acda68aa1ce +EBUILD sdl-mixer-1.2.11-r2.ebuild 2001 RMD160 00f8791f2c6db5d1f3758a60028bef62f832762d SHA1 e1ed9b39f3da70fb2be3c757cb5a031414dba5b6 SHA256 abee677cae29900fd4f72b379299367629ba25b4e0f68454c5891f4fb62c2ca8 +MISC ChangeLog 11198 RMD160 5c696331d5ebd1c362c57b8de4c9812311ff032d SHA1 981d48a86ab3ab61a15334fdb8f3f76a27a74234 SHA256 6180d0c15daabf2efc20925852dfa225c8002ec8127e56864ecee8600bb1c798 MISC metadata.xml 358 RMD160 0ca371404fcfabc51cd869a21a9942427c787a74 SHA1 a369c9d062d738d276e1a7c79892cfea918f706d SHA256 26734aaec72a5da02b2391dd99321c7eb65e9de1236165d0b5cafbad9d22bf18 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.18 (GNU/Linux) - -iEYEARECAAYFAk7iepsACgkQIY77eQFFFC3k8gCfZTsXoucxHRQy7uqwKwuFYvJ/ -DGcAnRpQojLRHKZbdiK031QADkTPk6+C -=oeKO ------END PGP SIGNATURE----- diff --git a/media-libs/sdl-mixer/files/sdl-mixer-1.2.11-midi.patch b/media-libs/sdl-mixer/files/sdl-mixer-1.2.11-midi.patch new file mode 100644 index 000000000000..5e45721b1aa8 --- /dev/null +++ b/media-libs/sdl-mixer/files/sdl-mixer-1.2.11-midi.patch @@ -0,0 +1,40 @@ +For bug 397333 +https://bugs.gentoo.org/show_bug.cgi?id=397333 + +upstream patch pulled from: +http://hg.libsdl.org/SDL_mixer/raw-diff/7a8f0018e23d/timidity/readmidi.c + +--- a/timidity/readmidi.c ++++ b/timidity/readmidi.c +@@ -530,7 +530,7 @@ + { + MidiEventList *meep; + MidiEventList *next, *new; +- int32 len; ++ int32 len, next_pos, pos; + char tmp[4]; + + meep=evlist; +@@ -552,7 +552,7 @@ + return -1; + } + len=BE_LONG(len); +- ++ next_pos = SDL_RWtell(rw) + len; + if (memcmp(tmp, "MTrk", 4)) + { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, +@@ -567,6 +567,9 @@ + + if (new==MAGIC_EOT) /* End-of-track Hack. */ + { ++ pos = SDL_RWtell(rw); ++ if (pos < next_pos) ++ SDL_RWseek(rw, next_pos - pos, RW_SEEK_CUR); + return 0; + } + + + + + diff --git a/media-libs/sdl-mixer/sdl-mixer-1.2.11-r2.ebuild b/media-libs/sdl-mixer/sdl-mixer-1.2.11-r2.ebuild new file mode 100644 index 000000000000..aa53226e2a43 --- /dev/null +++ b/media-libs/sdl-mixer/sdl-mixer-1.2.11-r2.ebuild @@ -0,0 +1,62 @@ +# 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.11-r2.ebuild,v 1.1 2012/01/02 21:39:18 mr_bones_ Exp $ + +EAPI=2 +inherit eutils + +MY_P=${P/sdl-/SDL_} +DESCRIPTION="Simple Direct Media Layer Mixer Library" +HOMEPAGE="http://www.libsdl.org/projects/SDL_mixer/" +SRC_URI="http://www.libsdl.org/projects/SDL_mixer/release/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" +IUSE="flac mad +midi mikmod mp3 playtools static-libs timidity vorbis +wav" + +DEPEND=">=media-libs/libsdl-1.2.10 + flac? ( media-libs/flac ) + timidity? ( media-sound/timidity++ ) + mad? ( media-libs/libmad ) + !mad? ( mp3? ( >=media-libs/smpeg-0.4.4-r1 ) ) + vorbis? ( >=media-libs/libvorbis-1.0_beta4 media-libs/libogg ) + mikmod? ( >=media-libs/libmikmod-3.1.10 )" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-multilib.patch \ + "${FILESDIR}"/${P}-midi.patch +} + +src_configure() { + econf \ + --disable-dependency-tracking \ + --disable-music-mod-shared \ + --disable-music-ogg-shared \ + --disable-music-flac-shared \ + --disable-music-mp3-shared \ + $(use_enable wav music-wave) \ + $(use_enable midi music-midi) \ + $(use_enable timidity music-timidity-midi) \ + $(use_enable mikmod music-mod) \ + $(use_enable vorbis music-ogg) \ + $(use_enable flac music-flac) \ + $(use_enable static-libs static) \ + $(use mad && echo --disable-music-mp3 || use_enable mp3 music-mp3) \ + $(use_enable mad music-mp3-mad-gpl) +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + if use playtools; then + emake DESTDIR="${D}" install-bin || die "make install-bin failed" + fi + dodoc CHANGES README + if ! use static-libs ; then + find "${D}" -type f -name '*.la' -exec rm {} + \ + || die "la removal failed" + fi +} -- 2.26.2