Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/topkg/
Date: Mon, 14 Jun 2021 18:41:08
Message-Id: 1623696055.c2c0cc0e8cfc9c592252a0c6d5e5ff23a6215c4e.sam@gentoo
1 commit: c2c0cc0e8cfc9c592252a0c6d5e5ff23a6215c4e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 14 18:40:37 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 14 18:40:55 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2c0cc0e
7
8 dev-ml/topkg: fix build without ocamlopt
9
10 Closes: https://bugs.gentoo.org/795987
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 dev-ml/topkg/topkg-1.0.3.ebuild | 11 ++++++++---
14 1 file changed, 8 insertions(+), 3 deletions(-)
15
16 diff --git a/dev-ml/topkg/topkg-1.0.3.ebuild b/dev-ml/topkg/topkg-1.0.3.ebuild
17 index 15977974d68..6afcb25f56b 100644
18 --- a/dev-ml/topkg/topkg-1.0.3.ebuild
19 +++ b/dev-ml/topkg/topkg-1.0.3.ebuild
20 @@ -12,12 +12,12 @@ SRC_URI="https://github.com/dbuenzli/topkg/archive/v${PV}.tar.gz -> ${P}.tar.gz"
21 LICENSE="ISC"
22 SLOT="0/${PV}"
23 KEYWORDS="amd64 arm arm64 ppc ppc64 x86"
24 -IUSE=""
25 +IUSE="+ocamlopt"
26
27 RDEPEND="dev-ml/result:=
28 dev-ml/ocamlbuild:=
29 dev-ml/findlib:=
30 - dev-lang/ocaml:="
31 + dev-lang/ocaml:=[ocamlopt?]"
32 DEPEND="${RDEPEND}"
33
34 src_compile() {
35 @@ -27,7 +27,12 @@ src_compile() {
36 src_install() {
37 # Can't use opam-installer here as it is an opam dep...
38 findlib_src_preinst
39 - local nativelibs="$(echo _build/src/${PN}*.cm{x,xa,xs,ti} _build/src/${PN}.a)"
40 +
41 + local nativelibs
42 + if use ocamlopt; then
43 + nativelibs=$(echo _build/src/${PN}*.cm{x,xa,xs,ti} _build/src/${PN}.a)
44 + fi
45 +
46 ocamlfind install ${PN} _build/pkg/META _build/src/${PN}.mli _build/src/${PN}.cm{a,i} ${nativelibs} || die
47 dodoc CHANGES.md DEVEL.md README.md
48 }