summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.1.ebuild')
-rw-r--r--dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.1.ebuild51
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.1.ebuild b/dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.1.ebuild
new file mode 100644
index 000000000000..1c5b40081f27
--- /dev/null
+++ b/dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit findlib
+
+DESCRIPTION="Map OCaml arrays onto C-like structs"
+HOMEPAGE="https://github.com/mirage/ocaml-cstruct https://mirage.io"
+SRC_URI="https://github.com/mirage/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="async +lwt +ppx test"
+
+RDEPEND="
+ async? ( dev-ml/async:= )
+ lwt? ( dev-ml/lwt:= )
+ ppx? (
+ dev-ml/ppx_tools:=
+ 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 )
+ ${RDEPEND}
+"
+
+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
+}