About patching ports

Chuck Swiger cswiger at mac.com
Thu Sep 22 18:09:07 PDT 2005

Naram Qashat wrote:
> Just a quick question really.  What's the best way to go about handling
> patching of files that need PREFIX substituted into the file after the patch
> has been applied?  Like for example, you replace a path in a source file
> with %%PREFIX%% and you want that replaced after the patch is done.  I don't
> think using SUB_FILES would work in this case.  Any help would be
> appreciated.

Something like:


         ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \
         s|%%CC%%|${CC}|g ; \
         s|%%CFLAGS%%|${CFLAGS}|g' ${WRKSRC}/Makefile

for more details...


More information about the freebsd-ports mailing list