summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2007-10-06 14:02:42 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2007-10-06 14:02:42 +0000
commit1ea323b70317bc87d0e24348e6733a7ff10bab77 (patch)
tree63547331b79c204c522d036b8eac37d946d0ec2f /sci-mathematics
parentBlock cryptsetup-luks #194907 by Jakub Moc. (diff)
downloadgentoo-2-1ea323b70317bc87d0e24348e6733a7ff10bab77.tar.gz
gentoo-2-1ea323b70317bc87d0e24348e6733a7ff10bab77.tar.bz2
gentoo-2-1ea323b70317bc87d0e24348e6733a7ff10bab77.zip
Clarify logic thanks to ulm. Bumped revision, many changes since 5.13.0
(Portage version: 2.1.3.9)
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/maxima/ChangeLog8
-rw-r--r--sci-mathematics/maxima/files/digest-maxima-5.13.0-r13
-rw-r--r--sci-mathematics/maxima/maxima-5.13.0-r1.ebuild189
3 files changed, 199 insertions, 1 deletions
diff --git a/sci-mathematics/maxima/ChangeLog b/sci-mathematics/maxima/ChangeLog
index d20d4dd8360e..45c16572087e 100644
--- a/sci-mathematics/maxima/ChangeLog
+++ b/sci-mathematics/maxima/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-mathematics/maxima
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.36 2007/09/23 11:46:13 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.37 2007/10/06 14:02:41 bicatali Exp $
+
+*maxima-5.13.0-r1 (06 Oct 2007)
+
+ 06 Oct 2007; Sébastien Fabbro <bicatali@gentoo.org>
+ +maxima-5.13.0-r1.ebuild:
+ Clarify logic thanks to ulm. Bumped revision, many changes since 5.13.0
23 Sep 2007; Sébastien Fabbro <bicatali@gentoo.org> maxima-5.13.0.ebuild:
fixed logic for lisp priorities. Now dependencies pull only the compiling
diff --git a/sci-mathematics/maxima/files/digest-maxima-5.13.0-r1 b/sci-mathematics/maxima/files/digest-maxima-5.13.0-r1
new file mode 100644
index 000000000000..a744fcabcc6f
--- /dev/null
+++ b/sci-mathematics/maxima/files/digest-maxima-5.13.0-r1
@@ -0,0 +1,3 @@
+MD5 7317ba22fc485554b15aceb6bc22542b maxima-5.13.0.tar.gz 19216173
+RMD160 2ec91678f8c6a6f863d6ba448f299793e52c822a maxima-5.13.0.tar.gz 19216173
+SHA256 9625e09785f88f738faf40ad64889acd17328e043c39ef5ad56f3172d76af187 maxima-5.13.0.tar.gz 19216173
diff --git a/sci-mathematics/maxima/maxima-5.13.0-r1.ebuild b/sci-mathematics/maxima/maxima-5.13.0-r1.ebuild
new file mode 100644
index 000000000000..ffdc9ec2c934
--- /dev/null
+++ b/sci-mathematics/maxima/maxima-5.13.0-r1.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/maxima-5.13.0-r1.ebuild,v 1.1 2007/10/06 14:02:41 bicatali Exp $
+
+inherit eutils 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 AECA"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="cmucl clisp sbcl gcl tetex emacs tk nls unicode"
+
+# rlwrap is recommended for cmucl and sbcl
+RDEPEND=">=sci-visualization/gnuplot-4.0
+ x11-misc/xdg-utils
+ tetex? ( virtual/tetex )
+ emacs? ( virtual/emacs
+ tetex? ( || ( app-emacs/auctex app-xemacs/auctex ) ) )
+ sbcl? ( dev-lisp/sbcl app-misc/rlwrap )
+ !sbcl? (
+ clisp? ( dev-lisp/clisp )
+ !clisp? (
+ cmucl? ( >=dev-lisp/cmucl-19a app-misc/rlwrap )
+ !cmucl? (
+ gcl? ( dev-lisp/gcl )
+ !gcl? ( dev-lisp/sbcl app-misc/rlwrap )
+ )
+ )
+ )
+ tk? ( dev-lang/tk )"
+
+DEPEND="${RDEPEND}
+ sys-apps/texinfo"
+
+LANGS="es pt pt_BR"
+for lang in ${LANGS}; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+RESTRICT="clisp? ( strip )"
+
+pkg_setup() {
+ # Don't install in the main tree, as this may cause file collisions
+ if use tetex; then
+ local TEXMFPATH="$(kpsewhich -var-value=TEXMFSITE)"
+ local TEXMFCONFIGFILE="$(kpsewhich texmf.cnf)"
+
+ if [ -z "${TEXMFPATH}" ]; then
+ eerror "You haven't defined the TEXMFSITE variable in your TeX config."
+ eerror "Please do so in the file ${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf}"
+ die "Define TEXMFSITE in TeX configuration!"
+ else
+ # go through the colon separated list of directories (maybe only one) provided in the variable
+ # TEXMFPATH (generated from TEXMFSITE from TeX's config) and choose only the first entry.
+ # All entries are separated by colons, even when defined with semi-colons, kpsewhich changes
+ # the output to a generic format, so IFS has to be redefined.
+ local IFS="${IFS}:"
+
+ for strippedpath in ${TEXMFPATH}; do
+ if [ -d ${strippedpath} ]; then
+ MAXIMA_TEXMFDIR="${strippedpath}"
+ break
+ fi
+ done
+
+ # verify if an existing path was chosen to prevent from installing into the wrong directory
+ if [ -z ${MAXIMA_TEXMFDIR} ]; then
+ eerror "TEXMFSITE does not contain any existing directory."
+ eerror "Please define an existing directory in your TeX config file"
+ eerror "${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf} or create at least one of the there specified directories"
+ die "TEXMFSITE variable did not contain an existing directory"
+ fi
+ fi
+ fi
+
+ if ! built_with_use sci-visualization/gnuplot gd; then
+ elog "To benefit full plotting capability of maxima,"
+ elog "enable the gd USE flag enabled for sci-visualization/gnuplot"
+ elog "Then re-emerge maxima"
+ epause 5
+ fi
+
+ # lisp priorities
+ if use sbcl; then
+ MAXIMA_LISP=sbcl
+ elif use clisp; then
+ MAXIMA_LISP=clisp
+ elif use cmucl; then
+ MAXIMA_LISP=cmucl
+ elif use gcl; then
+ MAXIMA_LISP=gcl
+ else
+ MAXIMA_LISP=sbcl
+ fi
+ einfo "Selected lisp: ${MAXIMA_LISP}"
+
+ if [[ ${MAXIMA_LISP} == gcl ]]; then
+ ewarn "Using gcl: if it breaks, recompile with another lisp or use default (sbcl)."
+ if ! built_with_use dev-lisp/gcl ansi; then
+ eerror "GCL must be installed with ANSI."
+ eerror "Try USE=\"ansi\" emerge gcl"
+ die "This package needs gcl with USE=ansi"
+ fi
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ # use xdg-open to view ps, pdf
+ epatch "${FILESDIR}"/${P}-xdg-utils.patch
+ # remove rmaxima if neither cmucl nor sbcl
+ if [[ ${MAXIMA_LISP} != cmucl ]] || [[ ${MAXIMA_LISP} != sbcl ]]; then
+ sed -i \
+ -e '/^@WIN32_FALSE@bin_SCRIPTS/s/rmaxima//' \
+ "${S}"/src/Makefile.in \
+ || die "sed for rmaxima failed"
+ fi
+}
+
+src_compile() {
+ local myconf="--enable-${MAXIMA_LISP}"
+ # remove xmaxima if no tk
+ if use tk; then
+ myconf="${myconf} --with-wish=wish"
+ else
+ myconf="${myconf} --with-wish=none"
+ sed -i \
+ -e '/^SUBDIRS/s/xmaxima//' \
+ interfaces/Makefile.in || die "sed for tk failed"
+ fi
+
+ # enable existing translated doc
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use "linguas_${lang}"; then
+ myconf="${myconf} --enable-lang-${lang}"
+ use unicode && myconf="${myconf} --enable-lang-${lang}-utf8"
+ fi
+ done
+ fi
+
+ econf ${myconf} || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ einstall || die "einstall failed"
+
+ use tk && make_desktop_entry xmaxima xmaxima \
+ /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
+ "Science;Math;Education"
+
+ use emacs && \
+ elisp-site-file-install "${FILESDIR}"/50maxima-gentoo.el
+
+ if use tetex; then
+ insinto "${MAXIMA_TEXMFDIR}"/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
+ insinto /usr/share/${PN}/${PV}/doc
+ doins AUTHORS COPYING ChangeLog-${PV} README README.lisps
+ dodir /usr/share/doc
+ dosym /usr/share/${PN}/${PV}/doc /usr/share/doc/${PF}
+}
+
+pkg_preinst() {
+ # some lisps do not read compress info files (bug #176411)
+ for infofile in "${D}"/usr/share/info/*.bz2 ; do
+ bunzip2 "${infofile}"
+ done
+ for infofile in "${D}"/usr/share/info/*.gz ; do
+ gunzip "${infofile}"
+ done
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ use tetex && mktexlsr
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}