diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-11-25 08:27:21 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-12-02 00:24:22 +0100 |
commit | 5d643560ce412eeb1217d0e48642b71ad6e81b56 (patch) | |
tree | e87b77a580c863c050b7377425b66bffb43e31e5 /app-shells/mksh/mksh-57-r2.ebuild | |
parent | app-shells/mksh: USE=static now uses the system libc (diff) | |
download | gentoo-5d643560ce412eeb1217d0e48642b71ad6e81b56.tar.gz gentoo-5d643560ce412eeb1217d0e48642b71ad6e81b56.tar.bz2 gentoo-5d643560ce412eeb1217d0e48642b71ad6e81b56.zip |
app-shells/mksh: Add USE=lksh
lksh is a variant of mksh intended for legacy scripts and strict
POSIX-compatibility
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-shells/mksh/mksh-57-r2.ebuild')
-rw-r--r-- | app-shells/mksh/mksh-57-r2.ebuild | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/app-shells/mksh/mksh-57-r2.ebuild b/app-shells/mksh/mksh-57-r2.ebuild index b818b1caf1a2..ff84abaff24a 100644 --- a/app-shells/mksh/mksh-57-r2.ebuild +++ b/app-shells/mksh/mksh-57-r2.ebuild @@ -23,7 +23,7 @@ HOMEPAGE="http://mirbsd.de/mksh" LICENSE="BSD" SLOT="0" -IUSE="static test" +IUSE="lksh static test" RESTRICT="!test? ( test )" DEPEND=" @@ -35,10 +35,25 @@ DEPEND=" S="${WORKDIR}/${PN}" +src_prepare() { + default + if use lksh; then + cp -pr "${S}" "${S}"_lksh || die + fi +} + src_compile() { tc-export CC use static && export LDSTATIC="-static" export CPPFLAGS="${CPPFLAGS} -DMKSH_DEFAULT_PROFILEDIR=\\\"${EPREFIX}/etc\\\"" + + if use lksh; then + pushd "${S}"_lksh >/dev/null || die + CPPFLAGS="${CPPFLAGS} -DMKSH_BINSHPOSIX -DMKSH_BINSHREDUCED" \ + sh Build.sh -r -L || die + popd >/dev/null || die + fi + sh Build.sh -r || die } @@ -47,8 +62,21 @@ src_install() { dobin mksh doman mksh.1 dodoc dot.mkshrc + + if use lksh; then + dobin "${S}"_lksh/lksh + doman "${S}"_lksh/lksh.1 + fi } src_test() { + einfo "Testing regular mksh." ./mksh test.sh -v || die + + if use lksh; then + einfo "Testing lksh, POSIX long-bit mksh." + pushd "${S}"_lksh >/dev/null || die + ./lksh test.sh -v || die + popd >/dev/null || die + fi } |