summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libmodplug')
-rw-r--r--media-libs/libmodplug/ChangeLog8
-rw-r--r--media-libs/libmodplug/files/digest-libmodplug-0.8.4-r23
-rw-r--r--media-libs/libmodplug/files/libmodplug-0.8.4-endian.patch63
-rw-r--r--media-libs/libmodplug/libmodplug-0.8.4-r2.ebuild47
4 files changed, 120 insertions, 1 deletions
diff --git a/media-libs/libmodplug/ChangeLog b/media-libs/libmodplug/ChangeLog
index e58ce3886c22..a041c9935bc1 100644
--- a/media-libs/libmodplug/ChangeLog
+++ b/media-libs/libmodplug/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-libs/libmodplug
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libmodplug/ChangeLog,v 1.28 2006/12/23 00:56:34 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libmodplug/ChangeLog,v 1.29 2006/12/24 21:49:18 hansmi Exp $
+
+*libmodplug-0.8.4-r2 (24 Dec 2006)
+
+ 24 Dec 2006; Michael Hanselmann <hansmi@gentoo.org>
+ +files/libmodplug-0.8.4-endian.patch, +libmodplug-0.8.4-r2.ebuild:
+ Fix endianness bug in load_psm.cpp, ported from audacious.
*libmodplug-0.8.4-r1 (23 Dec 2006)
diff --git a/media-libs/libmodplug/files/digest-libmodplug-0.8.4-r2 b/media-libs/libmodplug/files/digest-libmodplug-0.8.4-r2
new file mode 100644
index 000000000000..590a3cc7437e
--- /dev/null
+++ b/media-libs/libmodplug/files/digest-libmodplug-0.8.4-r2
@@ -0,0 +1,3 @@
+MD5 091bd1168a524a4f36fc61f95209e7e4 libmodplug-0.8.4.tar.gz 510758
+RMD160 0c4c179ebc32bf88cecb162c391e91a5d36ad834 libmodplug-0.8.4.tar.gz 510758
+SHA256 84890249b3ecf12ef040b9121b6238248fc8da0fee948661d70375049e5131ee libmodplug-0.8.4.tar.gz 510758
diff --git a/media-libs/libmodplug/files/libmodplug-0.8.4-endian.patch b/media-libs/libmodplug/files/libmodplug-0.8.4-endian.patch
new file mode 100644
index 000000000000..5b748d9b3c3e
--- /dev/null
+++ b/media-libs/libmodplug/files/libmodplug-0.8.4-endian.patch
@@ -0,0 +1,63 @@
+--- src/load_psm.cpp 2006/10/29 08:04:52 272
++++ src/load_psm.cpp 2006/12/23 22:46:28 870
+@@ -85,6 +85,10 @@
+ BYTE samplemap[MAX_SAMPLES];
+ UINT nPatterns;
+
++ pfh->id = bswapLE32(pfh->id);
++ pfh->len = bswapLE32(pfh->len);
++ pfh->listid = bswapLE32(pfh->listid);
++
+ // Chunk0: "PSM ",filesize,"FILE"
+ if (dwMemLength < 256) return FALSE;
+ if (pfh->id == PSM_ID_OLD)
+@@ -109,6 +113,11 @@
+ while (dwMemPos+8 < dwMemLength)
+ {
+ PSMCHUNK *pchunk = (PSMCHUNK *)(lpStream+dwMemPos);
++
++ pchunk->id = bswapLE32(pchunk->id);
++ pchunk->len = bswapLE32(pchunk->len);
++ pchunk->listid = bswapLE32(pchunk->listid);
++
+ if ((pchunk->len >= dwMemLength - 8) || (dwMemPos + pchunk->len + 8 > dwMemLength)) break;
+ dwMemPos += 8;
+ PUCHAR pdata = (PUCHAR)(lpStream+dwMemPos);
+@@ -142,6 +151,13 @@
+ m_nSamples++;
+ MODINSTRUMENT *pins = &Ins[m_nSamples];
+ PSMSAMPLE *psmp = (PSMSAMPLE *)pdata;
++
++ psmp->smpid = bswapLE32(psmp->smpid);
++ psmp->length = bswapLE32(psmp->length);
++ psmp->loopstart = bswapLE32(psmp->loopstart);
++ psmp->loopend = bswapLE32(psmp->loopend);
++ psmp->samplerate = bswapLE32(psmp->samplerate);
++
+ smpnames[m_nSamples] = psmp->smpid;
+ memcpy(m_szNames[m_nSamples], psmp->samplename, 31);
+ m_szNames[m_nSamples][31] = 0;
+@@ -193,6 +209,11 @@
+ while (dwMemPos + 8 < dwSongEnd)
+ {
+ PSMCHUNK *pchunk = (PSMCHUNK *)(lpStream+dwMemPos);
++
++ pchunk->id = bswapLE32(pchunk->id);
++ pchunk->len = bswapLE32(pchunk->len);
++ pchunk->listid = bswapLE32(pchunk->listid);
++
+ dwMemPos += 8;
+ if ((pchunk->len > dwSongEnd) || (dwMemPos + pchunk->len > dwSongEnd)) break;
+ PUCHAR pdata = (PUCHAR)(lpStream+dwMemPos);
+@@ -251,6 +272,11 @@
+ for (UINT nPat=0; nPat<nPatterns; nPat++)
+ {
+ PSMPATTERN *pPsmPat = (PSMPATTERN *)(lpStream+patptrs[nPat]+8);
++
++ pPsmPat->size = bswapLE32(pPsmPat->size);
++ pPsmPat->name = bswapLE32(pPsmPat->name);
++ pPsmPat->rows = bswapLE16(pPsmPat->rows);
++
+ ULONG len = *(DWORD *)(lpStream+patptrs[nPat]+4) - 12;
+ UINT nRows = pPsmPat->rows;
+ if (len > pPsmPat->size) len = pPsmPat->size;
diff --git a/media-libs/libmodplug/libmodplug-0.8.4-r2.ebuild b/media-libs/libmodplug/libmodplug-0.8.4-r2.ebuild
new file mode 100644
index 000000000000..4909e591eef1
--- /dev/null
+++ b/media-libs/libmodplug/libmodplug-0.8.4-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libmodplug/libmodplug-0.8.4-r2.ebuild,v 1.1 2006/12/24 21:49:18 hansmi Exp $
+
+WANT_AUTOCONF="latest"
+WANT_AUTOMAKE="latest"
+
+inherit eutils autotools
+
+DESCRIPTION="Library for playing MOD-like music files"
+SRC_URI="mirror://sourceforge/modplug-xmms/${P}.tar.gz"
+HOMEPAGE="http://modplug-xmms.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+#-sparc: 1.0 - Bus Error on play
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh -sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND=""
+DEPEND="dev-util/pkgconfig"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-0.7-amd64.patch"
+ epatch "${FILESDIR}/${PN}-0.8.4-timidity-patches.patch"
+ epatch "${FILESDIR}/${PN}-0.8.4-ppc64-64ul.patch"
+ epatch "${FILESDIR}/${PN}-0.8.4-endian.patch"
+
+ sed -i -e 's:-ffast-math::' "${S}/configure.in"
+
+ eautoreconf
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog README TODO
+}
+
+pkg_postinst() {
+ elog "Since version 0.8.4 onward, libmodplug supports MIDI playback."
+ elog "unfortunately to work correctly, this needs timidity patches,"
+ elog "but the code does not support the needed 'source' directive to"
+ elog "work with the patches currently in portage. For this reason it"
+ elog "will not work as intended yet."
+}