commit:     41ea1f45ef8603a287ff4723df43dac0103843ce
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  4 12:09:21 2022 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Mon Apr  4 12:10:46 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41ea1f45

dev-util/shc-4.0.3: fix tests

Closes: https://bugs.gentoo.org/836761
Reported-by: Agostino Sarubbo <ago <AT> gentoo.org>
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>

 dev-util/shc/shc-4.0.3.ebuild | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/dev-util/shc/shc-4.0.3.ebuild b/dev-util/shc/shc-4.0.3.ebuild
index 4bc77efcd7a9..818f2d0868eb 100644
--- a/dev-util/shc/shc-4.0.3.ebuild
+++ b/dev-util/shc/shc-4.0.3.ebuild
@@ -11,6 +11,30 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
 
+IUSE="test"
+
+DEPEND="test? (
+       app-shells/bash:0
+       app-shells/dash
+       app-shells/ksh
+       app-shells/tcsh
+       app-shells/zsh
+)"
+RDEPEND=""
+
+src_prepare() {
+       # ash requires sys-apps/busybox[make-symlinks], so exclude it too
+       # Exclude app-shells/rc from tests
+       # Fix path for app-shells/tcsh
+       sed -i \
+               -e "s:'/bin/ash'::" \
+               -e "s:'/usr/bin/rc'::" \
+               -e "s:/usr/bin/tcsh:/bin/tcsh:" \
+               test/ttest.sh || die
+
+       default
+}
+
 src_install() {
        dobin src/shc
        doman shc.1

Reply via email to