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

Blair Zajac blair at orcaware.com
Sat Jun 30 18:55:15 UTC 2018

> On Jun 30, 2018, at 6:13 AM, 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.

One can probably also set the GREP environmental variable if GNU grep is needed

configure.env-append GREP=${prefix}/libexec/gnubin/grep


More information about the macports-dev mailing list