summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <sultan@gentoo.org>2021-12-17 16:28:16 +0100
committerStephan Hartmann <sultan@gentoo.org>2021-12-17 16:28:21 +0100
commitc0f04fa2a8b583d5832462cfc9e502a888af356b (patch)
tree5b1c6590258fb1972d0724a22434a28536a877f2 /app-shells/ksh/ksh-1.0.0_beta2.ebuild
parentapp-editors/joe: Stabilize 4.6-r1 sparc, #829168 (diff)
downloadgentoo-c0f04fa2a8b583d5832462cfc9e502a888af356b.tar.gz
gentoo-c0f04fa2a8b583d5832462cfc9e502a888af356b.tar.bz2
gentoo-c0f04fa2a8b583d5832462cfc9e502a888af356b.zip
app-shells/ksh: bump to 1.0.0_beta2
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'app-shells/ksh/ksh-1.0.0_beta2.ebuild')
-rw-r--r--app-shells/ksh/ksh-1.0.0_beta2.ebuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/app-shells/ksh/ksh-1.0.0_beta2.ebuild b/app-shells/ksh/ksh-1.0.0_beta2.ebuild
new file mode 100644
index 00000000000..f9a81e83626
--- /dev/null
+++ b/app-shells/ksh/ksh-1.0.0_beta2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="The Original ATT Korn Shell"
+HOMEPAGE="http://www.kornshell.com/"
+
+MY_PV=$(ver_rs 3 - 4 .)
+SRC_URI="https://github.com/ksh93/${PN}/archive/v${MY_PV}/ksh-v${MY_PV}.tar.gz"
+
+LICENSE="EPL-1.0"
+SLOT="0"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~x86"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+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"
+ "-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"
+ "-Wno-lto-type-mismatch"
+ "-P"
+ )
+ append-cflags $(test-flags-CC ${extraflags[@]})
+ filter-flags '-fdiagnostics-color=always' # https://github.com/ksh93/ksh/issues/379
+ export CCFLAGS="${CFLAGS} -fno-strict-aliasing"
+
+ tc-export AR CC LD NM
+
+ sh bin/package make 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
+}