* This commit adds two patches from upstream
They should be removed as soon as upstream
releases new version.
Closes: https://bugs.gentoo.org/640202
Closes: https://github.com/gentoo/gentoo/pull/6481
Package-Manager: Portage-2.3.13, Repoman-2.3.3
--- /dev/null
+diff --git a/tests/which.c b/tests/which.c
+index cda57c6..3e74867 100644
+--- a/tests/which.c
++++ b/tests/which.c
+@@ -21,6 +21,7 @@ int main(void)
+ { NULL, 0 }
+ };
+
++ setenv("PATH", "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin", 1);
+ for (i = 0; test[i].cmd; i++) {
+ char *path;
+
--- /dev/null
+diff --git a/tests/which.c b/tests/which.c
+index 46dcccf..cda57c6 100644
+--- a/tests/which.c
++++ b/tests/which.c
+@@ -11,13 +11,13 @@ int main(void)
+ int result = 0;
+ size_t i;
+ struct tc test[] = {
+- { "ls", 1 },
+- { "free", 1 },
+- { "modinfo", 1 },
+- { "useradd", 1 },
+- { "/bin/which", 1 },
+- { "/bin/ps aux", 1 },
+- { "/etc/passwd", 0 },
++ { "ls", 1 },
++ { "free", 1 },
++ { "modinfo", 1 },
++ { "useradd", 1 },
++ { "/usr/bin/which", 1 },
++ { "/bin/ps aux", 1 },
++ { "/etc/passwd", 0 },
+ { NULL, 0 }
+ };
+
KEYWORDS="~amd64 ~x86"
IUSE="static-libs"
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-which-path.patch
+ "${FILESDIR}"/${P}-fix-path.patch
+)
+
src_configure(){
econf --enable-static=$(usex static-libs)
}