summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-libs/libaacplus/files/libaacplus-2.0.2-clang-inline-redefinition.patch37
-rw-r--r--media-libs/libaacplus/libaacplus-2.0.2-r3.ebuild62
2 files changed, 99 insertions, 0 deletions
diff --git a/media-libs/libaacplus/files/libaacplus-2.0.2-clang-inline-redefinition.patch b/media-libs/libaacplus/files/libaacplus-2.0.2-clang-inline-redefinition.patch
new file mode 100644
index 000000000000..64940a439db0
--- /dev/null
+++ b/media-libs/libaacplus/files/libaacplus-2.0.2-clang-inline-redefinition.patch
@@ -0,0 +1,37 @@
+Fix implicit gnu89 inline semantics causing issues with clang:
+* main.o:main.c:function main: error: undefined reference to 'AuChannelOpen'
+* https://bugs.gentoo.org/show_bug.cgi?id=458932
+
+--- libaacplus-2.0.2/frontend/au_channel.h
++++ libaacplus-2.0.2/frontend/au_channel.h
+@@ -12,7 +12,7 @@
+ int aFmt;
+ } WavInfo;
+
+-inline FILE* AuChannelOpen (const char* filename, WavInfo* info)
++static inline FILE* AuChannelOpen (const char* filename, WavInfo* info)
+ {
+ unsigned char header[12];
+ unsigned char data[WAV_HEADER_SIZE];
+@@ -48,18 +48,18 @@
+ return handle;
+ }
+
+-inline void AuChannelClose (FILE *audioChannel)
++static inline void AuChannelClose (FILE *audioChannel)
+ {
+ fclose(audioChannel);
+ }
+
+-inline size_t AuChannelReadShort(FILE *audioChannel, short *samples, int nSamples, int *readed)
++static inline size_t AuChannelReadShort(FILE *audioChannel, short *samples, int nSamples, int *readed)
+ {
+ *readed = fread(samples, 2, nSamples, audioChannel);
+ return *readed <= 0;
+ }
+
+-inline size_t AuChannelReadFloat(FILE *audioChannel, float *samples, int nSamples, int *readed)
++static inline size_t AuChannelReadFloat(FILE *audioChannel, float *samples, int nSamples, int *readed)
+ {
+ *readed = fread(samples, 4, nSamples, audioChannel);
+ return *readed <= 0;
diff --git a/media-libs/libaacplus/libaacplus-2.0.2-r3.ebuild b/media-libs/libaacplus/libaacplus-2.0.2-r3.ebuild
new file mode 100644
index 000000000000..2e9dc37126b1
--- /dev/null
+++ b/media-libs/libaacplus/libaacplus-2.0.2-r3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools eutils multilib-minimal
+
+# This file cannot be mirrored.
+# See the notes at http://tipok.org.ua/node/17
+# The .tar.gz, ie the wrapper library, is lgpl though.
+TGPPDIST=26410-800.zip
+
+DESCRIPTION="HE-AAC+ v2 library, based on the reference implementation"
+HOMEPAGE="http://tipok.org.ua/node/17"
+SRC_URI="
+ https://dev.gentoo.org/~aballier/${P}.tar.gz
+ http://tipok.ath.cx/downloads/media/aac+/libaacplus/${P}.tar.gz
+ http://217.20.164.161/~tipok/aacplus/${P}.tar.gz
+ http://www.3gpp.org/ftp/Specs/archive/26_series/26.410/${TGPPDIST}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="fftw static-libs"
+RESTRICT="bindist mirror"
+
+RDEPEND="
+ !media-sound/aacplusenc
+ fftw? ( >=sci-libs/fftw-3.3.3-r2:3.0[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-clang-inline-redefinition.patch"
+)
+
+src_prepare() {
+ default
+ sed \
+ -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' \
+ -i configure.ac || die
+ eautoreconf
+ cp "${DISTDIR}/${TGPPDIST}" src/ || die
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_with fftw fftw3) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_compile() {
+ emake -j1
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}