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

Jan Stary hans at stare.cz
Sat Jul 21 10:21:55 UTC 2018


> So far, I have tested installing the vim and bash ports with this code
> in place and the installation of each did indeed detect the gnubin
> version of grep, so all seems well for the ports that use grep as a
> build dependency.

The only ports I found that specifically deal with grep are:

* devel/libtool

  Explicitly sets GREP=/usr/bin/grep so that libtool's GNU-centric
  ./configure does _not_ detect the possiby installed MP grep
  (which is GNU grep), as that would create a hidden dependency.

* graphics/openexr/Portfile:# avoid dependency on port:grep

  Also sets GREP=/usr/bin/grep to _avoid_ the dependency

* math/octave

  Depends on GNU grep, GNU sed, and all that.

* textproc/dict

  Also insists on GNU grep, but does not need it.
  https://github.com/macports/macports-ports/pull/2252


> There are certain incompatibilities between BSD grep and GNU grep. If
> you compare the man pages, you'll see that GNU grep lacks certain
> options provided by BSD grep (and vice versa) and that some options
> behave differently. For the sake of brevity, I do not want to enumerate
> all such incompatibilities here. But they do exist. I have run into
> trouble before when I've relied on GNU grep instead of BSD grep for
> certain scripts and so I've become wary about doing that anymore.

Great, so use the system grep.

 $ grep -V
 grep (BSD grep) 2.5.1-FreeBSD

> > Are there ports that require GNU grep and do not work with
> > the BSD grep at /usr/bin/grep?
> 
> Not that I know of, no.

I'll check with math/octave.

	Jan



More information about the macports-dev mailing list