Date: Sat, 15 Jun 2002 22:52:01 -0700 From: Juli Mallett <jmallett@FreeBSD.org> To: Doug Barton <DougB@FreeBSD.org> Cc: Ade Lovett <ade@FreeBSD.org>, Akinori MUSHA <knu@iDaemons.org>, Trevor Johnson <trevor@jpj.net>, Mikhail Teterin <mi+mx@aldan.algebra.com>, Pete Fritchman <petef@absolutbsd.org>, portmgr@FreeBSD.org, Maxim Sobolev <sobomax@FreeBSD.org>, ports@FreeBSD.org Subject: Re: REINPLACE Message-ID: <20020615225200.A32114@FreeBSD.ORG> In-Reply-To: <3D0C2482.1D32A134@FreeBSD.org>; from DougB@FreeBSD.org on Sat, Jun 15, 2002 at 10:39:14PM -0700 References: <B9317479.11EB9%ade@FreeBSD.org> <3D0C2482.1D32A134@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Doug Barton <DougB@FreeBSD.org> escriurères > Ade Lovett wrote: > > > > On 06/15/02 22:32, "Doug Barton" <DougB@FreeBSD.org> wrote: > > > > > Ade Lovett wrote: > > >> > > >> On 06/14/02 18:15, "Doug Barton" <DougB@FreeBSD.org> wrote: > > >> > > >>> At tremendous risk to my sanity, I'm going to try and make a rather > > >>> obvious point one more time. You guys are putting a tremendous amount of > > >>> effort into this REINPLACE stuff in order to avoid the simple, clean > > >>> solution of not doing the patching 'in place' at all. I have the following > > >>> (or something similar) in several of my ports: > > >>> > > >>> post-patch: > > >>> @ ${CP} ${WRKSRC}/configure ${WRKSRC}/configure.Patched > > >>> @ ${SED} -e 's#-lpthread#${PTHREAD_LIBS}#g' \ > > >>> ${WRKSRC}/configure.Patched > ${WRKSRC}/configure > > > > > > Please tell me that you really are not so lacking in imagination. > > > > No. Just trying to maintain the status quo of perl -pi substituting > > regexp's in place on files, without leaving other turds around. > > I can't help thinking your use of the word "turd" in this context is an Read it as "droppings" then. > attempt to characterize my proposed solution as well, however let's > leave that aside for now. However, I think that part of the problem here > is that you're working so hard on finding a one-to-one solution (which > isn't actually possible in any case) that you're needlessly complicating > something that could be simple for the majority of cases; just to try to > make some edge cases look easy. > > > > I use this exact technique in for loops in my ports. Take a look at > > > xscreensaver for example. It used to have more files that needed the > > > malloc patch, but at this moment in time it only has one. The code above > > > works just as well in a for loop or not. > > > > Yes. I believed we did look at xscreensaver, once. Still doesn't work as > > is for xargs though. > > Can you explain in more detail what you mean by this? Do you mean lines > like: > > audio/easytag/Makefile: @${FIND} ${WRKSRC} -name "Makefile.in" | > ${XARGS} ${PERL} -pi -e \ > > If so, that can easily be re-written in a more explicit subshell. A > quick grep shows 331 ports that use similar semantics. Not easy, but not > impossible either. Which is why we should switch to building the rules in bsd.port.mk and just keeping lists of files/regexps to apply in each Makefile, so this stuff is all modular. MFINS!= ${FIND} ${WRKSRC} -name "Makefile.in" REGEX_REPLACE_FILES= ${MFINS} See my earlier post on the subject. Its target is wrong, but the idea is clear. -- Juli Mallett <jmallett@FreeBSD.org> | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger jmallett@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020615225200.A32114>