summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-emulation/emul-linux-x86-soundlibs/Manifest2
-rw-r--r--app-emulation/emul-linux-x86-soundlibs/emul-linux-x86-soundlibs-20130224.ebuild9
-rw-r--r--media-libs/flac/Manifest11
-rw-r--r--media-libs/flac/files/flac-1.2.1-asm.patch80
-rw-r--r--media-libs/flac/files/flac-1.2.1-asneeded.patch22
-rw-r--r--media-libs/flac/files/flac-1.2.1-cflags.patch12
-rw-r--r--media-libs/flac/files/flac-1.2.1-dontbuild-examples.patch34
-rw-r--r--media-libs/flac/files/flac-1.2.1-dontbuild-tests.patch78
-rw-r--r--media-libs/flac/files/flac-1.2.1-gcc-4.3-includes.patch11
-rw-r--r--media-libs/flac/files/flac-1.2.1-ogg-m4.patch67
-rw-r--r--media-libs/flac/flac-1.2.1-r5.ebuild79
-rw-r--r--media-libs/flac/metadata.xml5
12 files changed, 408 insertions, 2 deletions
diff --git a/app-emulation/emul-linux-x86-soundlibs/Manifest b/app-emulation/emul-linux-x86-soundlibs/Manifest
index 526b3e9..46ce7e1 100644
--- a/app-emulation/emul-linux-x86-soundlibs/Manifest
+++ b/app-emulation/emul-linux-x86-soundlibs/Manifest
@@ -1,3 +1,3 @@
DIST emul-linux-x86-soundlibs-20130224.tar.xz 7068240 SHA256 51ee669fb864b8522cd9ffa4aa8148c20eb07c06623a8c0bd718d444867da92a SHA512 67bca8c875e17bb8e1b3057182d08c679992ce525e124162e02e8a2c01bb5413d7ab19736a9f803d8a3835e7c5d68e556de9d3aee7240fb6708d2f3528ae56e0 WHIRLPOOL 48b9583dd91d5b1dbb4dedc1c9f5bf2937a325adad20bb45adf7de96e5d1db6a3e62a617ef85300c917faf57313a00790007d12db3a6dc9261ef627c71f14d9a
-EBUILD emul-linux-x86-soundlibs-20130224.ebuild 1643 SHA256 b753493310756db3f91a80c53431ef7ceecf8c895125af3627d2dc7ebaa11844 SHA512 b490ed60c5e9c7e75279fcbb1d95bcd62a4f2e303748b87240c43ea36e238e1ca48b88c314f5786dfc552e5da10b5951ae19f60ca7e1b6d5a3a790faa7ca6682 WHIRLPOOL 0e0f8b93c807d2654a3d13a5ac5dd329e7949c0fa41d4cc6bd00264a63b34b07f53fbbb058927df68e9d4300c51cea43b3792a0bd37209fe60c81e2188b9677f
+EBUILD emul-linux-x86-soundlibs-20130224.ebuild 1852 SHA256 964a7539ffe8d0720bef6f79b020fdffead26290d7e80ca9f28a089e17ff25de SHA512 b85d0f7d998cd93aa0f27e12a0119098af1d94162160977beb9dda0e2990777eff0250cad3900295f66ab3e2ff992ca0b0e2fcb8d263d86e6762fd9072eb628c WHIRLPOOL 25e448c50747232fc3d7af6098d1412b26c94382ffe51631c12d8ed12ec22d28150ca396ba273be07fd32430769f6af14377d31ec543828bd4e62a0ed6582d5d
MISC metadata.xml 225 SHA256 0ce288a649a1cbdf01d699a90300d341736ab0fd3456fd1002e2ffa8d409f453 SHA512 924fc3abc73e518a76ae8255dc51a98e2a96c5e0312b15a3b5f12e278b2b4345d0de8a7a2eb91dbad0b9e55e2c38ccc215fac8b07ff73ccd2fd9843e68531cf5 WHIRLPOOL 9ecaf784ea9cc1ae7e81cead25eb99cff6f61247a2f33ccf27782ddb17c2642f63a6892b9b664015d4f278469b2c8ef93b9f69b9a6d1f15cfcc55ce41451c503
diff --git a/app-emulation/emul-linux-x86-soundlibs/emul-linux-x86-soundlibs-20130224.ebuild b/app-emulation/emul-linux-x86-soundlibs/emul-linux-x86-soundlibs-20130224.ebuild
index fead6cb..03893cb 100644
--- a/app-emulation/emul-linux-x86-soundlibs/emul-linux-x86-soundlibs-20130224.ebuild
+++ b/app-emulation/emul-linux-x86-soundlibs/emul-linux-x86-soundlibs-20130224.ebuild
@@ -7,7 +7,7 @@ inherit emul-linux-x86
LICENSE="BSD FDL-1.2 GPL-2 LGPL-2.1 LGPL-2 MIT gsm public-domain"
KEYWORDS="-* amd64"
-IUSE="alsa filter-alsa-lib filter-audiofile filter-fftw filter-webrtc-audio-processing"
+IUSE="alsa filter-alsa-lib filter-audiofile filter-fftw filter-flac filter-webrtc-audio-processing"
RDEPEND="~app-emulation/emul-linux-x86-baselibs-${PV}
~app-emulation/emul-linux-x86-medialibs-${PV}
@@ -36,6 +36,13 @@ src_prepare() {
rm "${S}"/usr/lib32/pkgconfig/fftw3{,f,l}.pc || die "rm 1"
rm "${S}"/usr/lib32/libfftw3{,f,l}.so{,.3} || die "rm 2"
fi
+
+ # media-libs/flac-1.2.1-r5
+ if use filter-flac; then
+ rm usr/lib32/libFLAC++.so{,.6,.6.2.0} || die
+ rm usr/lib32/libFLAC.so{,.8,.8.2.0} || die
+ rm usr/lib32/pkgconfig/flac{,++}.pc || die
+ fi
# 'media-libs/webrtc-audio-processing-0.1-r1
if use filter-webrtc-audio-processing; then
diff --git a/media-libs/flac/Manifest b/media-libs/flac/Manifest
new file mode 100644
index 0000000..f36ec10
--- /dev/null
+++ b/media-libs/flac/Manifest
@@ -0,0 +1,11 @@
+AUX flac-1.2.1-asm.patch 2844 SHA256 b9a6d2011b9902924372316f3544e94cb066fe202e256b9696bf6cd6ee8a490b SHA512 0719b23921ec3617abd1baefda6d0806c21e0f31dda713cace9f2a5b9d208d692f8d82e5aea0a7b488f4283c0b7c49e7b1a087f0f04f1a0d67553655336f3f75 WHIRLPOOL 4c0150e0e75e7008da79cd41322e7f35a6c78690ec935ffd24399c0f1410667a29a6be267aaef10e2cf2a6fbcce77d40c61e3aac3e44b291b8219547fdf463a7
+AUX flac-1.2.1-asneeded.patch 840 SHA256 cb112fcc85fa57fb68e9fb0d1f735225132fb25b3cd41bb08febfc2d2154bb63 SHA512 586182aafc011e6d8af885491e3d9be7c70bf6b4c5a68dcbf87a7d23c8d142da6103b2a001810dac551c008edcacdfbb7d9be4e7bc95874d26156a7c980c4148 WHIRLPOOL 42b93fbe0c64381c1b2be811bd3d653fe1e1e0278590e5cf5958e0e432b02c08b2f94e04af4dc5ade8b851394b41a5f38add2c4978fecf0ca60206c64a7fd5e6
+AUX flac-1.2.1-cflags.patch 435 SHA256 cc9397825c966839edcd4a30406ff3590a21c825d4e1cb043bd35145a608bc21 SHA512 8f3ae0534e50f94b97d0ae800a845be0e091e38f19b68aa3907143ea1a47a2223bb2462b167485e993e849fb4c0f491b688c4135c98702e543a15a926e541aad WHIRLPOOL caac12c516412c8d8633758231c68f7d21887e4ee4f5521621e4c783af9c49daa193675b00ecb47a03363562ac5a8988d3f9e062e0563db9065f13638d04eb5d
+AUX flac-1.2.1-dontbuild-examples.patch 1014 SHA256 73e3ac8aa17bbe6d22f6c1b28993de35061e967a3a6c27d8e68261ba740d5e85 SHA512 65f53d4bf40f7e6ee0b08be6c54f1696c5ac301a2d83e8c3680ef93307376a1714dbb585d92b2139f8848951ef666d89527a266efa2cc8fb4a25bee54a4e7a6f WHIRLPOOL 3b5a7ec4a0ca803507724f70eb6e39f607b512b3d69cc06918bde0e6b09a6bba6adb0e048d2e28b712e3fd1a548c5751175abf1e0396518607f4415ab4a32ebf
+AUX flac-1.2.1-dontbuild-tests.patch 2721 SHA256 1fa075309ed3e42391d767a6401511b76baf0782702ff39eef06e38ea3bc3ed7 SHA512 5b131f011ea9e679ca4eda707dc0c652b9e3ff36a9825b5cf1b2edd70dfe8fe76329fd9dc732e220fdbad117fbfae4ba840bb464fb33b8645a3c813a4aa9e509 WHIRLPOOL f0cda1053794c8fd3d92783c4f89a3a4339f80d4bb0820c837e64dab214e6a752cd6cdc3d747695ddda6e814bad80b49a5071f359d73d43b860fff5b66b45a5d
+AUX flac-1.2.1-gcc-4.3-includes.patch 423 SHA256 b9826946fb8372cf7da1b68538bce9a6069c1be0e6e288cba5522ce977a1d8d4 SHA512 7e5fa05ab5284898352a9cbd7786a6e76e8ab6e02133657d5700710503cba69ac980153b507abf7b6dde7b0a3ee6f3b3b282825b3aca5c9c207794d31577aa74 WHIRLPOOL 0636c4ae2956ebdf34c84499f656591ce53a56802551c13e1fcba49fa992b61208068da5a105dbdb60df91ac9c47f6048eefbb9aff98d44366f761ddfd09e6f4
+AUX flac-1.2.1-ogg-m4.patch 2852 SHA256 7c8c2c4685894d429472cff0630a3873b7654fa0fcfe5f1048b23a71298fcd47 SHA512 4649ab95e9cef77e1fc5ecdcc1a3c3770d1a4617e602ff4a288c354e02b94ae04a4bcbc11f56323406f00c9b854dd57ab0041b9d381d7b24a657c4e0400f3754 WHIRLPOOL eeeea99e44b395a14b00f5758345469af4572aa7ae1318b097072e4b6023e5dae738f97696251402a07ae61a250f3d141c769f5d0b16ff6ef02254f5e16ffe85
+DIST flac-1.2.1-embedded-m4.tar.bz2 8545 SHA256 a32bd229ba454be595e66fa257805951c4484aff9f8ec2116727ca2b8a48fea9 SHA512 e0aee18748ad5d47dd637597a30824fab81b70def18184471a61c5a6315df0b3dfdaa0e12f22b69ac88d0c52ec848e15b488e345a5e2920369b85c0666051c0f WHIRLPOOL c72b485a023c45643e13e2c640157a62140cb25dd09e7f646050073ec90e6ec74dc1ba93031dcce9552b55f5bdf6faab88bffb326babec2f2867317194b86030
+DIST flac-1.2.1.tar.gz 2009217 SHA256 9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf SHA512 39b216239341fbfe210c3a2fc0d0531ecae26c425365c4b6d4fc1081e44e6dc7a9aba8d4c79cc8025386d0a7bb0d25c413c9b64cf7da9ab04ca34a56d2699787 WHIRLPOOL e38815e1c365f26a990752779bc1fb84a76d9d422cac9d66f1e55b5fcacad675006939a1d4ab72f20c36d8a80be4218a109317cc6e90f12abc9e1570dbe27319
+EBUILD flac-1.2.1-r5.ebuild 2097 SHA256 71b0fb2efbecc1c529e3326fec307ebdb81272648abaa4a1f1e461e2e439be66 SHA512 83a138a94242c7d54c482f6ba7d2639792b1c9648d69f7f4722875d63ec90f3eb3bc407a19b1aa5e9938b6be618ad8ab305855fa7fc136c41f8b5335357d89e1 WHIRLPOOL 116ab1a0d50c70f141936bda77b72313c94a42b3d51347912811eeda1c4ee43bd1d7f4224d07ae7c65432bd12950428a42bfb6a3405ad46ae568420f8db9b024
+MISC metadata.xml 158 SHA256 dfb5b47e6836db39fb187301dfcff1c2605e91d13d21db160806a563d8c75f9b SHA512 90f74979d228a35f81de50665ead63d228bc4f0d11f3def4832c9607f4242cbc4562db0a123bdcf2c4b6e0be78fc5565a65f75cdb53ed4c8d45544ebf74255dc WHIRLPOOL a90483bd4fa01ed5fa21bfe9f59c11b97c793146e3031eae342a3355c6dc2e4ef2b356af0bf711b5e16e16551c91d63ecdbb48e708df606017264e8bff5e9fe9
diff --git a/media-libs/flac/files/flac-1.2.1-asm.patch b/media-libs/flac/files/flac-1.2.1-asm.patch
new file mode 100644
index 0000000..cc832ee
--- /dev/null
+++ b/media-libs/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-libs/flac/files/flac-1.2.1-asneeded.patch b/media-libs/flac/files/flac-1.2.1-asneeded.patch
new file mode 100644
index 0000000..0d6ffb9
--- /dev/null
+++ b/media-libs/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-libs/flac/files/flac-1.2.1-cflags.patch b/media-libs/flac/files/flac-1.2.1-cflags.patch
new file mode 100644
index 0000000..3910604
--- /dev/null
+++ b/media-libs/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-libs/flac/files/flac-1.2.1-dontbuild-examples.patch b/media-libs/flac/files/flac-1.2.1-dontbuild-examples.patch
new file mode 100644
index 0000000..2c1d55a
--- /dev/null
+++ b/media-libs/flac/files/flac-1.2.1-dontbuild-examples.patch
@@ -0,0 +1,34 @@
+Index: flac-1.2.1/configure.in
+===================================================================
+--- flac-1.2.1.orig/configure.in
++++ flac-1.2.1/configure.in
+@@ -255,6 +255,12 @@ AC_DEFINE(FLAC__HAS_OGG)
+ AH_TEMPLATE(FLAC__HAS_OGG, [define if you have the ogg library])
+ fi
+
++dnl Build examples?
++AC_ARG_ENABLE(examples,
++ AS_HELP_STRING([--disable-examples], [Don't build examples during make]),,
++ enable_examples="yes")
++AM_CONDITIONAL(EXAMPLES, [test "$enable_examples" = "yes"])
++
+ dnl check for i18n(internationalization); these are from libiconv/gettext
+ AM_ICONV
+ AM_LANGINFO_CODESET
+Index: flac-1.2.1/Makefile.am
+===================================================================
+--- flac-1.2.1.orig/Makefile.am
++++ flac-1.2.1/Makefile.am
+@@ -30,7 +30,11 @@
+
+ AUTOMAKE_OPTIONS = foreign 1.7
+
+-SUBDIRS = doc include m4 man src examples test build obj
++SUBDIRS = doc include m4 man src test build obj
++
++if EXAMPLES
++SUBDIRS += examples
++endif
+
+ DISTCLEANFILES = libtool-disable-static
+
diff --git a/media-libs/flac/files/flac-1.2.1-dontbuild-tests.patch b/media-libs/flac/files/flac-1.2.1-dontbuild-tests.patch
new file mode 100644
index 0000000..4be64a1
--- /dev/null
+++ b/media-libs/flac/files/flac-1.2.1-dontbuild-tests.patch
@@ -0,0 +1,78 @@
+Index: flac-1.2.1/src/test_grabbag/cuesheet/Makefile.am
+===================================================================
+--- flac-1.2.1.orig/src/test_grabbag/cuesheet/Makefile.am
++++ flac-1.2.1/src/test_grabbag/cuesheet/Makefile.am
+@@ -20,7 +20,7 @@ EXTRA_DIST = \
+ test_cuesheet.dsp \
+ test_cuesheet.vcproj
+
+-noinst_PROGRAMS = test_cuesheet
++check_PROGRAMS = test_cuesheet
+ test_cuesheet_SOURCES = \
+ main.c
+ test_cuesheet_LDADD = \
+Index: flac-1.2.1/src/test_grabbag/picture/Makefile.am
+===================================================================
+--- flac-1.2.1.orig/src/test_grabbag/picture/Makefile.am
++++ flac-1.2.1/src/test_grabbag/picture/Makefile.am
+@@ -20,7 +20,7 @@ EXTRA_DIST = \
+ test_picture.dsp \
+ test_picture.vcproj
+
+-noinst_PROGRAMS = test_picture
++check_PROGRAMS = test_picture
+ test_picture_SOURCES = \
+ main.c
+ test_picture_LDADD = \
+Index: flac-1.2.1/src/test_libFLAC/Makefile.am
+===================================================================
+--- flac-1.2.1.orig/src/test_libFLAC/Makefile.am
++++ flac-1.2.1/src/test_libFLAC/Makefile.am
+@@ -22,7 +22,7 @@ EXTRA_DIST = \
+
+ INCLUDES = -I$(top_srcdir)/src/libFLAC/include
+
+-noinst_PROGRAMS = test_libFLAC
++check_PROGRAMS = test_libFLAC
+ test_libFLAC_LDADD = \
+ $(top_builddir)/src/share/grabbag/libgrabbag.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
+Index: flac-1.2.1/src/test_libFLAC++/Makefile.am
+===================================================================
+--- flac-1.2.1.orig/src/test_libFLAC++/Makefile.am
++++ flac-1.2.1/src/test_libFLAC++/Makefile.am
+@@ -20,7 +20,7 @@ EXTRA_DIST = \
+ test_libFLAC++.dsp \
+ test_libFLAC++.vcproj
+
+-noinst_PROGRAMS = test_libFLAC++
++check_PROGRAMS = test_libFLAC++
+ test_libFLAC___LDADD = \
+ $(top_builddir)/src/share/grabbag/libgrabbag.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
+Index: flac-1.2.1/src/test_seeking/Makefile.am
+===================================================================
+--- flac-1.2.1.orig/src/test_seeking/Makefile.am
++++ flac-1.2.1/src/test_seeking/Makefile.am
+@@ -24,7 +24,7 @@ AM_CFLAGS = @OGG_CFLAGS@
+
+ INCLUDES =
+
+-noinst_PROGRAMS = test_seeking
++check_PROGRAMS = test_seeking
+ test_seeking_LDADD = \
+ $(top_builddir)/src/libFLAC/libFLAC.la \
+ @OGG_LIBS@ \
+Index: flac-1.2.1/src/test_streams/Makefile.am
+===================================================================
+--- flac-1.2.1.orig/src/test_streams/Makefile.am
++++ flac-1.2.1/src/test_streams/Makefile.am
+@@ -20,7 +20,7 @@ EXTRA_DIST = \
+ test_streams.dsp \
+ test_streams.vcproj
+
+-noinst_PROGRAMS = test_streams
++check_PROGRAMS = test_streams
+ test_streams_SOURCES = \
+ main.c
+ test_streams_LDADD = -lm
diff --git a/media-libs/flac/files/flac-1.2.1-gcc-4.3-includes.patch b/media-libs/flac/files/flac-1.2.1-gcc-4.3-includes.patch
new file mode 100644
index 0000000..52fec8b
--- /dev/null
+++ b/media-libs/flac/files/flac-1.2.1-gcc-4.3-includes.patch
@@ -0,0 +1,11 @@
+diff -Naur 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 09:58:03.000000000 -0600
++++ flac-1.2.1/examples/cpp/encode/file/main.cpp 2007-11-18 12:59:45.000000000 -0600
+@@ -30,6 +30,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <cstring>
+ #include "FLAC++/metadata.h"
+ #include "FLAC++/encoder.h"
+
diff --git a/media-libs/flac/files/flac-1.2.1-ogg-m4.patch b/media-libs/flac/files/flac-1.2.1-ogg-m4.patch
new file mode 100644
index 0000000..ed551d5
--- /dev/null
+++ b/media-libs/flac/files/flac-1.2.1-ogg-m4.patch
@@ -0,0 +1,67 @@
+diff -urNp flac-1.2.1-old/m4/ogg.m4 flac-1.2.1/m4/ogg.m4
+--- flac-1.2.1-old/m4/ogg.m4 2011-03-28 09:54:44.355000011 +0530
++++ flac-1.2.1/m4/ogg.m4 2011-03-28 09:54:55.721000010 +0530
+@@ -9,23 +9,29 @@ AC_DEFUN([XIPH_PATH_OGG],
+ [dnl
+ dnl Get the cflags and libraries
+ dnl
+-AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
+-AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
+-AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
+-AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
++AC_ARG_WITH(ogg,AC_HELP_STRING([--with-ogg=PFX],[Prefix where libogg is installed (optional)]), ogg_prefix="$withval", ogg_prefix="")
++AC_ARG_WITH(ogg-libraries,AC_HELP_STRING([--with-ogg-libraries=DIR],[Directory where libogg library is installed (optional)]), ogg_libraries="$withval", ogg_libraries="")
++AC_ARG_WITH(ogg-includes,AC_HELP_STRING([--with-ogg-includes=DIR],[Directory where libogg header files are installed (optional)]), ogg_includes="$withval", ogg_includes="")
++AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--disable-oggtest],[Do not try to compile and run a test Ogg program]),, enable_oggtest=yes)
+
+ if test "x$ogg_libraries" != "x" ; then
+ OGG_LIBS="-L$ogg_libraries"
++ elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
++ OGG_LIBS=""
+ elif test "x$ogg_prefix" != "x" ; then
+ OGG_LIBS="-L$ogg_prefix/lib"
+ elif test "x$prefix" != "xNONE" ; then
+ OGG_LIBS="-L$prefix/lib"
+ fi
+
+- OGG_LIBS="$OGG_LIBS -logg"
++ if test "x$ogg_prefix" != "xno" ; then
++ OGG_LIBS="$OGG_LIBS -logg"
++ fi
+
+ if test "x$ogg_includes" != "x" ; then
+ OGG_CFLAGS="-I$ogg_includes"
++ elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
++ OGG_CFLAGS=""
+ elif test "x$ogg_prefix" != "x" ; then
+ OGG_CFLAGS="-I$ogg_prefix/include"
+ elif test "x$prefix" != "xNONE"; then
+@@ -33,7 +39,12 @@ AC_ARG_ENABLE(oggtest, [ --disable-oggt
+ fi
+
+ AC_MSG_CHECKING(for Ogg)
+- no_ogg=""
++ if test "x$ogg_prefix" = "xno" ; then
++ no_ogg="disabled"
++ enable_oggtest="no"
++ else
++ no_ogg=""
++ fi
+
+
+ if test "x$enable_oggtest" = "xyes" ; then
+@@ -62,9 +73,12 @@ int main ()
+ LIBS="$ac_save_LIBS"
+ fi
+
+- if test "x$no_ogg" = "x" ; then
++ if test "x$no_ogg" = "xdisabled" ; then
++ AC_MSG_RESULT(no)
++ ifelse([$2], , :, [$2])
++ elif test "x$no_ogg" = "x" ; then
+ AC_MSG_RESULT(yes)
+- ifelse([$1], , :, [$1])
++ ifelse([$1], , :, [$1])
+ else
+ AC_MSG_RESULT(no)
+ if test -f conf.oggtest ; then
diff --git a/media-libs/flac/flac-1.2.1-r5.ebuild b/media-libs/flac/flac-1.2.1-r5.ebuild
new file mode 100644
index 0000000..f64b8fa
--- /dev/null
+++ b/media-libs/flac/flac-1.2.1-r5.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2013 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-r5.ebuild,v 1.3 2013/05/07 11:58:12 mgorny Exp $
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="free lossless audio encoder and decoder"
+HOMEPAGE="http://flac.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://gentoo/${P}-embedded-m4.tar.bz2"
+
+LICENSE="BSD FDL-1.2 GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="3dnow altivec +cxx debug ogg sse static-libs"
+
+RDEPEND="ogg? ( >=media-libs/libogg-1.1.3[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( || (
+ app-emulation/emul-linux-x86-soundlibs[filter-${PN}]
+ !<=app-emulation/emul-linux-x86-soundlibs-20130224 ) )"
+DEPEND="${RDEPEND}
+ abi_x86_32? ( dev-lang/nasm )
+ !elibc_uclibc? ( sys-devel/gettext )
+ virtual/pkgconfig"
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${P}-asneeded.patch
+ "${FILESDIR}"/${P}-cflags.patch
+ "${FILESDIR}"/${P}-asm.patch
+ "${FILESDIR}"/${P}-dontbuild-tests.patch
+ "${FILESDIR}"/${P}-dontbuild-examples.patch
+ "${FILESDIR}"/${P}-gcc-4.3-includes.patch
+ "${FILESDIR}"/${P}-ogg-m4.patch
+ )
+
+ cp "${WORKDIR}"/*.m4 m4 || die
+
+ # bug 466990
+ sed -i "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" configure.in || die
+
+ # fix html install with out-of-source build
+ sed -i -e 's:cd api:cd $(srcdir)/api:' doc/html/Makefile.am || die
+
+ AT_M4DIR="m4" \
+ autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(use_enable sse)
+ $(use_enable 3dnow)
+ $(use_enable altivec)
+ --disable-doxygen-docs
+ --disable-xmms-plugin
+ $(use_enable cxx cpplibs)
+ $(use_enable ogg)
+ --disable-examples
+ )
+ autotools-multilib_src_configure
+}
+
+src_test() {
+ if [[ ${UID} != 0 ]]; then
+ autotools-multilib_src_test
+ else
+ ewarn "Tests will fail if ran as root, skipping."
+ fi
+}
+
+src_install() {
+ autotools-multilib_src_install \
+ docdir=/usr/share/doc/${PF}/html
+}
diff --git a/media-libs/flac/metadata.xml b/media-libs/flac/metadata.xml
new file mode 100644
index 0000000..e1774e3
--- /dev/null
+++ b/media-libs/flac/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sound</herd>
+</pkgmetadata>