Date: Mon, 4 Jan 2021 23:36:30 +0800 From: Po-Chuan Hsieh <sunpoet@freebsd.org> To: Steve Wills <swills@freebsd.org> Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r560241 - head/devel/readline Message-ID: <CAMHz58SirFY8zaCWUnJigoj0AnHh6WLvZeGC%2B1kwuSrV_3=UCw@mail.gmail.com> In-Reply-To: <5d52f437-618a-0da2-c8eb-a403a7e401fc@FreeBSD.org> References: <202101032029.103KTsw0028112@repo.freebsd.org> <5d52f437-618a-0da2-c8eb-a403a7e401fc@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Steve, On Mon, Jan 4, 2021 at 11:22 PM Steve Wills <swills@freebsd.org> wrote: > Hi, > > I think the attached patch would be better for two reasons. > > First, because sed (REINPLACE_CMD) will fail silently if the referenced > line is not found, applying a patch and then replacing it helps us know > if the code gets refactored in a way that makes our REINPLACE_CMD > ineffective (such as the line getting moved to a different file, for > example). I'm OK with this. > > > And second, because PREFIX should be used, since this is changing where > files that are a part of this package are located. (LOCALBASE is where > we find files installed by other packages.) > I also considered PREFIX while preparing the patch. On second thought, I think LOCALBASE is the right answer since inputrc is not part of the readline package. > > Cheers, > Steve > Regards, sunpoet > > On 1/3/21 3:29 PM, Sunpoet Po-Chuan Hsieh wrote: > > Author: sunpoet > > Date: Sun Jan 3 20:29:54 2021 > > New Revision: 560241 > > URL: https://svnweb.freebsd.org/changeset/ports/560241 > > > > Log: > > Read inputrc from LOCALBASE/etc/inputrc rather than /etc/inputrc > > > > - Bump PORTREVISION for package change > > > > PR: 247933 > > Reported by: Michael Osipov <michael.osipov@siemens.com> > > > > Modified: > > head/devel/readline/Makefile > > > > Modified: head/devel/readline/Makefile > > > ============================================================================== > > --- head/devel/readline/Makefile Sun Jan 3 20:29:49 2021 > (r560240) > > +++ head/devel/readline/Makefile Sun Jan 3 20:29:54 2021 > (r560241) > > @@ -3,6 +3,7 @@ > > > > PORTNAME= readline > > PORTVERSION= 8.0.${PATCHLEVEL} > > +PORTREVISION= 1 > > CATEGORIES= devel > > MASTER_SITES= GNU > > DISTNAME= ${PORTNAME}-${PORTVERSION:R} > > @@ -37,6 +38,7 @@ PATCHFILES+= > ${PORTNAME}${PORTVERSION:R:S|.||}-${patch > > .endfor > > > > post-patch: > > + @${REINPLACE_CMD} -e '/SYS_INPUTRC/ s|/etc/inputrc|${LOCALBASE}&|' > ${WRKSRC}/rlconf.h > > .if exists(/usr/lib/libtermcapw.so) > > @${REINPLACE_CMD} 's|-ltermcap|-ltermcapw|g' ${WRKSRC}/configure > > .endif > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMHz58SirFY8zaCWUnJigoj0AnHh6WLvZeGC%2B1kwuSrV_3=UCw>