From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/mksh/
Date: Sun, 1 Dec 2019 23:24:58 +0000 (UTC) [thread overview]
Message-ID: <1575242662.5d643560ce412eeb1217d0e48642b71ad6e81b56.mgorny@gentoo> (raw)
commit: 5d643560ce412eeb1217d0e48642b71ad6e81b56
Author: Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Mon Nov 25 07:27:21 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 1 23:24:22 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d643560
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 <AT> hacktivis.me>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
app-shells/mksh/metadata.xml | 6 ++++++
app-shells/mksh/mksh-57-r2.ebuild | 30 +++++++++++++++++++++++++++++-
app-shells/mksh/mksh-9999.ebuild | 30 +++++++++++++++++++++++++++++-
3 files changed, 64 insertions(+), 2 deletions(-)
diff --git a/app-shells/mksh/metadata.xml b/app-shells/mksh/metadata.xml
index 9df017effeb..c22c0afc77d 100644
--- a/app-shells/mksh/metadata.xml
+++ b/app-shells/mksh/metadata.xml
@@ -9,4 +9,10 @@
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
+ <use>
+ <flag name="lksh">
+variant that uses POSIX-compliant arithmetics with the host “long” data type
+and is automatically in POSIX mode when called as /bin/sh
+ </flag>
+ </use>
</pkgmetadata>
diff --git a/app-shells/mksh/mksh-57-r2.ebuild b/app-shells/mksh/mksh-57-r2.ebuild
index b818b1caf1a..ff84abaff24 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
}
diff --git a/app-shells/mksh/mksh-9999.ebuild b/app-shells/mksh/mksh-9999.ebuild
index b818b1caf1a..ff84abaff24 100644
--- a/app-shells/mksh/mksh-9999.ebuild
+++ b/app-shells/mksh/mksh-9999.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
}
next reply other threads:[~2019-12-01 23:25 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-01 23:24 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-18 17:54 [gentoo-commits] repo/gentoo:master commit in: app-shells/mksh/ Ulrich Müller
2024-08-30 15:58 Arthur Zamarin
2022-12-27 19:45 Sam James
2022-12-16 21:19 Arthur Zamarin
2022-12-02 18:44 WANG Xuerui
2021-05-24 7:39 Joonas Niilola
2021-04-27 20:18 Sam James
2021-02-22 14:47 Joonas Niilola
2021-02-16 12:34 Sam James
2021-02-14 5:37 Sam James
2021-02-09 21:31 Sam James
2021-02-09 21:30 Sam James
2021-02-09 9:48 Sam James
2021-02-09 6:16 Sam James
2020-12-17 13:48 Joonas Niilola
2020-12-16 16:12 Sam James
2020-12-16 8:29 Joonas Niilola
2020-12-15 10:39 Sam James
2020-12-15 10:37 Sam James
2020-12-13 7:42 Sam James
2020-12-11 7:42 Sergei Trofimovich
2020-12-10 21:41 Thomas Deutschmann
2020-12-10 17:43 Sam James
2020-05-07 14:57 Lars Wendler
2020-05-07 14:57 Lars Wendler
2020-04-07 10:21 Mart Raudsepp
2020-03-29 14:45 Sergei Trofimovich
2020-03-27 16:48 Lars Wendler
2020-03-27 16:48 Lars Wendler
2020-02-11 14:14 Michał Górny
2020-02-11 12:15 Agostino Sarubbo
2020-02-11 11:36 Agostino Sarubbo
2020-02-11 10:54 Agostino Sarubbo
2019-04-29 13:48 Michał Górny
2019-04-29 13:48 Michał Górny
2019-04-29 13:48 Michał Górny
2019-03-14 17:59 Patrick Lauer
2019-01-27 11:05 Pacho Ramos
2019-01-11 20:33 Hanno Boeck
2018-12-12 16:17 Mikle Kolyada
2018-12-08 9:36 Sergei Trofimovich
2018-12-07 2:41 Thomas Deutschmann
2018-12-05 15:23 Lars Wendler
2018-12-05 15:12 Mikle Kolyada
2018-01-16 16:02 Patrick Lauer
2018-01-07 12:39 Markus Meier
2017-08-30 18:34 Patrick Lauer
2017-08-09 14:06 Patrick Lauer
2016-08-23 14:23 Patrick Lauer
2016-08-23 14:23 Patrick Lauer
2016-07-07 2:35 Stephen Klimaszewski
2016-03-06 23:33 Patrick Lauer
2016-01-22 11:00 Patrick Lauer
2016-01-22 10:59 Patrick Lauer
2015-12-21 10:23 Patrick Lauer
2015-09-20 9:30 Agostino Sarubbo
2015-09-06 13:25 Agostino Sarubbo
2015-09-01 12:08 Lars Wendler
2015-08-26 11:00 Agostino Sarubbo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1575242662.5d643560ce412eeb1217d0e48642b71ad6e81b56.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox