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

Rainer Müller raimue at macports.org
Wed Jun 27 20:25:11 UTC 2018


Just to add to the previous discussion, /usr/bin/grep used to be
GNU grep on older versions of macOS. That is probably the reason why it
does not implement the g* prefix like the other ports for GNU tools yet.

On 2018-06-27 21:14, George Plymale II wrote:
> I noticed that most of them have build dependencies which are declared
> like so:
> 
> depends_build   bin:grep:grep
> 
> If my understanding of `depends_build' is correct, these ports aren't
> really relying on the grep port, right? Since the system /usr/bin/grep
> will be found first, the grep port won't even be installed so isn't this
> redundant? I feel like I'm missing something here.

The grep port will only be installed if the grep binary is not available
in PATH. On macOS, it is available at /usr/bin/grep, so the grep port is
not needed. If the grep port is installed, ${prefix}/bin/grep will
always be used as it comes first in PATH. This dependency declaration
also allows the use of ${prefix}/bin/grep in trace mode as opposed to
forcing /usr/bin/grep.

Rainer


More information about the macports-dev mailing list