summaryrefslogtreecommitdiff
blob: 244725d7c5998b58bc5e23b0b482127f23ab3a02 (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/opendylan/opendylan-9999.ebuild,v 1.5 2013/12/20 06:35:14 patrick Exp $
EAPI=4

inherit autotools git-2

RESTRICT="test"

DESCRIPTION="OpenDylan language runtime environment"

HOMEPAGE="http://opendylan.org"
EGIT_HAS_SUBMODULES="1"
EGIT_REPO_URI="https://github.com/dylan-lang/opendylan.git"

LICENSE="Opendylan"
SLOT="0"

IUSE=""

DEPEND="dev-libs/boehm-gc[threads]
	dev-lang/perl
	dev-perl/XML-Parser
	|| ( dev-lang/opendylan-bin dev-lang/opendylan )"
RDEPEND="${DEPEND}"

src_prepare() {
	mkdir -p build-aux
	elibtoolize && eaclocal || die "Fail"
	automake --foreign --add-missing # this one dies wrongfully
	eautoconf || die "Fail"
}

src_configure() {
        if has_version =dev-lang/opendylan-bin-2013.1; then
                PATH=/opt/opendylan-2013.1/bin/:$PATH
	elif has_version =dev-lang/opendylan-bin-2012.1; then
		PATH=/opt/opendylan-2012.1/bin/:$PATH
	elif has_version =dev-lang/opendylan-bin-2011.1; then
		PATH=/opt/opendylan-2011.1/bin/:$PATH
	else
		PATH=/opt/opendylan/bin/:$PATH
	fi
	econf --prefix=/opt/opendylan || die
}

src_compile() {
	ulimit -s 32000 # this is naughty build system
	emake || die
}

src_install() {
	ulimit -s 32000 # this is naughty build system
	# because of Makefile weirdness it rebuilds quite a bit here
	# upstream has been notified
	emake -j1 DESTDIR="${D}" install
	mkdir -p "${D}/etc/env.d/opendylan/"
	echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/opendylan" || die "Failed to add env settings"
}