Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Sep 2005 21:09:06 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        Naram Qashat <cyberbotx@cyberbotx.com>
Cc:        ports@FreeBSD.org
Subject:   Re: About patching ports
Message-ID:  <433355B2.1040205@mac.com>
In-Reply-To: <011401c5bfda$1e6505c0$fe02a8c0@metroid>
References:  <011401c5bfda$1e6505c0$fe02a8c0@metroid>

next in thread | previous in thread | raw e-mail | index | archive | help
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:

USE_REINPLACE=  yes

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

See 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/slow-patch.html 
for more details...

-- 
-Chuck






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