From 18bf1a7d6beb25bcca10ff9304b9cdf706569723 Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Sun, 11 May 2025 06:58:54 +0000 Subject: [PATCH] textproc/gnugrep (dependencies): do not rely on compatibility symlink Historically we had built and installed GNU grep programs as `grep' + [ef]grep, but started to configure the port with `--program-prefix=g' in 2022, as we and several other non-GNU/Linux systems, e.g. NetBSD, OpenBSD, Solaris, macOS do for miscellaneous GNU utilities. To avoid breaking POLA, g-prefixless compatibility symlinks were being created, subject to the COMPAT option (on by default). Recently GNU grep developers decided to deprecate {e,f}grep variants, with the clear intention to consolidate all three greps into a single command. This had significantly annoyed users who could not update their scripts to `grep -[EF]', usually for portability reasons, e.g. SunOS 4.11 grep which does not support those switches, but does have egrep and fgrep, or when scripts are written by others and they don't have permissions to modify them, etc. Perhaps it is time to turn the COMPAT option off by default, this commit concludes the preparation. PR: 277784 Requested by: fuz, obrien --- databases/proxysql/Makefile | 4 ++-- devel/argobots/Makefile | 4 ++-- devel/xtensa-esp-elf/Makefile | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/databases/proxysql/Makefile b/databases/proxysql/Makefile index 7741ea538d32..1a1f045d7791 100644 --- a/databases/proxysql/Makefile +++ b/databases/proxysql/Makefile @@ -15,7 +15,7 @@ BUILD_DEPENDS= aclocal:devel/automake \ autoreconf:devel/autoconf \ bash:shells/bash \ cmake:devel/cmake-core \ - ${LOCALBASE}/bin/grep:textproc/gnugrep \ + ggrep:textproc/gnugrep \ libgcrypt>0:security/libgcrypt \ libtoolize:devel/libtool \ e2fsprogs-libuuid>0:misc/e2fsprogs-libuuid \ @@ -48,7 +48,7 @@ post-patch: -e '7s/^/pidfile="\/var\/run\/${PORTNAME}\/${PORTNAME}.pid"\n/g' \ ${WRKSRC}/src/proxysql.cfg @${REINPLACE_CMD} \ - -e 's,grep -P,${LOCALBASE}/bin/grep -P,g' \ + -e 's,grep -P,g&,' \ -e '/ export C/d' \ -e 's,PROXYSQLCLICKHOUSE=1 ,,g' \ -e 's,--enable-fastopen=false ,--enable-fastopen=false --enable-shared=no ,g' \ diff --git a/devel/argobots/Makefile b/devel/argobots/Makefile index a5cc7b8f72bb..acd42843fb9e 100644 --- a/devel/argobots/Makefile +++ b/devel/argobots/Makefile @@ -10,7 +10,7 @@ WWW= https://www.argobots.org/ LICENSE= BSD4CLAUSE LICENSE_FILE= ${WRKSRC}/COPYRIGHT -BUILD_DEPENDS= ${LOCALBASE}/bin/grep:textproc/gnugrep # workaround for https://github.com/pmodels/argobots/issues/375 +BUILD_DEPENDS= ggrep:textproc/gnugrep # workaround for https://github.com/pmodels/argobots/issues/375 USES= autoreconf gmake libtool USE_LDCONFIG= yes @@ -22,7 +22,7 @@ GH_ACCOUNT= pmodels INSTALL_TARGET= install-strip -BINARY_ALIAS= grep=${LOCALBASE}/bin/grep # for https://github.com/pmodels/argobots/issues/375 +BINARY_ALIAS= grep=ggrep # for https://github.com/pmodels/argobots/issues/375 PLIST_FILES= include/abt.h \ lib/libabt.a \ diff --git a/devel/xtensa-esp-elf/Makefile b/devel/xtensa-esp-elf/Makefile index 056c6d097cd7..07556b5beb45 100644 --- a/devel/xtensa-esp-elf/Makefile +++ b/devel/xtensa-esp-elf/Makefile @@ -30,10 +30,10 @@ WWW= https://docs.espressif.com/projects/esp-idf/en/v5.3.1/esp32/get-started/ LICENSE= GPLv2 LGPL21 LICENSE_COMB= multi -BUILD_DEPENDS= ${LOCALBASE}/bin/grep:textproc/gnugrep \ - ${LOCALBASE}/include/libintl.h:devel/gettext-runtime \ +BUILD_DEPENDS= ${LOCALBASE}/include/libintl.h:devel/gettext-runtime \ bash:shells/bash \ gawk:lang/gawk \ + ggrep:textproc/gnugrep \ gpatch:devel/patch \ gsed:textproc/gsed \ help2man:misc/help2man \ @@ -58,7 +58,7 @@ BINARY_ALIAS= g++=${CXX} gcc=${CC} python=${PYTHON_VERSION} BUILD_ENV= ${WRK_ENV} \ CT_ALLOW_BUILD_AS_ROOT_SURE=1 \ CT_FORBID_DOWNLOAD=y \ - GREP=${LOCALBASE}/bin/grep \ + GREP=ggrep \ LD_RUN_PATH=${PREFIX}/lib/${CC} \ LDFLAGS=-I${PREFIX}/lib \ ${MAKE_ENV:MPATH=*}