onanomsg-1.0.ebuild 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit findlib
  5. DESCRIPTION="nanomsg bindings for OCaml"
  6. HOMEPAGE="https://github.com/rgrinberg/onanomsg"
  7. SRC_URI="https://github.com/rgrinberg/onanomsg/archive/${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="WTFPL-2"
  9. SLOT="0/${PV}"
  10. KEYWORDS="~amd64"
  11. IUSE="+lwt +ocamlopt test"
  12. RDEPEND="
  13. dev-libs/nanomsg:=
  14. dev-lang/ocaml:=[ocamlopt?]
  15. dev-ml/ocaml-ctypes:=
  16. dev-ml/ocaml-ipaddr:=[ocamlopt?]
  17. dev-ml/ppx_deriving:=[ocamlopt?]
  18. dev-ml/ocaml-containers:=[ocamlopt?]
  19. lwt? ( dev-ml/lwt:=[ocamlopt?] )
  20. "
  21. DEPEND="${RDEPEND}
  22. test? ( dev-ml/ounit )
  23. "
  24. src_compile() {
  25. ocaml pkg/build.ml \
  26. native=$(usex ocamlopt true false) \
  27. native-dynlink=$(usex ocamlopt true false) \
  28. lwt=$(usex lwt true false) \
  29. ounit=$(usex test true false) \
  30. || die
  31. }
  32. src_install() {
  33. opam-installer \
  34. --prefix="${ED}/usr" \
  35. --libdir="${D}/$(ocamlc -where)" \
  36. --docdir="${ED}/usr/share/doc/${PF}" \
  37. || die
  38. dodoc CHANGES README.md
  39. }