summaryrefslogtreecommitdiff
path: root/app-shells/ksh/ksh-1.0.3.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-16 23:15:49 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-16 23:15:49 +0100
commit3b827127cdc24d49f3dbaa82def6c80501d2cd87 (patch)
tree4e3f67cb234339d4cb7c29ee99550a3362d5a1ca /app-shells/ksh/ksh-1.0.3.ebuild
parent6e356edde093fb3589ab7a5859685e85c2873ab0 (diff)
gentoo auto-resync : 16:09:2022 - 23:15:49
Diffstat (limited to 'app-shells/ksh/ksh-1.0.3.ebuild')
-rw-r--r--app-shells/ksh/ksh-1.0.3.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/app-shells/ksh/ksh-1.0.3.ebuild b/app-shells/ksh/ksh-1.0.3.ebuild
new file mode 100644
index 000000000000..8fb7af0f3c4b
--- /dev/null
+++ b/app-shells/ksh/ksh-1.0.3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 2021-2022 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 ~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_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
+}