sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / dev-lang / parrot / parrot-7.5.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         opengl? ( media-libs/freeglut )
23         nls? ( sys-devel/gettext )
24         unicode? ( >=dev-libs/icu-2.6:= )
25         gdbm? ( >=sys-libs/gdbm-1.8.3-r1 )
26         gmp? ( >=dev-libs/gmp-4.1.4:0= )
27         ssl? ( dev-libs/openssl:0= )
28         pcre? ( dev-libs/libpcre )
29         doc? ( dev-perl/JSON )"
30
31 DEPEND="dev-lang/perl[doc?]
32         ${RDEPEND}"
33
34 src_configure() {
35         myconf="--disable-rpath"
36         use unicode || myconf+=" --without-icu"
37         use ssl     || myconf+=" --without-crypto"
38         use gdbm    || myconf+=" --without-gdbm"
39         use nls     || myconf+=" --without-gettext"
40         use gmp     || myconf+=" --without-gmp"
41         use opengl  || myconf+=" --without-opengl"
42         use pcre    || myconf+=" --without-pcre"
43
44         perl Configure.pl \
45                 --ccflags="${CFLAGS}" \
46                 --linkflags="${LDFLAGS}" \
47                 --prefix="${EPREFIX}"/usr \
48                 --libdir="${EPREFIX}"/usr/$(get_libdir) \
49                 --mandir="${EPREFIX}"/usr/share/man \
50                 --sysconfdir="${EPREFIX}"/etc \
51                 --sharedstatedir="${EPREFIX}"/var/lib/parrot \
52                 $myconf || die
53 }
54
55 src_compile() {
56         export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${S}"/blib/lib
57         # occasionally dies in parallel make
58         emake -j1
59         if use doc ; then
60                 emake -j1 html
61         fi
62 }
63
64 src_test() {
65         emake -j1 test
66 }
67
68 src_install() {
69         emake -j1 install-dev DESTDIR="${D}" DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
70         dodoc CREDITS DONORS.pod PBC_COMPAT PLATFORMS RESPONSIBLE_PARTIES TODO
71         dosym parrot-ops2c /usr/bin/ops2c
72         if use examples; then
73                 insinto "/usr/share/doc/${PF}/examples"
74                 doins -r examples/*
75         fi
76         if use doc; then
77                 insinto "/usr/share/doc/${PF}/editor"
78                 doins -r editor
79                 cd docs/html
80                 dohtml -r developer.html DONORS.pod.html index.html ops.html parrotbug.html pdds.html \
81                         pmc.html tools.html docs src tools || die
82         fi
83 }