Skip to content

Commit

Permalink
dev-lang/mozart: include site-lisp file to get Oz major modes.
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/194604
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Keri Harris <[email protected]>
  • Loading branch information
keriharris committed Jun 27, 2021
1 parent e83d9b2 commit d48eb5d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
13 changes: 13 additions & 0 deletions dev-lang/mozart/files/50mozart-gentoo.el
Original file line number Diff line number Diff line change
@@ -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))
12 changes: 11 additions & 1 deletion dev-lang/mozart/mozart-2.0.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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() {
Expand Down Expand Up @@ -71,18 +73,26 @@ 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
}

pkg_postrm() {
if use emacs; then
xdg_icon_cache_update
xdg_desktop_database_update
elisp-site-regen
fi
}

0 comments on commit d48eb5d

Please sign in to comment.