Gentoo Archives: gentoo-commits

From: Andrey Grozin <grozin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/maxima/
Date: Thu, 30 Jan 2020 15:42:32
Message-Id: 1580398939.e0fd55708ce23e9be5c3672c0d78317681529435.grozin@gentoo
1 commit: e0fd55708ce23e9be5c3672c0d78317681529435
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 30 15:42:19 2020 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 30 15:42:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0fd5570
7
8 sci-mathematics/maxima: bump to 5.43.2
9
10 Package-Manager: Portage-2.3.85, Repoman-2.3.20
11 Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>
12
13 sci-mathematics/maxima/Manifest | 1 +
14 sci-mathematics/maxima/maxima-5.43.2.ebuild | 214 ++++++++++++++++++++++++++++
15 2 files changed, 215 insertions(+)
16
17 diff --git a/sci-mathematics/maxima/Manifest b/sci-mathematics/maxima/Manifest
18 index c360d028503..ab667a5ad2b 100644
19 --- a/sci-mathematics/maxima/Manifest
20 +++ b/sci-mathematics/maxima/Manifest
21 @@ -3,3 +3,4 @@ DIST maxima-5.42.1.tar.gz 41865510 BLAKE2B d3b8a50594dc0cef0c354c42be1aee96df77a
22 DIST maxima-5.42.2.tar.gz 41840181 BLAKE2B bca8a94366f1fe2f508436fdef8de80107b19c9b267a4b72dc6f56870078d35b3feb7dbdda384589b38c5351d6eeede1b9738a5ec2152063de2afacd1ced48c4 SHA512 5033b02272121f6aacff5ededf90eaad5e644a06d0c62aafd745401c08429da979ecd8274f7aa12596a0e32ddb614659af14e4273f59d372fe1ecbec081e7829
23 DIST maxima-5.43.0-missing-texi-file.tar.gz 6713 BLAKE2B 4e2c8c7a2ec9007c47cbb45272eb00f930c0014e0a70e52418124bd06731668d47dd76a854c395ccfa2ef00f87e60d8a5811d9237653126680ecfa2d3013e9ec SHA512 e09f983e2eb76adbf8b237c2b2909ff643bd562e16c28f50096509470cd3c9e72d69d39d4ac35315698d20937489c28883604e24302c4424222b51ecc20e438d
24 DIST maxima-5.43.0.tar.gz 34605709 BLAKE2B db9db75b7eff0454d4b9595120d726969b4e8b651f611ac69dcd92c4496bf9530ce76867348fd87a33444eef3abb7d123ef2726a7b96ebde9e43f231b21a2b8c SHA512 6611eda4bf81bc5454bf6dd641c73a470cc07b2f768d9550b3abeb7b68f1b4675fd5eca766c52844438e9247d8035be537c7120c9f49cdaed9f918d49ed16659
25 +DIST maxima-5.43.2.tar.gz 40871773 BLAKE2B a00a6ca06159d5acde195d9dc0f59d3a4b72738b2690997c18a9d1b2c642983b3a2005aee98544d4f45d8bc9ee5d9c6b0e43e4be40df4224b0174662bd75f71d SHA512 b2503440b2c4d515de9a39dd6acbe1c8dfae5daf083c47b6af2ffce381ad48923d1fa4e5f25ec1dc0621ad592b23cebc4c456b8ee2ee52bea958df6fb9df26fd
26
27 diff --git a/sci-mathematics/maxima/maxima-5.43.2.ebuild b/sci-mathematics/maxima/maxima-5.43.2.ebuild
28 new file mode 100644
29 index 00000000000..7c68f0a0e32
30 --- /dev/null
31 +++ b/sci-mathematics/maxima/maxima-5.43.2.ebuild
32 @@ -0,0 +1,214 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +inherit autotools elisp-common eutils xdg-utils
39 +
40 +DESCRIPTION="Free computer algebra environment based on Macsyma"
41 +HOMEPAGE="http://maxima.sourceforge.net/"
42 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
43 +
44 +LICENSE="GPL-2 GPL-2+"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
47 +
48 +# Supported lisps
49 +LISPS=( sbcl cmucl gcl ecls clozurecl clisp )
50 +# <lisp> supports readline: . - no, y - yes
51 +SUPP_RL=( . . y . . y )
52 +# . - just --enable-<lisp>, <flag> - --enable-<flag>
53 +CONF_FLAG=( . . . ecl ccl . )
54 +# patch file version; . - no patch
55 +PATCH_V=( 2 1 . 3 3 1 )
56 +
57 +IUSE="emacs tk nls unicode X test ${LISPS[*]}"
58 +RESTRICT="!test? ( test )"
59 +
60 +# Languages
61 +LANGS="de es pt pt_BR"
62 +for lang in ${LANGS}; do
63 + IUSE="${IUSE} l10n_${lang/_/-}"
64 +done
65 +
66 +# texlive-latexrecommended needed by imaxima for breqn.sty
67 +RDEPEND="!app-emacs/imaxima
68 + X? ( x11-misc/xdg-utils
69 + sci-visualization/gnuplot[gd]
70 + tk? ( dev-lang/tk:0 ) )
71 + emacs? ( >=app-editors/emacs-23.1:*
72 + virtual/latex-base
73 + app-emacs/auctex
74 + app-text/ghostscript-gpl
75 + dev-texlive/texlive-latexrecommended )"
76 +
77 +# generating lisp dependencies
78 +depends() {
79 + local LISP DEP
80 + LISP=${LISPS[$1]}
81 + DEP="dev-lisp/${LISP}:="
82 + if [ "${SUPP_RL[$1]}" = "." ]; then
83 + DEP="${DEP} app-misc/rlwrap"
84 + fi
85 + echo ${DEP}
86 +}
87 +
88 +n=${#LISPS[*]}
89 +for ((n--; n >= 0; n--)); do
90 + LISP=${LISPS[${n}]}
91 + RDEPEND="${RDEPEND} ${LISP}? ( $(depends ${n}) )"
92 + DEF_DEP="${DEF_DEP} !${LISP}? ( "
93 +done
94 +
95 +# default lisp
96 +DEF_LISP=0 # sbcl
97 +ARM_LISP=2 # gcl
98 +DEF_DEP="${DEF_DEP} arm? ( `depends ${ARM_LISP}` ) !arm? ( `depends ${DEF_LISP}` )"
99 +
100 +n=${#LISPS[*]}
101 +for ((n--; n >= 0; n--)); do
102 + DEF_DEP="${DEF_DEP} )"
103 +done
104 +
105 +unset LISP
106 +
107 +RDEPEND="${RDEPEND}
108 + ${DEF_DEP}"
109 +
110 +DEPEND="${RDEPEND}
111 + test? ( sci-visualization/gnuplot )
112 + sys-apps/texinfo"
113 +
114 +TEXMF="${EPREFIX}"/usr/share/texmf-site
115 +
116 +pkg_setup() {
117 + local n=${#LISPS[*]}
118 +
119 + for ((n--; n >= 0; n--)); do
120 + use ${LISPS[${n}]} && NLISPS="${NLISPS} ${n}"
121 + done
122 +
123 + if [ -z "${NLISPS}" ]; then
124 + use arm && DEF_LISP=${ARM_LISP}
125 + ewarn "No lisp specified in USE flags, choosing ${LISPS[${DEF_LISP}]} as default"
126 + NLISPS=${DEF_LISP}
127 + fi
128 +}
129 +
130 +src_prepare() {
131 + local n PATCHES v
132 + PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-1 texinfo-0 )
133 +
134 + n=${#PATCHES[*]}
135 + for ((n--; n >= 0; n--)); do
136 + eapply "${FILESDIR}"/${PATCHES[${n}]}.patch
137 + done
138 +
139 + n=${#LISPS[*]}
140 + for ((n--; n >= 0; n--)); do
141 + v=${PATCH_V[${n}]}
142 + if [ "${v}" != "." ]; then
143 + eapply "${FILESDIR}"/${LISPS[${n}]}-${v}.patch
144 + fi
145 + done
146 +
147 + eapply_user
148 +
149 + # bug #343331
150 + rm share/Makefile.in || die
151 + rm src/Makefile.in || die
152 + touch src/*.mk
153 + touch src/Makefile.am
154 + eautoreconf
155 +}
156 +
157 +src_configure() {
158 + local CONFS CONF n lang
159 + for n in ${NLISPS}; do
160 + CONF=${CONF_FLAG[${n}]}
161 + if [ ${CONF} = . ]; then
162 + CONF=${LISPS[${n}]}
163 + fi
164 + CONFS="${CONFS} --enable-${CONF}"
165 + done
166 +
167 + # enable existing translated doc
168 + if use nls; then
169 + for lang in ${LANGS}; do
170 + if use "l10n_${lang/_/-}"; then
171 + CONFS="${CONFS} --enable-lang-${lang}"
172 + use unicode && CONFS="${CONFS} --enable-lang-${lang}-utf8"
173 + fi
174 + done
175 + fi
176 +
177 + econf ${CONFS} \
178 + $(use_with tk wish) \
179 + $(use_enable emacs) \
180 + --with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
181 +}
182 +
183 +src_compile() {
184 + emake
185 + if use emacs; then
186 + pushd interfaces/emacs/emaxima > /dev/null
187 + elisp-compile *.el
188 + popd > /dev/null
189 + pushd interfaces/emacs/imaxima > /dev/null
190 + BYTECOMPFLAGS="-L . -L ../emaxima"
191 + elisp-compile *.el
192 + popd > /dev/null
193 + fi
194 +}
195 +
196 +src_install() {
197 + docompress -x /usr/share/info
198 + emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
199 +
200 + use tk && make_desktop_entry xmaxima xmaxima \
201 + /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
202 + "Science;Math;Education"
203 +
204 + # do not use dodoc because interfaces can't read compressed files
205 + # read COPYING before attempt to remove it from dodoc
206 + insinto /usr/share/${PN}/${PV}/doc
207 + doins AUTHORS COPYING README README.lisps
208 + dodir /usr/share/doc
209 + dosym ../${PN}/${PV}/doc /usr/share/doc/${PF}
210 +
211 + if use emacs; then
212 + elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp}
213 + elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el
214 +
215 + rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die
216 + insinto ${TEXMF}/tex/latex/emaxima
217 + doins interfaces/emacs/emaxima/emaxima.sty
218 +
219 + insinto /usr/share/${PN}/${PV}/doc/imaxima
220 + doins interfaces/emacs/imaxima/README
221 + doins -r interfaces/emacs/imaxima/imath-example
222 + fi
223 +
224 + # if we use ecls, build an ecls library for maxima
225 + if use ecls; then
226 + ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"`
227 + insinto "${ECLLIB#${EPREFIX}}"
228 + doins src/binary-ecl/maxima.fas
229 + fi
230 +}
231 +
232 +pkg_postinst() {
233 + xdg_mimeinfo_database_update
234 + if use emacs; then
235 + elisp-site-regen
236 + mktexlsr
237 + fi
238 +}
239 +
240 +pkg_postrm() {
241 + xdg_mimeinfo_database_update
242 + if use emacs; then
243 + elisp-site-regen
244 + mktexlsr
245 + fi
246 +}