chicken-4.10.0-r1.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib versionator
  5. MY_PV=$(get_version_component_range 1-3)
  6. DESCRIPTION="Chicken is a Scheme interpreter and native Scheme to C compiler"
  7. HOMEPAGE="http://www.call-cc.org/"
  8. SRC_URI="http://code.call-cc.org/releases/${MY_PV}/${P}.tar.gz"
  9. LICENSE="BSD"
  10. SLOT="0"
  11. KEYWORDS="alpha amd64 ppc ppc64 x86"
  12. IUSE="emacs doc"
  13. DOCS=( NEWS README LICENSE )
  14. DEPEND="
  15. sys-apps/texinfo
  16. emacs? ( virtual/emacs )"
  17. RDEPEND="
  18. emacs? (
  19. virtual/emacs
  20. app-emacs/scheme-complete
  21. )"
  22. src_prepare() {
  23. #Because chicken's Upstream is in the habit of using variables that
  24. #portage also uses :( eg. $ARCH and $A
  25. sed "s,A\(\s?=\|)\),chicken&," \
  26. -i Makefile.cross-linux-mingw defaults.make rules.make || die
  27. sed "s,ARCH,zARCH," \
  28. -i Makefile.* defaults.make rules.make || die
  29. sed -e "s,\$(PREFIX)/lib,\$(PREFIX)/$(get_libdir)," \
  30. -e "s,\$(DATADIR)/doc,\$(SHAREDIR)/doc/${PF}," \
  31. -i defaults.make || die
  32. # remove HTML documentation if the user doesn't USE=doc
  33. if ! use "doc"; then
  34. rm -rf manual-html || die
  35. fi
  36. }
  37. src_compile() {
  38. OPTIONS="-j1 PLATFORM=linux PREFIX=/usr"
  39. emake ${OPTIONS} C_COMPILER_OPTIMIZATION_OPTIONS="${CFLAGS}" \
  40. LINKER_OPTIONS="${LDFLAGS}" \
  41. HOSTSYSTEM="${CBUILD}"
  42. }
  43. # chicken's testsuite is not runnable before install
  44. # upstream has been notified of the issue
  45. RESTRICT=test
  46. src_install() {
  47. # still can't run make in parallel for the install target
  48. emake -j1 ${OPTIONS} DESTDIR="${D}" HOSTSYSTEM="${CBUILD}" \
  49. LINKER_OPTIONS="${LDFLAGS}" install
  50. dodoc ${DOCS}
  51. if use "doc"; then
  52. dodoc -r manual-html
  53. fi
  54. }