1 |
commit: e671c6b407b19d81a63ece43e98f5c507594e96b |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 1 16:05:52 2018 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 1 16:05:52 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e671c6b4 |
7 |
|
8 |
sci-mathematics/maxima: bump to 5.42.0 |
9 |
|
10 |
Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
12 |
|
13 |
sci-mathematics/maxima/Manifest | 1 + |
14 |
sci-mathematics/maxima/files/ecls-3.patch | 48 +++++++ |
15 |
sci-mathematics/maxima/maxima-5.42.0.ebuild | 212 ++++++++++++++++++++++++++++ |
16 |
3 files changed, 261 insertions(+) |
17 |
|
18 |
diff --git a/sci-mathematics/maxima/Manifest b/sci-mathematics/maxima/Manifest |
19 |
index 47cab5b50ef..76d4d1d3864 100644 |
20 |
--- a/sci-mathematics/maxima/Manifest |
21 |
+++ b/sci-mathematics/maxima/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST maxima-5.38.1.tar.gz 38641257 BLAKE2B 0244b5dbdd337e64d4f7c3e7f6b946463b0246a9fd0660588798f7891fd1599cf400369fe0d1ce3433d01ce2e4b8bc86ad405d3f8368b429cd028362ec66a1b4 SHA512 abca10984dbb22a48bae481b2e803cb5bee6776e974b4bb9271773aa035fb5e49f34b2458aabca01f0a681a07179e57c012273be6f8d53c615b3309b1034abf9 |
24 |
DIST maxima-5.41.0.tar.gz 41540226 BLAKE2B ff726044c9026bc58d04832fa6382146ed7e7d61d801fa7131b1e7e2ed386b99e238e039481697f9aa24cea59ffd0f6811675cd28818c9fe53f023f965f9d149 SHA512 1b93ae2db055ba7fb4a95924a896667f0cfa1c675c603c104181662aeb32b10b006158526b2f3ad93a59688a23eacdc82e870bb8ffb182a89e1e51de013ec209 |
25 |
+DIST maxima-5.42.0.tar.gz 41902466 BLAKE2B ff09294ee66fc407845b1713e5762d28597bda067fdcaca942a61e6f07365965a9cdeb3f6d7369d9a074f5835cf64d9724d1ac8f2ad84033b84483f3cb619476 SHA512 dedd86838b254c9932166eb161589187f353e986ecd398e9405db43b5159597ba87369e9d7afa8bbfd18288c1213818812fe27881b5f5e99efc63bf31a1d7854 |
26 |
|
27 |
diff --git a/sci-mathematics/maxima/files/ecls-3.patch b/sci-mathematics/maxima/files/ecls-3.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..b44dea4d09a |
30 |
--- /dev/null |
31 |
+++ b/sci-mathematics/maxima/files/ecls-3.patch |
32 |
@@ -0,0 +1,48 @@ |
33 |
+diff -r -U3 maxima-5.42.0.orig/src/maxima.in maxima-5.42.0/src/maxima.in |
34 |
+--- maxima-5.42.0.orig/src/maxima.in 2018-09-21 08:21:11.000000000 +0700 |
35 |
++++ maxima-5.42.0/src/maxima.in 2018-10-01 21:49:23.551633882 +0700 |
36 |
+@@ -236,7 +236,7 @@ |
37 |
+ fi |
38 |
+ |
39 |
+ elif [ "$MAXIMA_LISP" = "ecl" ]; then |
40 |
+- exec "$maxima_image_base" --frame-stack 4096 --lisp-stack 65536 $MAXIMA_LISP_OPTIONS -- "$@" |
41 |
++ exec "$maxima_image_base" --frame-stack 4096 --lisp-stack 65536 $MAXIMA_LISP_OPTIONS -norc -- "$@" |
42 |
+ |
43 |
+ elif [ "$MAXIMA_LISP" = "sbcl" ]; then |
44 |
+ # Use executable image if it exists. |
45 |
+diff -r -U3 maxima-5.42.0.orig/src/maxima.system maxima-5.42.0/src/maxima.system |
46 |
+--- maxima-5.42.0.orig/src/maxima.system 2016-12-04 05:27:40.000000000 +0700 |
47 |
++++ maxima-5.42.0/src/maxima.system 2018-10-01 22:01:08.068604254 +0700 |
48 |
+@@ -59,6 +59,14 @@ |
49 |
+ (c:build-fasl output :lisp-files (list object-output))))) |
50 |
+ |
51 |
+ #+ecl |
52 |
++(defun split-ld-flags-for-ecl (string &aux space) |
53 |
++ (setf string (string-trim '(#\Space) string)) |
54 |
++ (if (setf space (position #\Space string)) |
55 |
++ (cons (subseq string 0 space) |
56 |
++ (split-ld-flags-for-ecl (subseq string (1+ space)))) |
57 |
++ (cons string nil))) |
58 |
++ |
59 |
++#+ecl |
60 |
+ (defun build-maxima-lib () |
61 |
+ (labels ((list-all-objects (module) |
62 |
+ (if (eql (mk::component-type module) :file) |
63 |
+@@ -75,11 +83,16 @@ |
64 |
+ ;; Convert dir/foo.fas to dir/foo.o |
65 |
+ (make-pathname :type "o" :defaults p)) |
66 |
+ files))) |
67 |
++ (c::build-fasl "binary-ecl/maxima" :lisp-files obj |
68 |
++ :ld-flags |
69 |
++ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*" |
70 |
++ (find-package "MAXIMA"))))) |
71 |
++ (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x)))) |
72 |
+ (c::build-program "binary-ecl/maxima" :lisp-files obj |
73 |
+ :ld-flags |
74 |
+ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*" |
75 |
+ (find-package "MAXIMA"))))) |
76 |
+- (if (and x (not (string= x ""))) (list x))) |
77 |
++ (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x))) |
78 |
+ :epilogue-code '(progn (require :defsystem) |
79 |
+ (cl-user::run))))))) |
80 |
+ |
81 |
|
82 |
diff --git a/sci-mathematics/maxima/maxima-5.42.0.ebuild b/sci-mathematics/maxima/maxima-5.42.0.ebuild |
83 |
new file mode 100644 |
84 |
index 00000000000..1c0c67e3ac6 |
85 |
--- /dev/null |
86 |
+++ b/sci-mathematics/maxima/maxima-5.42.0.ebuild |
87 |
@@ -0,0 +1,212 @@ |
88 |
+# Copyright 1999-2018 Gentoo Foundation |
89 |
+# Distributed under the terms of the GNU General Public License v2 |
90 |
+ |
91 |
+EAPI=6 |
92 |
+ |
93 |
+inherit autotools elisp-common eutils xdg-utils |
94 |
+ |
95 |
+DESCRIPTION="Free computer algebra environment based on Macsyma" |
96 |
+HOMEPAGE="http://maxima.sourceforge.net/" |
97 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
98 |
+ |
99 |
+LICENSE="GPL-2 GPL-2+" |
100 |
+SLOT="0" |
101 |
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
102 |
+ |
103 |
+# Supported lisps |
104 |
+LISPS=( sbcl cmucl gcl ecls clozurecl clisp ) |
105 |
+# <lisp> supports readline: . - no, y - yes |
106 |
+SUPP_RL=( . . y . . y ) |
107 |
+# . - just --enable-<lisp>, <flag> - --enable-<flag> |
108 |
+CONF_FLAG=( . . . ecl ccl . ) |
109 |
+# patch file version; . - no patch |
110 |
+PATCH_V=( 2 1 . 3 2 1 ) |
111 |
+ |
112 |
+IUSE="emacs tk nls unicode X ${LISPS[*]}" |
113 |
+ |
114 |
+# Languages |
115 |
+LANGS="de es pt pt_BR" |
116 |
+for lang in ${LANGS}; do |
117 |
+ IUSE="${IUSE} l10n_${lang/_/-}" |
118 |
+done |
119 |
+ |
120 |
+# texlive-latexrecommended needed by imaxima for breqn.sty |
121 |
+RDEPEND="!app-emacs/imaxima |
122 |
+ X? ( x11-misc/xdg-utils |
123 |
+ sci-visualization/gnuplot[gd] |
124 |
+ tk? ( dev-lang/tk:0 ) ) |
125 |
+ emacs? ( virtual/emacs |
126 |
+ virtual/latex-base |
127 |
+ app-emacs/auctex |
128 |
+ app-text/ghostscript-gpl |
129 |
+ dev-texlive/texlive-latexrecommended )" |
130 |
+ |
131 |
+# generating lisp dependencies |
132 |
+depends() { |
133 |
+ local LISP DEP |
134 |
+ LISP=${LISPS[$1]} |
135 |
+ DEP="dev-lisp/${LISP}:=" |
136 |
+ if [ "${SUPP_RL[$1]}" = "." ]; then |
137 |
+ DEP="${DEP} app-misc/rlwrap" |
138 |
+ fi |
139 |
+ echo ${DEP} |
140 |
+} |
141 |
+ |
142 |
+n=${#LISPS[*]} |
143 |
+for ((n--; n >= 0; n--)); do |
144 |
+ LISP=${LISPS[${n}]} |
145 |
+ RDEPEND="${RDEPEND} ${LISP}? ( $(depends ${n}) )" |
146 |
+ DEF_DEP="${DEF_DEP} !${LISP}? ( " |
147 |
+done |
148 |
+ |
149 |
+# default lisp |
150 |
+DEF_LISP=0 # sbcl |
151 |
+ARM_LISP=2 # gcl |
152 |
+DEF_DEP="${DEF_DEP} arm? ( `depends ${ARM_LISP}` ) !arm? ( `depends ${DEF_LISP}` )" |
153 |
+ |
154 |
+n=${#LISPS[*]} |
155 |
+for ((n--; n >= 0; n--)); do |
156 |
+ DEF_DEP="${DEF_DEP} )" |
157 |
+done |
158 |
+ |
159 |
+unset LISP |
160 |
+ |
161 |
+RDEPEND="${RDEPEND} |
162 |
+ ${DEF_DEP}" |
163 |
+ |
164 |
+DEPEND="${RDEPEND} |
165 |
+ sys-apps/texinfo" |
166 |
+ |
167 |
+TEXMF="${EPREFIX}"/usr/share/texmf-site |
168 |
+ |
169 |
+pkg_setup() { |
170 |
+ local n=${#LISPS[*]} |
171 |
+ |
172 |
+ for ((n--; n >= 0; n--)); do |
173 |
+ use ${LISPS[${n}]} && NLISPS="${NLISPS} ${n}" |
174 |
+ done |
175 |
+ |
176 |
+ if [ -z "${NLISPS}" ]; then |
177 |
+ use arm && DEF_LISP=${ARM_LISP} |
178 |
+ ewarn "No lisp specified in USE flags, choosing ${LISPS[${DEF_LISP}]} as default" |
179 |
+ NLISPS=${DEF_LISP} |
180 |
+ fi |
181 |
+} |
182 |
+ |
183 |
+src_prepare() { |
184 |
+ local n PATCHES v |
185 |
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-1 ) |
186 |
+ |
187 |
+ n=${#PATCHES[*]} |
188 |
+ for ((n--; n >= 0; n--)); do |
189 |
+ eapply "${FILESDIR}"/${PATCHES[${n}]}.patch |
190 |
+ done |
191 |
+ |
192 |
+ n=${#LISPS[*]} |
193 |
+ for ((n--; n >= 0; n--)); do |
194 |
+ v=${PATCH_V[${n}]} |
195 |
+ if [ "${v}" != "." ]; then |
196 |
+ eapply "${FILESDIR}"/${LISPS[${n}]}-${v}.patch |
197 |
+ fi |
198 |
+ done |
199 |
+ |
200 |
+ eapply_user |
201 |
+ |
202 |
+ # bug #343331 |
203 |
+ rm share/Makefile.in || die |
204 |
+ rm src/Makefile.in || die |
205 |
+ touch src/*.mk |
206 |
+ touch src/Makefile.am |
207 |
+ eautoreconf |
208 |
+} |
209 |
+ |
210 |
+src_configure() { |
211 |
+ local CONFS CONF n lang |
212 |
+ for n in ${NLISPS}; do |
213 |
+ CONF=${CONF_FLAG[${n}]} |
214 |
+ if [ ${CONF} = . ]; then |
215 |
+ CONF=${LISPS[${n}]} |
216 |
+ fi |
217 |
+ CONFS="${CONFS} --enable-${CONF}" |
218 |
+ done |
219 |
+ |
220 |
+ # enable existing translated doc |
221 |
+ if use nls; then |
222 |
+ for lang in ${LANGS}; do |
223 |
+ if use "l10n_${lang/_/-}"; then |
224 |
+ CONFS="${CONFS} --enable-lang-${lang}" |
225 |
+ use unicode && CONFS="${CONFS} --enable-lang-${lang}-utf8" |
226 |
+ fi |
227 |
+ done |
228 |
+ fi |
229 |
+ |
230 |
+ econf ${CONFS} \ |
231 |
+ $(use_with tk wish) \ |
232 |
+ $(use_enable emacs) \ |
233 |
+ --with-lispdir="${EPREFIX}/${SITELISP}/${PN}" |
234 |
+} |
235 |
+ |
236 |
+src_compile() { |
237 |
+ emake |
238 |
+ if use emacs; then |
239 |
+ pushd interfaces/emacs/emaxima > /dev/null |
240 |
+ elisp-compile *.el |
241 |
+ popd > /dev/null |
242 |
+ pushd interfaces/emacs/imaxima > /dev/null |
243 |
+ BYTECOMPFLAGS="-L . -L ../emaxima" |
244 |
+ elisp-compile *.el |
245 |
+ popd > /dev/null |
246 |
+ fi |
247 |
+} |
248 |
+ |
249 |
+src_install() { |
250 |
+ docompress -x /usr/share/info |
251 |
+ emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install |
252 |
+ |
253 |
+ use tk && make_desktop_entry xmaxima xmaxima \ |
254 |
+ /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \ |
255 |
+ "Science;Math;Education" |
256 |
+ |
257 |
+ # do not use dodoc because interfaces can't read compressed files |
258 |
+ # read COPYING before attempt to remove it from dodoc |
259 |
+ insinto /usr/share/${PN}/${PV}/doc |
260 |
+ doins AUTHORS COPYING README README.lisps |
261 |
+ dodir /usr/share/doc |
262 |
+ dosym ../${PN}/${PV}/doc /usr/share/doc/${PF} |
263 |
+ |
264 |
+ if use emacs; then |
265 |
+ elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp} |
266 |
+ elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el |
267 |
+ |
268 |
+ rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die |
269 |
+ insinto ${TEXMF}/tex/latex/emaxima |
270 |
+ doins interfaces/emacs/emaxima/emaxima.sty |
271 |
+ |
272 |
+ insinto /usr/share/${PN}/${PV}/doc/imaxima |
273 |
+ doins interfaces/emacs/imaxima/README |
274 |
+ doins -r interfaces/emacs/imaxima/imath-example |
275 |
+ fi |
276 |
+ |
277 |
+ # if we use ecls, build an ecls library for maxima |
278 |
+ if use ecls; then |
279 |
+ ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"` |
280 |
+ insinto "${ECLLIB#${EPREFIX}}" |
281 |
+ doins src/binary-ecl/maxima.fas |
282 |
+ fi |
283 |
+} |
284 |
+ |
285 |
+pkg_postinst() { |
286 |
+ xdg_mimeinfo_database_update |
287 |
+ if use emacs; then |
288 |
+ elisp-site-regen |
289 |
+ mktexlsr |
290 |
+ fi |
291 |
+} |
292 |
+ |
293 |
+pkg_postrm() { |
294 |
+ xdg_mimeinfo_database_update |
295 |
+ if use emacs; then |
296 |
+ elisp-site-regen |
297 |
+ mktexlsr |
298 |
+ fi |
299 |
+} |