diff options
Diffstat (limited to 'media-libs/flac')
-rw-r--r-- | media-libs/flac/Manifest | 1 | ||||
-rw-r--r-- | media-libs/flac/files/flac-1.3.0-asneeded.patch | 21 | ||||
-rw-r--r-- | media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch | 30 | ||||
-rw-r--r-- | media-libs/flac/files/flac-1.3.0-dontbuild-tests.patch | 66 | ||||
-rw-r--r-- | media-libs/flac/files/flac-1.3.1-cflags.patch | 23 | ||||
-rw-r--r-- | media-libs/flac/flac-1.3.1-r1.ebuild | 72 | ||||
-rw-r--r-- | media-libs/flac/metadata.xml | 5 |
7 files changed, 218 insertions, 0 deletions
diff --git a/media-libs/flac/Manifest b/media-libs/flac/Manifest new file mode 100644 index 000000000000..50c1c0a19d87 --- /dev/null +++ b/media-libs/flac/Manifest @@ -0,0 +1 @@ +DIST flac-1.3.1.tar.xz 941848 SHA256 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c SHA512 923cd0ffe2155636febf2b4633791bc83370d57080461b97ebb69ea21a4b1be7c0ff376c7fc8ca3979af4714e761112114a24b49ff6c80228b58b929db6e96d5 WHIRLPOOL abda096c0c1392499a613cc99c917cd519a20936bb98390a466c971ee981385a0e249e80f0bdac27b1eb6566a3392c1a4cb6ff9a6695952f16127a0b290fa5d4 diff --git a/media-libs/flac/files/flac-1.3.0-asneeded.patch b/media-libs/flac/files/flac-1.3.0-asneeded.patch new file mode 100644 index 000000000000..a38b3202500a --- /dev/null +++ b/media-libs/flac/files/flac-1.3.0-asneeded.patch @@ -0,0 +1,21 @@ +--- flac-1.3.0/src/flac/Makefile.am ++++ flac-1.3.0/src/flac/Makefile.am +@@ -51,7 +51,7 @@ + $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ + $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \ + $(top_builddir)/src/libFLAC/libFLAC.la \ +- @LIBICONV@ \ ++ @LTLIBICONV@ \ + -lm + + CLEANFILES = flac.exe +--- flac-1.3.0/src/metaflac/Makefile.am ++++ flac-1.3.0/src/metaflac/Makefile.am +@@ -48,6 +48,6 @@ + $(top_builddir)/src/share/getopt/libgetopt.la \ + $(top_builddir)/src/share/utf8/libutf8.la \ + $(top_builddir)/src/libFLAC/libFLAC.la \ +- @LIBICONV@ ++ @LTLIBICONV@ + + CLEANFILES = metaflac.exe diff --git a/media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch b/media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch new file mode 100644 index 000000000000..5c25dd588f2b --- /dev/null +++ b/media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch @@ -0,0 +1,30 @@ +--- flac-1.3.0/configure.ac ++++ flac-1.3.0/configure.ac +@@ -319,6 +319,12 @@ + fi + AC_SUBST(OGG_PACKAGE) + ++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 +--- flac-1.3.0/Makefile.am ++++ flac-1.3.0/Makefile.am +@@ -31,7 +31,11 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = doc include m4 man src examples test build objs ++SUBDIRS = doc include m4 man src test build objs ++ ++if EXAMPLES ++SUBDIRS += examples ++endif + + EXTRA_DIST = \ + COPYING.FDL \ diff --git a/media-libs/flac/files/flac-1.3.0-dontbuild-tests.patch b/media-libs/flac/files/flac-1.3.0-dontbuild-tests.patch new file mode 100644 index 000000000000..0915a5976609 --- /dev/null +++ b/media-libs/flac/files/flac-1.3.0-dontbuild-tests.patch @@ -0,0 +1,66 @@ +--- flac-1.3.0/src/test_grabbag/cuesheet/Makefile.am ++++ flac-1.3.0/src/test_grabbag/cuesheet/Makefile.am +@@ -21,7 +21,7 @@ + test_cuesheet.vcproj + + AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include +-noinst_PROGRAMS = test_cuesheet ++check_PROGRAMS = test_cuesheet + test_cuesheet_SOURCES = \ + main.c + test_cuesheet_LDADD = \ +--- flac-1.3.0/src/test_grabbag/picture/Makefile.am ++++ flac-1.3.0/src/test_grabbag/picture/Makefile.am +@@ -21,7 +21,7 @@ + test_picture.vcproj + + AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include +-noinst_PROGRAMS = test_picture ++check_PROGRAMS = test_picture + test_picture_SOURCES = \ + main.c + +--- flac-1.3.0/src/test_libFLAC/Makefile.am ++++ flac-1.3.0/src/test_libFLAC/Makefile.am +@@ -22,7 +22,7 @@ + + AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src/libFLAC/include + +-noinst_PROGRAMS = test_libFLAC ++check_PROGRAMS = test_libFLAC + + if OS_IS_WINDOWS + win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la +--- flac-1.3.0/src/test_libFLAC++/Makefile.am ++++ flac-1.3.0/src/test_libFLAC++/Makefile.am +@@ -21,7 +21,7 @@ + test_libFLAC++.vcproj + + AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/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 \ +--- flac-1.3.0/src/test_seeking/Makefile.am ++++ flac-1.3.0/src/test_seeking/Makefile.am +@@ -24,7 +24,7 @@ + + AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include + +-noinst_PROGRAMS = test_seeking ++check_PROGRAMS = test_seeking + test_seeking_LDADD = \ + $(top_builddir)/src/libFLAC/libFLAC.la + +--- flac-1.3.0/src/test_streams/Makefile.am ++++ flac-1.3.0/src/test_streams/Makefile.am +@@ -21,7 +21,7 @@ + test_streams.vcproj + + AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include +-noinst_PROGRAMS = test_streams ++check_PROGRAMS = test_streams + test_streams_SOURCES = \ + main.c + diff --git a/media-libs/flac/files/flac-1.3.1-cflags.patch b/media-libs/flac/files/flac-1.3.1-cflags.patch new file mode 100644 index 000000000000..758e7b31c13a --- /dev/null +++ b/media-libs/flac/files/flac-1.3.1-cflags.patch @@ -0,0 +1,23 @@ +--- flac-1.3.1/configure.ac ++++ flac-1.3.1/configure.ac +@@ -348,12 +348,8 @@ + + if test "x$debug" = xtrue; then + CPPFLAGS="-DDEBUG $CPPFLAGS" +- CFLAGS=$(echo "$CFLAGS" | sed 's/-g//') +- CFLAGS="-g $CFLAGS" + else + CPPFLAGS="-DNDEBUG $CPPFLAGS" +- CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//') +- CFLAGS="-O3 -funroll-loops $CFLAGS" + fi + + XIPH_GCC_VERSION +@@ -363,7 +359,6 @@ + CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations + + XIPH_ADD_CFLAGS([-Wdeclaration-after-statement]) +- XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) + + AC_LANG_PUSH([C++]) + XIPH_ADD_CXXFLAGS([-Weffc++]) diff --git a/media-libs/flac/flac-1.3.1-r1.ebuild b/media-libs/flac/flac-1.3.1-r1.ebuild new file mode 100644 index 000000000000..79112a386a24 --- /dev/null +++ b/media-libs/flac/flac-1.3.1-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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="http://downloads.xiph.org/releases/${PN}/${P}.tar.xz" + +LICENSE="BSD FDL-1.2 GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="altivec +cxx debug ogg cpu_flags_x86_sse static-libs" + +RDEPEND="ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-soundlibs-20130224-r1 + !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] + )" +DEPEND="${RDEPEND} + app-arch/xz-utils + abi_x86_32? ( dev-lang/nasm ) + !elibc_uclibc? ( sys-devel/gettext ) + virtual/pkgconfig" + +src_prepare() { + local PATCHES=( + "${FILESDIR}"/${P}-cflags.patch + "${FILESDIR}"/${PN}-1.3.0-asneeded.patch + "${FILESDIR}"/${PN}-1.3.0-dontbuild-tests.patch + "${FILESDIR}"/${PN}-1.3.0-dontbuild-examples.patch + ) + + AT_M4DIR="m4" autotools-multilib_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable debug) + $(use_enable cpu_flags_x86_sse sse) + $(use_enable altivec) + --disable-doxygen-docs + --disable-xmms-plugin + $(use_enable cxx cpplibs) + $(use_enable ogg) + --disable-examples + $([[ ${CHOST} == *-darwin* ]] && echo "--disable-asm-optimizations") + + # cross-compile fix (bug #521446) + # no effect if ogg support is disabled + --with-ogg + ) + autotools-multilib_src_configure +} + +src_test() { + if [[ ${UID} != 0 ]]; then + autotools-multilib_src_test -j1 + else + ewarn "Tests will fail if ran as root, skipping." + fi +} + +src_install() { + autotools-multilib_src_install \ + docdir="${EPREFIX}"/usr/share/doc/${PF}/html +} diff --git a/media-libs/flac/metadata.xml b/media-libs/flac/metadata.xml new file mode 100644 index 000000000000..e1774e3d9ad7 --- /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> |