summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2022-04-19 00:03:37 +0200
committerMaciej Barć <xgqt@gentoo.org>2022-04-19 00:03:37 +0200
commit1509acbb6d4e7f4c9f1a622ac380a14b4afa7317 (patch)
tree721a433d72e933650f2182dc87fcc0fbe70aeb1c /dev-ml/dune
parentdev-util/patdiff: Keyword 0.14.0-r1 riscv, #838100 (diff)
downloadgentoo-1509acbb6d4e7f4c9f1a622ac380a14b4afa7317.tar.gz
gentoo-1509acbb6d4e7f4c9f1a622ac380a14b4afa7317.tar.bz2
gentoo-1509acbb6d4e7f4c9f1a622ac380a14b4afa7317.zip
dev-ml/dune: 2.9.3 - enable Emacs support & bump to EAPI 8
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-ml/dune')
-rw-r--r--dev-ml/dune/dune-2.9.3-r1.ebuild (renamed from dev-ml/dune/dune-2.9.3.ebuild)15
-rw-r--r--dev-ml/dune/files/50dune-gentoo.el4
2 files changed, 16 insertions, 3 deletions
diff --git a/dev-ml/dune/dune-2.9.3.ebuild b/dev-ml/dune/dune-2.9.3-r1.ebuild
index 9bf93b2276e8..8830c7c629e2 100644
--- a/dev-ml/dune/dune-2.9.3.ebuild
+++ b/dev-ml/dune/dune-2.9.3-r1.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit multiprocessing
+inherit multiprocessing elisp-common
DESCRIPTION="A composable build system for OCaml"
HOMEPAGE="https://github.com/ocaml/dune"
@@ -12,11 +12,12 @@ 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="test"
+IUSE="emacs test"
RESTRICT="!test? ( test )"
RDEPEND="
>=dev-lang/ocaml-4.08:=
+ emacs? ( >=app-editors/emacs-23.1:* )
"
DEPEND="
${RDEPEND}
@@ -29,6 +30,7 @@ DEPEND="
"
QA_FLAGS_IGNORED="usr/bin/dune"
+SITEFILE="50${PN}-gentoo.el"
src_configure() {
:
@@ -38,10 +40,17 @@ 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() {
default
mv "${ED}"/usr/doc "${ED}"/usr/share/doc/${PF} || die
mv "${ED}"/usr/man "${ED}"/usr/share/man || 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/files/50dune-gentoo.el b/dev-ml/dune/files/50dune-gentoo.el
new file mode 100644
index 000000000000..87fd7c6b28a9
--- /dev/null
+++ b/dev-ml/dune/files/50dune-gentoo.el
@@ -0,0 +1,4 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'dune-mode "dune"
+ "Major mode to edit dune files." t)
+(add-to-list 'auto-mode-alist '("\\(?:\\`\\|/\\)dune\\(?:\\.inc\\|\\-project\\)?\\'" . dune-mode))