dev-ml/ppx_deriving: Use opam-installer to install it properly
authorAlexis Ballier <aballier@gentoo.org>
Sat, 6 Feb 2016 15:20:30 +0000 (16:20 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Sat, 6 Feb 2016 15:39:11 +0000 (16:39 +0100)
Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
dev-ml/ppx_deriving/ppx_deriving-3.0-r1.ebuild [moved from dev-ml/ppx_deriving/ppx_deriving-3.0.ebuild with 80% similarity]

similarity index 80%
rename from dev-ml/ppx_deriving/ppx_deriving-3.0.ebuild
rename to dev-ml/ppx_deriving/ppx_deriving-3.0-r1.ebuild
index 933139f965587129ae2d3569006b1230ec0591f4..0099ce56db760956b8d6a32926bf6a7cfbf4b73a 100644 (file)
@@ -19,6 +19,7 @@ DEPEND="dev-ml/ppx_tools:=
        >=dev-lang/ocaml-4.02.3:=[ocamlopt?]"
 RDEPEND="${DEPEND}"
 DEPEND="${RDEPEND}
+       dev-ml/opam
        test? ( dev-ml/ounit )"
 
 src_compile() {
@@ -40,12 +41,12 @@ src_test() {
 }
 
 src_install() {
-       findlib_src_preinst
-       # Copied from upstream makefile
-       grep -E '^[[:space:]]+' ppx_deriving.install | \
-               awk '{ print $1 }' | \
-               sed -e 's:"?*::g'  | \
-               xargs ocamlfind install ppx_deriving || die
+       opam-installer -i \
+               --prefix="${ED}/usr" \
+               --libdir="${D}/$(ocamlc -where)" \
+               --docdir="${ED}/usr/share/doc/${PF}" \
+               ${PN}.install || die
+       mv "${ED}/usr/lib/ppx_deriving/ppx_deriving" "${D}/$(ocamlc -where)/ppx_deriving/" || die
 
        use doc && dohtml api.docdir/*