dev-ml/uchar: stop using opam-installer as it is an indirect opam dep, bug #601906
authorAlexis Ballier <aballier@gentoo.org>
Mon, 9 Jan 2017 11:07:30 +0000 (12:07 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 9 Jan 2017 11:08:25 +0000 (12:08 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

dev-ml/uchar/uchar-0.0.1.ebuild

index 2cf183d878ed986063efaa816900fd017b12930c..37b0fbd221a44231abc67276391e9283970320af 100644 (file)
@@ -1,9 +1,11 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=6
 
+inherit findlib
+
 DESCRIPTION="Uchar compatibility library"
 HOMEPAGE="https://github.com/ocaml/uchar"
 SRC_URI="https://github.com/ocaml/uchar/archive/v${PV}.tar.gz -> ${P}.tar.gz"
@@ -13,9 +15,8 @@ SLOT="0/${PV}"
 KEYWORDS="~amd64"
 IUSE="+ocamlopt"
 
-RDEPEND="dev-lang/ocaml:="
-DEPEND="${RDEPEND}
-       dev-ml/opam"
+RDEPEND=">=dev-lang/ocaml-4.03:="
+DEPEND="${RDEPEND}"
 
 src_compile() {
        ocaml pkg/build.ml \
@@ -28,10 +29,9 @@ src_test() {
 }
 
 src_install() {
-       opam-installer -i \
-               --prefix="${ED}/usr" \
-               --libdir="${D}/$(ocamlc -where)" \
-               --docdir="${ED}/usr/share/doc/${PF}" \
-               ${PN}.install || die
+       # Can't use opam-installer here as it is an opam dep...
+       findlib_src_preinst
+       mv _build/pkg/META{.empty,} || die
+       ocamlfind install ${PN} _build/pkg/META || die
        dodoc README.md CHANGES.md
 }