dev-ml/ppx_deriving: bump to 4.0
authorAlexis Ballier <aballier@gentoo.org>
Mon, 27 Jun 2016 09:02:24 +0000 (11:02 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 27 Jun 2016 10:31:35 +0000 (12:31 +0200)
Package-Manager: portage-2.3.0

dev-ml/ppx_deriving/Manifest
dev-ml/ppx_deriving/ppx_deriving-4.0.ebuild [new file with mode: 0644]

index f23ba37d501a20e0adea4375151d15dacbda32f5..bfd7ada0cd453d9d62f4788b2b35c449e9b9b528 100644 (file)
@@ -1 +1,2 @@
 DIST ppx_deriving-3.3.tar.gz 43707 SHA256 6e7424f36cc35d1266acc3dcec0371913fec432d1fd5b4892a009e2db26140c8 SHA512 d8c4a289c62f4b2e4a1affcf6225c5929dd45fb705714b7071b0c01609c0bf833b0367d35f95cac344ad9d06a954f86b8c440729193112d723442f790a5c2af3 WHIRLPOOL 121ffbafd1314ffdcbc593808e691f5c3e370c62bc4bac3608eac565fabe8af1a55522b3e79dfafbf5b65f497486851c1d5aaa15d44fe6f3e8e56504353deb65
+DIST ppx_deriving-4.0.tar.gz 45941 SHA256 df2cc4d752e70cbb13ceadae620fbb25e94913a50633f1829e6a8a2c57c278b2 SHA512 1487650ca70b5e7402f49d533aa9d6fb7d2dbf84d8c0e2a12b22659814e7c003577a793376f3848047423e6502e50e5be3714c8fca10bd518818e64c8a09f660 WHIRLPOOL 0952372e94021827fe4c959a9d50e8418efc7252d6085d269affba0d8fdc7c48d5e7905ace06ac9882e3741c3469b0ffcfaa009ef6723c01e76fbc7f209d5540
diff --git a/dev-ml/ppx_deriving/ppx_deriving-4.0.ebuild b/dev-ml/ppx_deriving/ppx_deriving-4.0.ebuild
new file mode 100644 (file)
index 0000000..17feda3
--- /dev/null
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit findlib
+
+DESCRIPTION="Type-driven code generation for OCaml"
+HOMEPAGE="https://github.com/whitequark/ppx_deriving"
+SRC_URI="https://github.com/whitequark/ppx_deriving/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="doc +ocamlopt test"
+
+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() {
+       cp pkg/META.in pkg/META || die
+       ocaml pkg/build.ml \
+               native=$(usex ocamlopt true false) \
+               native-dynlink=$(usex ocamlopt true false) \
+               || die
+       use doc && emake doc
+}
+
+src_test() {
+       ocamlbuild -j 0 -use-ocamlfind -classic-display \
+                       src_test/test_ppx_deriving.byte -- || die
+       if use ocamlopt;  then
+               ocamlbuild -j 0 -use-ocamlfind -classic-display \
+                       src_test/test_ppx_deriving.native -- || die
+       fi
+}
+
+src_install() {
+       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/*
+
+       dodoc CHANGELOG.md README.md
+}