Gentoo Archives: gentoo-commits

From: "Sebastien Fabbro (bicatali)" <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-mathematics/maxima: ChangeLog maxima-5.13.0-r1.ebuild
Date: Sat, 06 Oct 2007 14:12:11
Message-Id: E1IeAEs-0006xa-5u@stork.gentoo.org
1 bicatali 07/10/06 14:02:42
2
3 Modified: ChangeLog
4 Added: maxima-5.13.0-r1.ebuild
5 Log:
6 Clarify logic thanks to ulm. Bumped revision, many changes since 5.13.0
7 (Portage version: 2.1.3.9)
8
9 Revision Changes Path
10 1.37 sci-mathematics/maxima/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/ChangeLog?rev=1.37&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/ChangeLog?rev=1.37&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/ChangeLog?r1=1.36&r2=1.37
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v
19 retrieving revision 1.36
20 retrieving revision 1.37
21 diff -u -r1.36 -r1.37
22 --- ChangeLog 23 Sep 2007 11:46:13 -0000 1.36
23 +++ ChangeLog 6 Oct 2007 14:02:41 -0000 1.37
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sci-mathematics/maxima
26 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.36 2007/09/23 11:46:13 bicatali Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.37 2007/10/06 14:02:41 bicatali Exp $
29 +
30 +*maxima-5.13.0-r1 (06 Oct 2007)
31 +
32 + 06 Oct 2007; Sébastien Fabbro <bicatali@g.o>
33 + +maxima-5.13.0-r1.ebuild:
34 + Clarify logic thanks to ulm. Bumped revision, many changes since 5.13.0
35
36 23 Sep 2007; Sébastien Fabbro <bicatali@g.o> maxima-5.13.0.ebuild:
37 fixed logic for lisp priorities. Now dependencies pull only the compiling
38
39
40
41 1.1 sci-mathematics/maxima/maxima-5.13.0-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/maxima-5.13.0-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/maxima-5.13.0-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: maxima-5.13.0-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2007 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $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 $
51
52 inherit eutils elisp-common
53
54 DESCRIPTION="Free computer algebra environment based on Macsyma"
55 HOMEPAGE="http://maxima.sourceforge.net/"
56 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
57
58 LICENSE="GPL-2 AECA"
59 SLOT="0"
60 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
61 IUSE="cmucl clisp sbcl gcl tetex emacs tk nls unicode"
62
63 # rlwrap is recommended for cmucl and sbcl
64 RDEPEND=">=sci-visualization/gnuplot-4.0
65 x11-misc/xdg-utils
66 tetex? ( virtual/tetex )
67 emacs? ( virtual/emacs
68 tetex? ( || ( app-emacs/auctex app-xemacs/auctex ) ) )
69 sbcl? ( dev-lisp/sbcl app-misc/rlwrap )
70 !sbcl? (
71 clisp? ( dev-lisp/clisp )
72 !clisp? (
73 cmucl? ( >=dev-lisp/cmucl-19a app-misc/rlwrap )
74 !cmucl? (
75 gcl? ( dev-lisp/gcl )
76 !gcl? ( dev-lisp/sbcl app-misc/rlwrap )
77 )
78 )
79 )
80 tk? ( dev-lang/tk )"
81
82 DEPEND="${RDEPEND}
83 sys-apps/texinfo"
84
85 LANGS="es pt pt_BR"
86 for lang in ${LANGS}; do
87 IUSE="${IUSE} linguas_${lang}"
88 done
89
90 RESTRICT="clisp? ( strip )"
91
92 pkg_setup() {
93 # Don't install in the main tree, as this may cause file collisions
94 if use tetex; then
95 local TEXMFPATH="$(kpsewhich -var-value=TEXMFSITE)"
96 local TEXMFCONFIGFILE="$(kpsewhich texmf.cnf)"
97
98 if [ -z "${TEXMFPATH}" ]; then
99 eerror "You haven't defined the TEXMFSITE variable in your TeX config."
100 eerror "Please do so in the file ${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf}"
101 die "Define TEXMFSITE in TeX configuration!"
102 else
103 # go through the colon separated list of directories (maybe only one) provided in the variable
104 # TEXMFPATH (generated from TEXMFSITE from TeX's config) and choose only the first entry.
105 # All entries are separated by colons, even when defined with semi-colons, kpsewhich changes
106 # the output to a generic format, so IFS has to be redefined.
107 local IFS="${IFS}:"
108
109 for strippedpath in ${TEXMFPATH}; do
110 if [ -d ${strippedpath} ]; then
111 MAXIMA_TEXMFDIR="${strippedpath}"
112 break
113 fi
114 done
115
116 # verify if an existing path was chosen to prevent from installing into the wrong directory
117 if [ -z ${MAXIMA_TEXMFDIR} ]; then
118 eerror "TEXMFSITE does not contain any existing directory."
119 eerror "Please define an existing directory in your TeX config file"
120 eerror "${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf} or create at least one of the there specified directories"
121 die "TEXMFSITE variable did not contain an existing directory"
122 fi
123 fi
124 fi
125
126 if ! built_with_use sci-visualization/gnuplot gd; then
127 elog "To benefit full plotting capability of maxima,"
128 elog "enable the gd USE flag enabled for sci-visualization/gnuplot"
129 elog "Then re-emerge maxima"
130 epause 5
131 fi
132
133 # lisp priorities
134 if use sbcl; then
135 MAXIMA_LISP=sbcl
136 elif use clisp; then
137 MAXIMA_LISP=clisp
138 elif use cmucl; then
139 MAXIMA_LISP=cmucl
140 elif use gcl; then
141 MAXIMA_LISP=gcl
142 else
143 MAXIMA_LISP=sbcl
144 fi
145 einfo "Selected lisp: ${MAXIMA_LISP}"
146
147 if [[ ${MAXIMA_LISP} == gcl ]]; then
148 ewarn "Using gcl: if it breaks, recompile with another lisp or use default (sbcl)."
149 if ! built_with_use dev-lisp/gcl ansi; then
150 eerror "GCL must be installed with ANSI."
151 eerror "Try USE=\"ansi\" emerge gcl"
152 die "This package needs gcl with USE=ansi"
153 fi
154 fi
155 }
156
157 src_unpack() {
158 unpack ${A}
159 # use xdg-open to view ps, pdf
160 epatch "${FILESDIR}"/${P}-xdg-utils.patch
161 # remove rmaxima if neither cmucl nor sbcl
162 if [[ ${MAXIMA_LISP} != cmucl ]] || [[ ${MAXIMA_LISP} != sbcl ]]; then
163 sed -i \
164 -e '/^@WIN32_FALSE@bin_SCRIPTS/s/rmaxima//' \
165 "${S}"/src/Makefile.in \
166 || die "sed for rmaxima failed"
167 fi
168 }
169
170 src_compile() {
171 local myconf="--enable-${MAXIMA_LISP}"
172 # remove xmaxima if no tk
173 if use tk; then
174 myconf="${myconf} --with-wish=wish"
175 else
176 myconf="${myconf} --with-wish=none"
177 sed -i \
178 -e '/^SUBDIRS/s/xmaxima//' \
179 interfaces/Makefile.in || die "sed for tk failed"
180 fi
181
182 # enable existing translated doc
183 if use nls; then
184 for lang in ${LANGS}; do
185 if use "linguas_${lang}"; then
186 myconf="${myconf} --enable-lang-${lang}"
187 use unicode && myconf="${myconf} --enable-lang-${lang}-utf8"
188 fi
189 done
190 fi
191
192 econf ${myconf} || die "econf failed"
193 emake || die "emake failed"
194 }
195
196 src_install() {
197 einstall || die "einstall failed"
198
199 use tk && make_desktop_entry xmaxima xmaxima \
200 /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
201 "Science;Math;Education"
202
203 use emacs && \
204 elisp-site-file-install "${FILESDIR}"/50maxima-gentoo.el
205
206 if use tetex; then
207 insinto "${MAXIMA_TEXMFDIR}"/tex/latex/emaxima
208 doins interfaces/emacs/emaxima/emaxima.sty
209 fi
210
211 # do not use dodoc because interfaces can't read compressed files
212 # read COPYING before attempt to remove it
213 insinto /usr/share/${PN}/${PV}/doc
214 doins AUTHORS COPYING ChangeLog-${PV} README README.lisps
215 dodir /usr/share/doc
216 dosym /usr/share/${PN}/${PV}/doc /usr/share/doc/${PF}
217 }
218
219 pkg_preinst() {
220 # some lisps do not read compress info files (bug #176411)
221 for infofile in "${D}"/usr/share/info/*.bz2 ; do
222 bunzip2 "${infofile}"
223 done
224 for infofile in "${D}"/usr/share/info/*.gz ; do
225 gunzip "${infofile}"
226 done
227 }
228
229 pkg_postinst() {
230 use emacs && elisp-site-regen
231 use tetex && mktexlsr
232 }
233
234 pkg_postrm() {
235 use emacs && elisp-site-regen
236 }
237
238
239
240 --
241 gentoo-commits@g.o mailing list