Re: git: 1a8a9a832eb5 - main - devel/libvirt: depend on GNU grep(1) in a more robust way

From: Alexey Dokuchaev <danfe_at_freebsd.org>
Date: Sat, 10 May 2025 10:13:40 UTC
On Sat, May 10, 2025 at 12:48:31PM +0300, Gleb Popov wrote:
> On Sat, May 10, 2025 at 12:36???PM Alexey Dokuchaev wrote:
> > commit 1a8a9a832eb52cb3bb7ea6453a88451d54ebc597
> >
> >   devel/libvirt: depend on GNU grep(1) in a more robust way
> >
> >   FreeBSD ships native grep(1) implementation in the base for
> >   quite a while, so don't bother to check its origin and just
> >   request GNU version explicitly like on Darwin (macOS).
> >
> >   Depending on `/usr/local/bin/grep' is also wrong because of
> >   the hardcoded prefix and because compatibility symlinks are
> >   optional (plans are to disable them in the future).
> 
> This change doesn't make sense to me. Can you please elaborate
> on the last paragraph?

Ports could be installed into prefix other than `/usr/local', yet
the path is hardcoded in the `build-aux/meson.build', meaning it's
likely to break with custom-PREFIX'ed packages.  While not very
common, we support this and IIRC there were occasional exp-runs in
the past for custom values of PREFIX/LOCALBASE (with lots of fallout
as one might expect).

However, more importantly is that `bin/grep' is guarded by the COMPAT
option, hence it is not guaranteed to exist even under `/usr/local',
while `bin/ggrep' is always there, similar to other GNU tools which
are typically configured with `--program-prefix=g'.  People had been
asking me to stop installing those compatibility symlinks by default,
so one day I might make the option opt-in rather than opt-out.  HTH,

./danfe