ikarus-0.0.3_p1870.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="3"
  4. inherit eutils flag-o-matic autotools versionator
  5. MY_PV=$(get_version_component_range 4-)
  6. MY_PV=${MY_PV/p/}
  7. MY_P=${PN}-scheme-r${MY_PV}
  8. DESCRIPTION="A free optimizing incremental native-code compiler for R6RS Scheme"
  9. HOMEPAGE="http://ikarus-scheme.org/"
  10. SRC_URI="http://ikarus-scheme.org/ikarus.dev/${MY_P}.tgz"
  11. LICENSE="GPL-3"
  12. SLOT="0"
  13. KEYWORDS="-* ~x86"
  14. IUSE="cpu_flags_x86_sse2 doc"
  15. RDEPEND=">=dev-libs/gmp-4.2.2"
  16. DEPEND="${RDEPEND}"
  17. S=${WORKDIR}/${MY_P}
  18. src_prepare() {
  19. sed -i -e 's/-O3//' configure.ac || die
  20. epatch "${FILESDIR}/${P}-cpu_has_sse2.patch"
  21. epatch "${FILESDIR}/${P}-ikarus-enter.patch"
  22. eautoreconf
  23. }
  24. src_compile() {
  25. if use !cpu_flags_x86_sse2; then \
  26. eerror "You must have a processor who supports \
  27. SSE2 instructions" && die
  28. fi
  29. append-flags "-std=gnu99"
  30. emake || die "emake failed"
  31. }
  32. src_test() {
  33. cd benchmarks
  34. make benchall || die "Tests failed"
  35. if [ -e timelog ]
  36. then
  37. cat timelog || die "stdout test logs failed."
  38. fi
  39. }
  40. src_install() {
  41. emake DESTDIR="${D}" install || die "emake install failed"
  42. rm -Rf "${D}/usr/share"
  43. dodoc README ACKNOWLEDGMENTS || die "dodoc failed"
  44. if use doc; then
  45. dodoc doc/*.pdf || die "dodoc failed"
  46. fi
  47. }