summaryrefslogtreecommitdiff
blob: eac14ac6c46a740a58ba18928df4f066a252e677 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-scheme/bigloo/bigloo-2.5a.ebuild,v 1.4 2005/01/22 21:27:36 karltk Exp $

S=${WORKDIR}/${PN}${PV}
DESCRIPTION="Bigloo Scheme compiler for x86, sparc, alpha, ppc and JVM"
SRC_URI="ftp://ftp-sop.inria.fr/mimosa/fp/Bigloo/bigloo${PV}.tar.gz"
HOMEPAGE="http://www-sop.inria.fr/mimosa/fp/Bigloo/bigloo.html"
DEPEND=""
#RDEPEND=""
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86"
IUSE="java"

src_compile() {
	local myconf
	local myjava=`java-config --java`
	local myjavac=`java-config --javac`

	use java &&
		myconf="--jvm=force --java=$myjava --javac=$myjavac" \
		|| myconf="--jvm=no"


	./configure \
		--native=yes \
		--cflags="${CFLAGS}" \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man/man1 \
		--docdir=/usr/share/doc/${PV} \
		$myconf || die "./configure failed"

	cp Makefile.config Makefile.config.orig
	sed "s/JCFLAGS=-O/JCFLAGS=/" \
		< Makefile.config.orig \
		> Makefile.config
	echo LD_LIBRARY_PATH=${S}/lib/${PV} >> Makefile.config

	cp bde/Makefile bde/Makefile.orig
	sed "s/\$(BOOTBINDIR)\/afile jas/LD_LIBRARY_PATH=\$(LD_LIBRARY_PATH) \$(BOOTBINDIR)\/afile jas/" \
		< bde/Makefile.orig \
		> bde/Makefile

	cp Makefile.config Makefile.config.fixed

	make || die
}

src_install () {
	dodir /usr/bin
	dodir /usr/lib
	dodir /usr/share/doc/${PF}
	dodir /usr/share/man/man1
	dodir /usr/share/info

	sed \
		-e "s:^BINDIR=\(.*\):BINDIR=${D}\1:" \
		-e "s:^LIBDIR=\(.*\):LIBDIR=${D}\1:" \
		-e "s:^MANDIR=\(.*\):MANDIR=${D}\1:" \
		-e "s:^INFODIR=\(.*\):INFODIR=${D}\1:" \
		-e "s:^DOCDIR=\(.*\):DOCDIR=${D}\1:" \
		< Makefile.config.fixed \
		> Makefile.config

	dodir /etc/env.d
	echo "LDPATH=/usr/lib/bigloo/${PV}/" \
		> ${D}/etc/env.d/25bigloo
	make install || die
}