dev-ml/labltk: arm stable wrt bug #708672
[gentoo.git] / dev-ml / cmdliner / cmdliner-1.0.2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit findlib
7
8 DESCRIPTION="Declarative definition of command line interfaces for OCaml"
9 HOMEPAGE="http://erratique.ch/software/cmdliner"
10 SRC_URI="http://erratique.ch/software/${PN}/releases/${P}.tbz"
11
12 LICENSE="ISC"
13 SLOT="0/${PV}"
14 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
15 IUSE="+ocamlopt test"
16 RESTRICT="!test? ( test )"
17
18 RDEPEND="
19         >=dev-lang/ocaml-4:=[ocamlopt?]
20         dev-ml/result:=
21 "
22 DEPEND="${RDEPEND}
23         dev-ml/topkg
24         dev-ml/ocamlbuild"
25
26 src_compile() {
27         ocaml pkg/pkg.ml build \
28                 --tests $(usex test true false) \
29                 || die
30 }
31
32 src_test() {
33         ocaml pkg/pkg.ml test || die
34 }
35
36 src_install() {
37         # Can't use opam-installer here as it is an opam dep...
38         findlib_src_preinst
39         local nativelibs=""
40         use ocamlopt && nativelibs="$(echo _build/src/cmdliner.cm{x,xa,xs} _build/src/cmdliner.a)"
41         ocamlfind install cmdliner _build/pkg/META \
42                 _build/src/cmdliner.mli _build/src/cmdliner.cm{a,i} ${nativelibs} || die
43         dodoc README.md CHANGES.md
44 }