From 0de3441938fab38446970dce28715b5c47b596e3 Mon Sep 17 00:00:00 2001 From: Lev Kujawski Date: Thu, 11 Feb 2021 21:39:56 -0700 Subject: [PATCH] Upgrade the Korn shell to the new upstream The Korn shell 2020 project has ground to a halt and AT&T has reverted its changes due to numerous unfixed performance regressions and bugs. The new Korn shell project at github.com/ksh93/ksh has restarted development with a focus on bug fixing and preserving Korn shell functionality. --- srcpkgs/ksh/template | 48 ++++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/srcpkgs/ksh/template b/srcpkgs/ksh/template index 2709dacc0b0..62ce60139ab 100644 --- a/srcpkgs/ksh/template +++ b/srcpkgs/ksh/template @@ -1,16 +1,15 @@ # Template file for 'ksh' pkgname=ksh -version=2020.0.0 -revision=1 -wrksrc="ast-${version}" -build_style=meson -configure_args="-Dbuild-api-tests=false -Dbuild-api-tests-only=true" +version=1.0.0a +revision=2 +_commit="37a18bab7173427ce045c9a67772cb98eb678cb7" +wrksrc="${pkgname}-${_commit}" short_desc="AT&T's Korn shell (ksh93)" maintainer="Leah Neukirchen " license="EPL-1.0" homepage="http://www.kornshell.com/" -distfiles="https://github.com/att/ast/archive/${version}.tar.gz" -checksum=76597c96c4f94423b9225b5de50ea54be08d5bbaa1e0e594a7eec603bd60ecaf +distfiles="https://github.com/ksh93/ksh/archive/${_commit}.tar.gz" +checksum=2ec6700a3c1ef688409a9339acb745e72902717b9e719e7937cdcccaa140e16d nocross=yes register_shell="/bin/ksh" @@ -19,30 +18,17 @@ alternatives=" ksh:ksh.1:/usr/share/man/man1/ksh93.1 " -build_options="static" -if [ "$build_option_static" ]; then - LDFLAGS+=" -static" -fi - -case "$XBPS_TARGET_MACHINE" in -*-musl) - makedepends+=" musl-fts-devel" -esac - -post_extract() { - sed -i -e 's/= library/= static_library/' \ - -e 's/install: true/install: false/' src/lib/*/meson.build - sed -i 's/vpoi/void*/g' src/cmd/ksh93/include/name.h - if [ "$build_option_static" ]; then - # Drop tests that use .so - sed -i '/some tests/,$d' src/cmd/ksh93/meson.build - sed -i '/libsample_files/,$d' src/lib/libdll/meson.build - fi +do_build() { + ./bin/package make } -post_install() { - mv ${DESTDIR}/usr/bin/ksh ${DESTDIR}/usr/bin/ksh93 - mv ${DESTDIR}/usr/share/man/man1/ksh.1 ${DESTDIR}/usr/share/man/man1/ksh93.1 + +do_install() { + ARCH=$(./bin/package) + vmkdir usr/bin + mv arch/${ARCH}/bin/ksh ${DESTDIR}/usr/bin/ksh93 + vmkdir usr/share/man/man1 + mv arch/${ARCH}/man/man1/sh.1 ${DESTDIR}/usr/share/man/man1/ksh93.1 vmkdir usr/share/ksh - vcopy src/cmd/ksh93/fun usr/share/ksh/functions - vlicense LICENSE + vcopy arch/${ARCH}/fun usr/share/ksh/functions + vlicense LICENSE.md }