diff options
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/maxima/Manifest | 1 | ||||
-rw-r--r-- | sci-mathematics/maxima/maxima-5.40.0.ebuild | 208 |
2 files changed, 209 insertions, 0 deletions
diff --git a/sci-mathematics/maxima/Manifest b/sci-mathematics/maxima/Manifest index bd89940df543..07b5abb84017 100644 --- a/sci-mathematics/maxima/Manifest +++ b/sci-mathematics/maxima/Manifest @@ -1,3 +1,4 @@ DIST maxima-5.37.3.tar.gz 29964644 SHA256 8bd5dcd672f37ea752385475fc64f8c87dfa29bbe34766cbcb87b1f63dfb5934 SHA512 a337afdc779abc88297e7dadf8af949da881c91a237e85ed654046c98692f2446c0b2ddb8c81b637cb7a35dd3b712832aadc5dedcaa8b681496dae4835c9d0f1 WHIRLPOOL d24eeb7f39f88b9f542e28db28b8f249b1badc059fe744a83209b102b8f776131e4b2f91c28949f4f6de8323f163cb0a6be9bafc3c0ef058a73e9b543622e976 DIST maxima-5.38.1.tar.gz 38641257 SHA256 0e866536ab5847ec045ba013570f80f36206ca6ce07a5d13987010bcb321c6dc SHA512 abca10984dbb22a48bae481b2e803cb5bee6776e974b4bb9271773aa035fb5e49f34b2458aabca01f0a681a07179e57c012273be6f8d53c615b3309b1034abf9 WHIRLPOOL 443ab032e784e4e2c37274dc3b1635acd9ede08af7863793f93b2f8fdc10e9cce8d4b1a5e98df9a6486fe97e082fb4030fbb3208939ab627f7ca333de7c224b8 DIST maxima-5.39.0.tar.gz 38652090 SHA256 f58ff98013fcaa37d8661b941672c38db58f982f082d6cfcca1f1b5fac7d71b3 SHA512 393ade47fc3832ee44df7bf0c3bd2e501755167ec0f02d50d5876e7cf54fe682f2ebf2511290fa498d174e55961451e61ea5c1c5f6e5f9e6d04ad73d45a5d2a9 WHIRLPOOL 35c7e4acf7933c11562ade2ce30b9c3865a052fc13f9880502165313aae66925aff44cc9d70666001d0378ef14b2e0bf6bc2faeb258b6d50e558b9e043cd972c +DIST maxima-5.40.0.tar.gz 41668208 SHA256 74fe468cd372714622a99afb6b34297589ddd80386e125d71067d3e75519f796 SHA512 7aa36ae56c289e1cc6bb1722a6ee93fed5bf893747a26bb52a48f93cd02d65b63c453f37dc2c86ab4596ad192150aed9ad6b361ab295eda5207d9633c07cdee6 WHIRLPOOL 0e66c5492728a1d21ef7b72fd227943200725c5dad812d81e111f609f381a94a66432c7ff13608e18fc5f2616f8992b46769b421b6942d10fb796d3992d46c8a diff --git a/sci-mathematics/maxima/maxima-5.40.0.ebuild b/sci-mathematics/maxima/maxima-5.40.0.ebuild new file mode 100644 index 000000000000..8bdc377e8486 --- /dev/null +++ b/sci-mathematics/maxima/maxima-5.40.0.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools elisp-common eutils + +DESCRIPTION="Free computer algebra environment based on Macsyma" +HOMEPAGE="http://maxima.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2 GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +# Supported lisps +LISPS=( sbcl cmucl gcl ecls clozurecl clisp ) +# <lisp> supports readline: . - no, y - yes +SUPP_RL=( . . y . . y ) +# . - just --enable-<lisp>, <flag> - --enable-<flag> +CONF_FLAG=( . . . ecl ccl . ) +# patch file version; . - no patch +PATCH_V=( 2 1 . 2 2 1 ) + +IUSE="emacs tk nls unicode X ${LISPS[*]}" + +# Languages +LANGS="de es pt pt_BR" +for lang in ${LANGS}; do + IUSE="${IUSE} linguas_${lang}" +done + +# texlive-latexrecommended needed by imaxima for breqn.sty +RDEPEND="!app-emacs/imaxima + X? ( x11-misc/xdg-utils + sci-visualization/gnuplot[gd] + tk? ( dev-lang/tk:0 ) ) + emacs? ( virtual/emacs + virtual/latex-base + app-emacs/auctex + app-text/ghostscript-gpl + dev-texlive/texlive-latexrecommended )" + +# generating lisp dependencies +depends() { + local LISP DEP + LISP=${LISPS[$1]} + DEP="dev-lisp/${LISP}:=" + if [ "${SUPP_RL[$1]}" = "." ]; then + DEP="${DEP} app-misc/rlwrap" + fi + echo ${DEP} +} + +n=${#LISPS[*]} +for ((n--; n >= 0; n--)); do + LISP=${LISPS[${n}]} + RDEPEND="${RDEPEND} ${LISP}? ( $(depends ${n}) )" + DEF_DEP="${DEF_DEP} !${LISP}? ( " +done + +# default lisp +DEF_LISP=0 # sbcl +ARM_LISP=2 # gcl +DEF_DEP="${DEF_DEP} arm? ( `depends ${ARM_LISP}` ) !arm? ( `depends ${DEF_LISP}` )" + +n=${#LISPS[*]} +for ((n--; n >= 0; n--)); do + DEF_DEP="${DEF_DEP} )" +done + +unset LISP + +RDEPEND="${RDEPEND} + ${DEF_DEP}" + +DEPEND="${RDEPEND} + sys-apps/texinfo" + +TEXMF="${EPREFIX}"/usr/share/texmf-site + +pkg_setup() { + local n=${#LISPS[*]} + + for ((n--; n >= 0; n--)); do + use ${LISPS[${n}]} && NLISPS="${NLISPS} ${n}" + done + + if [ -z "${NLISPS}" ]; then + use arm && DEF_LISP=${ARM_LISP} + ewarn "No lisp specified in USE flags, choosing ${LISPS[${DEF_LISP}]} as default" + NLISPS=${DEF_LISP} + fi +} + +src_prepare() { + local n PATCHES v + PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-0 ) + + n=${#PATCHES[*]} + for ((n--; n >= 0; n--)); do + epatch "${FILESDIR}"/${PATCHES[${n}]}.patch + done + + n=${#LISPS[*]} + for ((n--; n >= 0; n--)); do + v=${PATCH_V[${n}]} + if [ "${v}" != "." ]; then + epatch "${FILESDIR}"/${LISPS[${n}]}-${v}.patch + fi + done + + # bug #343331 + rm share/Makefile.in || die + rm src/Makefile.in || die + touch src/*.mk + touch src/Makefile.am + eautoreconf +} + +src_configure() { + local CONFS CONF n lang + for n in ${NLISPS}; do + CONF=${CONF_FLAG[${n}]} + if [ ${CONF} = . ]; then + CONF=${LISPS[${n}]} + fi + CONFS="${CONFS} --enable-${CONF}" + done + + # enable existing translated doc + if use nls; then + for lang in ${LANGS}; do + if use "linguas_${lang}"; then + CONFS="${CONFS} --enable-lang-${lang}" + use unicode && CONFS="${CONFS} --enable-lang-${lang}-utf8" + fi + done + fi + + econf ${CONFS} \ + $(use_with tk wish) \ + $(use_enable emacs) \ + --with-lispdir="${EPREFIX}/${SITELISP}/${PN}" +} + +src_compile() { + emake + if use emacs; then + pushd interfaces/emacs/emaxima > /dev/null + elisp-compile *.el + popd > /dev/null + pushd interfaces/emacs/imaxima > /dev/null + BYTECOMPFLAGS="-L . -L ../emaxima" + elisp-compile *.el + popd > /dev/null + fi +} + +src_install() { + docompress -x /usr/share/info + emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install + + use tk && make_desktop_entry xmaxima xmaxima \ + /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \ + "Science;Math;Education" + + # 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 + doins AUTHORS COPYING README README.lisps + dodir /usr/share/doc + dosym ../${PN}/${PV}/doc /usr/share/doc/${PF} + + 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 + fi + + # if we use ecls, build an ecls library for maxima + if use ecls; then + ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"` + insinto "${ECLLIB#${EPREFIX}}" + doins src/binary-ecl/maxima.fas + fi +} + +pkg_postinst() { + if use emacs; then + elisp-site-regen + mktexlsr + fi +} + +pkg_postrm() { + if use emacs; then + elisp-site-regen + mktexlsr + fi +} |