summaryrefslogtreecommitdiffstats
path: root/media-plugins/xmms-flac
diff options
context:
space:
mode:
Diffstat (limited to 'media-plugins/xmms-flac')
-rw-r--r--media-plugins/xmms-flac/Manifest6
-rw-r--r--media-plugins/xmms-flac/files/flac-1.2.1-asm.patch80
-rw-r--r--media-plugins/xmms-flac/files/flac-1.2.1-asneeded.patch22
-rw-r--r--media-plugins/xmms-flac/files/flac-1.2.1-cflags.patch12
-rw-r--r--media-plugins/xmms-flac/files/xmms-flac-ds-gcc4.patch11
-rw-r--r--media-plugins/xmms-flac/xmms-flac-1.2.1-r2.ebuild60
6 files changed, 191 insertions, 0 deletions
diff --git a/media-plugins/xmms-flac/Manifest b/media-plugins/xmms-flac/Manifest
new file mode 100644
index 0000000..1777a74
--- /dev/null
+++ b/media-plugins/xmms-flac/Manifest
@@ -0,0 +1,6 @@
+AUX flac-1.2.1-asm.patch 2844 RMD160 7e2f1dbdf1dbe7c019089f5359f794123cb388f9 SHA1 9cf5708bcc181b66632868e95e23a84b0a1644af SHA256 b9a6d2011b9902924372316f3544e94cb066fe202e256b9696bf6cd6ee8a490b
+AUX flac-1.2.1-asneeded.patch 840 RMD160 42570f0d4c8bb6ff2f188e81952ac774fa9cfd0d SHA1 a87abf76cbc9db5cf65d6282cdfcf3b5cfcd329c SHA256 cb112fcc85fa57fb68e9fb0d1f735225132fb25b3cd41bb08febfc2d2154bb63
+AUX flac-1.2.1-cflags.patch 435 RMD160 49cb14f8c107fada76252a67e6ef693dcc0f82b1 SHA1 5698376e901679398b6dac850d8015b1386f1983 SHA256 cc9397825c966839edcd4a30406ff3590a21c825d4e1cb043bd35145a608bc21
+AUX xmms-flac-ds-gcc4.patch 425 RMD160 699534306928d800c9be88c30731a076f1c26099 SHA1 95a6ebfad9e306712f9918e80594b2476a3b42ee SHA256 f23edbb110b9ce5481fe27723ee6244117b1236c113f257c0f2f6da79ca3f62d
+DIST flac-1.2.1.tar.gz 2009217 RMD160 bd3223c848054f0a75d11200b30f903bdd375bfc SHA1 bd54354900181b59db3089347cc84ad81e410b38 SHA256 9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf
+EBUILD xmms-flac-1.2.1-r2.ebuild 1699 RMD160 2930a015964555afd108e3eb66f7f2901970e630 SHA1 cc4a6bb348513a685562d39d9318a923be9e7855 SHA256 44a6ec8ed299d75a0837b4b8875fd3f29500d89ba28974fa81b62da0225b95ba
diff --git a/media-plugins/xmms-flac/files/flac-1.2.1-asm.patch b/media-plugins/xmms-flac/files/flac-1.2.1-asm.patch
new file mode 100644
index 0000000..cc832ee
--- /dev/null
+++ b/media-plugins/xmms-flac/files/flac-1.2.1-asm.patch
@@ -0,0 +1,80 @@
+diff -urp flac-1.2.1-old/src/libFLAC/ia32/bitreader_asm.nasm flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm
+--- flac-1.2.1-old/src/libFLAC/ia32/bitreader_asm.nasm 2007-03-30 02:54:53.000000000 +0200
++++ flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm 2007-09-27 21:39:45.000000000 +0200
+@@ -140,8 +140,13 @@ cident FLAC__bitreader_read_rice_signed_
+ %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
+ mov edi, _FLAC__crc16_table
+ %else
++%ifdef OBJ_FORMAT_elf
++ mov edi, [esp + 16] ; saved ebx (GOT base)
++ lea edi, [edi + FLAC__crc16_table wrt ..gotoff]
++%else
+ mov edi, FLAC__crc16_table
+ %endif
++%endif
+ ;; eax (ax) crc a.k.a. br->read_crc
+ ;; ebx (bl) intermediate result index into FLAC__crc16_table[]
+ ;; ecx br->crc16_align
+@@ -216,8 +221,13 @@ cident FLAC__bitreader_read_rice_signed_
+ %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
+ mov edi, _FLAC__crc16_table
+ %else
++%ifdef OBJ_FORMAT_elf
++ mov edi, [esp + 16] ; saved ebx (GOT base)
++ lea edi, [edi + FLAC__crc16_table wrt ..gotoff]
++%else
+ mov edi, FLAC__crc16_table
+ %endif
++%endif
+ ;; eax (ax) crc a.k.a. br->read_crc
+ ;; ebx (bl) intermediate result index into FLAC__crc16_table[]
+ ;; ecx br->crc16_align
+@@ -315,8 +325,13 @@ cident FLAC__bitreader_read_rice_signed_
+ %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
+ call _bitreader_read_from_client_
+ %else
++%ifdef OBJ_FORMAT_elf
++ mov ebx, [esp + 20] ; saved ebx (GOT base)
++ call bitreader_read_from_client_ wrt ..plt
++%else
+ call bitreader_read_from_client_
+ %endif
++%endif
+ pop edx ; /* discard, unused */
+ pop ecx ; /* restore */
+ mov esi, [ebp + 16] ; cwords = br->consumed_words;
+@@ -362,13 +377,20 @@ cident FLAC__bitreader_read_rice_signed_
+ mov [ebp + 16], esi ; br->consumed_words = cwords;
+ mov [ebp + 20], ecx ; br->consumed_bits = cbits;
+ push ecx ; /* save */
++ push ebx ; /* save */
+ push ebp ; /* push br argument */
+ %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
+ call _bitreader_read_from_client_
+ %else
++%ifdef OBJ_FORMAT_elf
++ mov ebx, [esp + 24] ; saved ebx (GOT base)
++ call bitreader_read_from_client_ wrt ..plt
++%else
+ call bitreader_read_from_client_
+ %endif
++%endif
+ pop edx ; /* discard, unused */
++ pop ebx ; /* restore */
+ pop ecx ; /* restore */
+ mov esi, [ebp + 16] ; cwords = br->consumed_words;
+ ; ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits;
+@@ -437,8 +459,13 @@ cident FLAC__bitreader_read_rice_signed_
+ %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
+ mov edi, _FLAC__crc16_table
+ %else
++%ifdef OBJ_FORMAT_elf
++ mov edi, [esp + 24] ; saved ebx (GOT base)
++ lea edi, [edi + FLAC__crc16_table wrt ..gotoff]
++%else
+ mov edi, FLAC__crc16_table
+ %endif
++%endif
+ ;; eax (ax) crc a.k.a. br->read_crc
+ ;; ebx (bl) intermediate result index into FLAC__crc16_table[]
+ ;; ecx br->crc16_align
diff --git a/media-plugins/xmms-flac/files/flac-1.2.1-asneeded.patch b/media-plugins/xmms-flac/files/flac-1.2.1-asneeded.patch
new file mode 100644
index 0000000..0d6ffb9
--- /dev/null
+++ b/media-plugins/xmms-flac/files/flac-1.2.1-asneeded.patch
@@ -0,0 +1,22 @@
+diff -ur flac-1.2.1.orig/src/flac/Makefile.am flac-1.2.1/src/flac/Makefile.am
+--- flac-1.2.1.orig/src/flac/Makefile.am 2007-09-11 20:56:51.000000000 +0300
++++ flac-1.2.1/src/flac/Makefile.am 2007-09-20 19:38:09.000000000 +0300
+@@ -53,6 +53,6 @@
+ $(top_builddir)/src/share/utf8/libutf8.la \
+ $(top_builddir)/src/libFLAC/libFLAC.la \
+ @OGG_LIBS@ \
+- @LIBICONV@ \
++ @LTLIBICONV@ \
+ @MINGW_WINSOCK_LIBS@ \
+ -lm
+diff -ur flac-1.2.1.orig/src/metaflac/Makefile.am flac-1.2.1/src/metaflac/Makefile.am
+--- flac-1.2.1.orig/src/metaflac/Makefile.am 2007-09-11 20:59:25.000000000 +0300
++++ flac-1.2.1/src/metaflac/Makefile.am 2007-09-20 19:38:25.000000000 +0300
+@@ -49,6 +49,6 @@
+ $(top_builddir)/src/share/utf8/libutf8.la \
+ $(top_builddir)/src/libFLAC/libFLAC.la \
+ @OGG_LIBS@ \
+- @LIBICONV@ \
++ @LTLIBICONV@ \
+ @MINGW_WINSOCK_LIBS@ \
+ -lm
diff --git a/media-plugins/xmms-flac/files/flac-1.2.1-cflags.patch b/media-plugins/xmms-flac/files/flac-1.2.1-cflags.patch
new file mode 100644
index 0000000..3910604
--- /dev/null
+++ b/media-plugins/xmms-flac/files/flac-1.2.1-cflags.patch
@@ -0,0 +1,12 @@
+diff -ur flac-1.2.1.orig/configure.in flac-1.2.1/configure.in
+--- flac-1.2.1.orig/configure.in 2007-09-13 18:48:42.000000000 +0300
++++ flac-1.2.1/configure.in 2007-09-20 19:26:05.000000000 +0300
+@@ -301,7 +301,7 @@
+ CPPFLAGS="-DNDEBUG $CPPFLAGS"
+ if test "x$GCC" = xyes; then
+ CPPFLAGS="-DFLaC__INLINE=__inline__ $CPPFLAGS"
+- CFLAGS="-O3 -funroll-loops -finline-functions -Wall -W -Winline $CFLAGS"
++ CFLAGS="$CFLAGS"
+ fi
+ fi
+
diff --git a/media-plugins/xmms-flac/files/xmms-flac-ds-gcc4.patch b/media-plugins/xmms-flac/files/xmms-flac-ds-gcc4.patch
new file mode 100644
index 0000000..0507c95
--- /dev/null
+++ b/media-plugins/xmms-flac/files/xmms-flac-ds-gcc4.patch
@@ -0,0 +1,11 @@
+diff -dPNur flac-1.2.1-orig/examples/cpp/encode/file/main.cpp flac-1.2.1/examples/cpp/encode/file/main.cpp
+--- flac-1.2.1-orig/examples/cpp/encode/file/main.cpp 2007-09-13 17:58:03.000000000 +0200
++++ flac-1.2.1/examples/cpp/encode/file/main.cpp 2011-02-08 17:30:56.000000000 +0100
+@@ -30,6 +30,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "FLAC++/metadata.h"
+ #include "FLAC++/encoder.h"
+
diff --git a/media-plugins/xmms-flac/xmms-flac-1.2.1-r2.ebuild b/media-plugins/xmms-flac/xmms-flac-1.2.1-r2.ebuild
new file mode 100644
index 0000000..90899cf
--- /dev/null
+++ b/media-plugins/xmms-flac/xmms-flac-1.2.1-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/flac/flac-1.2.1-r1.ebuild,v 1.10 2007/11/01 19:07:17 armin76 Exp $
+
+inherit autotools eutils
+
+DESCRIPTION="free lossless audio encoder and decoder plugin for xmms"
+HOMEPAGE="http://flac.sourceforge.net"
+SRC_URI="mirror://sourceforge/flac/flac-${PV}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd"
+IUSE="3dnow altivec debug doc ogg sse"
+
+RDEPEND="ogg? ( >=media-libs/libogg-1.1.3 )"
+DEPEND="${RDEPEND}
+ x86? ( dev-lang/nasm )
+ sys-apps/gawk
+ sys-devel/gettext
+ dev-util/pkgconfig
+ media-libs/flac
+ media-sound/xmms"
+
+S="${WORKDIR}/flac-${PV}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Stop using upstream CFLAGS. Fix building with
+ # ldflag asneeded on non glibc systems. Fix
+ # broken asm causing text relocations.
+ epatch "${FILESDIR}"/flac-${PV}-asneeded.patch || die
+ epatch "${FILESDIR}"/flac-${PV}-cflags.patch || die
+ epatch "${FILESDIR}"/flac-${PV}-asm.patch || die
+ epatch "${FILESDIR}"/xmms-flac-ds-gcc4.patch || die
+
+ #AT_M4DIR="m4" eautoreconf
+ ./autogen.sh
+}
+
+src_compile() {
+ econf $(use_enable ogg) \
+ $(use_enable sse) \
+ $(use_enable 3dnow) \
+ $(use_enable altivec) \
+ $(use_enable debug) \
+ --disable-doxygen-docs \
+ --disable-dependency-tracking \
+ --enable-xmms-plugin
+
+ emake || die "emake failed."
+}
+
+src_install() {
+ mkdir -p "${D}/usr/lib/xmms/Input"
+ install -c -m 755 src/plugin_xmms/.libs/libxmms-flac.so "${D}/usr/lib/xmms/Input" || die
+ install -c -m 755 src/plugin_xmms/.libs/libxmms-flac.la "${D}/usr/lib/xmms/Input" || die
+}