esh-0.8.5-r2.ebuild 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit flag-o-matic toolchain-funcs
  5. DESCRIPTION="A UNIX Shell with a simplified Scheme syntax"
  6. HOMEPAGE="http://slon.ttk.ru/esh/"
  7. SRC_URI="http://slon.ttk.ru/esh/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86"
  11. IUSE="debug"
  12. DEPEND=">=sys-libs/readline-4.1"
  13. RDEPEND="${DEPEND}"
  14. S="${WORKDIR}/${PN}"
  15. src_prepare() {
  16. emake clean
  17. sed -i \
  18. -e 's|-g ||' \
  19. -e 's|-DMEM_DEBUG ||' \
  20. -e 's|^CFLAGS|&+|g' \
  21. -e 's|$(CC) |&$(CFLAGS) $(LDFLAGS) |g' \
  22. -e 's:-ltermcap::' \
  23. Makefile || die
  24. }
  25. src_compile() {
  26. # For some reason, this tarball has binary files in it for x86.
  27. # Make clean so we can rebuild for our arch and optimization.
  28. use debug && append-flags -DMEM_DEBUG
  29. emake \
  30. CC="$(tc-getCC)" \
  31. LDFLAGS="${LDFLAGS}"
  32. }
  33. src_install() {
  34. dobin esh
  35. doinfo doc/esh.info
  36. dodoc CHANGELOG CREDITS GC_README HEADER READLINE-HACKS TODO
  37. dohtml doc/*.html
  38. docinto examples
  39. dodoc examples/*
  40. }