summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2021-06-27 14:50:06 +0000
committerKeri Harris <keri@gentoo.org>2021-06-27 14:50:41 +0000
commitd48eb5d10b1d301240521d5369b9ddcf8c93cb52 (patch)
tree6d399c4ce5c5a58424a6f862f37122033ca8ef3f /dev-lang/mozart
parentdev-python/contextlib2: Bump to 21.6.0 (diff)
downloadgentoo-d48eb5d10b1d301240521d5369b9ddcf8c93cb52.tar.gz
gentoo-d48eb5d10b1d301240521d5369b9ddcf8c93cb52.tar.bz2
gentoo-d48eb5d10b1d301240521d5369b9ddcf8c93cb52.zip
dev-lang/mozart: include site-lisp file to get Oz major modes.
Closes: https://bugs.gentoo.org/194604 Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Keri Harris <keri@gentoo.org>
Diffstat (limited to 'dev-lang/mozart')
-rw-r--r--dev-lang/mozart/files/50mozart-gentoo.el13
-rw-r--r--dev-lang/mozart/mozart-2.0.1.ebuild12
2 files changed, 24 insertions, 1 deletions
diff --git a/dev-lang/mozart/files/50mozart-gentoo.el b/dev-lang/mozart/files/50mozart-gentoo.el
new file mode 100644
index 000000000000..3533d49d693b
--- /dev/null
+++ b/dev-lang/mozart/files/50mozart-gentoo.el
@@ -0,0 +1,13 @@
+;;; mozart site-lisp configuration
+
+(or (getenv "OZHOME")
+ (setenv "OZHOME" "/usr"))
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'run-oz' "oz" "Start Mozart as a sub-process" t)
+(autoload 'oz-mode "oz" "Major mode for editing Oz code." t)
+(autoload 'oz-gump-mode "oz"
+ "Major mode for editing Oz code with embedded Gump specifications." t)
+(autoload 'ozm-mode "mozart" "Major mode for displaying Oz machine code." t)
+(add-to-list 'auto-mode-alist '("\\.oz$" . oz-mode))
+(add-to-list 'auto-mode-alist '("\\.ozg$" . oz-gump-mode))
+(add-to-list 'auto-mode-alist '("\\.ozm$" . ozm-mode))
diff --git a/dev-lang/mozart/mozart-2.0.1.ebuild b/dev-lang/mozart/mozart-2.0.1.ebuild
index d469901f25b6..510d6729b40b 100644
--- a/dev-lang/mozart/mozart-2.0.1.ebuild
+++ b/dev-lang/mozart/mozart-2.0.1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit cmake java-pkg-2 java-ant-2
+inherit cmake elisp-common java-pkg-2 java-ant-2
PATCHSET_VER="1"
@@ -30,6 +30,8 @@ DEPEND="${RDEPEND}
dev-lang/scala:2.12
test? ( dev-cpp/gtest:= )"
+SITEFILE="50${PN}-gentoo.el"
+
S="${WORKDIR}/${PN}2-${PV}"
src_prepare() {
@@ -71,12 +73,19 @@ src_install() {
dolib.so "${BUILD_DIR}"/vm/vm/main/libmozartvm.so
dolib.so "${BUILD_DIR}"/vm/boostenv/main/libmozartvmboost.so
+
+ if use emacs; then
+ elisp-install ${PN} "${S}"/opi/emacs/*.el
+ elisp-site-file-install "${FILESDIR}"/"${SITEFILE}" \
+ || die "elsip-site-file-install failed"
+ fi
}
pkg_postinst() {
if use emacs; then
xdg_icon_cache_update
xdg_desktop_database_update
+ elisp-site-regen
fi
}
@@ -84,5 +93,6 @@ pkg_postrm() {
if use emacs; then
xdg_icon_cache_update
xdg_desktop_database_update
+ elisp-site-regen
fi
}