summaryrefslogtreecommitdiff
blob: 39d021f2577dca08fe4011fda12d0e4652fbe3f4 (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

# still not working
RESTRICT="test"

inherit eutils multilib versionator

GITCRAP=b5ebdaa

DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
HOMEPAGE="http://rakudo.org/"
SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"

LICENSE="Artistic-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="doc java +moar"
REQUIRED_USE="|| ( java moar )"

RDEPEND="
	java? ( >=virtual/jre-1.7 )
	moar? ( ~dev-lang/moarvm-${PV} )
	dev-libs/libffi"
DEPEND="${RDEPEND}
	java? ( >=virtual/jdk-1.7 )
	dev-lang/perl"

S=${WORKDIR}/perl6-nqp-${GITCRAP}

src_configure() {
	use java && myconf+="jvm,"
	use moar && myconf+="moar,"
	perl Configure.pl --backend=${myconf} --prefix=/usr || die
	# dirty hack to make dyncall not fail
	sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
	sed -i -e 's/-Werror=missing-declarations//' Makefile || die
	sed -i -e 's/-Werror=strict-prototypes//' Makefile || die

	# more dirty hack to allow building with newer gcc
	sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
	sed -i -e 's/-Werror=nested-externs//' Makefile || die
}

src_compile() {
	emake -j1 || die
}

src_test() {
	emake -j1 test || die
}

src_install() {
	emake DESTDIR="${ED}" install || die

	dodoc CREDITS README.pod || die

	if use doc; then
		dodoc -r docs/* || die
	fi
}