workflow question: how do you maintain the port in sync with upstream?

Mathieu Arnold mat at FreeBSD.org
Mon Aug 20 10:31:39 UTC 2018


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 <mat at freebsd.org
> > <mailto:mat at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20180820/8ad1f17c/attachment.sig>


More information about the freebsd-ports mailing list