dev-ml/{camlimages,js_of_ocaml,labltk}: Dependency default
[gentoo.git] / dev-ml / opam / opam-1.3.1-r1.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 eutils
7
8 DESCRIPTION="A source-based package manager for OCaml"
9 HOMEPAGE="http://opam.ocaml.org/"
10 LICENSE="LGPL-3-with-linking-exception"
11 SLOT="0/${PV}"
12 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
13 IUSE="test"
14 RESTRICT="!test? ( test )"
15
16 if [[ ${PV} != 9999 ]]; then
17         SRC_URI="https://github.com/ocaml/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
18 else
19         inherit git-r3
20         EGIT_REPO_URI="https://github.com/ocaml/opam.git"
21 fi
22
23 RDEPEND="dev-lang/ocaml:=
24         || ( net-misc/wget net-misc/curl )
25         dev-ml/extlib:=
26         dev-ml/ocaml-re:=
27         dev-ml/ocamlgraph:=
28         dev-ml/cmdliner:=
29         dev-ml/cudf:=
30         >=dev-ml/dose3-5:=
31         dev-ml/uutf:=
32         dev-ml/jsonm:=
33 "
34 DEPEND="${RDEPEND}
35         dev-ml/findlib
36         test? ( dev-vcs/git )
37 "
38
39 src_prepare() {
40         epatch "${FILESDIR}/stublibs.patch"
41 }
42
43 src_compile() {
44         emake -j1
45         cd doc
46         emake man
47 }
48
49 src_test() {
50         EMAIL=foo@bar.com emake -j1 tests
51 }
52
53 src_install() {
54         default
55         emake DESTDIR="${D}" OPAMINSTALLER_FLAGS="--prefix=\"${ED}/usr\" --libdir=\"${D}/$(ocamlc -where)\"" libinstall
56 }