commit:     fe668307e129013f764d655fb4c3416872970de4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 16 23:13:53 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 16 23:13:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe668307

x11-misc/alock: avoid using which in configure

Closes: https://bugs.gentoo.org/844886
Signed-off-by: Sam James <sam <AT> gentoo.org>

 x11-misc/alock/alock-1.0.0-r1.ebuild |  3 ++-
 x11-misc/alock/files/no-which.patch  | 30 ++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/x11-misc/alock/alock-1.0.0-r1.ebuild 
b/x11-misc/alock/alock-1.0.0-r1.ebuild
index 33a86aadaf0a..476253fafdaa 100644
--- a/x11-misc/alock/alock-1.0.0-r1.ebuild
+++ b/x11-misc/alock/alock-1.0.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -33,6 +33,7 @@ PATCHES=(
        "${FILESDIR}"/tidy-printf.patch
        "${FILESDIR}"/fix-aliasing.patch
        "${FILESDIR}"/no-xf86misc.patch
+       "${FILESDIR}"/no-which.patch
 )
 
 src_configure() {

diff --git a/x11-misc/alock/files/no-which.patch 
b/x11-misc/alock/files/no-which.patch
new file mode 100644
index 000000000000..1764be32c82d
--- /dev/null
+++ b/x11-misc/alock/files/no-which.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/844886
+--- a/configure
++++ b/configure
+@@ -26,7 +26,7 @@ msg_chkfor() {
+ check_docs() {
+ 
+     msg_chkfor "asciidoc"
+-    if which asciidoc 1> /dev/null 2>&3
++    if command -v asciidoc 1> /dev/null 2>&3
+     then
+         echo "ok."
+         echo "#_______________________" >&4
+@@ -40,7 +40,7 @@ check_docs() {
+ check_tools() {
+ 
+     msg_chkfor "compiler $CC"
+-    if which "$CC" 1> /dev/null 2>&3
++    if command -v "$CC" 1> /dev/null 2>&3
+     then
+         echo "ok."
+         echo "---------------------------------" 1>&3
+@@ -56,7 +56,7 @@ check_tools() {
+ check_imlib2() {
+ 
+     msg_chkfor "imlib2-config"
+-    if which imlib2-config 1> /dev/null 2>&3
++    if command -v imlib2-config 1> /dev/null 2>&3
+     then
+         echo "ok."
+         cat << EOF > tmp.c

Reply via email to