ports/104427: ffmpeg-devel port's Makefile introduces errors if a makefile (in the sources) has CFLAGS assignments split over several lines

S. Benabbas sbenabas at gmail.com
Sun Oct 15 02:50:13 UTC 2006


>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 at 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:



More information about the freebsd-ports-bugs mailing list