commit:     411f7e106012a6af37a5d14e2a62572c2f0b4f6a
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Mar 27 06:16:21 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 29 02:28:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=411f7e10

dev-build/libtool: simplify defining tool names to their basename

Recently a bunch more got added following the original sed style. The
whole thing is incredibly wasteful and difficult to read, however.

- type -P xxx will always return ${path}/xxx or nothing, which includes
  failing to fork in low-memory conditions, catastrophically failing the
  build, but NOT running "die"
- basename ${path}/xxx will always return "xxx"

We can simply write xxx directly. This is a confusing 2016 hack that
doesn't need to be continued.

Bug: https://bugs.gentoo.org/574550
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-build/libtool/libtool-2.4.7-r4.ebuild | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dev-build/libtool/libtool-2.4.7-r4.ebuild 
b/dev-build/libtool/libtool-2.4.7-r4.ebuild
index d165475452d8..73de49e5d15f 100644
--- a/dev-build/libtool/libtool-2.4.7-r4.ebuild
+++ b/dev-build/libtool/libtool-2.4.7-r4.ebuild
@@ -101,12 +101,12 @@ src_configure() {
        # Do not bother hardcoding the full path to sed.
        # Just rely on $PATH. bug #574550
        export CONFIG_SHELL="${EPREFIX}"/bin/bash
-       export ac_cv_path_SED="$(basename "$(type -P sed)")"
-       export ac_cv_path_EGREP="$(basename "$(type -P grep)") -E"
-       export ac_cv_path_EGREP_TRADITIONAL="$(basename "$(type -P grep)") -E"
-       export ac_cv_path_FGREP="$(basename "$(type -P grep)") -F"
-       export ac_cv_path_GREP="$(basename "$(type -P grep)")"
-       export ac_cv_path_lt_DD="$(basename "$(type -P dd)")"
+       export ac_cv_path_SED="sed"
+       export ac_cv_path_EGREP="grep -E"
+       export ac_cv_path_EGREP_TRADITIONAL="grep -E"
+       export ac_cv_path_FGREP="grep -F"
+       export ac_cv_path_GREP="grep"
+       export ac_cv_path_lt_DD="dd"
 
        [[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g"
 

Reply via email to