Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Oct 2006 02:47:24 GMT
From:      "S. Benabbas"<sbenabas@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/104427: ffmpeg-devel port's Makefile introduces errors if a makefile (in the sources) has CFLAGS assignments split over several lines
Message-ID:  <200610150247.k9F2lOM6039591@www.freebsd.org>
Resent-Message-ID: <200610150250.k9F2oCfQ040035@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 15 02:50:12 GMT 2006
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610150247.k9F2lOM6039591>