summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Grozin <grozin@gentoo.org>2014-01-29 13:46:26 +0000
committerAndrey Grozin <grozin@gentoo.org>2014-01-29 13:46:26 +0000
commitb8bb49ab57d8e8e8d47fd117e6af48bc069ed557 (patch)
tree51354251d1c11abe6acf50396facdc9e2072afa4 /sci-mathematics
parentversion bump (diff)
downloadgentoo-2-b8bb49ab57d8e8e8d47fd117e6af48bc069ed557.tar.gz
gentoo-2-b8bb49ab57d8e8e8d47fd117e6af48bc069ed557.tar.bz2
gentoo-2-b8bb49ab57d8e8e8d47fd117e6af48bc069ed557.zip
Fix the library version of the ecls maxima needed by sage (bug #499634), thanks to Martin von Gagern <Martin.vGagern@gmx.net>
(Portage version: 2.2.8-r1/cvs/Linux i686, signed Manifest commit with key 0x3AFFCE974D34BD8C!)
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/maxima/ChangeLog9
-rw-r--r--sci-mathematics/maxima/files/ecls-1.patch37
-rw-r--r--sci-mathematics/maxima/maxima-5.32.1-r1.ebuild190
3 files changed, 235 insertions, 1 deletions
diff --git a/sci-mathematics/maxima/ChangeLog b/sci-mathematics/maxima/ChangeLog
index 5f523b374530..aa370bb327f2 100644
--- a/sci-mathematics/maxima/ChangeLog
+++ b/sci-mathematics/maxima/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-mathematics/maxima
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.108 2014/01/11 11:21:18 grozin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.109 2014/01/29 13:46:26 grozin Exp $
+
+*maxima-5.32.1-r1 (29 Jan 2014)
+
+ 29 Jan 2014; Andrey Grozin <grozin@gentoo.org> +maxima-5.32.1-r1.ebuild,
+ +files/ecls-1.patch:
+ Fix the library version of the ecls maxima needed by sage (bug #499634),
+ thanks to Martin von Gagern <Martin.vGagern@gmx.net>
*maxima-5.32.1 (11 Jan 2014)
diff --git a/sci-mathematics/maxima/files/ecls-1.patch b/sci-mathematics/maxima/files/ecls-1.patch
new file mode 100644
index 000000000000..36e9af17bb6f
--- /dev/null
+++ b/sci-mathematics/maxima/files/ecls-1.patch
@@ -0,0 +1,37 @@
+diff -r -U1 maxima-5.30.0.orig/src/maxima.in maxima-5.30.0/src/maxima.in
+--- maxima-5.30.0.orig/src/maxima.in 2012-12-04 12:54:50.000000000 +0700
++++ maxima-5.30.0/src/maxima.in 2013-04-13 12:57:12.037579805 +0700
+@@ -191,3 +191,3 @@
+ elif [ "$MAXIMA_LISP" = "ecl" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -norc -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+
+diff -r -U1 maxima-5.30.0.orig/src/maxima.system maxima-5.30.0/src/maxima.system
+--- maxima-5.30.0.orig/src/maxima.system 2013-03-23 08:32:08.000000000 +0700
++++ maxima-5.30.0/src/maxima.system 2013-04-13 12:59:54.086730845 +0700
+@@ -61,2 +61,10 @@
+ #+ecl
++(defun split-ld-flags-for-ecl (string &aux space)
++ (setf string (string-trim '(#\Space) string))
++ (if (setf space (position #\Space string))
++ (cons (subseq string 0 space)
++ (split-ld-flags-for-ecl (subseq string (1+ space))))
++ (cons string nil)))
++
++#+ecl
+ (defun build-maxima-lib ()
+@@ -77,7 +85,12 @@
+ files)))
++ (c::build-fasl "binary-ecl/maxima" :lisp-files obj
++ :ld-flags
++ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
++ (find-package "MAXIMA")))))
++ (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x))))
+ (c::build-program "binary-ecl/maxima" :lisp-files obj
+ :ld-flags
+ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ (find-package "MAXIMA")))))
+- (if (and x (not (string= x ""))) (list x)))
++ (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x)))
+ :epilogue-code '(progn (require :defsystem)
+
diff --git a/sci-mathematics/maxima/maxima-5.32.1-r1.ebuild b/sci-mathematics/maxima/maxima-5.32.1-r1.ebuild
new file mode 100644
index 000000000000..ee008bf3c902
--- /dev/null
+++ b/sci-mathematics/maxima/maxima-5.32.1-r1.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/maxima-5.32.1-r1.ebuild,v 1.1 2014/01/29 13:46:26 grozin Exp $
+
+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"
+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 )
+# <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=( 0 0 . 1 0 0 )
+
+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="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}) )"
+ 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() {
+ local n PATCHES v
+ PATCHES=( imaxima-0 rmaxima-0 wish-0 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) --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
+ ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"`
+ insinto "${ECLLIB#${EPREFIX}}"
+ doins src/binary-ecl/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
+}