commit:     4558f4f84ffba0838860f5357043571a67c1cc06
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 22 08:12:11 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Sep 22 08:31:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4558f4f8

dev-ml/ocaml-cstruct: use opam.eclass

Package-Manager: Portage-2.3.10, Repoman-2.3.3

 dev-ml/ocaml-cstruct/ocaml-cstruct-3.1.1.ebuild | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/dev-ml/ocaml-cstruct/ocaml-cstruct-3.1.1.ebuild 
b/dev-ml/ocaml-cstruct/ocaml-cstruct-3.1.1.ebuild
index 0acf2607860..1b42677acb6 100644
--- a/dev-ml/ocaml-cstruct/ocaml-cstruct-3.1.1.ebuild
+++ b/dev-ml/ocaml-cstruct/ocaml-cstruct-3.1.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=5
 
-inherit findlib
+inherit findlib opam
 
 DESCRIPTION="Map OCaml arrays onto C-like structs"
 HOMEPAGE="https://github.com/mirage/ocaml-cstruct https://mirage.io";
@@ -26,14 +26,12 @@ RDEPEND="
                dev-ml/ocaml-migrate-parsetree:=
                >=dev-ml/ppx_tools_versioned-5.0.1:=
        )
-       >=dev-lang/ocaml-4.01:=
        dev-ml/ocplib-endian:=
        dev-ml/sexplib:=
        dev-ml/type-conv:=
 "
 DEPEND="
        dev-ml/jbuilder
-       dev-ml/opam
        test? (
                dev-ml/ounit
                ppx? ( dev-ml/ppx_driver dev-ml/ppx_sexp_conv )
@@ -57,18 +55,10 @@ src_test() {
        jbuilder runtest -p $(get_targets) || die
 }
 
-oinstall() {
-       opam-installer -i \
-               --prefix="${ED}/usr" \
-               --libdir="${D}/$(ocamlc -where)" \
-               --docdir="${ED}/usr/share/doc/${PF}" \
-               ${1}.install || die
-}
-
 src_install() {
-       oinstall cstruct
-       oinstall cstruct-unix
-       use lwt && oinstall cstruct-lwt
-       use async && oinstall cstruct-async
-       use ppx && oinstall ppx_cstruct
+       opam-install cstruct
+       opam-install cstruct-unix
+       use lwt && opam-install cstruct-lwt
+       use async && opam-install cstruct-async
+       use ppx && opam-install ppx_cstruct
 }

Reply via email to