You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-ml/ocaml-websocket/ocaml-websocket-2.9.ebuild

55 lines
1.3 KiB

# 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
}