From avg@pautina.in.ua  Wed Aug 18 13:28:24 2010
Return-Path: <avg@pautina.in.ua>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C3D8F1065674;
	Wed, 18 Aug 2010 13:28:24 +0000 (UTC)
	(envelope-from avg@pautina.in.ua)
Received: from smtp.pautina-nau.net (smtp.pautina-nau.net [194.0.89.243])
	by mx1.freebsd.org (Postfix) with ESMTP id 6663D8FC20;
	Wed, 18 Aug 2010 13:28:23 +0000 (UTC)
Received: from [92.249.64.71] (helo=trant.local.)
	by smtp.pautina-nau.net with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69)
	(envelope-from <avg@pautina.in.ua>)
	id 1OliNw-0003GL-Aa; Wed, 18 Aug 2010 16:08:52 +0300
Received: from trant.local. (localhost [127.0.0.1])
	by trant.local. (8.14.4/8.14.4) with ESMTP id o7ID8obw045676;
	Wed, 18 Aug 2010 16:08:50 +0300 (EEST)
	(envelope-from avg@trant.local)
Received: (from root@localhost)
	by trant.local. (8.14.4/8.14.4/Submit) id o7ID8onF045675;
	Wed, 18 Aug 2010 16:08:50 +0300 (EEST)
	(envelope-from avg)
Message-Id: <201008181308.o7ID8onF045675@trant.local.>
Date: Wed, 18 Aug 2010 16:08:50 +0300 (EEST)
From: Andriy Gapon <avg@icyb.net.ua>
To: FreeBSD-gnats-submit@freebsd.org
Cc: multimedia@freebsd.org
Subject: [PATCH] audio/faac: improve build patches
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         149765
>Category:       ports
>Synopsis:       [PATCH] audio/faac: improve build patches
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 18 13:30:03 UTC 2010
>Closed-Date:    Fri Mar 18 09:45:07 UTC 2011
>Last-Modified:  Fri Mar 18 09:50:07 UTC 2011
>Originator:     Andriy Gapon
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>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@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@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 ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-multimedia 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Aug 18 13:30:19 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149765 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Fri Mar 18 09:45:05 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149765 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/149765: commit references a PR
Date: Fri, 18 Mar 2011 09:44:55 +0000 (UTC)

 miwi        2011-03-18 09:44:41 UTC
 
   FreeBSD ports repository
 
   Modified files:
     audio/faac           Makefile distinfo 
     audio/faac/files     patch-configure.in 
   Added files:
     audio/faac/files     patch-frontend_Makefile.am 
   Log:
   1. fix portlint complaint about incorrect whitespace in CONFIGURE_ARGS
       assignment
   2. instead of unconditionally setting LIBS in CONFIGURE_ENV use automake logc
      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++.
   
   PR:             149765
   Submitted by:   Andriy Gapon <avg@icyb.net.ua>
   
   Revision  Changes    Path
   1.43      +2 -3      ports/audio/faac/Makefile
   1.6       +0 -1      ports/audio/faac/distinfo
   1.3       +9 -3      ports/audio/faac/files/patch-configure.in
   1.1       +14 -0     ports/audio/faac/files/patch-frontend_Makefile.am (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
