From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-shells/ksh/Manifest | 10 +++++++ app-shells/ksh/files/cpp.patch | 24 +++++++++++++++++ app-shells/ksh/files/ksh-prefix.patch | 42 +++++++++++++++++++++++++++++ app-shells/ksh/ksh-93.20140625.ebuild | 50 ++++++++++++++++++++++++++++++++++ app-shells/ksh/ksh-93.20160110.ebuild | 51 +++++++++++++++++++++++++++++++++++ app-shells/ksh/metadata.xml | 30 +++++++++++++++++++++ 6 files changed, 207 insertions(+) create mode 100644 app-shells/ksh/Manifest create mode 100644 app-shells/ksh/files/cpp.patch create mode 100644 app-shells/ksh/files/ksh-prefix.patch create mode 100644 app-shells/ksh/ksh-93.20140625.ebuild create mode 100644 app-shells/ksh/ksh-93.20160110.ebuild create mode 100644 app-shells/ksh/metadata.xml (limited to 'app-shells/ksh') diff --git a/app-shells/ksh/Manifest b/app-shells/ksh/Manifest new file mode 100644 index 000000000000..1cc87b6b7fc9 --- /dev/null +++ b/app-shells/ksh/Manifest @@ -0,0 +1,10 @@ +AUX cpp.patch 865 SHA256 c8b9b72af426e2cbe805f711f0ab4b74ed25fdbff25f003cbf5bd92490b484a2 SHA512 68b50627a548cfda24579ae5316ec1e42a959d6533df2c88dda572b0432e0080f0b6e4cbaa7a9a7f148a0f89ac1bda36ed414850a00fccfb36c2782a349fb1b5 WHIRLPOOL d2e9d90b72ef066c1b2994a6ad5938b51625dfd3c27291e164f14a91a475c670a69c4a562a7219a7004b4d30bf7e3ded299bea7fc2d2022f32d9c4610747109d +AUX ksh-prefix.patch 1780 SHA256 9dd102cbd377e403ac01fb138d5a98ce7f9f352c9ce0a1fc38f57ebba8a6e8c3 SHA512 32ae89b988cc0bed839039646f5658c7a1e64b6b8a85ba4afecd02cfda4d6b64a968a4f8da8d290b90357b9b6231c609c51f4989935cc56ea378b5032569c315 WHIRLPOOL 2bc10c1209fed433adce600e89474c9b1cb6ec367e3088be5d13a099c36d76291f0608ff4744f6b97f01b83a3a994fd2b7af2cc6497d9907bdc29ab17de6e4ad +DIST INIT.2014-06-25.tgz 385531 SHA256 e73302b6ab2854421c960f179c3ac079f9e21f0362cfdec58476bda36c163f14 SHA512 9034cdf5b798c134472d786195d0f5d14e7e7a1f8226dcbccf962880cd59cd59d3a5597307587163f90a9187cce0232235cf79bcd66842044b2c624b335ba730 WHIRLPOOL 9e33c998c90878829e6e3007a3fa1b0b7d3128f4761a75630bb449e9e3e29b49c6c54e509c56a1e73119ff87aabc1a84108f4943928920745156d95abf2b0d20 +DIST ast-base.2014-06-25.tgz 9609090 SHA256 58588b07b076f05dbbd5f4f095d5753309a8356ba1e5475262ce77d6bff42dae SHA512 3006dd187c6042798ffd6da5aad8d6340bf4fbad687338b2b9797556136966b65d90295eb267dba198a83ea5b651a9a339d9ff48179f3d7e25b3de76c41bf737 WHIRLPOOL b07c4809e729359d0ed613310f49fa391c199a225e4a3c589f9015af54d1159e199135ee4eadebd9d09f21f3131103550c1c17badc3a643943e3828df79d98d2 +DIST ksh-93.20160110.tar.gz 26416127 SHA256 59cf3c8e8945b593e10946bc0ae1172f62c18ddde1de0f7427599195aecbd591 SHA512 cf6e13e5f6b0fd62b12cbcd007c09306ba1ff7e733c207be34cb360b6b269b8e75f2134a32775c65626ea6cfbdf1bbffecab22c7b2ff244fe91981b3d8fa8688 WHIRLPOOL e7548707b3bb8d3ac8fab749f826ae4db775ca03af2fd51b7fcecd7ba766b64065d18a6ded1b64e1e9aecd4e8ef3bb613dfd744eaf788ca227068bb20d444d62 +EBUILD ksh-93.20140625.ebuild 1173 SHA256 e1900933144248c58af69e1c40a464f9000a77ca47184962e3d11f5174e3b444 SHA512 9b93f2101fcc17470fdab5facd402143971edbcf06ffff74b6a969dbd7340d863bbd5a825e852bc661e3db52fc32542aa37a3507c9889ffd24a0f89da367b53c WHIRLPOOL 01352d5ac88fa4595132d62f9699c127ae6e80a5f300c5a9c802a2bebb85270880f91cb8f9a74ebc8c2bf6899a3e7a577e26a16ec6d6e4ee968a6d1fa37799d8 +EBUILD ksh-93.20160110.ebuild 1115 SHA256 e95e8c0f3e21a373a278e0a71381bfef0f71f55b5903f9aabbe60bcbf8ce3231 SHA512 09e6068ad0b4393a5b60ff40324045856b2ad8ed36fcb14d04412552ab601bad8305ddd1f9267a6382f06f64c6bf2058235391e850adbf2ffd39a9433b830f17 WHIRLPOOL 7a8081ace45cf8b6f0e54d2f4cb1ddccbaed91bf46a6b6c02d0a924fb4104666d791e24269777bce1215d9d551fbf70f0393b2e8162ba8aed29b0d75f244d2a8 +MISC ChangeLog 3881 SHA256 4ef3664099ef912ead9c432ed11ca10564f82dca5e30df4e6689871f6108ccbc SHA512 79361175f9d07f3ead908f66b6429647db3b1d3c7d9c059be03ad727a4f612983204b64cf8f44fcf505ebcb31fd8247d0c8556083b25c40672e2bccc4db34aec WHIRLPOOL 0b3cb07d8d778a92f78c76556ecf2e9b0a12ec82aacbb602eed22e957f00ccd72a069339ee912c9d88a42128f8411743f2ca70abb5e86adc2851d3bb32b75c10 +MISC ChangeLog-2015 8642 SHA256 6c04b8e984a18f59140ab908f65c0221fda3aa799bfe385dbfb126c88d62524e SHA512 564cc8f46348c51d9fd126dcdd92c2b2a40f5fbcdb2083d55c80565e9ab77158b2859547ee93ee6dd56a478f5afe28c44b1ec2140b7b5056e27cd75206a186e3 WHIRLPOOL 0a396ce8020c18122adde2950dd8fba1cab2c21169ea5725b7aa00dab8f989d32edc9b98127368c657b5ad0cb494ab40bcbb4a9d46330bacc4994a1a2f736094 +MISC metadata.xml 1371 SHA256 d115c86f3cd2d03c6ec67c587d8eb73fafd2c0c167d1b4aee4d068fe0421856e SHA512 b74fe4a12ce5868839cd32fe9c4f88c216a0703a3f477b005dcf7b47f697d129c695a011a9b37894c39716b5d47ddc9abeb5bd4946ba6b6849707a73b5901810 WHIRLPOOL 3baf53c5c28c1398521dddc87a2bc2eb6400d91e414ba2823a81795ae13554c1fb8d5884dd56ad851ee6398a74b0f95d5af369ea6113d81c280f98f4aea16047 diff --git a/app-shells/ksh/files/cpp.patch b/app-shells/ksh/files/cpp.patch new file mode 100644 index 000000000000..7075bcfc1f7f --- /dev/null +++ b/app-shells/ksh/files/cpp.patch @@ -0,0 +1,24 @@ +iffe depends on cc -E not inserting newlines between tokens + +https://build.opensuse.org/package/view_file/home:Andreas_Schwab:Factory/ksh/cpp.patch?expand=1 + +--- a/src/cmd/INIT/iffe.sh ++++ b/src/cmd/INIT/iffe.sh +@@ -3427,7 +3427,7 @@ + (eval "$src") <&$nullin || e=1 + ;; + mac*|nomac*) +- if compile $cc -E $tmp.c <&$nullin >$tmp.i ++ if compile $cc -E -P $tmp.c <&$nullin >$tmp.i + then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i + else e=1 + fi +@@ -3718,7 +3718,7 @@ + <<\"#define $v\">> $v <<\"/* native $v */\">> + <<\"#endif\">> + #endif" > $tmp.c +- if compile $cc -E $tmp.c <&$nullin >$tmp.i ++ if compile $cc -E -P $tmp.c <&$nullin >$tmp.i + then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i > $tmp.t + if test -s $tmp.t + then success diff --git a/app-shells/ksh/files/ksh-prefix.patch b/app-shells/ksh/files/ksh-prefix.patch new file mode 100644 index 000000000000..c97cbe333ca1 --- /dev/null +++ b/app-shells/ksh/files/ksh-prefix.patch @@ -0,0 +1,42 @@ +--- a/src/cmd/ksh93/data/msg.c ++++ b/src/cmd/ksh93/data/msg.c +@@ -180,7 +180,7 @@ + const char e_sptbnl[] = " \t\n"; + const char e_tolower[] = "tolower"; + const char e_toupper[] = "toupper"; +-const char e_defpath[] = "/bin:/usr/bin:"; ++const char e_defpath[] = "@GENTOO_PORTAGE_EPREFIX@/bin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:"; + const char e_defedit[] = _pth_ed; + const char e_unknown [] = ""; + const char e_devnull[] = "/dev/null"; +@@ -188,24 +188,24 @@ + const char e_supprompt[] = "# "; + const char e_stdprompt[] = "$ "; + const char e_profile[] = "$HOME/.profile"; +-const char e_sysprofile[] = "/etc/profile"; +-const char e_suidprofile[] = "/etc/suid_profile"; ++const char e_sysprofile[] = "@GENTOO_PORTAGE_EPREFIX@/etc/profile"; ++const char e_suidprofile[] = "@GENTOO_PORTAGE_EPREFIX@/etc/suid_profile"; + #if SHOPT_SYSRC +-const char e_sysrc[] = "/etc/ksh.kshrc"; ++const char e_sysrc[] = "@GENTOO_PORTAGE_EPREFIX@/etc/ksh.kshrc"; + #endif + #if SHOPT_BASH + #if SHOPT_SYSRC +-const char e_bash_sysrc[] = "/etc/bash.bashrc"; ++const char e_bash_sysrc[] = "@GENTOO_PORTAGE_EPREFIX@/etc/bash/bashrc"; + #endif + const char e_bash_rc[] = "$HOME/.bashrc"; + const char e_bash_login[] = "$HOME/.bash_login"; + const char e_bash_logout[] = "$HOME/.bash_logout"; + const char e_bash_profile[] = "$HOME/.bash_profile"; + #endif +-const char e_crondir[] = "/usr/spool/cron/atjobs"; ++const char e_crondir[] = "@GENTOO_PORTAGE_EPREFIX@/usr/spool/cron/atjobs"; + const char e_prohibited[] = "login setuid/setgid shells prohibited"; + #if SHOPT_SUID_EXEC +- const char e_suidexec[] = "/etc/suid_exec"; ++ const char e_suidexec[] = "@GENTOO_PORTAGE_EPREFIX@/etc/suid_exec"; + #endif /* SHOPT_SUID_EXEC */ + const char hist_fname[] = "/.sh_history"; + const char e_dot[] = "."; diff --git a/app-shells/ksh/ksh-93.20140625.ebuild b/app-shells/ksh/ksh-93.20140625.ebuild new file mode 100644 index 000000000000..c8a15396a51d --- /dev/null +++ b/app-shells/ksh/ksh-93.20140625.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs prefix eutils + +DESCRIPTION="The Original Korn Shell, 1993 revision (ksh93)" +HOMEPAGE="http://www.kornshell.com/" + +KSH_PV=${PV:3:4}-${PV:7:2}-${PV:9:2} + +SRC_URI="https://dev.gentoo.org/~floppym/distfiles/INIT.${KSH_PV}.tgz + https://dev.gentoo.org/~floppym/distfiles/ast-base.${KSH_PV}.tgz" + +LICENSE="CPL-1.0 EPL-1.0" +SLOT="0" +KEYWORDS="alpha amd64 arm ia64 ppc ~ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND="!app-shells/pdksh" + +S=${WORKDIR} + +src_prepare() { + # Bug 238906. + sed -i -e 's,cd /tmp,cd "${TMPDIR:-/tmp}",' \ + bin/package src/cmd/INIT/package.sh || die + + epatch "${FILESDIR}"/${PN}-prefix.patch + epatch "${FILESDIR}"/cpp.patch + eprefixify src/cmd/ksh93/data/msg.c +} + +src_compile() { + tc-export AR CC LD NM + export CCFLAGS="${CFLAGS}" + sh bin/package flat only make ast-ksh SHELL=sh SHOPT_SYSRC=1 || die +} + +src_install() { + dodoc lib/package/ast-base.README + dohtml lib/package/ast-base.html + + local myhost=$(sh bin/package host) + into / + dobin bin/ksh + dosym ksh /bin/rksh + newman man/man1/sh.1 ksh.1 +} diff --git a/app-shells/ksh/ksh-93.20160110.ebuild b/app-shells/ksh/ksh-93.20160110.ebuild new file mode 100644 index 000000000000..13f64f1a69ea --- /dev/null +++ b/app-shells/ksh/ksh-93.20160110.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs prefix eutils + +DESCRIPTION="The Original Korn Shell, 1993 revision (ksh93)" +HOMEPAGE="http://www.kornshell.com/" + +COMMIT="c506cb548d9b4bcebef92c86e948657728760e15" +SRC_URI="https://github.com/att/ast/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="CPL-1.0 EPL-1.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND="!app-shells/pdksh" + +S="${WORKDIR}/ast-${COMMIT}" + +PATCHES=( + "${FILESDIR}"/ksh-prefix.patch + "${FILESDIR}"/cpp.patch +) + +src_prepare() { + default + + # Bug 238906. + sed -i -e 's,cd /tmp,cd "${TMPDIR:-/tmp}",' \ + bin/package src/cmd/INIT/package.sh || die + + eprefixify src/cmd/ksh93/data/msg.c +} + +src_compile() { + tc-export AR CC LD NM + export CCFLAGS="${CFLAGS}" + sh bin/package flat only make ast-ksh SHELL=sh SHOPT_SYSRC=1 || die + # The build system doesn't exit properly + [[ -e bin/ksh ]] || die +} + +src_install() { + into / + dobin bin/ksh + dosym ksh /bin/rksh + newman man/man1/sh.1 ksh.1 +} diff --git a/app-shells/ksh/metadata.xml b/app-shells/ksh/metadata.xml new file mode 100644 index 000000000000..6018c787c35e --- /dev/null +++ b/app-shells/ksh/metadata.xml @@ -0,0 +1,30 @@ + + + + + floppym@gentoo.org + Mike Gilbert + + + The KornShell language was designed and developed by David G. Korn at + AT&T Bell Laboratories. It is an interactive command language that + provides access to the UNIX system and to many other systems, on the + many different computers and workstations on which it is implemented. + + ksh has the functionality of other scripting languages such as awk, + icon, perl, rexx, and tcl. For this and many other reasons, ksh is a + much better scripting language than any of the other popular shells. + The code size for ksh is larger than the Bourne shell or C shell + programs. The revised version is even larger. + + In spite of its increased size, ksh provides better performance. You + can write programs to run faster with ksh than with either the Bourne + shell or the C shell, sometimes an order of magnitude faster. ksh has + evolved and matured with extensive user feedback. It has been used by + many thousands of people at AT&T since 1982, and at many other + companies and universities. + + + att/ast + + -- cgit v1.2.3