Subject: Re: pkg/17776
To: Julien T. Letessier <>
From: grant beattie <>
List: tech-pkg
Date: 07/08/2003 22:03:22
On Tue, Jul 08, 2003 at 10:32:54AM +0200, Julien T. Letessier wrote:

> Never mind. And, I didn't encounter any problems with 'grep' since I use
> XPG4's *grep -- I guess this PR can be closed (except if someone else has
> encounterd some similar problem).
> Other packages do have problems with, for instance, 'sed' or 'awk'.

.. yes, and we need to make sure the working tools are used :)

> There are several solutions to this:
> - the very ugly one: patch the scripts, replacing eg. 'sed' by '${SED}',
> generating a huge amount of (unmaintainable) patch noise.
> - the ugly one: prepend /usr/xpg4/bin to the PATH. It's ugly because the stuff
> installed in /usr/pkg shouldn't be overriden by system stuff, and because it
> hides functionnality and would make things hard to debug.

agreed on both of these points.

> - the less ugly one (solarpack's choice): at pre-configure time, link the
> proper tool (/usr/xpg4/bin/awk or /usr/pkg/bin/gawk, for instance) in
> ${BUILDLINK_DIR}/bin. This makes things more general (ie. can be applied to
> various tools) and only requires patching the Makefiles; it could even be
> centralized in some way

we have textproc/gsed/ specifically for this purpose,
that's why I was asking what the issue with grep was.

I have enhancements for gsed/ to link ${SED} into
${BUILDLINK_DIR}/bin, or conditionally pull in gsed if xpg4 sed is not
good enough.

this is essentially what you've done :-)

> What's your opinion about this?
> If you think it's pretty enough, I've got a whole bunch of stuff to commit :)

previous feedback about enhancing gsed/ was positive, so
I'll commit that, similar for awk, and we can go from there.

thanks for the note.