summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-ml/ocaml-websocket/Manifest1
-rw-r--r--dev-ml/ocaml-websocket/metadata.xml12
-rw-r--r--dev-ml/ocaml-websocket/ocaml-websocket-2.9.ebuild54
3 files changed, 67 insertions, 0 deletions
diff --git a/dev-ml/ocaml-websocket/Manifest b/dev-ml/ocaml-websocket/Manifest
new file mode 100644
index 00000000000..94a592d40bf
--- /dev/null
+++ b/dev-ml/ocaml-websocket/Manifest
@@ -0,0 +1 @@
+DIST ocaml-websocket-2.9.tar.gz 23946 SHA256 fcf53aec904f0defbd76ec4aea9a4363bb38912b76c84cf97ffa1a5bfcd260c3 SHA512 eab5e4f971985c03ca70b46abb54ca8a09491e5ebc803b57ddf8447447b6926da2117fd882c7cb5a9a7282290e756f535e4584f09cbd21ce2554f20df1db7ae8 WHIRLPOOL fbefe08995de2721370571a66021c8dd6f51d65f142e310f1cf34f4fdcc8ea4adb6ab3dbec70fa01660cdf1a2c22cffc31a4c87ae674864b528839c06d96a423
diff --git a/dev-ml/ocaml-websocket/metadata.xml b/dev-ml/ocaml-websocket/metadata.xml
new file mode 100644
index 00000000000..fa5c1b148ef
--- /dev/null
+++ b/dev-ml/ocaml-websocket/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+</maintainer>
+ <use>
+ <flag name="async">Enables support for the <pkg>dev-ml/async</pkg> asynchronous execution library.</flag>
+ <flag name="lwt">Enables support for the <pkg>dev-ml/lwt</pkg> cooperative light-weight thread library.</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-ml/ocaml-websocket/ocaml-websocket-2.9.ebuild b/dev-ml/ocaml-websocket/ocaml-websocket-2.9.ebuild
new file mode 100644
index 00000000000..6dd48459ec4
--- /dev/null
+++ b/dev-ml/ocaml-websocket/ocaml-websocket-2.9.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Websocket library for OCaml"
+HOMEPAGE="https://github.com/vbmithr/ocaml-websocket"
+SRC_URI="https://github.com/vbmithr/ocaml-websocket/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="+ocamlopt async +ssl lwt"
+
+DEPEND="
+ dev-lang/ocaml:=[ocamlopt?]
+ dev-ml/astring:=[ocamlopt(+)?]
+ dev-ml/ocaml-cohttp:=[ocamlopt(+)?,async?,lwt?]
+ dev-ml/cppo:=[ocamlopt(+)?]
+ dev-ml/ocplib-endian:=[ocamlopt(+)?]
+ async? (
+ dev-ml/async:=[ocamlopt(+)?]
+ ssl? ( dev-ml/async_ssl:=[ocamlopt(+)?] )
+ )
+ lwt? ( dev-ml/lwt:=[ocamlopt(+)?] )
+ ssl? ( dev-ml/cryptokit:=[ocamlopt(+)?] )
+
+"
+RDEPEND="${DEPEND}"
+DEPEND="${DEPEND}
+ dev-ml/opam
+ dev-ml/ocamlbuild"
+
+src_compile() {
+ ocaml pkg/build.ml \
+ native=$(usex ocamlopt true false) \
+ native-dynlink=$(usex ocamlopt true false) \
+ lwt=$(usex lwt true false) \
+ async=$(usex async true false) \
+ async_ssl=$(usex async "$(usex ssl true false)" false) \
+ nocrypto=false \
+ cryptokit=$(usex ssl true false) \
+ test=false \
+ || die
+}
+
+src_install() {
+ opam-installer -i \
+ --prefix="${ED}/usr" \
+ --libdir="${D}/$(ocamlc -where)" \
+ --docdir="${ED}/usr/share/doc/${PF}" \
+ websocket.install || die
+ dodoc README CHANGES
+}