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.15.0-r1.ebuild
Date: Wed, 30 Apr 2008 11:00:53
Message-Id: E1JrA3O-0000qP-Hd@stork.gentoo.org
1 bicatali 08/04/30 11:00:50
2
3 Modified: ChangeLog
4 Added: maxima-5.15.0-r1.ebuild
5 Log:
6 Include imaxima, and blocks old imaxima, thanks Andrey Grozin.
7 (Portage version: 2.1.5_rc6)
8
9 Revision Changes Path
10 1.54 sci-mathematics/maxima/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/ChangeLog?rev=1.54&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/ChangeLog?rev=1.54&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/ChangeLog?r1=1.53&r2=1.54
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v
19 retrieving revision 1.53
20 retrieving revision 1.54
21 diff -u -r1.53 -r1.54
22 --- ChangeLog 29 Apr 2008 08:54:24 -0000 1.53
23 +++ ChangeLog 30 Apr 2008 11:00:50 -0000 1.54
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sci-mathematics/maxima
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.53 2008/04/29 08:54:24 bicatali Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/maxima/ChangeLog,v 1.54 2008/04/30 11:00:50 bicatali Exp $
29 +
30 +*maxima-5.15.0-r1 (30 Apr 2008)
31 +
32 + 30 Apr 2008; Sébastien Fabbro <bicatali@g.o>
33 + files/50maxima-gentoo.el, +maxima-5.15.0-r1.ebuild:
34 + Include imaxima, and blocks old imaxima, thanks Andrey Grozin.
35
36 *maxima-5.15.0 (29 Apr 2008)
37
38
39
40
41 1.1 sci-mathematics/maxima/maxima-5.15.0-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/maxima-5.15.0-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/maxima/maxima-5.15.0-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: maxima-5.15.0-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 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.15.0-r1.ebuild,v 1.1 2008/04/30 11:00:50 bicatali Exp $
51 inherit eutils elisp-common
52
53 DESCRIPTION="Free computer algebra environment based on Macsyma"
54 HOMEPAGE="http://maxima.sourceforge.net/"
55 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
56
57 LICENSE="GPL-2 AECA"
58 SLOT="0"
59 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
60
61 # Supported lisps with readline
62 SUPP_RL="gcl clisp"
63 # Supported lisps without readline
64 SUPP_NORL="cmucl sbcl"
65 SUPP_LISPS="${SUPP_RL} ${SUPP_NORL}"
66 # Default lisp if none selected
67 DEF_LISP="sbcl"
68
69 IUSE="latex emacs tk nls unicode xemacs X ${SUPP_LISPS} ${IUSE}"
70
71 # Languages
72 LANGS="es pt pt_BR"
73 for lang in ${LANGS}; do
74 IUSE="${IUSE} linguas_${lang}"
75 done
76
77 # >=maxima-5.15.0 includes imaxima; it depends on dev-tex/mh
78 RDEPEND="!app-emacs/imaxima
79 X? ( x11-misc/xdg-utils
80 sci-visualization/gnuplot
81 tk? ( dev-lang/tk ) )
82 latex? ( || ( dev-texlive/texlive-latexrecommended
83 >=app-text/tetex-3
84 app-text/ptex ) )
85 emacs? ( virtual/emacs
86 latex? ( app-emacs/auctex
87 || ( dev-tex/mh dev-texlive/texlive-mathextra ) ) )
88 xemacs? ( virtual/xemacs
89 latex? ( app-emacs/auctex
90 || ( dev-tex/mh dev-texlive/texlive-mathextra ) ) )"
91
92
93 # create lisp dependencies
94 for LISP in ${SUPP_LISPS}; do
95 RDEPEND="${RDEPEND} ${LISP}? ( dev-lisp/${LISP} )"
96 DEF_DEP="${DEF_DEP} !${LISP}? ( "
97 done
98 DEF_DEP="${DEF_DEP} dev-lisp/${DEF_LISP}"
99 for LISP in ${SUPP_NORL}; do
100 RDEPEND="${RDEPEND} ${LISP}? ( app-misc/rlwrap )"
101 [[ ${LISP} = ${DEF_LISP} ]] && \
102 DEF_DEP="${DEF_DEP} app-misc/rlwrap"
103 done
104 for LISP in ${SUPP_LISPS}; do
105 DEF_DEP="${DEF_DEP} )"
106 done
107
108 RDEPEND="${RDEPEND}
109 ${DEF_DEP}"
110
111 DEPEND="${RDEPEND}
112 sys-apps/texinfo"
113
114 pkg_setup() {
115 LISPS=""
116
117 for LISP in ${SUPP_LISPS}; do
118 use ${LISP} && LISPS="${LISPS} ${LISP}"
119 done
120
121 if [ -z "${LISPS}" ]; then
122 ewarn "No lisp specified in USE flags, choosing ${DEF_LISP} as default"
123 LISPS="${DEF_LISP}"
124 fi
125
126 RL=""
127
128 for LISP in ${SUPP_NORL}; do
129 use ${LISP} && RL="yes"
130 done
131
132 if use gcl; then
133 if ! built_with_use dev-lisp/gcl ansi; then
134 eerror "gcl must be emerged with the USE flag ansi"
135 die "This package needs gcl with USE=ansi"
136 fi
137 # gcl in the main tree is broken (bug #205803)
138 ewarn "Please use gcl from http://repo.or.cz/w/gentoo-lisp-overlay.git"
139 fi
140
141 # Calculating MAXIMA_TEXMFDIR
142 if use latex; then
143 local TEXMFPATH="$(kpsewhich -var-value=TEXMFSITE)"
144 local TEXMFCONFIGFILE="$(kpsewhich texmf.cnf)"
145
146 if [ -z "${TEXMFPATH}" ]; then
147 eerror "You haven't defined the TEXMFSITE variable in your TeX config."
148 eerror "Please do so in the file ${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf}"
149 die "Define TEXMFSITE in TeX configuration!"
150 else
151 # go through the colon separated list of directories
152 # (maybe only one) provided in the variable
153 # TEXMFPATH (generated from TEXMFSITE from TeX's config)
154 # and choose only the first entry.
155 # All entries are separated by colons, even when defined
156 # with semi-colons, kpsewhich changes
157 # the output to a generic format, so IFS has to be redefined.
158 local IFS="${IFS}:"
159
160 for strippedpath in ${TEXMFPATH}; do
161 if [ -d ${strippedpath} ]; then
162 MAXIMA_TEXMFDIR="${strippedpath}"
163 break
164 fi
165 done
166
167 # verify if an existing path was chosen to prevent from
168 # installing into the wrong directory
169 if [ -z ${MAXIMA_TEXMFDIR} ]; then
170 eerror "TEXMFSITE does not contain any existing directory."
171 eerror "Please define an existing directory in your TeX config file"
172 eerror "${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf} or create at least one of the there specified directories"
173 die "TEXMFSITE variable did not contain an existing directory"
174 fi
175 fi
176 fi
177
178 if use X && ! built_with_use sci-visualization/gnuplot gd; then
179 elog "To benefit full plotting capability of maxima,"
180 elog "enable the gd USE flag for sci-visualization/gnuplot"
181 elog "Then re-emerge maxima"
182 epause 5
183 fi
184 }
185
186 src_unpack() {
187 unpack ${A}
188 cd "${S}"
189 # use xdg-open to view ps, pdf
190 epatch "${FILESDIR}"/${PN}-xdg-utils.patch
191 epatch "${FILESDIR}"/${PN}-no-init-files.patch
192 # remove rmaxima if neither cmucl nor sbcl
193 if [ -z "${RL}" ]; then
194 sed -i \
195 -e '/^@WIN32_FALSE@bin_SCRIPTS/s/rmaxima//' \
196 "${S}"/src/Makefile.in \
197 || die "sed for rmaxima failed"
198 fi
199 }
200
201 src_compile() {
202 local myconf=""
203 for LISP in ${LISPS}; do
204 myconf="${myconf} --enable-${LISP}"
205 done
206
207 # remove xmaxima if no tk
208 if use tk; then
209 myconf="${myconf} --with-wish=wish"
210 else
211 myconf="${myconf} --with-wish=none"
212 sed -i \
213 -e '/^SUBDIRS/s/xmaxima//' \
214 interfaces/Makefile.in || die "sed for tk failed"
215 fi
216
217 # enable existing translated doc
218 if use nls; then
219 for lang in ${LANGS}; do
220 if use "linguas_${lang}"; then
221 myconf="${myconf} --enable-lang-${lang}"
222 use unicode && myconf="${myconf} --enable-lang-${lang}-utf8"
223 fi
224 done
225 fi
226
227 econf ${myconf} || die "econf failed"
228 emake || die "emake failed"
229 }
230
231 src_install() {
232 einstall emacsdir="${D}${SITELISP}/${PN}" || die "einstall failed"
233
234 use tk && make_desktop_entry xmaxima xmaxima \
235 /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
236 "Science;Math;Education"
237
238 if use latex; then
239 insinto "${MAXIMA_TEXMFDIR}"/tex/latex/emaxima
240 doins interfaces/emacs/emaxima/emaxima.sty
241 fi
242
243 # do not use dodoc because interfaces can't read compressed files
244 # read COPYING before attempt to remove it from dodoc
245 insinto /usr/share/${PN}/${PV}/doc
246 doins AUTHORS COPYING README README.lisps || die
247 dodir /usr/share/doc
248 dosym ../../${PN}/${PV}/doc /usr/share/doc/${PF}
249
250 if use emacs; then
251 elisp-site-file-install "${FILESDIR}"/50maxima-gentoo.el
252 # imaxima docs
253 cd interfaces/emacs/imaxima
254 insinto /usr/share/${PN}/${PV}/doc/imaxima
255 doins ChangeLog NEWS README || die "installing imaxima docs failed"
256 insinto /usr/share/${PN}/${PV}/doc/imaxima/imath-example
257 doins imath-example/*.txt || die "installing imaxima docs failed"
258 fi
259 }
260
261 pkg_preinst() {
262 # some lisps do not read compress info files (bug #176411)
263 for infofile in "${D}"/usr/share/info/*.bz2 ; do
264 bunzip2 "${infofile}"
265 done
266 for infofile in "${D}"/usr/share/info/*.gz ; do
267 gunzip "${infofile}"
268 done
269 }
270
271 pkg_postinst() {
272 use emacs && elisp-site-regen
273 use latex && mktexlsr
274 }
275
276 pkg_postrm() {
277 use emacs && elisp-site-regen
278 }
279
280
281
282 --
283 gentoo-commits@l.g.o mailing list