| 1 |
|
# Copyright 1999-2024 Gentoo Authors
|
|
1 |
# Copyright 1999-2025 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
# We are opam
|
| 7 |
|
OPAM_INSTALLER_DEP=" "
|
| 8 |
|
OPAM_SKIP_VALIDATION=yes
|
| 9 |
6 |
inherit dune
|
| 10 |
7 |
|
| 11 |
8 |
DESCRIPTION="Core installer for opam packages"
|
| 12 |
9 |
HOMEPAGE="https://opam.ocaml.org/ https://github.com/ocaml/opam"
|
| 13 |
|
SRC_URI="https://github.com/ocaml/opam/releases/download/${PV}/opam-full-${PV}.tar.gz"
|
| 14 |
|
S="${WORKDIR}/opam-full-${PV/_/-}"
|
| 15 |
|
OPAM_INSTALLER="${S}/_build/install/default/bin/opam-installer"
|
|
10 |
SRC_URI="https://github.com/ocaml/opam/archive/${PV/_/-}.tar.gz -> opam-${PV}.tar.gz"
|
|
11 |
S="${WORKDIR}/opam-${PV/_/-}"
|
| 16 |
12 |
|
| 17 |
13 |
LICENSE="LGPL-2.1"
|
| 18 |
14 |
SLOT="0/${PV}"
|
| 19 |
|
KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
|
|
15 |
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
|
| 20 |
16 |
IUSE="+ocamlopt"
|
| 21 |
17 |
RESTRICT="test" # sandbox not working
|
| 22 |
18 |
|
| 23 |
19 |
RDEPEND="
|
| 24 |
|
dev-ml/cmdliner:=[ocamlopt?]
|
| 25 |
|
~dev-ml/opam-${PV}:=[ocamlopt?]
|
| 26 |
|
dev-ml/dose3:=[ocamlopt?]
|
|
20 |
<dev-ml/cmdliner-2.0.0:=[ocamlopt?]
|
|
21 |
dev-ml/jsonm:=[ocamlopt?]
|
|
22 |
dev-ml/ocamlgraph:=[ocamlopt?]
|
|
23 |
dev-ml/ocaml-sha:=[ocamlopt?]
|
|
24 |
~dev-ml/opam-common-${PV}:=[ocamlopt?]
|
|
25 |
dev-ml/opam-file-format:=[ocamlopt?]
|
|
26 |
dev-ml/re:=[ocamlopt?]
|
|
27 |
dev-ml/swhid_core:=[ocamlopt?]
|
|
28 |
dev-ml/stdlib-shims:=[ocamlopt?]
|
|
29 |
dev-ml/uchar:=[ocamlopt?]
|
|
30 |
dev-ml/uutf:=[ocamlopt?]
|
| 27 |
31 |
"
|
| 28 |
|
DEPEND="${RDEPEND}
|
| 29 |
|
dev-ml/findlib"
|
|
32 |
DEPEND="${RDEPEND}"
|
|
33 |
BDEPEND="dev-ml/findlib"
|
| 30 |
34 |
|
| 31 |
35 |
src_configure() {
|
| 32 |
|
econf \
|
| 33 |
|
--prefix="${EPREFIX}/usr" \
|
| 34 |
|
--with-mccs \
|
| 35 |
|
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
| 36 |
|
--mandir="${EPREFIX}/usr/share/man"
|
|
36 |
:
|
| 37 |
37 |
}
|
| 38 |
38 |
|
| 39 |
39 |
src_compile() {
|
| 40 |
40 |
dune-compile ${PN}
|
| 41 |
41 |
}
|
|
42 |
|
|
43 |
src_install() {
|
|
44 |
dune-install ${PN}
|
|
45 |
mv "${ED}"/usr/share/doc/${PF}/${PN}/* \
|
|
46 |
"${ED}"/usr/share/doc/${PF} || die
|
|
47 |
}
|