1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="O'Caml Graph library"
9 HOMEPAGE="http://ocamlgraph.lri.fr/index.en.html"
10 SRC_URI="http://ocamlgraph.lri.fr/download/${P}.tar.gz"
13 KEYWORDS="~amd64 ~arm ~arm64 ppc x86"
14 RDEPEND=">=dev-lang/ocaml-3.10.2:=[ocamlopt?]
15 gtk? ( dev-ml/lablgtk:=[gnomecanvas,ocamlopt?] )"
17 doc? ( dev-tex/hevea dev-ml/ocamlweb )"
18 IUSE="doc examples gtk +ocamlopt"
21 epatch "${FILESDIR}/${PN}-1.8.6-installfindlib.patch"
22 epatch "${FILESDIR}/${P}-test.patch"
27 use ocamlopt && emake opt
34 emake OCAMLBEST=$(usex ocamlopt opt byte) viewer dgraph editor
40 use ocamlopt || export WANT_OCAMLOPT=no
41 use gtk && export WANT_GTK=yes
46 use ocamlopt && ext=opt
47 newbin dgraph/dgraph.${ext} ${PN}-dgraph
48 newbin editor/editor.${ext} ${PN}-editor
49 newbin view_graph/viewgraph.${ext} ${PN}-viewgraph
52 dodoc README.adoc CREDITS FAQ CHANGES
58 insinto /usr/share/doc/${PF}
60 docompress -x /usr/share/doc/${PF}/examples