1 |
|
# Copyright 1999-2023 Gentoo Authors
|
|
1 |
# Copyright 1999-2022 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit dune
|
|
6 |
inherit dune multiprocessing
|
7 |
7 |
|
8 |
|
DESCRIPTION="A composable build system for OCaml"
|
|
8 |
DESCRIPTION="Private libraries of Dune"
|
9 |
9 |
HOMEPAGE="https://github.com/ocaml/dune"
|
10 |
10 |
SRC_URI="https://github.com/ocaml/dune/archive/${PV}.tar.gz -> dune-${PV}.tar.gz"
|
11 |
11 |
S="${WORKDIR}/dune-${PV}"
|
12 |
12 |
|
13 |
13 |
LICENSE="Apache-2.0"
|
14 |
14 |
SLOT="0/${PV}"
|
15 |
|
KEYWORDS="amd64 arm ~arm64 ~ppc ppc64 ~riscv x86"
|
16 |
|
IUSE="+ocamlopt test"
|
17 |
|
RESTRICT="!test? ( test )"
|
18 |
|
|
19 |
|
BDEPEND="
|
20 |
|
~dev-ml/dune-${PV}
|
21 |
|
test? (
|
22 |
|
dev-ml/core_bench
|
23 |
|
dev-ml/menhir
|
24 |
|
dev-ml/opam
|
25 |
|
dev-ml/ppx_expect
|
26 |
|
)
|
27 |
|
"
|
|
15 |
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
|
|
16 |
IUSE="+ocamlopt"
|
|
17 |
RESTRICT="test"
|
|
18 |
|
|
19 |
BDEPEND=">=dev-ml/dune-3"
|
28 |
20 |
DEPEND="
|
29 |
|
dev-ml/csexp:=[ocamlopt?]
|
30 |
|
dev-ml/findlib:=[ocamlopt?]
|
31 |
|
>=dev-lang/ocaml-4.09:=
|
|
21 |
>=dev-ml/csexp-1.5:=[ocamlopt?]
|
|
22 |
dev-ml/pp:=[ocamlopt?]
|
|
23 |
~dev-ml/dyn-${PV}:=[ocamlopt?]
|
|
24 |
~dev-ml/stdune-${PV}:=[ocamlopt?]
|
|
25 |
>=dev-lang/ocaml-4.08
|
32 |
26 |
"
|
33 |
27 |
RDEPEND="${DEPEND}"
|
34 |
28 |
|
35 |
|
PATCHES=( "${FILESDIR}"/${P}-test.patch )
|
36 |
|
|
37 |
|
# TODO for test deps:
|
38 |
|
# Add cram?
|
39 |
|
# Add dev-ml/js_of_ocaml once dev-ml/ocaml-base64 is ported to Dune
|
40 |
|
# Add coq?
|
41 |
|
|
42 |
|
src_prepare() {
|
43 |
|
default
|
44 |
|
|
45 |
|
# Keep this list in sync with dev-ml/dune-configurator
|
46 |
|
local bad_tests=(
|
47 |
|
# List of tests calling git, mercurial, etc
|
48 |
|
test/blackbox-tests/test-cases/dune-project-meta/main.t
|
49 |
|
test/blackbox-tests/test-cases/meta-template-version-bug.t
|
50 |
|
test/blackbox-tests/test-cases/subst/project-name-restriction.t
|
51 |
|
test/blackbox-tests/test-cases/subst/with-opam-file.t
|
52 |
|
test/blackbox-tests/test-cases/subst.t
|
53 |
|
test/blackbox-tests/test-cases/subst/unicode.t
|
54 |
|
test/blackbox-tests/test-cases/subst/from-project-file.t
|
55 |
|
test/blackbox-tests/test-cases/trace-file.t
|
56 |
|
otherlibs/build-info/test/run.t
|
57 |
|
test/expect-tests/vcs_tests.ml
|
58 |
|
|
59 |
|
# Strange failures, seemingly from newer versions of deps
|
60 |
|
test/blackbox-tests/test-cases/merlin/allow_approximate_merlin_warn.t
|
61 |
|
test/blackbox-tests/test-cases/merlin/merlin-tests.t
|
62 |
|
test/blackbox-tests/test-cases/merlin/github4125.t
|
63 |
|
test/blackbox-tests/test-cases/install-dry-run.t
|
64 |
|
test/blackbox-tests/test-cases/c-flags.t
|
65 |
|
test/blackbox-tests/test-cases/install-libdir.t
|
66 |
|
test/blackbox-tests/test-cases/dune-cache/trim.t
|
67 |
|
|
68 |
|
# Strange failures about opam not being initialised
|
69 |
|
test/blackbox-tests/test-cases/merlin/merlin-from-subdir.t
|
70 |
|
test/blackbox-tests/test-cases/merlin/symlinks.t
|
71 |
|
test/blackbox-tests/test-cases/merlin/src-dirs-of-deps.t
|
72 |
|
test/blackbox-tests/test-cases/merlin/per-module-pp.t
|
73 |
|
test/blackbox-tests/test-cases/merlin/server.t
|
74 |
|
test/blackbox-tests/test-cases/github1946.t
|
75 |
|
test/blackbox-tests/test-cases/github759.t
|
76 |
|
test/blackbox-tests/test-cases/merlin/default-based-context.t
|
77 |
|
otherlibs/site/test/run.t
|
78 |
|
|
79 |
|
# Deprecated warnings
|
80 |
|
test/blackbox-tests/test-cases/toplevel-integration.t
|
81 |
|
|
82 |
|
# Wants nodejs!
|
83 |
|
test/blackbox-tests/test-cases/jsoo/simple.t
|
84 |
|
test/blackbox-tests/test-cases/jsoo/inline-tests.t
|
85 |
|
test/blackbox-tests/test-cases/jsoo/github3622.t
|
86 |
|
# Wants js_of_ocaml (can't include yet b/c of ocaml-base64 porting)
|
87 |
|
test/blackbox-tests/test-cases/jsoo/explicit-js-mode-specified.t
|
88 |
|
|
89 |
|
# Wants coq which doesn't build for me right now
|
90 |
|
test/blackbox-tests/test-cases/coq/rec-module.t
|
91 |
|
test/blackbox-tests/test-cases/coq/compose-sub-theory.t
|
92 |
|
test/blackbox-tests/test-cases/coq/native-compose.t
|
93 |
|
test/blackbox-tests/test-cases/coq/base-unsound.t
|
94 |
|
test/blackbox-tests/test-cases/coq/base.t
|
95 |
|
test/blackbox-tests/test-cases/coq/native-single.t
|
96 |
|
test/blackbox-tests/test-cases/coq/compose-simple.t
|
97 |
|
test/blackbox-tests/test-cases/coq/ml-lib.t
|
98 |
|
test/blackbox-tests/test-cases/coq/extract.t
|
99 |
|
test/blackbox-tests/test-cases/coq/compose-plugin.t
|
100 |
|
test/blackbox-tests/test-cases/coq/flags.t
|
101 |
|
test/blackbox-tests/test-cases/coq/env.t
|
102 |
|
|
103 |
|
# Unpackaged dependencies (a rabbit hole for now)
|
104 |
|
# utop -> lambda-term, zed
|
105 |
|
test/blackbox-tests/test-cases/utop/github3188.t
|
106 |
|
test/blackbox-tests/test-cases/utop/utop-simple.t
|
107 |
|
test/blackbox-tests/test-cases/utop/utop-default.t
|
108 |
|
test/blackbox-tests/test-cases/utop/utop-default-implementation.t
|
109 |
|
test/blackbox-tests/test-cases/utop/utop-ppx-rewriters.t
|
110 |
|
# ocamlformat
|
111 |
|
test/blackbox-tests/test-cases/formatting.t
|
112 |
|
# mdx
|
113 |
|
test/blackbox-tests/test-cases/mdx-stanza.t
|
114 |
|
# odoc
|
115 |
|
test/blackbox-tests/test-cases/odoc/odoc-simple.t
|
116 |
|
test/blackbox-tests/test-cases/odoc/odoc-package-mld-link.t
|
117 |
|
test/blackbox-tests/test-cases/odoc/multiple-private-libs.t
|
118 |
|
test/blackbox-tests/test-cases/odoc/odoc-unique-mlds.t
|
119 |
|
test/blackbox-tests/test-cases/odoc/github717-odoc-index.t
|
120 |
|
test/blackbox-tests/test-cases/odoc/warnings.t
|
121 |
|
)
|
122 |
|
|
123 |
|
rm -r ${bad_tests[@]} || die "Failed to remove broken/inappropriate tests"
|
|
29 |
src_configure() {
|
|
30 |
./configure \
|
|
31 |
--libdir="$(ocamlc -where)" \
|
|
32 |
--mandir="/usr/share/man" \
|
|
33 |
|| die
|
124 |
34 |
}
|
125 |
35 |
|
126 |
|
src_configure() {
|
127 |
|
:
|
|
36 |
src_compile() {
|
|
37 |
dune build -p "${PN}" @install -j $(makeopts_jobs) --profile release || die
|
128 |
38 |
}
|