From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C0A8D138335 for ; Sun, 1 Dec 2019 23:25:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5DF3E0886; Sun, 1 Dec 2019 23:25:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A4BE4E0886 for ; Sun, 1 Dec 2019 23:25:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9973734D675 for ; Sun, 1 Dec 2019 23:25:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8E19D8A6 for ; Sun, 1 Dec 2019 23:24:58 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1575242662.5d643560ce412eeb1217d0e48642b71ad6e81b56.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/mksh/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-shells/mksh/metadata.xml app-shells/mksh/mksh-57-r2.ebuild app-shells/mksh/mksh-9999.ebuild X-VCS-Directories: app-shells/mksh/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 5d643560ce412eeb1217d0e48642b71ad6e81b56 X-VCS-Branch: master Date: Sun, 1 Dec 2019 23:24:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1d7ed0f2-5e30-49f7-8a2a-f19047b08703 X-Archives-Hash: dcf5bc479054ba3fef41f246bcbbcc12 commit: 5d643560ce412eeb1217d0e48642b71ad6e81b56 Author: Haelwenn (lanodan) Monnier hacktivis me> AuthorDate: Mon Nov 25 07:27:21 2019 +0000 Commit: Michał Górny gentoo 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 hacktivis.me> Signed-off-by: Michał Górny 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 @@ proxy-maint@gentoo.org Proxy Maintainers + + +variant that uses POSIX-compliant arithmetics with the host “long” data type +and is automatically in POSIX mode when called as /bin/sh + + 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 }