diff options
Diffstat (limited to 'app-shells/mksh')
-rw-r--r-- | app-shells/mksh/Manifest | 7 | ||||
-rw-r--r-- | app-shells/mksh/metadata.xml | 6 | ||||
-rw-r--r-- | app-shells/mksh/mksh-57-r1.ebuild | 1 | ||||
-rw-r--r-- | app-shells/mksh/mksh-57-r2.ebuild | 82 | ||||
-rw-r--r-- | app-shells/mksh/mksh-9999.ebuild | 46 |
5 files changed, 131 insertions, 11 deletions
diff --git a/app-shells/mksh/Manifest b/app-shells/mksh/Manifest index 0e3c010d9b75..85ab05de95e5 100644 --- a/app-shells/mksh/Manifest +++ b/app-shells/mksh/Manifest @@ -1,7 +1,8 @@ DIST mksh-R56c.tgz 417218 BLAKE2B 3512855dd177be8432fe503716ca571a3c06ab3eeb6b44de923ab7d9eb9246087f627b7d7a3e9bb29a849da126b88c223864f140b136e922776ec7bd4a04e96d SHA512 7e4cd2d24c6bca2ebad7c6b02d158188e766bd4693d93f5bed198d69238aef078d42ce911431ad4e419e4af55083047d823bfad53973db5c6d8a685482770135 DIST mksh-R57.tgz 419604 BLAKE2B 11af09535ace3fdd982189fb7d7f3e5961776c3bdbf6b981f4f1506a66ebdbd893efb9aa50a5a36fd8b3b7bd3e149021aad154888dc81e0de29f41e91eeb583c SHA512 7d7fa557c17da4f1f62f82877a136439efb6d4f9fde52b2df39214db09868982e756df6e4fe83498f9013cbcf3252dc383b00ddfafaa4c9f143ffded7cd255b3 EBUILD mksh-56c.ebuild 992 BLAKE2B 1ecbe94f3d96371818512d89b3f077402118058f382f1e3dfd9f57826eb783256bc193b4697272626cce52ccb8fe29a479646107750e1db94859b95b7bb7c524 SHA512 1f17fcf0f5cae5de4128feded4c1c92c9d75b3c507deb7e265058251c225bbb852c9ad305ac5bac0f4fb8739eb38c325e0f85c33dc1fa10fe6ede6e4a71a41b6 -EBUILD mksh-57-r1.ebuild 1010 BLAKE2B da381d59adade8902014bf730bbecf56730de750f81ea4462f904ec4459cd0f23bdf9ebb4a284f9b408b3e3cbcc08f80d124ba1c5269325a5619e4113a03c2b5 SHA512 6d9a8435f42fcf1a08a2d0a21daf95bc4706d704b0d9281e3efef49d06e4d0e557349c4e80ee8056e8543774ddb1b268847ae69ab6c62fb216fefa4647a69b16 +EBUILD mksh-57-r1.ebuild 1037 BLAKE2B c9e511b80490286bc0743126b858018658d372d7a8a76dc313eb485fed4a908a1985c2d26a737324a3ecac8629d1dfa24b8d9eed719dddeb94abaf016d8b0cf6 SHA512 3534b627236192a846cb6993973820af5c4ebee5514273c05e5d3eefd091c99f96fb4af4d510f8121c60115c9bb6e03b2f5356dacca9ea7395f06cd6601ff86d +EBUILD mksh-57-r2.ebuild 1604 BLAKE2B 26c835c620d0ce8b0af908df5e309fff652a835759dc07f28442f1ba63f8406a7f68e672a46bf08d4b777554d8128310f2e2ccf3171316682c84f4210e26c374 SHA512 d7b105454422ef6ecbab9d8ec6cb3c4e3786dce1e692eb827ab6c0c6b82817337d3516abdab7eae1e3e244a4f5bda35674b5be7804b2e6e519b5eeaebf7e0692 EBUILD mksh-57.ebuild 995 BLAKE2B 0e9efe4a046e26c35f3b5882e6fc6f81adb85f47acd9e84f7de768e6557e2725dcea05a18b30d8ff26e20383a452a4ba434c6dfebcb8476ce7c03fef8a2aa8da SHA512 e259c3b4c8cacc5655ea5fe444cacbcab8d646e4a1dbff949dfc8ffe2fb032a8c51cf1017c23f7b4191309285d08936a31a7791f0104384264865495f973e616 -EBUILD mksh-9999.ebuild 1010 BLAKE2B da381d59adade8902014bf730bbecf56730de750f81ea4462f904ec4459cd0f23bdf9ebb4a284f9b408b3e3cbcc08f80d124ba1c5269325a5619e4113a03c2b5 SHA512 6d9a8435f42fcf1a08a2d0a21daf95bc4706d704b0d9281e3efef49d06e4d0e557349c4e80ee8056e8543774ddb1b268847ae69ab6c62fb216fefa4647a69b16 -MISC metadata.xml 379 BLAKE2B b4d62877ff242c65d08dc06b33970d51545518b5e30dc231d1b700a47b984500ca8f64a77f705913070a51d7c45be61e1b9c25d4691d62142eabfec153dde5cb SHA512 ae67be4bd206bdc709c9d78f5256c8b286eae5383453d16156ce43a5fc389208053587284dfc339a4ed65a239304cc6ad40b87e0b4a6aec4695213beb1d69aff +EBUILD mksh-9999.ebuild 1604 BLAKE2B 26c835c620d0ce8b0af908df5e309fff652a835759dc07f28442f1ba63f8406a7f68e672a46bf08d4b777554d8128310f2e2ccf3171316682c84f4210e26c374 SHA512 d7b105454422ef6ecbab9d8ec6cb3c4e3786dce1e692eb827ab6c0c6b82817337d3516abdab7eae1e3e244a4f5bda35674b5be7804b2e6e519b5eeaebf7e0692 +MISC metadata.xml 565 BLAKE2B 7bbb94f30f910e5a73f6fca91db59bd8b9825e358903bfc3116222c9bcb9927b5609b4c31bb5f36db5898023631a0d8dd2ad8d6a218136bb2e1786337db58fed SHA512 a10bf827859a6176fef847313a096d8ce04dfb6a271452602f8fe3638c8aeb7da11a5ea7a9d30257e516d8344365e30372e4c16d31d23c19e97c3d7ddd333914 diff --git a/app-shells/mksh/metadata.xml b/app-shells/mksh/metadata.xml index 9df017effeb6..c22c0afc77d8 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-r1.ebuild b/app-shells/mksh/mksh-57-r1.ebuild index 3aa638fe2453..ba0d160f76a5 100644 --- a/app-shells/mksh/mksh-57-r1.ebuild +++ b/app-shells/mksh/mksh-57-r1.ebuild @@ -22,6 +22,7 @@ HOMEPAGE="http://mirbsd.de/mksh" LICENSE="BSD" SLOT="0" IUSE="static test" +RESTRICT="!test? ( test )" RDEPEND="static? ( dev-libs/klibc )" DEPEND=" ${RDEPEND} diff --git a/app-shells/mksh/mksh-57-r2.ebuild b/app-shells/mksh/mksh-57-r2.ebuild new file mode 100644 index 000000000000..ff84abaff24a --- /dev/null +++ b/app-shells/mksh/mksh-57-r2.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +if [[ $PV = 9999 ]]; then + inherit cvs + ECVS_SERVER="anoncvs.mirbsd.org:/cvs" + ECVS_MODULE="mksh" + ECVS_USER="_anoncvs" + ECVS_AUTH="ext" + KEYWORDS="" +else + SRC_URI="https://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="MirBSD Korn Shell" +# Host is TLSv1.0-only, keep to http for compatibility with modern browsers +HOMEPAGE="http://mirbsd.de/mksh" + +LICENSE="BSD" +SLOT="0" +IUSE="lksh static test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-lang/perl + sys-apps/ed + ) +" + +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 +} + +src_install() { + into / + 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 3aa638fe2453..ff84abaff24a 100644 --- a/app-shells/mksh/mksh-9999.ebuild +++ b/app-shells/mksh/mksh-9999.ebuild @@ -13,30 +13,47 @@ if [[ $PV = 9999 ]]; then ECVS_AUTH="ext" KEYWORDS="" else - SRC_URI="http://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz" - KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" + SRC_URI="https://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" fi DESCRIPTION="MirBSD Korn Shell" +# Host is TLSv1.0-only, keep to http for compatibility with modern browsers HOMEPAGE="http://mirbsd.de/mksh" + LICENSE="BSD" SLOT="0" -IUSE="static test" -RDEPEND="static? ( dev-libs/klibc )" +IUSE="lksh static test" +RESTRICT="!test? ( test )" + DEPEND=" - ${RDEPEND} test? ( dev-lang/perl sys-apps/ed ) " + S="${WORKDIR}/${PN}" +src_prepare() { + default + if use lksh; then + cp -pr "${S}" "${S}"_lksh || die + fi +} + src_compile() { tc-export CC - # we want to build static with klibc - if use static; then export CC="/usr/bin/klcc"; export LDSTATIC="-static"; fi + 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 } @@ -45,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() { - ./test.sh -v || die + 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 } |