diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-22 14:08:05 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-22 14:08:05 +0000 |
commit | 93a93e9a3b53c1a73142a305ea1f8136846942ee (patch) | |
tree | b9791a06ab3284e27b568412c59316c66240c682 /app-shells/ksh/ksh-9999.ebuild | |
parent | 2771f79232c273bc2a57d23bf335dd81ccf6af28 (diff) |
gentoo resync : 22.12.2021
Diffstat (limited to 'app-shells/ksh/ksh-9999.ebuild')
-rw-r--r-- | app-shells/ksh/ksh-9999.ebuild | 80 |
1 files changed, 55 insertions, 25 deletions
diff --git a/app-shells/ksh/ksh-9999.ebuild b/app-shells/ksh/ksh-9999.ebuild index e5b08b6bef9c..8e02335af1d6 100644 --- a/app-shells/ksh/ksh-9999.ebuild +++ b/app-shells/ksh/ksh-9999.ebuild @@ -1,44 +1,74 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit meson ninja-utils +inherit flag-o-matic toolchain-funcs if [[ ${PV} == 9999 ]]; then inherit git-r3 - EGIT_REPO_URI="https://github.com/att/ast" + EGIT_REPO_URI="https://github.com/ksh93/ksh" else - KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" - MY_PV="${PV/_/-}" - MY_P="${PN}-${MY_PV}" - SRC_URI="https://github.com/att/ast/releases/download/${MY_PV}/${MY_P}.tar.gz" - S="${WORKDIR}/${MY_P}" + KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv" + 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 Korn Shell, 1993 revision (ksh93)" -HOMEPAGE="https://github.com/att/ast" +DESCRIPTION="The Original ATT Korn Shell" +HOMEPAGE="http://www.kornshell.com/" -LICENSE="CPL-1.0 EPL-1.0" +LICENSE="EPL-1.0" SLOT="0" -RDEPEND="!app-shells/pdksh" +src_prepare() { + default -src_test() { - # https://bugs.gentoo.org/702570 - addwrite /proc/self - local cmd=( - meson test - -C "${BUILD_DIR}" - --num-processes "$(makeopts_jobs ${NINJAOPTS:-${MAKEOPTS}})" + # 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" ) - echo "${cmd[@]}" >&2 - # https://github.com/att/ast/issues/1392 - env -u T "${cmd[@]}" || die + 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() { - meson_src_install - dodir /bin - mv "${ED}/usr/bin/ksh" "${ED}/bin/ksh" || die + 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 } |