From 86c1ae981dc841f534126cc09e7e88c2b819f410 Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Sat, 19 Nov 2022 23:47:16 +0100 Subject: dev-ml/dune: separate dune-configurator Signed-off-by: Alfredo Tupone --- dev-ml/dune/dune-3.0.3-r1.ebuild | 66 +++++++++++++++++++++++++++++++++ dev-ml/dune/dune-3.0.3.ebuild | 79 ---------------------------------------- 2 files changed, 66 insertions(+), 79 deletions(-) create mode 100644 dev-ml/dune/dune-3.0.3-r1.ebuild delete mode 100644 dev-ml/dune/dune-3.0.3.ebuild (limited to 'dev-ml/dune') diff --git a/dev-ml/dune/dune-3.0.3-r1.ebuild b/dev-ml/dune/dune-3.0.3-r1.ebuild new file mode 100644 index 000000000000..34a23dd6020a --- /dev/null +++ b/dev-ml/dune/dune-3.0.3-r1.ebuild @@ -0,0 +1,66 @@ +# 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" +RESTRICT="strip test" + +RDEPEND=" + >=dev-lang/ocaml-4.08:= + emacs? ( >=app-editors/emacs-23.1:* ) +" +DEPEND="${RDEPEND}" + +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 +} + +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}" --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) "${PN}" \ + || 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 +} diff --git a/dev-ml/dune/dune-3.0.3.ebuild b/dev-ml/dune/dune-3.0.3.ebuild deleted file mode 100644 index d4b1683267dd..000000000000 --- a/dev-ml/dune/dune-3.0.3.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# 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:* ) - !