sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / dev-lang / parrot / parrot-8.1.0-r2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
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 CDEPEND="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 "
31 RDEPEND="${CDEPEND}
32         doc? ( dev-perl/JSON )"
33 DEPEND="${CDEPEND}"
34 BDEPEND="dev-lang/perl[doc?]
35         ${RDEPEND}"
36
37 src_configure() {
38         myconf="--disable-rpath"
39         use unicode || myconf+=" --without-icu"
40         use ssl     || myconf+=" --without-crypto"
41         use gdbm    || myconf+=" --without-gdbm"
42         use nls     || myconf+=" --without-gettext"
43         use gmp     || myconf+=" --without-gmp"
44         use opengl  || myconf+=" --without-opengl"
45         use pcre    || myconf+=" --without-pcre"
46
47         perl Configure.pl \
48                 --ccflags="${CFLAGS}" \
49                 --linkflags="${LDFLAGS}" \
50                 --prefix="${EPREFIX}"/usr \
51                 --libdir="${EPREFIX}"/usr/$(get_libdir) \
52                 --mandir="${EPREFIX}"/usr/share/man \
53                 --sysconfdir="${EPREFIX}"/etc \
54                 --sharedstatedir="${EPREFIX}"/var/lib/parrot \
55                 $myconf || die
56 }
57
58 src_compile() {
59         export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${S}"/blib/lib
60         # occasionally dies in parallel make
61         emake -j1
62         if use doc ; then
63                 emake -j1 html
64         fi
65 }
66
67 src_test() {
68         emake -j1 test
69 }
70
71 src_install() {
72         emake -j1 install-dev DESTDIR="${D}" DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
73         dosym parrot-ops2c /usr/bin/ops2c
74         rm -vfr "${ED}/usr/share/doc/${PF}/parrot" || die "Unable to prune excess docs"
75         DOCS=(
76                 CREDITS
77                 ChangeLog
78                 DONORS.pod
79                 PBC_COMPAT
80                 PLATFORMS
81                 README.pod
82                 RESPONSIBLE_PARTIES
83                 TODO
84         )
85         use doc && DOCS+=( editor )
86         use examples && DOCS+=( examples )
87         use doc && HTML_DOCS=(
88                         docs/html/developer.html
89                         docs/html/DONORS.pod.html
90                         docs/html/index.html
91                         docs/html/ops.html
92                         docs/html/parrotbug.html
93                         docs/html/pdds.html
94                         docs/html/pmc.html
95                         docs/html/tools.html
96                         docs/html/docs
97                         docs/html/src
98                         docs/html/tools
99         )
100         einstalldocs
101 }