From 839ec5298188fb38db36c8a00d30ba7ab3f1d152 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Mon, 31 Jul 2017 22:03:03 +0200 Subject: [PATCH] faad2: add recipe for version 2.8.1. --- media-libs/faad2/faad2-2.8.1.recipe | 69 +++++++++++++++++++ media-libs/faad2/patches/faad2-2.8.1.patchset | 60 ++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 media-libs/faad2/faad2-2.8.1.recipe create mode 100644 media-libs/faad2/patches/faad2-2.8.1.patchset diff --git a/media-libs/faad2/faad2-2.8.1.recipe b/media-libs/faad2/faad2-2.8.1.recipe new file mode 100644 index 000000000..46310fe6a --- /dev/null +++ b/media-libs/faad2/faad2-2.8.1.recipe @@ -0,0 +1,69 @@ +SUMMARY="An open source MPEG-4 and MPEG-2 AAC decoder" +DESCRIPTION="This is an open source MPEG-4 and MPEG-4 ACC decoder programmed in C \ +and used in FAAC (freeware Advanced Audio Coder). It is used with the FAAC \ +encoder and can be compile on various platforms. It supports MPEG-4 audio \ +object types including LC, Main, LTP, LD, ER, SBR and PS. It contains a \ +library (libfaad) that may be used by other programs." +HOMEPAGE="http://www.audiocoding.com/" +COPYRIGHT="2003-2005 M. Bakker, Nero AG." +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="http://downloads.sourceforge.net/faac/faad2-$portVersion.tar.gz" +CHECKSUM_SHA256="133270a9be0c9ab8fea18017703ab4a94f9eddbb45a8aa6a511a1469fa413591" +PATCHES="faad2-$portVersion.patchset" + +ARCHITECTURES="?x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86" + +PROVIDES=" + faad2$secondaryArchSuffix = $portVersion compat >= 2 + lib:libfaad$secondaryArchSuffix = 2.0.0 compat >= 2 + lib:libfaad_drm$secondaryArchSuffix = 2.0.0 compat >= 2 + cmd:faad$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku${secondaryArchSuffix} + " + +PROVIDES_devel=" + faad2${secondaryArchSuffix}_devel = $portVersion compat >= 2 + devel:libfaad$secondaryArchSuffix = 2.0.0 compat >= 2 + devel:libfaad_drm$secondaryArchSuffix = 2.0.0 compat >= 2 + " +REQUIRES_devel=" + faad2$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:libtool + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + " + +BUILD() +{ + ./bootstrap + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install + + rm $libDir/libfaad*.la + + prepareInstalledDevelLibs libfaad libfaad_drm + + # devel package + packageEntries devel \ + $developDir + +} diff --git a/media-libs/faad2/patches/faad2-2.8.1.patchset b/media-libs/faad2/patches/faad2-2.8.1.patchset new file mode 100644 index 000000000..2fe370882 --- /dev/null +++ b/media-libs/faad2/patches/faad2-2.8.1.patchset @@ -0,0 +1,60 @@ +From c786109ac9fa3ff9d820074721b15e14b0443af6 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 31 Jul 2017 21:36:50 +0200 +Subject: [PATCH] patch from 2.7 + +--- + configure.ac | 3 ++- + frontend/getopt.c | 2 +- + libfaad/Makefile.am | 2 +- + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 4470f22..acf046d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,6 +25,7 @@ AC_PROG_INSTALL + AC_PROG_LN_S + AC_PROG_MAKE_SET + AC_CHECK_PROGS(RPMBUILD, rpmbuild, rpm) ++AC_CHECK_LIBM + + AC_CONFIG_HEADERS([config.h]) + +@@ -92,7 +93,7 @@ AC_DEFUN([AC_C99_FUNC_LRINTF], + ac_cv_c99_lrintf, + [ + lrintf_save_CFLAGS=$CFLAGS +-CFLAGS="-O -lm" ++CFLAGS="-O $LIBM" + AC_TRY_LINK([ + #define _ISOC9X_SOURCE 1 + #define _ISOC99_SOURCE 1 +diff --git a/frontend/getopt.c b/frontend/getopt.c +index 185d49b..40c7a22 100644 +--- a/frontend/getopt.c ++++ b/frontend/getopt.c +@@ -172,7 +172,7 @@ static enum + #if __STDC__ || defined(PROTO) + extern char *getenv(const char *name); + extern int strcmp (const char *s1, const char *s2); +-extern int strncmp(const char *s1, const char *s2, unsigned int n); ++extern int strncmp(const char *s1, const char *s2, size_t n); + + static int my_strlen(const char *s); + static char *my_index (const char *str, int chr); +diff --git a/libfaad/Makefile.am b/libfaad/Makefile.am +index a042c47..8c46c14 100644 +--- a/libfaad/Makefile.am ++++ b/libfaad/Makefile.am +@@ -1,6 +1,6 @@ + lib_LTLIBRARIES = libfaad.la libfaad_drm.la + +-AM_CPPFLAGS = -iquote $(top_srcdir)/include ++AM_CPPFLAGS = -I $(top_srcdir)/include + include_HEADERS = $(top_srcdir)/include/faad.h \ + $(top_srcdir)/include/neaacdec.h + +-- +2.13.1 +