dev-ml/camlp5: restricted 7.10 wrt ocaml
[gentoo.git] / dev-ml / uchar / uchar-0.0.2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit findlib
7
8 DESCRIPTION="Uchar compatibility library"
9 HOMEPAGE="https://github.com/ocaml/uchar"
10 SRC_URI="https://github.com/ocaml/uchar/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="LGPL-2-with-linking-exception"
13 SLOT="0/${PV}"
14 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
15 IUSE="+ocamlopt"
16
17 RDEPEND=">=dev-lang/ocaml-4.03:="
18 DEPEND="${RDEPEND} dev-ml/ocamlbuild"
19
20 # This is mostly a compat wrapper for older ocaml versions we don't support. No
21 # need to test it, plus it fails when installing for the first time:
22 # https://bugs.gentoo.org/show_bug.cgi?id=624144
23 RESTRICT="test"
24
25 src_compile() {
26         ocaml pkg/build.ml \
27                 "native=$(usex ocamlopt true false)" \
28                 "native-dynlink=$(usex ocamlopt true false)" || die
29 }
30
31 src_test() {
32         ocamlbuild -X src -use-ocamlfind -pkg uchar test/testpkg.native || die
33 }
34
35 src_install() {
36         # Can't use opam-installer here as it is an opam dep...
37         findlib_src_preinst
38         mv _build/pkg/META{.empty,} || die
39         ocamlfind install ${PN} _build/pkg/META || die
40         dodoc README.md CHANGES.md
41 }