summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2022-11-19 19:30:18 +0100
committerAlfredo Tupone <tupone@gentoo.org>2022-11-19 19:30:54 +0100
commit642e7282213bd5bda45eb4947f4baa7686bc9093 (patch)
tree70689353fec7896e2c57d683843dc78515e4b787 /dev-ml/dune
parentdev-ml/dune-configurator: add 3 (diff)
downloadgentoo-642e7282213bd5bda45eb4947f4baa7686bc9093.tar.gz
gentoo-642e7282213bd5bda45eb4947f4baa7686bc9093.tar.bz2
gentoo-642e7282213bd5bda45eb4947f4baa7686bc9093.zip
dev-ml/dune: add 3.0.3
includes dune-configurator Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-ml/dune')
-rw-r--r--dev-ml/dune/Manifest1
-rw-r--r--dev-ml/dune/dune-3.0.3.ebuild79
2 files changed, 80 insertions, 0 deletions
diff --git a/dev-ml/dune/Manifest b/dev-ml/dune/Manifest
index 4700dffa36ef..bc194e8ffc95 100644
--- a/dev-ml/dune/Manifest
+++ b/dev-ml/dune/Manifest
@@ -1,3 +1,4 @@
DIST dune-2.8.4.tar.gz 1372925 BLAKE2B 5b6d6738a0dc701d852e6cc59a1998f64c006d233f43a804b0b9b677a6eadda25aa20f52799c90910d361e4bc565636a50d218ad5d0a9927239adc5be36b3889 SHA512 13b36eb6a943f9513987a23dab467b2e449cc3a4de35227f8323c3c724b27f19daac500602141ab22a04579243333c8484ce27a7f73e46a72e796d30fb1c3253
DIST dune-2.9.1.tar.gz 1385381 BLAKE2B 27224f803547d02f7110dcfc486ef41f9a4586f6f862ef7f8bbf05cc1f3f6dc8ea03fca99c01842f4226ea3d08f4127daa0e5811dd46cc00f1b96ad7eaafe43d SHA512 4fcff34de4acc4429dd73864ca90e695d8ba436839fd679608f7db292e44be70c3db455a58f59477f2055f84ce497bfa8e90e485ed9536acad3c1b3be3d4be77
DIST dune-2.9.3.tar.gz 1387667 BLAKE2B 3db54c780b9d13f40c774f53c3fe471dba4a640e7cb5aa5d70ef1dc20a217b95a66149ca5f99f07f3a20450577d622e0cda149f656f06f5a42231b89667c1152 SHA512 df6e06a9beebf41f3ed375384be781b5c87c7949048995cc0bbad13dd65c96bd8b27415cd41e43b1112bd86524a59a7dd418e14b5c72b4f1f8fd4ac5ca2d1494
+DIST dune-3.0.3.tar.gz 1725788 BLAKE2B 2de93c085f642c8381642a08b18bc21ad48097f32397b3eddab9725deb267b089849b649705e1b72bb1b5b37f7531fd9e0cfb134174f0cb3a8ee2595c7dcf8ce SHA512 839e942bcf8189763d0d9b01614333bb2f036bce68c82959e51d2e9145b57067cb862b66781912391c1a0f531b8dddf2ffeafcee71c626169a437fe40feba155
diff --git a/dev-ml/dune/dune-3.0.3.ebuild b/dev-ml/dune/dune-3.0.3.ebuild
new file mode 100644
index 000000000000..d4b1683267dd
--- /dev/null
+++ b/dev-ml/dune/dune-3.0.3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multiprocessing elisp-common
+
+DESCRIPTION="A composable build system for OCaml"
+HOMEPAGE="https://github.com/ocaml/dune"
+SRC_URI="https://github.com/ocaml/dune/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="emacs test"
+RESTRICT="strip !test? ( test )"
+
+RDEPEND="
+ >=dev-lang/ocaml-4.08:=
+ emacs? ( >=app-editors/emacs-23.1:* )
+ !<dev-ml/dune-configurator-3
+"
+DEPEND="
+ ${RDEPEND}
+ dev-ml/findlib
+ test? (
+ dev-ml/core_bench
+ dev-ml/ppx_bench
+ dev-ml/ppx_expect
+ )
+"
+
+QA_FLAGS_IGNORED="usr/bin/dune"
+
+BYTECOMPFLAGS="-L ${S}/editor-integration/emacs"
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+ default
+
+ # This allows `dune --version` to output the correct version instead of "n/a"
+ sed -i "/^(name dune)/a (version ${PV})" dune-project || die
+ # This enables dune-configurator to use the vendored csexp module
+ sed -i 's/stdune.csexp/dune-configurator.csexp/' vendor/csexp/src/dune \
+ || die
+}
+
+src_configure() {
+ ./configure \
+ --libdir="$(ocamlc -where)" \
+ --mandir="/usr/share/man" \
+ || die
+}
+
+src_compile() {
+ ocaml bootstrap.ml -j $(makeopts_jobs) || die
+ ./dune.exe build -p "${PN}",dune-configurator --profile dune-bootstrap \
+ -j $(makeopts_jobs) \
+ --display short || die
+
+ use emacs && elisp-compile editor-integration/emacs/*.el
+}
+
+src_install() {
+ ./dune.exe install --destdir="${D}" --prefix=/usr/ \
+ --libdir=$(ocamlc -where) dune dune-configurator \
+ || die
+
+ rm -r "${D}"/usr/doc/dune-configurator || die
+ dodir /usr/share/doc
+ mv "${D}"/usr/doc/dune \
+ "${D}"/usr/share/doc/${PF} || die
+ rmdir "${D}"/usr/doc || die
+
+ if use emacs ; then
+ elisp-install ${PN} editor-integration/emacs/*.el{,c}
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}