[PATCH] audio/faac: improve build patches
Andriy Gapon
avg at icyb.net.ua
Wed Aug 18 13:28:24 UTC 2010
>Submitter-Id: current-users
>Originator: Andriy Gapon
>Organization:
>Confidential: no
>Synopsis: [PATCH] audio/faac: improve build patches
>Severity: non-critical
>Priority: low
>Category: ports
>Class: change-request
>Release: FreeBSD 9.0-CURRENT amd64
>Environment:
System: FreeBSD 9.0-CURRENT amd64
>Description:
1. fix portlint complaint about incorrect whitespace in CONFIGURE_ARGS assignment
2. instead of unconditionally setting LIBS in CONFIGURE_ENV use automake logic
to correctly set library dependencies for the case when external libmp4v2 is used
Fix #2 also fixes build with non-base gcc: configure stage would pass LIBS to all
invocations of gcc and linking would fail because libmp4v2 is a C++ library, but
non-base gcc (as opposed to g++) doesn't know where to look for the correct
libstdc++.
Added file(s):
- files/patch-frontend_Makefile.am
I think that this patch could be proposed to the upstream developers for inclusion.
Port maintainer (multimedia at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- faac-1.28_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/audio/faac.orig/Makefile /usr/ports/audio/faac/Makefile
--- /usr/ports/audio/faac.orig/Makefile 2010-08-11 23:58:02.000000000 +0300
+++ /usr/ports/audio/faac/Makefile 2010-08-18 15:49:00.287291159 +0300
@@ -25,10 +25,9 @@
USE_AUTOTOOLS= aclocal:110 autoheader:262 automake:110 autoconf:262 libtool:22
ACLOCAL_ARGS= -I . -I ${LOCALBASE}/share/aclocal
AUTOMAKE_ARGS= --add-missing
-CONFIGURE_ARGS= --with-mp4v2
+CONFIGURE_ARGS= --with-mp4v2
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib" \
- LIBS="-lmp4v2"
+ LDFLAGS="-L${LOCALBASE}/lib"
USE_LDCONFIG= yes
MAN1= faac.1
diff -ruN --exclude=CVS /usr/ports/audio/faac.orig/files/patch-configure.in /usr/ports/audio/faac/files/patch-configure.in
--- /usr/ports/audio/faac.orig/files/patch-configure.in 2010-08-11 23:58:02.000000000 +0300
+++ /usr/ports/audio/faac/files/patch-configure.in 2010-08-18 15:47:38.872749237 +0300
@@ -1,5 +1,5 @@
---- ./configure.in.orig 2010-07-11 22:10:12.000000000 +0100
-+++ ./configure.in 2010-07-11 22:10:49.000000000 +0100
+--- configure.in.orig 2010-08-18 15:41:30.584845747 +0300
++++ configure.in 2010-08-18 15:42:51.184443581 +0300
@@ -1,7 +1,7 @@
AC_PREREQ(2.50)
AC_INIT(FAAC, 1.28, faac-dev at lists.sourceforge.net)
@@ -9,7 +9,12 @@
AM_CONFIG_HEADER(config.h)
-@@ -32,10 +32,11 @@
+@@ -28,14 +28,17 @@ AC_CHECK_DECL(strcasecmp, MY_DEFINE(HAVE
+ AC_CHECK_LIB(gnugetopt, getopt_long)
+
+ AM_CONDITIONAL(WITH_MP4V2, false)
++AM_CONDITIONAL(WITH_EXT_MP4V2, false)
+
AC_CHECK_DECLS([MP4Create, MP4MetadataDelete],
AC_CHECK_LIB(mp4v2, MP4MetadataDelete, external_mp4v2=yes,
external_mp4v2=no, -lstdc++),
@@ -18,6 +23,7 @@
if test x$external_mp4v2 = xyes; then
AC_MSG_NOTICE([*** Building with external mp4v2 ***])
++ AM_CONDITIONAL(WITH_EXT_MP4V2, true)
+ MY_DEFINE(HAVE_LIBMP4V2)
else
if test x$WITHMP4V2 = xyes; then
diff -ruN --exclude=CVS /usr/ports/audio/faac.orig/files/patch-frontend_Makefile.am /usr/ports/audio/faac/files/patch-frontend_Makefile.am
--- /usr/ports/audio/faac.orig/files/patch-frontend_Makefile.am 1970-01-01 03:00:00.000000000 +0300
+++ /usr/ports/audio/faac/files/patch-frontend_Makefile.am 2010-08-18 15:47:38.827751834 +0300
@@ -0,0 +1,14 @@
+--- frontend/Makefile.am.orig 2010-08-18 15:43:04.246728673 +0300
++++ frontend/Makefile.am 2010-08-18 15:45:44.922966543 +0300
+@@ -7,6 +7,11 @@ if WITH_MP4V2
+ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4v2
+ LDADD = $(top_builddir)/libfaac/libfaac.la $(top_srcdir)/common/mp4v2/libmp4v2.a -lm -lstdc++
+ else
++if WITH_EXT_MP4V2
++INCLUDES = -I$(top_srcdir)/include
++LDADD = $(top_builddir)/libfaac/libfaac.la -lmp4v2 -lm -lstdc++
++else
+ INCLUDES = -I$(top_srcdir)/include
+ LDADD = $(top_builddir)/libfaac/libfaac.la -lm
+ endif
++endif
--- faac-1.28_1.patch ends here ---
More information about the freebsd-multimedia
mailing list