Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Feb 2007 11:39:27 -0500
From:      "Siavosh Benabbas" <sbenabas@gmail.com>
To:        freebsd-multimedia@freebsd.org
Subject:   ports/104427: ffmpeg-devel port's Makefile can corrupt makefile's
Message-ID:  <32d8477c0702180839x3654f8e6i580dbc06bdeadf1c@mail.gmail.com>

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

[-- Attachment #1 --]
Hello All,
I filed this http://www.freebsd.org/cgi/query-pr.cgi?pr=104427 PR some
time ago but it was never fixed/closed. I don't know if this is the
right list but I will post it anyway.
Basically the ffmpeg-devel port's Makefile has a ${REINPLACE_CMD} line

                         ${REINPLACE_CMD} -E \
                         -e 's@^(CFLAGS.+)$$@\1 ${FFMPEG_CFLAGS}@' \
                         -e 's@^(FFLIBS|LDFLAGS)(.+)$$@\1\2 ${FFMPEG_LDFLAGS}@'

This would corrupt the Makefile if a CFLAGS assignment is split over
multiple lines using \ at the end of the lines. These long assignments
are present in new ffmpeg sources but the port has not been updated to
the last version of ffmpeg for a long time. I have also posted a patch
which brings all such lines to the pattern space and fixes the
problem, it is attached.

Thanks,
Siavosh

[-- Attachment #2 --]
--- 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)


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