Merge remote-tracking branch 'remotes/hydrapolic/logstash'
[gentoo.git] / dev-lang / nqp / nqp-2016.01.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 # still not working
8 RESTRICT="test"
9
10 inherit eutils multilib versionator
11
12 GITCRAP=b5ebdaa
13
14 DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
15 HOMEPAGE="http://rakudo.org/"
16 SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
17
18 LICENSE="Artistic-2"
19 SLOT="0"
20 KEYWORDS="~x86 ~amd64"
21 IUSE="doc java +moar"
22 REQUIRED_USE="|| ( java moar )"
23
24 RDEPEND="
25         java? ( >=virtual/jre-1.7 )
26         moar? ( ~dev-lang/moarvm-${PV} )
27         dev-libs/libffi"
28 DEPEND="${RDEPEND}
29         java? ( >=virtual/jdk-1.7 )
30         dev-lang/perl"
31
32 S=${WORKDIR}/perl6-nqp-${GITCRAP}
33
34 src_configure() {
35         use java && myconf+="jvm,"
36         use moar && myconf+="moar,"
37         perl Configure.pl --backend=${myconf} --prefix=/usr || die
38         # dirty hack to make dyncall not fail
39         sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
40         sed -i -e 's/-Werror=missing-declarations//' Makefile || die
41         sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
42
43         # more dirty hack to allow building with newer gcc
44         sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
45         sed -i -e 's/-Werror=nested-externs//' Makefile || die
46 }
47
48 src_compile() {
49         emake -j1 || die
50 }
51
52 src_test() {
53         emake -j1 test || die
54 }
55
56 src_install() {
57         emake DESTDIR="${ED}" install || die
58
59         dodoc CREDITS README.pod || die
60
61         if use doc; then
62                 dodoc -r docs/* || die
63         fi
64 }