--- /dev/null
+--- maxima-5.37.3.orig/configure.ac
++++ maxima-5.37.3/configure.ac
+@@ -513,6 +513,17 @@
+ fi
+ fi
+
++AC_ARG_ENABLE(emacs,
++ [ --enable-emacs Emacs support],
++ [case "${enableval}" in
++ yes) enable_emacs=true ;;
++ no) enable_emacs=false ;;
++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-emacs) ;;
++ esac],
++ [enable_emacs=true])
++
++AM_CONDITIONAL(WANT_EMACS, test x$enable_emacs = xtrue)
++
+ dnl xgettext
+ AC_ARG_ENABLE(gettext,
+ [ --enable-gettext Locale support],
+--- maxima-5.37.3.orig/interfaces/Makefile.am
++++ maxima-5.37.3/interfaces/Makefile.am
+@@ -1,5 +1,8 @@
++if WANT_EMACS
++ MAYBE_EMACS = emacs
++endif
+ if WANT_TK
+ MAYBE_XMAXIMA = xmaxima
+ endif
+-SUBDIRS = emacs $(MAYBE_XMAXIMA)
++SUBDIRS = $(MAYBE_EMACS) $(MAYBE_XMAXIMA)
+ EXTRA_DIST = bin/xmaxima.iss
--- /dev/null
+--- maxima-5.37.3.orig/configure.ac
++++ maxima-5.37.3/configure.ac
+@@ -991,6 +991,11 @@
+ [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)],
+- [WISH="${withval}"],
+- [WISH="wish"])
++ [],
++ [with_wish="wish"])
++case "${with_wish}" in
++ no) WISH="none" ;;
++ yes) WISH="wish" ;;
++ *) WISH="${with_wish}" ;;
++esac
+ AC_SUBST(WISH)
+-
++AM_CONDITIONAL(WANT_TK, test x"${with_wish}" != xno)
+
+--- maxima-5.37.3.orig/interfaces/Makefile.am
++++ maxima-5.37.3/interfaces/Makefile.am
+@@ -1,2 +1,5 @@
+-SUBDIRS = emacs xmaxima
++if WANT_TK
++ MAYBE_XMAXIMA = xmaxima
++endif
++SUBDIRS = emacs $(MAYBE_XMAXIMA)
+ EXTRA_DIST = bin/xmaxima.iss
# patch file version; . - no patch
PATCH_V=( 1 1 . 2 2 1 )
-IUSE="latex emacs tk nls unicode xemacs X ${LISPS[*]}"
+IUSE="emacs tk nls unicode X ${LISPS[*]}"
# Languages
LANGS="es pt pt_BR"
X? ( x11-misc/xdg-utils
sci-visualization/gnuplot[gd]
tk? ( dev-lang/tk:0 ) )
- latex? ( virtual/latex-base )
emacs? ( virtual/emacs
- latex? ( app-emacs/auctex
- app-text/ghostscript-gpl
- dev-texlive/texlive-latexrecommended ) )
- xemacs? ( app-editors/xemacs
- latex? ( app-xemacs/auctex ) )"
+ virtual/latex-base
+ app-emacs/auctex
+ app-text/ghostscript-gpl
+ dev-texlive/texlive-latexrecommended )"
# generating lisp dependencies
depends() {
src_prepare() {
local n PATCHES v
- PATCHES=( rmaxima-0 wish-1 xdg-utils-0 db-0 )
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-0 db-0 )
n=${#PATCHES[*]}
for ((n--; n >= 0; n--)); do
done
fi
- econf ${CONFS} $(use_with tk wish) --with-lispdir="${EPREFIX}/${SITELISP}"/${PN}
+ econf ${CONFS} \
+ $(use_with tk wish) \
+ $(use_enable emacs) \
+ --with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
}
src_compile() {
/usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
"Science;Math;Education"
- rm -f "${ED}"/${SITELISP}/${PN}/emaxima.sty
-
- if use latex; then
- insinto ${TEXMF}/tex/latex/emaxima
- doins interfaces/emacs/emaxima/emaxima.sty
- fi
-
# do not use dodoc because interfaces can't read compressed files
# read COPYING before attempt to remove it from dodoc
insinto /usr/share/${PN}/${PV}/doc
if use emacs; then
elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp}
elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el
+
+ rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die
+ insinto ${TEXMF}/tex/latex/emaxima
+ doins interfaces/emacs/emaxima/emaxima.sty
+
insinto /usr/share/${PN}/${PV}/doc/imaxima
doins interfaces/emacs/imaxima/README
doins -r interfaces/emacs/imaxima/imath-example
- else
- # remove any emacs files installed by the build system
- rm -rf "${ED}"/usr/share/emacs
fi
# if we use ecls, build an ecls library for maxima
}
pkg_postinst() {
- use emacs && elisp-site-regen
- use latex && mktexlsr
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
}
pkg_postrm() {
- use emacs && elisp-site-regen
- use latex && mktexlsr
+ if use emacs; then
+ lisp-site-regen
+ mktexlsr
+ fi
}