public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Ulrich Müller" <ulm@gentoo.org>
Subject: [gentoo-dev] [PATCH 4/4] app-shells/mksh: Restore live ebuild
Date: Thu, 17 Oct 2024 07:58:31 +0200	[thread overview]
Message-ID: <20241017055843.16396-4-ulm@gentoo.org> (raw)
In-Reply-To: <20241017055843.16396-1-ulm@gentoo.org>

Closes: https://bugs.gentoo.org/911450
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
 app-shells/mksh/mksh-59c.ebuild  |  6 +--
 app-shells/mksh/mksh-9999.ebuild | 90 ++++++++++++++++++++++++++++++++
 2 files changed, 93 insertions(+), 3 deletions(-)
 create mode 100644 app-shells/mksh/mksh-9999.ebuild

diff --git a/app-shells/mksh/mksh-59c.ebuild b/app-shells/mksh/mksh-59c.ebuild
index 09bf32351049..2921a6d7f5c8 100644
--- a/app-shells/mksh/mksh-59c.ebuild
+++ b/app-shells/mksh/mksh-59c.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -10,6 +10,7 @@ if [[ ${PV} == *9999 ]] ; then
 	ECVS_MODULE="mksh"
 	ECVS_USER="_anoncvs"
 	ECVS_AUTH="ext"
+	ECVS_SSH_EXTRA_OPTS=( "-oHostKeyAlgorithms=+ssh-rsa" )
 	inherit cvs
 else
 	SRC_URI="https://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz"
@@ -19,6 +20,7 @@ fi
 DESCRIPTION="MirBSD Korn Shell"
 # Host is TLSv1.0-only, keep to http for compatibility with modern browsers
 HOMEPAGE="http://mirbsd.de/mksh"
+S="${WORKDIR}/${PN}"
 
 # See http://www.mirbsd.org/TaC-mksh.txt or ${S}/www/files/TaC-mksh.txt
 # MirOS for most of it
@@ -37,8 +39,6 @@ DEPEND="
 	)
 "
 
-S="${WORKDIR}/${PN}"
-
 src_prepare() {
 	default
 	if use lksh; then
diff --git a/app-shells/mksh/mksh-9999.ebuild b/app-shells/mksh/mksh-9999.ebuild
new file mode 100644
index 000000000000..5c43ce0c33a5
--- /dev/null
+++ b/app-shells/mksh/mksh-9999.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+if [[ ${PV} == *9999 ]] ; then
+	ECVS_SERVER="anoncvs.mirbsd.org:/cvs"
+	ECVS_MODULE="mksh"
+	ECVS_USER="_anoncvs"
+	ECVS_AUTH="ext"
+	ECVS_SSH_EXTRA_OPTS=( "-oHostKeyAlgorithms=+ssh-rsa" )
+	inherit cvs
+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 ~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"
+S="${WORKDIR}/${PN}"
+
+# See http://www.mirbsd.org/TaC-mksh.txt or ${S}/www/files/TaC-mksh.txt
+# MirOS for most of it
+# BSD for when strlcpy(3) is absent, such as with glibc
+# unicode for some included Unicode data
+# ISC if the printf builtin is used, not currently the case
+LICENSE="MirOS BSD unicode"
+SLOT="0"
+IUSE="lksh static test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	test? (
+		dev-lang/perl
+		sys-apps/ed
+	)
+"
+
+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
+	sh FAQ2HTML.sh || die
+}
+
+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
+}
+
+src_install() {
+	into /
+	dobin mksh
+	dosym mksh /bin/rmksh
+	doman mksh.1
+	dodoc dot.mkshrc
+	dodoc FAQ.htm
+
+	if use lksh; then
+		dobin "${S}"_lksh/lksh
+		dosym lksh /bin/rlksh
+		doman "${S}"_lksh/lksh.1
+	fi
+}
-- 
2.47.0



      parent reply	other threads:[~2024-10-17  5:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17  5:58 [gentoo-dev] [PATCH 1/4] cvs.eclass: Add local declarations and die statements throughout Ulrich Müller
2024-10-17  5:58 ` [gentoo-dev] [PATCH 2/4] cvs.eclass: Rewrite the ssh wrapper script in bash Ulrich Müller
2024-10-17  5:58 ` [gentoo-dev] [PATCH 3/4] cvs.eclass: New eclass variable ECVS_SSH_EXTRA_OPTS Ulrich Müller
2024-10-17 14:50   ` Mike Gilbert
2024-10-17 16:10     ` Ulrich Müller
2024-10-17  5:58 ` Ulrich Müller [this message]

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=20241017055843.16396-4-ulm@gentoo.org \
    --to=ulm@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