summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-07-03 01:49:54 +0100
committerSam James <sam@gentoo.org>2024-07-03 01:50:53 +0100
commitb2a5c6456e0fce45f91bd1d9ad3ac4d2d6e4dc8e (patch)
tree6bec8b26c00d951a3cd989bb27d4151892c6d85b /app-shells/ksh
parentapp-shells/ksh: drop 1.0.3 (diff)
downloadgentoo-b2a5c6456e0fce45f91bd1d9ad3ac4d2d6e4dc8e.tar.gz
gentoo-b2a5c6456e0fce45f91bd1d9ad3ac4d2d6e4dc8e.tar.bz2
gentoo-b2a5c6456e0fce45f91bd1d9ad3ac4d2d6e4dc8e.zip
app-shells/ksh: add 1.0.9
Also, drop obsolete register hack. As far as I can tell, it was either misguided from the beginning or is at the very least now-obsolete. The function (or lack) of 'register' in C is a misnomer anyway. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-shells/ksh')
-rw-r--r--app-shells/ksh/Manifest1
-rw-r--r--app-shells/ksh/ksh-1.0.9.ebuild68
-rw-r--r--app-shells/ksh/ksh-9999.ebuild7
3 files changed, 69 insertions, 7 deletions
diff --git a/app-shells/ksh/Manifest b/app-shells/ksh/Manifest
index 3624cb03ab83..7f5bd74db1b1 100644
--- a/app-shells/ksh/Manifest
+++ b/app-shells/ksh/Manifest
@@ -1,2 +1,3 @@
DIST ksh-v1.0.4.tar.gz 2127036 BLAKE2B c3bd7f8d8c86e8bf4f7482c99890f025365334b7ab826261b03f9a2f6bf72b4112ba0cec09c7d5388cbba4541a4e99a24e3b95a98e386b941a39f549c5c21525 SHA512 ca6ff4625a48a991d07a34c8d28656c131124e6cccbb495d8fbc2922db9f94a83c1df2be17a7fa7aa39ce5b9243573b0b806eef87d11c5a2936e7af564d2f5e6
DIST ksh-v1.0.8.tar.gz 2114262 BLAKE2B cf900c4dbdc750a6c4ff6906ab32b24722da3dbb84363517e4d7345c0bc591c346aa82fb58de5fd9662f20dd855deb6f1720002b7d91118ef8497e9f45412148 SHA512 4284ab98f6055877c0715a8b224eb5a75dc7fa022f38c9ee30d50786e997f70b507ee452fc8bbdfa67649a26e0fdfc8051f7e54ff9f6a0f96e44498757080548
+DIST ksh-v1.0.9.tar.gz 2084378 BLAKE2B 9cb827003f00261df74e19c6b9dad5f25fba401bc9dabeb300b90b7f3e9e9c37d096e5e24dec7c2ac60b195008d69c9fc682b32b376f7c03cbf9c56779431958 SHA512 747a9b624ee898c84cf37958add17eee6ee8fcb6112701430f0d12d2913b3af22554a98a9836dee6bbbe62adbdb3cbc1d3fb7f2c654f2ce799805d9b1f407683
diff --git a/app-shells/ksh/ksh-1.0.9.ebuild b/app-shells/ksh/ksh-1.0.9.ebuild
new file mode 100644
index 000000000000..96d8ebd86abd
--- /dev/null
+++ b/app-shells/ksh/ksh-1.0.9.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/ksh93/ksh"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ MY_PV=$(ver_rs 3 - 4 .)
+ SRC_URI="https://github.com/ksh93/${PN}/archive/v${MY_PV}/ksh-v${MY_PV}.tar.gz"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+fi
+
+DESCRIPTION="The Original ATT Korn Shell"
+HOMEPAGE="http://www.kornshell.com/"
+
+LICENSE="EPL-1.0"
+SLOT="0"
+
+src_compile() {
+ local extraflags=(
+ "-Wno-unknown-pragmas"
+ "-Wno-missing-braces"
+ "-Wno-unused-result"
+ "-Wno-return-type"
+ "-Wno-int-to-pointer-cast"
+ "-Wno-parentheses"
+ "-Wno-unused"
+ "-Wno-unused-but-set-variable"
+ "-Wno-cpp"
+ "-Wno-maybe-uninitialized"
+ "-P"
+ )
+ append-cflags $(test-flags-CC ${extraflags[@]})
+ append-cflags -fno-strict-aliasing
+ filter-flags '-fdiagnostics-color=always' # https://github.com/ksh93/ksh/issues/379
+ filter-lto
+
+ export CCFLAGS="${CFLAGS}"
+ tc-export AR CC LD NM
+
+ sh bin/package make AR="${AR}" CC="${CC}" NM="${NM}" SHELL="${BROOT}"/bin/sh || die
+}
+
+src_test() {
+ # test tries to catch IO error
+ addwrite /proc/self/mem
+
+ # arith.sh uses A for tests
+ unset A
+
+ sh bin/shtests --compile || die
+}
+
+src_install() {
+ local myhost="$(sh bin/package host)"
+ cd "arch/${myhost}" || die
+
+ into /
+ dobin bin/ksh
+ dosym ksh /bin/rksh
+
+ newman man/man1/sh.1 ksh.1
+}
diff --git a/app-shells/ksh/ksh-9999.ebuild b/app-shells/ksh/ksh-9999.ebuild
index c97a769209a6..96d8ebd86abd 100644
--- a/app-shells/ksh/ksh-9999.ebuild
+++ b/app-shells/ksh/ksh-9999.ebuild
@@ -21,13 +21,6 @@ HOMEPAGE="http://www.kornshell.com/"
LICENSE="EPL-1.0"
SLOT="0"
-src_prepare() {
- default
-
- # disable register for debugging
- sed -i 1i"#define register" src/lib/libast/include/ast.h || die
-}
-
src_compile() {
local extraflags=(
"-Wno-unknown-pragmas"