From owner-freebsd-ports@freebsd.org Mon Aug 20 10:31:39 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B4B3108BB93 for ; Mon, 20 Aug 2018 10:31:39 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2FCC85DC9; Mon, 20 Aug 2018 10:31:38 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from ogg.in.absolight.net (ogg.in.absolight.net [IPv6:2a01:678:ab:50::42:42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: mat/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 0B59F210CF; Mon, 20 Aug 2018 10:31:37 +0000 (UTC) (envelope-from mat@FreeBSD.org) Date: Mon, 20 Aug 2018 12:31:35 +0200 From: Mathieu Arnold To: Helen Koike Cc: blubee blubeeme , Mathieu Arnold , FreeBSD Ports Subject: Re: workflow question: how do you maintain the port in sync with upstream? Message-ID: <20180820103135.i7nf7jwi76ggtjmk@ogg.in.absolight.net> References: <05457c2b-b85c-a929-20e7-38ff1b2899d6@collabora.com> <87211ccd-bb2f-cd03-ecde-fd123d0c9ca5@collabora.com> <20180814153338.bujxg3a5uswj3y5n@ogg.in.absolight.net> <78db7cab-6658-5380-0c19-2e7245bd851f@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eo5bjywascnwk2tb" Content-Disposition: inline In-Reply-To: <78db7cab-6658-5380-0c19-2e7245bd851f@collabora.com> User-Agent: NeoMutt/20180622 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2018 10:31:39 -0000 --eo5bjywascnwk2tb Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 19, 2018 at 02:02:42AM -0300, Helen Koike wrote: >=20 >=20 > On 08/14/2018 01:09 PM, blubee blubeeme wrote: > >=20 > >=20 > > On Tue, Aug 14, 2018 at 11:33 PM Mathieu Arnold > > wrote: > >=20 > > 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: > > >=A0 =A0 =A0 =A0@${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' > > ${WRKSRC}/README > >=20 > > Patching files in post-patch using sed SHOULD only be used to repla= ce > > dynamic content, never static content. >=20 > 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? >=20 > from mail/lbdb/Makefile > post-patch: > ${REINPLACE_CMD} -e 's/sed/gsed/' ${WRKSRC}/m_muttalias.sh.in >=20 > 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. --=20 Mathieu Arnold --eo5bjywascnwk2tb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEOraXidLtEhBkQLpbOkUW81GDzkgFAlt6mIZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNB QjY5Nzg5RDJFRDEyMTA2NDQwQkE1QjNBNDUxNkYzNTE4M0NFNDgACgkQOkUW81GD zkjY/g/8D4tm9yOMoWJ20FNvA+2+5TqmUJ0h+ky8/+ggnDzDd3CP7fRnHqL8PfFa LoXa3qGVXZmfNavJ0KqsrqsxFy24RFQdSex0r30PKGyktAqHlx3hfvCEmYmd4C9E W697z12sPriVya6OKNNqXEf2gSk5mpKIFo+XtAUIVNP/uQ8inRfae5aAzHZkUr2z LpikQ3dA1JdTninBeIXSKSyouFnKMttuEajf8DpLoIBv8o5njpmmOAuSXVOpPtae LvPG+ap9VgO1bYlT0LJWD3B0BDuI6uI1PzMfvwXVyrPzkqF0IzmNVnqBVPWBcQlv fnk6ReMhUJ6LoalHbgbhrLBkbyD/iwg25AdDMF2HReMPr7whmNRH0RhLtExKepVv nnFEu91ekSc0E29BKrClSD/ow+IKS0YoAbpthrWmc2x2Z2lI0XGCacrCrVFVXCPY 8MIHKYIcZpXlwXuAAQ8x3fgMJLIqcbzibWoRRCZEz9vpY4qMqJ4HtG0YL0FvKUON e9NAubkp3VAWEadxFFu7UI162tG0gqaPKDVIOUAc60EKY7bQnjGjfW+Gfg/I1H0q mzMapRZrodwpQJgCwSGBwKmGhozJHyeO5SVwlFYs5p0ySPc3bT3j97QVLSdbJm73 YX/5HAfBBDqWwasmBdtta/9K5D3Si/esDUB+lXv0DqbzP/Au9sA= =RWAs -----END PGP SIGNATURE----- --eo5bjywascnwk2tb--