From nobody@FreeBSD.org  Sun Oct 15 02:47:24 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D46AC16A40F
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 15 Oct 2006 02:47:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7D96443D53
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 15 Oct 2006 02:47:24 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k9F2lOJj039592
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 15 Oct 2006 02:47:24 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k9F2lOM6039591;
	Sun, 15 Oct 2006 02:47:24 GMT
	(envelope-from nobody)
Message-Id: <200610150247.k9F2lOM6039591@www.freebsd.org>
Date: Sun, 15 Oct 2006 02:47:24 GMT
From: "S. Benabbas"<sbenabas@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ffmpeg-devel port's Makefile introduces errors if a makefile (in the sources) has CFLAGS assignments split over several lines
X-Send-Pr-Version: www-3.0

>Number:         104427
>Category:       ports
>Synopsis:       ffmpeg-devel port's Makefile introduces errors if a makefile (in the sources) has CFLAGS assignments split over several lines
>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:   Sun Oct 15 02:50:12 GMT 2006
>Closed-Date:    Mon Apr 02 15:19:56 GMT 2007
>Last-Modified:  Mon Apr 02 15:19:56 GMT 2007
>Originator:     S. Benabbas
>Release:        6.1-RELEASE
>Organization:
>Environment:
FreeBSD H. 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Fri May 12 18:35:08 IRDT 2006     s@H:/usr/obj/usr/src/sys/s  amd64
>Description:
The ffmpeg-devel port's Makefile has the following part for CFLAGS safeness:
# {C,LD}FLAGS safeness
        @${FIND} ${WRKDIR} -type f -name "Makefile" -print0 | \
                ${XARGS} -0 -n 5 -x \
                        ${REINPLACE_CMD} -E \
                        -e 's@^(CFLAGS.+)$$@\1 ${FFMPEG_CFLAGS}@' \
                        -e 's@^(FFLIBS|LDFLAGS)(.+)$$@\1\2 ${FFMPEG_LDFLAGS}@'

This corrupts all the makefiles in the source that have a CFLAGS/LDFLAGS assignment split over several lines. Newer CVS versions of ffmpeg have these kinds of assignments, so this is required for updating this port.
>How-To-Repeat:

>Fix:
The attached patch fixes the problem by first bringing all the parts of any multi-line assignemnt/command in the target makefiles into sed's pattern space.

Patch attached with submission follows:

--- Makefile.orig	Sat Oct 14 15:38:39 2006
+++ Makefile	Sat Oct 14 22:46:05 2006
@@ -474,6 +474,8 @@
 	@${FIND} ${WRKDIR} -type f -name "Makefile" -print0 | \
 		${XARGS} -0 -n 5 -x \
 			${REINPLACE_CMD} -E \
+			-e ':again' -e '/.*\\$$/N' -e 's/(.*)\\$$/\1\\/g' \
+			-e 't again' \
 			-e 's@^(CFLAGS.+)$$@\1 ${FFMPEG_CFLAGS}@' \
 			-e 's@^(FFLIBS|LDFLAGS)(.+)$$@\1\2 ${FFMPEG_LDFLAGS}@'
 # fix x264 math, use correct log base 2 from math(3)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->lioux 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Oct 15 04:29:42 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=104427 
Responsible-Changed-From-To: lioux->freebsd-multimedia 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Mar 31 07:20:30 UTC 2007 
Responsible-Changed-Why:  
Maintainership was transferred. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=104427 
State-Changed-From-To: open->closed  
State-Changed-By: ahze 
State-Changed-When: Mon Apr 2 15:18:43 UTC 2007 
State-Changed-Why:  
This was fixed in the latest version of ffmpeg-devel, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=104427 
>Unformatted:
