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

dev-ml/jsonm/jsonm-1.0.0.ebuild

index 71e10a865591fe157ae413fd807bed5b75760a0c..0281afd77e9198886c925dc1ebe1df502753d314 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="5"
 
+inherit findlib
+
 DESCRIPTION="Non-blocking streaming JSON codec for OCaml"
 HOMEPAGE="http://erratique.ch/software/jsonm"
 SRC_URI="http://erratique.ch/software/jsonm/releases/${P}.tbz"
@@ -18,7 +20,6 @@ RDEPEND="dev-ml/uutf:=
        dev-ml/uchar:="
 DEPEND="${RDEPEND}
        dev-ml/topkg
-       dev-ml/opam
        dev-ml/ocamlbuild
        dev-ml/findlib"
 
@@ -29,10 +30,10 @@ src_compile() {
 }
 
 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
+       local nativelibs="$(echo _build/src/${PN}.cm{x,xa,xs,ti} _build/src/${PN}.a)"
+       ocamlfind install ${PN} _build/pkg/META _build/src/${PN}.mli _build/src/${PN}.cm{a,i} ${nativelibs} || die
+       newbin _build/test/jsontrip.native jsontrip
        dodoc CHANGES.md TODO.md README.md
 }