dev-ml/num: use CFLAGS
[gentoo.git] / dev-ml / extlib / extlib-1.7.6.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="Standard library extensions for O'Caml"
9 HOMEPAGE="https://github.com/ygrek/ocaml-extlib"
10 SRC_URI="https://github.com/ygrek/ocaml-extlib/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="LGPL-2.1"
13 SLOT="0/${PV}"
14 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
15 IUSE="doc +ocamlopt"
16
17 RDEPEND="
18         >=dev-lang/ocaml-3.10.2:=[ocamlopt?]
19 "
20 DEPEND="${RDEPEND}
21         dev-ml/cppo"
22
23 S="${WORKDIR}/ocaml-${P}"
24
25 src_compile() {
26         cd src || die
27         emake -j1 all
28         if use ocamlopt; then
29                 emake opt cmxs
30         fi
31
32         if use doc; then
33                 emake doc
34         fi
35 }
36
37 src_test() {
38         emake -j1 test
39 }
40
41 src_install() {
42         findlib_src_install
43
44         # install documentation
45         dodoc README.md
46
47         if use doc; then
48                 dodoc -r src/doc/
49         fi
50 }