summaryrefslogtreecommitdiff
blob: 0fc2fcd64acd7c281eb9a7124b59b0c3c8d1c430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-scheme/ikarus/ikarus-0.0.3.ebuild,v 1.2 2008/06/01 03:33:46 mr_bones_ Exp $

inherit eutils flag-o-matic autotools

DESCRIPTION="Ikarus is a free optimizing incremental native-code compiler for R6RS Scheme."
HOMEPAGE="http://www.cs.indiana.edu/~aghuloum/ikarus/"
SRC_URI="http://www.cs.indiana.edu/~aghuloum/ikarus/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"

KEYWORDS="-* ~x86"
IUSE="sse2 doc"

RDEPEND=">=dev-libs/gmp-4.2.2"
DEPEND="${RDEPEND}"

src_unpack() {
	unpack ${A}
	cd "${S}"
	sed -i -e 's/-O3//' configure.ac
	epatch "${FILESDIR}/${P}-cpu_has_sse2.patch"
	epatch "${FILESDIR}/${P}-ikarus-enter.patch"
	eautoreconf || die "autoconf failed"
}

src_compile() {
	if use !sse2; then \
		eerror "You must have a processor who supports \
		SSE2 instructions" && die
	fi

	append-flags "-std=gnu99"

	econf || die "econf failed"
	emake || die "emake failed"
}

src_test() {
	cd benchmarks
	make benchall || die "Tests failed"
	if [ -e timelog ]
	then
		cat timelog || die "stdout test logs failed."
	fi
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	rm -R "${D}/usr/share"
	dodoc README ACKNOWLEDGMENTS
	if use doc; then
		dodoc doc/*.pdf
	fi
}