media-libs/gst-plugins-ugly: ppc stable wrt bug #587010
[gentoo.git] / media-libs / a52dec / a52dec-0.7.4-r7.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit autotools eutils flag-o-matic multilib-minimal
7
8 DESCRIPTION="library for decoding ATSC A/52 streams used in DVD"
9 HOMEPAGE="http://liba52.sourceforge.net/"
10 SRC_URI="http://liba52.sourceforge.net/files/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 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 ~x86-solaris"
15 IUSE="djbfft oss static-libs"
16
17 RDEPEND="djbfft? ( >=sci-libs/djbfft-0.76-r2[${MULTILIB_USEDEP}] )
18         abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r8
19                 !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
20 DEPEND="${RDEPEND}"
21 DOCS=( AUTHORS ChangeLog HISTORY NEWS README TODO doc/liba52.txt )
22
23 src_prepare() {
24         epatch \
25                 "${FILESDIR}"/${P}-build.patch \
26                 "${FILESDIR}"/${P}-freebsd.patch \
27                 "${FILESDIR}"/${P}-tests-optional.patch \
28                 "${FILESDIR}"/${P}-test-hidden-symbols.patch
29
30         sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #466978
31
32         eautoreconf
33
34         filter-flags -fprefetch-loop-arrays
35 }
36
37 multilib_src_configure() {
38         local myconf
39         use oss || myconf="${myconf} --disable-oss"
40
41         ECONF_SOURCE="${S}" econf \
42                 --enable-shared \
43                 $(use_enable static-libs static) \
44                 $(use_enable djbfft) \
45                 ${myconf}
46
47         # remove useless subdirs
48         if ! multilib_is_native_abi ; then
49                 sed -i \
50                         -e 's/ src//' \
51                         -e 's/ libao//' \
52                         Makefile || die
53         fi
54 }
55
56 multilib_src_compile() {
57         emake CFLAGS="${CFLAGS}"
58 }
59
60 multilib_src_install_all() {
61         prune_libtool_files --all
62         einstalldocs
63 }