dev-ml/num: use ocamlopt
[gentoo.git] / dev-ml / camlp5 / camlp5-7.11.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit findlib
7
8 DESCRIPTION="A preprocessor-pretty-printer of ocaml"
9 HOMEPAGE="https://camlp5.github.io/"
10 SRC_URI="https://github.com/camlp5/camlp5/archive/rel$(ver_rs 1- '').tar.gz -> ${P}.tar.gz"
11 S="${WORKDIR}/${PN}-rel$(ver_rs 1- '')"
12
13 LICENSE="BSD"
14 SLOT="0/${PV}"
15 KEYWORDS="~alpha amd64 ppc x86"
16 IUSE="doc +ocamlopt"
17
18 DEPEND="dev-lang/ocaml"
19 RDEPEND="${DEPEND}"
20
21 DOCS="CHANGES DEVEL ICHANGES README.md UPGRADING MODE"
22
23 src_configure() {
24         ./configure \
25                 --strict \
26                 -prefix /usr \
27                 -bindir /usr/bin \
28                 -libdir /usr/$(get_libdir)/ocaml \
29                 -mandir /usr/share/man || die "configure failed"
30 }
31
32 src_compile() {
33         emake out
34         if use ocamlopt; then
35                 emake  opt
36                 emake  opt.opt
37         fi
38 }
39
40 src_install() {
41         use doc && HTML_DOCS="doc/*"
42
43         default
44
45         # findlib support
46         insinto "$(ocamlfind printconf destdir)/${PN}"
47         doins etc/META
48 }