commit:     71182f821273a894cb9c960a72b33658bc7dd56d
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  4 06:58:42 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Jul  4 06:58:42 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71182f82

dev-ml/ocaml-cstruct: build only enabled targets, should fix bug #623742

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-ml/ocaml-cstruct/ocaml-cstruct-3.0.2.ebuild | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

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 388db7e2542..39b192f16a3 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" \

Reply via email to