ksh-93.20140625.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit toolchain-funcs prefix eutils
  5. DESCRIPTION="The Original Korn Shell, 1993 revision (ksh93)"
  6. HOMEPAGE="http://www.kornshell.com/"
  7. KSH_PV=${PV:3:4}-${PV:7:2}-${PV:9:2}
  8. SRC_URI="https://dev.gentoo.org/~floppym/distfiles/INIT.${KSH_PV}.tgz
  9. https://dev.gentoo.org/~floppym/distfiles/ast-base.${KSH_PV}.tgz"
  10. LICENSE="CPL-1.0 EPL-1.0"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 arm ia64 ppc ~ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
  13. IUSE=""
  14. RDEPEND="!app-shells/pdksh"
  15. S=${WORKDIR}
  16. src_prepare() {
  17. # Bug 238906.
  18. sed -i -e 's,cd /tmp,cd "${TMPDIR:-/tmp}",' \
  19. bin/package src/cmd/INIT/package.sh || die
  20. epatch "${FILESDIR}"/${PN}-prefix.patch
  21. epatch "${FILESDIR}"/cpp.patch
  22. eprefixify src/cmd/ksh93/data/msg.c
  23. }
  24. src_compile() {
  25. tc-export AR CC LD NM
  26. export CCFLAGS="${CFLAGS}"
  27. sh bin/package flat only make ast-ksh SHELL=sh SHOPT_SYSRC=1 || die
  28. }
  29. src_install() {
  30. dodoc lib/package/ast-base.README
  31. dohtml lib/package/ast-base.html
  32. local myhost=$(sh bin/package host)
  33. into /
  34. dobin bin/ksh
  35. dosym ksh /bin/rksh
  36. newman man/man1/sh.1 ksh.1
  37. }