Gentoo Archives: gentoo-dev

From: Anna <cyber+gentoo@×××××.in>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Proposed changes to findlib.eclass
Date: Thu, 30 Jun 2022 18:32:05
Message-Id: Yr3sG72Y85OrUvSn@sysrq.in
In Reply to: [gentoo-dev] Proposed changes to findlib.eclass by Alfredo Tupone
1 On 2022-06-30 20:25, Alfredo Tupone wrote:
2 > dev-ml/findlib needs ocamlopt to build other packages with ocamlopt
3 > (native code)
4 >
5 > Alfredo
6
7 > diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass
8 > index 0e14514e298..f6c2657ecdb 100644
9 > --- a/eclass/findlib.eclass
10 > +++ b/eclass/findlib.eclass
11 > @@ -14,35 +14,38 @@
12 > case ${EAPI:-0} in
13 > [67]) ;;
14 > *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
15 > esac
16
17 EAPI 8 support?
18
19 > if [[ -z ${_FINDLIB_ECLASS} ]] ; then
20 > _FINDLIB_ECLASS=1
21 >
22 > # Do not complain about CFLAGS etc since ML projects do not use them.
23 > QA_FLAGS_IGNORED='.*'
24 >
25 > # Required to use the ocamlopt? dep in RDEPEND below
26 > IUSE="+ocamlopt"
27 >
28 > # From this findlib version, there is proper stublibs support.
29 > -DEPEND=">=dev-ml/findlib-1.0.4-r1"
30 > +DEPEND=">=dev-ml/findlib-1.0.4-r1[ocamlopt?]"
31 > [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )"
32 > RDEPEND="dev-lang/ocaml:=[ocamlopt?]"
33 > [[ ${FINDLIB_USE} ]] && RDEPEND="${FINDLIB_USE}? ( ${RDEPEND} )"
34 >
35 > +# @FUNCTION: check_ocamlfind
36 > +# @DESCRIPTION:
37 > +# Die if ocamlfind is not found
38 > check_ocamlfind() {
39 > if [ ! -x "${EPREFIX}"/usr/bin/ocamlfind ] ; then
40
41 Bash tests.
42
43 > eerror "In ${ECLASS}: could not find the ocamlfind executable"
44 > eerror "Please report this bug on Gentoo's Bugzilla, assigning to ml@g.o"
45 > die "ocamlfind executable not found"
46 > fi
47 > }
48 >
49 > # @FUNCTION: findlib_src_preinst
50 > # @DESCRIPTION:
51 > # Prepare the image for a findlib installation.
52 > # We use the stublibs style, so no ld.conf needs to be
53 > # updated when a package installs C shared libraries.
54 > findlib_src_preinst() {
55 > has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
56
57 This line should be dropped since these EAPIs are not supported.