From 7c75a924221c75930b2833ff19d8590d201a1b8f Mon Sep 17 00:00:00 2001 From: Andrey Grozin Date: Wed, 31 Aug 2011 14:20:28 +0000 Subject: Version bump (Portage version: 2.2.0_alpha51/cvs/Linux i686) --- sci-mathematics/maxima/ChangeLog | 10 +- .../maxima/files/maxima-5.25.0-wish.patch | 28 --- sci-mathematics/maxima/files/maxima-5.25.0.patch | 37 ---- .../maxima/files/maxima-5.25.1-wish.patch | 28 +++ sci-mathematics/maxima/files/maxima-5.25.1.patch | 37 ++++ sci-mathematics/maxima/maxima-5.25.0.ebuild | 206 --------------------- sci-mathematics/maxima/maxima-5.25.1.ebuild | 206 +++++++++++++++++++++ 7 files changed, 280 insertions(+), 272 deletions(-) delete mode 100644 sci-mathematics/maxima/files/maxima-5.25.0-wish.patch delete mode 100644 sci-mathematics/maxima/files/maxima-5.25.0.patch create mode 100644 sci-mathematics/maxima/files/maxima-5.25.1-wish.patch create mode 100644 sci-mathematics/maxima/files/maxima-5.25.1.patch delete mode 100644 sci-mathematics/maxima/maxima-5.25.0.ebuild create mode 100644 sci-mathematics/maxima/maxima-5.25.1.ebuild (limited to 'sci-mathematics') diff --git a/sci-mathematics/maxima/ChangeLog b/sci-mathematics/maxima/ChangeLog index 8e10eb9c2af7..ac2cf17a595c 100644 --- a/sci-mathematics/maxima/ChangeLog +++ b/sci-mathematics/maxima/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sci-mathematics/maxima # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.91 2011/08/27 05:03:22 grozin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.92 2011/08/31 14:20:28 grozin Exp $ + +*maxima-5.25.1 (31 Aug 2011) + + 31 Aug 2011; Andrey Grozin -maxima-5.25.0.ebuild, + -files/maxima-5.25.0-wish.patch, -files/maxima-5.25.0.patch, + +maxima-5.25.1.ebuild, +files/maxima-5.25.1-wish.patch, + +files/maxima-5.25.1.patch: + Version bump 27 Aug 2011; Andrey Grozin maxima-5.25.0.ebuild, +files/maxima-ecl-ldflags.patch: diff --git a/sci-mathematics/maxima/files/maxima-5.25.0-wish.patch b/sci-mathematics/maxima/files/maxima-5.25.0-wish.patch deleted file mode 100644 index 6fcb0d9ec8e9..000000000000 --- a/sci-mathematics/maxima/files/maxima-5.25.0-wish.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in ---- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600 -+++ maxima-5.23.1//configure.in 2011-01-16 21:00:16.000000000 +0600 -@@ -777,6 +777,11 @@ - [ --with-wish= Use 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) - -diff -r -U1 maxima-5.23.1.orig//interfaces/Makefile.am maxima-5.23.1//interfaces/Makefile.am ---- maxima-5.23.1.orig//interfaces/Makefile.am 2004-04-28 23:34:59.000000000 +0700 -+++ maxima-5.23.1//interfaces/Makefile.am 2011-01-16 20:41:38.000000000 +0600 -@@ -1,2 +1,6 @@ -+if WANT_TK - SUBDIRS = emacs xmaxima -+else -+SUBDIRS = emacs -+endif - EXTRA_DIST = bin/xmaxima.iss diff --git a/sci-mathematics/maxima/files/maxima-5.25.0.patch b/sci-mathematics/maxima/files/maxima-5.25.0.patch deleted file mode 100644 index 6309653d6e87..000000000000 --- a/sci-mathematics/maxima/files/maxima-5.25.0.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in ---- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600 -+++ maxima-5.23.1//configure.in 2011-01-16 19:50:55.000000000 +0600 -@@ -294,3 +294,3 @@ - dnl n.b. openmcl_default_name is hardcoded in "with" message --openmcl_default_name=openmcl -+openmcl_default_name=ccl - AC_ARG_ENABLE(openmcl, -diff -r -U1 maxima-5.23.1.orig//src/maxima.in maxima-5.23.1//src/maxima.in ---- maxima-5.23.1.orig//src/maxima.in 2010-12-05 08:06:03.000000000 +0600 -+++ maxima-5.23.1//src/maxima.in 2011-01-16 20:07:27.000000000 +0600 -@@ -137,5 +137,5 @@ - if [ "$layout_autotools" = "true" ]; then -- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" -+ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" - else -- exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" -+ exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" - fi -@@ -147,5 +147,5 @@ - if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then -- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" -+ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" - else -- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" -+ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" - fi -@@ -155,3 +155,3 @@ - else -- exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" -+ exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" - fi -@@ -177,3 +177,3 @@ - elif [ "$MAXIMA_LISP" = "sbcl" ]; then -- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" -+ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" - else diff --git a/sci-mathematics/maxima/files/maxima-5.25.1-wish.patch b/sci-mathematics/maxima/files/maxima-5.25.1-wish.patch new file mode 100644 index 000000000000..6fcb0d9ec8e9 --- /dev/null +++ b/sci-mathematics/maxima/files/maxima-5.25.1-wish.patch @@ -0,0 +1,28 @@ +diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in +--- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600 ++++ maxima-5.23.1//configure.in 2011-01-16 21:00:16.000000000 +0600 +@@ -777,6 +777,11 @@ + [ --with-wish= Use 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) + +diff -r -U1 maxima-5.23.1.orig//interfaces/Makefile.am maxima-5.23.1//interfaces/Makefile.am +--- maxima-5.23.1.orig//interfaces/Makefile.am 2004-04-28 23:34:59.000000000 +0700 ++++ maxima-5.23.1//interfaces/Makefile.am 2011-01-16 20:41:38.000000000 +0600 +@@ -1,2 +1,6 @@ ++if WANT_TK + SUBDIRS = emacs xmaxima ++else ++SUBDIRS = emacs ++endif + EXTRA_DIST = bin/xmaxima.iss diff --git a/sci-mathematics/maxima/files/maxima-5.25.1.patch b/sci-mathematics/maxima/files/maxima-5.25.1.patch new file mode 100644 index 000000000000..6309653d6e87 --- /dev/null +++ b/sci-mathematics/maxima/files/maxima-5.25.1.patch @@ -0,0 +1,37 @@ +diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in +--- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600 ++++ maxima-5.23.1//configure.in 2011-01-16 19:50:55.000000000 +0600 +@@ -294,3 +294,3 @@ + dnl n.b. openmcl_default_name is hardcoded in "with" message +-openmcl_default_name=openmcl ++openmcl_default_name=ccl + AC_ARG_ENABLE(openmcl, +diff -r -U1 maxima-5.23.1.orig//src/maxima.in maxima-5.23.1//src/maxima.in +--- maxima-5.23.1.orig//src/maxima.in 2010-12-05 08:06:03.000000000 +0600 ++++ maxima-5.23.1//src/maxima.in 2011-01-16 20:07:27.000000000 +0600 +@@ -137,5 +137,5 @@ + if [ "$layout_autotools" = "true" ]; then +- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" ++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" + else +- exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" ++ exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" + fi +@@ -147,5 +147,5 @@ + if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then +- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" ++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" + else +- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" ++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" + fi +@@ -155,3 +155,3 @@ + else +- exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" ++ exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" + fi +@@ -177,3 +177,3 @@ + elif [ "$MAXIMA_LISP" = "sbcl" ]; then +- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" ++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" + else diff --git a/sci-mathematics/maxima/maxima-5.25.0.ebuild b/sci-mathematics/maxima/maxima-5.25.0.ebuild deleted file mode 100644 index a5f64db682d0..000000000000 --- a/sci-mathematics/maxima/maxima-5.25.0.ebuild +++ /dev/null @@ -1,206 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/maxima-5.25.0.ebuild,v 1.2 2011/08/27 05:03:22 grozin Exp $ - -EAPI=3 - -inherit autotools elisp-common - -DESCRIPTION="Free computer algebra environment based on Macsyma" -HOMEPAGE="http://maxima.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" - -# Supported lisps (the first one is the default) -LISPS=( sbcl cmucl gcl ecls clozurecl clisp ) -# . - just dev-lisp/, - >= dev-lisp/- -MIN_VER=( . . 2.6.8_pre[ansi] 10 . . ) -# supports readline: . - no, y - yes -SUPP_RL=( . . y . . y ) -# . - just --enable-, - --enable- -CONF_FLAG=( . . . ecl ccl . ) - -IUSE="latex emacs tk nls unicode xemacs X ${LISPS[*]}" - -# Languages -LANGS="es pt pt_BR" -for lang in ${LANGS}; do - IUSE="${IUSE} linguas_${lang}" -done - -RDEPEND="X? ( x11-misc/xdg-utils - sci-visualization/gnuplot[gd] - tk? ( dev-lang/tk ) ) - latex? ( virtual/latex-base ) - emacs? ( virtual/emacs - latex? ( app-emacs/auctex ) ) - xemacs? ( app-editors/xemacs - latex? ( app-emacs/auctex ) )" - -PDEPEND="emacs? ( app-emacs/imaxima )" - -# generating lisp dependencies -depends() { - local LISP DEP - LISP=${LISPS[$1]} - DEP=${MIN_VER[$1]} - if [ "${DEP}" = "." ]; then - DEP="dev-lisp/${LISP}" - else - DEP=">=dev-lisp/${LISP}-${DEP}" - fi - 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}) )" - if (( ${n} > 0 )); then - DEF_DEP="${DEF_DEP} !${LISP}? ( " - fi -done - -DEF_DEP="${DEF_DEP} `depends 0`" - -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 - ewarn "No lisp specified in USE flags, choosing ${LISPS[0]} as default" - NLISPS=0 - fi -} - -src_prepare() { - # use xdg-open to view ps, pdf - epatch "${FILESDIR}"/${PN}-xdg-utils.patch - - # Don't use lisp init files - # ClozureCL (former OpenMCL) executable name is ccl - epatch "${FILESDIR}"/${P}.patch - - # make xmaxima conditional on tk (wish) - epatch "${FILESDIR}"/${P}-wish.patch - - # don't install imaxima, since we have a separate package for it - epatch "${FILESDIR}"/${PN}-imaxima.patch - - # remove rmaxima if not needed - epatch "${FILESDIR}"/${PN}-rmaxima.patch - - # fix LDFLAGS handling in ecl (#378195) - epatch "${FILESDIR}"/${PN}-ecl-ldflags.patch - - # 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) --with-lispdir="${SITELISP}"/${PN} -} - -src_install() { - einstall emacsdir="${ED}${SITELISP}/${PN}" || die "einstall failed" - - use tk && make_desktop_entry xmaxima xmaxima \ - /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \ - "Science;Math;Education" - - 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 - doins AUTHORS COPYING README README.lisps || die - dodir /usr/share/doc - dosym ../${PN}/${PV}/doc /usr/share/doc/${PF} || die - - if use emacs; then - elisp-site-file-install "${FILESDIR}"/50maxima-gentoo.el || die - fi - - # if we use ecls, build an ecls library for maxima - if use ecls; then - cd src - mkdir ./lisp-cache - ecl \ - -eval '(require `asdf)' \ - -eval '(setf asdf::*user-cache* (truename "./lisp-cache"))' \ - -eval '(load "maxima-build.lisp")' \ - -eval '(asdf:make-build :maxima :type :fasl :move-here ".")' \ - -eval '(quit)' - ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"` - insinto "${ECLLIB#${EPREFIX}}" - newins maxima.fasb maxima.fas - fi -} - -pkg_preinst() { - # some lisps do not read compress info files (bug #176411) - local infofile - for infofile in "${ED}"/usr/share/info/*.bz2 ; do - bunzip2 "${infofile}" - done -} - -pkg_postinst() { - use emacs && elisp-site-regen - use latex && mktexlsr -} - -pkg_postrm() { - use emacs && elisp-site-regen - use latex && mktexlsr -} diff --git a/sci-mathematics/maxima/maxima-5.25.1.ebuild b/sci-mathematics/maxima/maxima-5.25.1.ebuild new file mode 100644 index 000000000000..e6f07da4d31c --- /dev/null +++ b/sci-mathematics/maxima/maxima-5.25.1.ebuild @@ -0,0 +1,206 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/maxima-5.25.1.ebuild,v 1.1 2011/08/31 14:20:28 grozin Exp $ + +EAPI=3 + +inherit autotools elisp-common + +DESCRIPTION="Free computer algebra environment based on Macsyma" +HOMEPAGE="http://maxima.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +# Supported lisps (the first one is the default) +LISPS=( sbcl cmucl gcl ecls clozurecl clisp ) +# . - just dev-lisp/, - >= dev-lisp/- +MIN_VER=( . . 2.6.8_pre[ansi] 10 . . ) +# supports readline: . - no, y - yes +SUPP_RL=( . . y . . y ) +# . - just --enable-, - --enable- +CONF_FLAG=( . . . ecl ccl . ) + +IUSE="latex emacs tk nls unicode xemacs X ${LISPS[*]}" + +# Languages +LANGS="es pt pt_BR" +for lang in ${LANGS}; do + IUSE="${IUSE} linguas_${lang}" +done + +RDEPEND="X? ( x11-misc/xdg-utils + sci-visualization/gnuplot[gd] + tk? ( dev-lang/tk ) ) + latex? ( virtual/latex-base ) + emacs? ( virtual/emacs + latex? ( app-emacs/auctex ) ) + xemacs? ( app-editors/xemacs + latex? ( app-emacs/auctex ) )" + +PDEPEND="emacs? ( app-emacs/imaxima )" + +# generating lisp dependencies +depends() { + local LISP DEP + LISP=${LISPS[$1]} + DEP=${MIN_VER[$1]} + if [ "${DEP}" = "." ]; then + DEP="dev-lisp/${LISP}" + else + DEP=">=dev-lisp/${LISP}-${DEP}" + fi + 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}) )" + if (( ${n} > 0 )); then + DEF_DEP="${DEF_DEP} !${LISP}? ( " + fi +done + +DEF_DEP="${DEF_DEP} `depends 0`" + +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 + ewarn "No lisp specified in USE flags, choosing ${LISPS[0]} as default" + NLISPS=0 + fi +} + +src_prepare() { + # use xdg-open to view ps, pdf + epatch "${FILESDIR}"/${PN}-xdg-utils.patch + + # Don't use lisp init files + # ClozureCL (former OpenMCL) executable name is ccl + epatch "${FILESDIR}"/${P}.patch + + # make xmaxima conditional on tk (wish) + epatch "${FILESDIR}"/${P}-wish.patch + + # don't install imaxima, since we have a separate package for it + epatch "${FILESDIR}"/${PN}-imaxima.patch + + # remove rmaxima if not needed + epatch "${FILESDIR}"/${PN}-rmaxima.patch + + # fix LDFLAGS handling in ecl (#378195) + epatch "${FILESDIR}"/${PN}-ecl-ldflags.patch + + # 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) --with-lispdir="${SITELISP}"/${PN} +} + +src_install() { + einstall emacsdir="${ED}${SITELISP}/${PN}" || die "einstall failed" + + use tk && make_desktop_entry xmaxima xmaxima \ + /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \ + "Science;Math;Education" + + 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 + doins AUTHORS COPYING README README.lisps || die + dodir /usr/share/doc + dosym ../${PN}/${PV}/doc /usr/share/doc/${PF} || die + + if use emacs; then + elisp-site-file-install "${FILESDIR}"/50maxima-gentoo.el || die + fi + + # if we use ecls, build an ecls library for maxima + if use ecls; then + cd src + mkdir ./lisp-cache + ecl \ + -eval '(require `asdf)' \ + -eval '(setf asdf::*user-cache* (truename "./lisp-cache"))' \ + -eval '(load "maxima-build.lisp")' \ + -eval '(asdf:make-build :maxima :type :fasl :move-here ".")' \ + -eval '(quit)' + ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"` + insinto "${ECLLIB#${EPREFIX}}" + newins maxima.fasb maxima.fas + fi +} + +pkg_preinst() { + # some lisps do not read compress info files (bug #176411) + local infofile + for infofile in "${ED}"/usr/share/info/*.bz2 ; do + bunzip2 "${infofile}" + done +} + +pkg_postinst() { + use emacs && elisp-site-regen + use latex && mktexlsr +} + +pkg_postrm() { + use emacs && elisp-site-regen + use latex && mktexlsr +} -- cgit v1.2.3-65-gdbad