1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils multilib
12 DESCRIPTION="Proof assistant written in O'Caml"
13 HOMEPAGE="http://coq.inria.fr/"
14 SRC_URI="http://${PN}.inria.fr/distrib/V${MY_PV}/files/${MY_P}.tar.gz"
18 KEYWORDS="amd64 ppc x86"
19 IUSE="gtk debug +ocamlopt doc camlp5"
22 >=dev-lang/ocaml-3.11.2:=[ocamlopt?]
23 camlp5? ( >=dev-ml/camlp5-6.02.3:=[ocamlopt?] )
24 !camlp5? ( || ( dev-ml/camlp4 <dev-lang/ocaml-4.02.0 ) )
25 gtk? ( >=dev-ml/lablgtk-2.10.1:=[ocamlopt?] )"
28 media-libs/netpbm[png,zlib]
32 dev-texlive/texlive-pictures
33 dev-texlive/texlive-mathextra
34 dev-texlive/texlive-latexextra
40 epatch "${FILESDIR}/${PN}-8.4_p5-do-not-install-revision.patch"
41 # Fix generation of the index_urls.txt file with Gentoo dev-tex/hevea versions.
42 # http://lists.gforge.inria.fr/pipermail/coq-commits/2014-October/013582.html
43 epatch "${FILESDIR}/${P}-hevea.patch"
44 epatch "${FILESDIR}/${PN}-8.4_p5-no-clean-before-test.patch"
48 ocaml_lib=$(ocamlc -where)
52 --libdir /usr/$(get_libdir)/coq
53 --mandir /usr/share/man
54 --emacslib /usr/share/emacs/site-lisp
55 --coqdocdir /usr/$(get_libdir)/coq/coqdoc
56 --docdir /usr/share/doc/${PF}
57 --configdir /etc/xdg/${PN}
58 --lablgtkdir ${ocaml_lib}/lablgtk2
61 use debug && myconf+=( --debug )
62 use doc || myconf+=( --with-doc no )
66 myconf+=( --coqide opt )
68 myconf+=( --coqide byte )
71 myconf+=( --coqide no )
77 myconf+=( -byte-only )
81 myconf+=( --camlp5dir ${ocaml_lib}/camlp5 )
83 myconf+=( --usecamlp4 )
86 export CAML_LD_LIBRARY_PATH="${S}/kernel/byterun/"
87 ./configure ${myconf[@]} || die "configure failed"
91 emake STRIP="true" -j1 world VERBOSE=1
95 emake STRIP="true" check VERBOSE=1
99 emake STRIP="true" COQINSTALLPREFIX="${D}" install VERBOSE=1
100 dodoc README CREDITS CHANGES
102 use gtk && make_desktop_entry "coqide" "Coq IDE" "${EPREFIX}/usr/share/coq/coq.png"