[macports-ports] branch master updated: grep: add new variant to install as ggrep

Christopher Jones jonesc at hep.phy.cam.ac.uk
Sat Jun 30 15:22:36 UTC 2018

> On 30 Jun 2018, at 2:13 pm, Rainer Müller <raimue at macports.org> wrote:
> On 2018-06-30 08:39, George Plymale II wrote:
>> Ryan Schmidt <ryandesign at macports.org> writes:
>>> Do all of the ports that declare the dependency "bin:grep:grep" already know that they should alternately look for a binary called "ggrep"? I don't know, and figuring that out and making any necessary adjustments to the programs and/or their build systems would be part of the task. Possible adjustments that could me made would include modifying e.g. configure scripts to check for ggrep in addition to grep, or modifying the PATH seen by configure scripts to add /opt/local/libexec/gnubin so that the "grep" binary there is found, or changing the dependency to "port:grep" and modifying the port to always look for a binary "ggrep" instead of "grep".
>> Thanks for your suggestions, Ryan. I have now covered the ports which
>> use grep as a build dependency by following your suggestion of putting
>> /opt/local/libexec/gnubin in front of the PATH. This seemed to be the
>> path of least resistance and of the least potential problems. The code I
>> added to each such Portfile is this:
>> # To find GNU grep instead of system grep
>> configure.env-append PATH=${prefix}/libexec/gnubin:$env(PATH)
> I do not think this is the way we want to go forward. This also exposes
> all other g* tools and not just grep. I expect this to introduce new
> problems. Some build scripts make assumptions about the userland tools
> and expect BSD syntax when running on macOS.
> If we chose to install grep as ggrep by default, why would we even need
> to expose it at all? What problem are you trying to solve here? Are
> there ports that require GNU grep and do not work with the BSD grep at
> /usr/bin/grep?
> If grep is installed as ggrep, just just remove the dependency on
> bin:grep:grep and be done.

I agree. 

To be honest I fail to see the rationale for making any changes here at all. 

What exactly is the reason for wanting to prevent the MP version of grep from hiding the system one ? What real world problem does this cause ? Why in this cases cannot you just directly refer to the system grep using /sr/bin/grep than relying on what PATH finds ?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1910 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20180630/84aa18cb/attachment.bin>

More information about the macports-dev mailing list