ksh-93.20160110.ebuild 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit toolchain-funcs prefix eutils
  5. DESCRIPTION="The Original Korn Shell, 1993 revision (ksh93)"
  6. HOMEPAGE="http://www.kornshell.com/"
  7. COMMIT="c506cb548d9b4bcebef92c86e948657728760e15"
  8. SRC_URI="https://github.com/att/ast/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="CPL-1.0 EPL-1.0"
  10. SLOT="0"
  11. KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
  12. IUSE=""
  13. RDEPEND="!app-shells/pdksh"
  14. S="${WORKDIR}/ast-${COMMIT}"
  15. PATCHES=(
  16. "${FILESDIR}"/ksh-prefix.patch
  17. "${FILESDIR}"/cpp.patch
  18. )
  19. src_prepare() {
  20. default
  21. # Bug 238906.
  22. sed -i -e 's,cd /tmp,cd "${TMPDIR:-/tmp}",' \
  23. bin/package src/cmd/INIT/package.sh || die
  24. eprefixify src/cmd/ksh93/data/msg.c
  25. }
  26. src_compile() {
  27. tc-export AR CC LD NM
  28. export CCFLAGS="${CFLAGS}"
  29. sh bin/package flat only make ast-ksh SHELL=sh SHOPT_SYSRC=1 || die
  30. # The build system doesn't exit properly
  31. [[ -e bin/ksh ]] || die
  32. }
  33. src_install() {
  34. into /
  35. dobin bin/ksh
  36. dosym ksh /bin/rksh
  37. newman man/man1/sh.1 ksh.1
  38. }