From: Alexis Ballier Date: Tue, 4 Jul 2017 06:58:42 +0000 (+0200) Subject: dev-ml/ocaml-cstruct: build only enabled targets, should fix bug #623742 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=71182f821273a894cb9c960a72b33658bc7dd56d;p=gentoo.git dev-ml/ocaml-cstruct: build only enabled targets, should fix bug #623742 Package-Manager: Portage-2.3.6, Repoman-2.3.2 --- 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 388db7e25424..39b192f16a3c 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" \