dev-python/pip: arm64 keyworded (bug #719700)
[gentoo.git] / dev-lang / parrot / parrot-8.1.0-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit eutils multilib
7
8 # weird failures
9 RESTRICT="test"
10
11 DESCRIPTION="Virtual machine designed to compile and execute bytecode for dynamic languages"
12 HOMEPAGE="http://www.parrot.org/"
13 SRC_URI="ftp://ftp.parrot.org/pub/parrot/releases/all/${PV}/${P}.tar.gz"
14
15 LICENSE="Artistic-2"
16 SLOT="0/${PV}"
17 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
18 IUSE="opengl nls doc examples gdbm +gmp ssl +unicode pcre"
19
20 RDEPEND="sys-libs/readline:0=
21         dev-libs/libffi
22         net-libs/libnsl:0=
23         opengl? ( media-libs/freeglut )
24         nls? ( sys-devel/gettext )
25         unicode? ( >=dev-libs/icu-2.6:= )
26         gdbm? ( >=sys-libs/gdbm-1.8.3-r1 )
27         gmp? ( >=dev-libs/gmp-4.1.4:0= )
28         ssl? ( dev-libs/openssl:0= )
29         pcre? ( dev-libs/libpcre )
30         doc? ( dev-perl/JSON )"
31
32 DEPEND="dev-lang/perl[doc?]
33         ${RDEPEND}"
34
35 src_configure() {
36         myconf="--disable-rpath"
37         use unicode || myconf+=" --without-icu"
38         use ssl     || myconf+=" --without-crypto"
39         use gdbm    || myconf+=" --without-gdbm"
40         use nls     || myconf+=" --without-gettext"
41         use gmp     || myconf+=" --without-gmp"
42         use opengl  || myconf+=" --without-opengl"
43         use pcre    || myconf+=" --without-pcre"
44
45         perl Configure.pl \
46                 --ccflags="${CFLAGS}" \
47                 --linkflags="${LDFLAGS}" \
48                 --prefix="${EPREFIX}"/usr \
49                 --libdir="${EPREFIX}"/usr/$(get_libdir) \
50                 --mandir="${EPREFIX}"/usr/share/man \
51                 --sysconfdir="${EPREFIX}"/etc \
52                 --sharedstatedir="${EPREFIX}"/var/lib/parrot \
53                 $myconf || die
54 }
55
56 src_compile() {
57         export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${S}"/blib/lib
58         # occasionally dies in parallel make
59         emake -j1
60         if use doc ; then
61                 emake -j1 html
62         fi
63 }
64
65 src_test() {
66         emake -j1 test
67 }
68
69 src_install() {
70         emake -j1 install-dev DESTDIR="${D}" DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
71         dodoc CREDITS DONORS.pod PBC_COMPAT PLATFORMS RESPONSIBLE_PARTIES TODO
72         dosym parrot-ops2c /usr/bin/ops2c
73         if use examples; then
74                 insinto "/usr/share/doc/${PF}/examples"
75                 doins -r examples/*
76         fi
77         if use doc; then
78                 insinto "/usr/share/doc/${PF}/editor"
79                 doins -r editor
80                 cd docs/html
81                 dohtml -r developer.html DONORS.pod.html index.html ops.html parrotbug.html pdds.html \
82                         pmc.html tools.html docs src tools || die
83         fi
84 }