On Sun, Aug 19, 2018 at 02:02:42AM -0300, Helen Koike wrote: > > > On 08/14/2018 01:09 PM, blubee blubeeme wrote: > > > > > > On Tue, Aug 14, 2018 at 11:33 PM Mathieu Arnold <m...@freebsd.org > > <mailto:m...@freebsd.org>> wrote: > > > > On Tue, Aug 14, 2018 at 10:41:43PM +0800, blubee blubeeme wrote: > > > This one is fairly straight forward, you can simply replace that > > string > > > with a regex command; > > > This is an example of running a replace command for strings after > > the patch > > > phase of the build; > > > > > > post-patch: > > > @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' > > ${WRKSRC}/README > > > > Patching files in post-patch using sed SHOULD only be used to replace > > dynamic content, never static content. > > I am not sure I understand what dynamic content means here in the > post-patch (as nothing was built, so no new file should be created). Is > the replacement used by mail/lbdb wrong? > > from mail/lbdb/Makefile > post-patch: > ${REINPLACE_CMD} -e 's/sed/gsed/' ${WRKSRC}/m_muttalias.sh.in > > is it ok if I do the same? > It is not clear to me when I can use REINPLACE_CMD in the Makefile and > when I should do a patch.
Patching using sed in post-patch is for cases when you need to replace a variable "thing". For example, changing /usr/local into ${PREFIX} or ${LOCALBASE}. Here, for the sed -> gsed change, you should use a patch file. -- Mathieu Arnold
signature.asc
Description: PGP signature