Gentoo Archives: gentoo-dev

From: Alfredo Tupone <tupone@g.o>
To: gentoo-dev@l.g.o, ml@g.o
Subject: [gentoo-dev] dune.eclass change to build release
Date: Sat, 02 Oct 2021 07:41:40
Message-Id: 20211002094126.715895ed@alfredo-i5
1 This is for review the change i ndune.eclass
2
3 The reason is that the new ocaml-4.12 compiler raise some
4 warning that dune transform in fatal error
5 The following changes is to build with profile release.
6 That will change compiler warning to not raise fatal error during build
7
8 diff --git a/eclass/dune.eclass b/eclass/dune.eclass
9 index 5e2c1fa1f7c4..02a8a870ef43 100644
10 --- a/eclass/dune.eclass
11 +++ b/eclass/dune.eclass
12 @@ -30,31 +30,31 @@ QA_FLAGS_IGNORED='.*'
13
14 EXPORT_FUNCTIONS src_compile src_test src_install
15
16 RDEPEND=">=dev-lang/ocaml-4:=[ocamlopt?] dev-ml/dune:="
17 case ${EAPI:-0} in
18 5|6)
19 DEPEND="${RDEPEND} dev-ml/dune"
20 ;;
21 *)
22 BDEPEND="dev-ml/dune dev-lang/ocaml"
23 DEPEND="${RDEPEND}"
24 ;;
25 esac
26
27 dune_src_compile() {
28 - dune build @install || die
29 + dune build @install --profile release || die
30 }
31
32 dune_src_test() {
33 dune runtest || die
34 }
35
36 # @FUNCTION: dune-install
37 # @USAGE: <list of packages>
38 # @DESCRIPTION:
39 # Installs the dune packages given as arguments. For each "${pkg}"
40 element in # that list, "${pkg}.install" must be readable from
41 "${PWD}/_build/default" dune-install() {
42 local pkg
43 for pkg ; do
44 dune install \