diff --git a/dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.2.ebuild b/dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.2.ebuild index 388db7e25424b..39b192f16a3ce 100644 --- a/dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.2.ebuild +++ b/dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.2.ebuild @@ -38,6 +38,22 @@ DEPEND=" ${RDEPEND} " +get_targets() { + local tgt="cstruct,cstruct-unix" + use lwt && tgt+=",cstruct-lwt" + use async && tgt+=",cstruct-async" + use ppx && tgt+=",ppx_cstruct" + echo "${tgt}" +} + +src_compile() { + jbuilder build -p $(get_targets) || die +} + +src_test() { + jbuilder runtest -p $(get_targets) || die +} + oinstall() { opam-installer -i \ --prefix="${ED}/usr" \