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: Mon, 21 Jun 2021 04:07:32
Message-Id: 1624248418.30240deb6a7a23a55954da5a144397e11d95d84a.grozin@gentoo
1 commit: 30240deb6a7a23a55954da5a144397e11d95d84a
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 21 04:06:58 2021 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 21 04:06:58 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30240deb
7
8 sci-mathematics/maxima: bump to 5.45.1
9
10 Closes: https://bugs.gentoo.org/796386
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>
13
14 sci-mathematics/maxima/Manifest | 1 +
15 sci-mathematics/maxima/maxima-5.45.1.ebuild | 235 ++++++++++++++++++++++++++++
16 2 files changed, 236 insertions(+)
17
18 diff --git a/sci-mathematics/maxima/Manifest b/sci-mathematics/maxima/Manifest
19 index 8aabbfd7df5..94e8ada3253 100644
20 --- a/sci-mathematics/maxima/Manifest
21 +++ b/sci-mathematics/maxima/Manifest
22 @@ -1,3 +1,4 @@
23 DIST maxima-5.42.1.tar.gz 41865510 BLAKE2B d3b8a50594dc0cef0c354c42be1aee96df77a4e222dbe457edeb47d7fe77a8fe376b10ce8da9e4ff6c447242e9c53a32286d09a64d8600112f6feda92f1fb58d SHA512 79c5e70119b0384d9dd8aa47c7e96a0ccb7e6367526b8a14d21f00137a1c2f0c8b7990bb7231d7c90ffa0090f67c1fa30a418d013d9c5982030ae68de9717f48
24 DIST maxima-5.44.0.tar.gz 34976354 BLAKE2B d6870b6fb0581d9e60d6ed97c7daed8ce12b8b1ae49d0edb7b8d31dd723f9b879eb70440659ff958f53cee16d8d2a92f80dcaa3898d9f6dbabd79a5059073a65 SHA512 1e043bebb7c6d002c113d8de20a98d58d1a8e7bedfc9bcf52819e7c7554655991dc2f42f0333889706574249736db833a237b3e59b967e7e42ede28262e31f2f
25 DIST maxima-5.45.0.tar.gz 39946933 BLAKE2B bdccb6cb88d458eec4359b7bc0b5337c9d1d0af9fe4cfeece9c80e840a2aa3963793cdf5c02437b72af647ef6c9306224c524f5a715860808d3b49ad5a85641f SHA512 353d33a89e5fd1986e84698866cc9716307a5ab3c7a29908ed474b5d00f6f8869f616334ff068c2c5d175c4bbb95f892d6061b12e43686ee4813b9a16e5a4139
26 +DIST maxima-5.45.1.tar.gz 39951932 BLAKE2B b6d67aebf34c12567ec5d08581dc22d13a902d42074abc967f8e50e029845a52a2538da8cb4382e3e28163ce11a6d8c245cfc48150cc10768250de34368acf6c SHA512 08e7a2b24324c0f0dda127d291b9d439125fa1324732b17c804c3eb68d35f87e3fc713c147472821a1781e6378b7afb0721d5da907826324ec3d24848251b7cf
27
28 diff --git a/sci-mathematics/maxima/maxima-5.45.1.ebuild b/sci-mathematics/maxima/maxima-5.45.1.ebuild
29 new file mode 100644
30 index 00000000000..02d33fe5db6
31 --- /dev/null
32 +++ b/sci-mathematics/maxima/maxima-5.45.1.ebuild
33 @@ -0,0 +1,235 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +PYTHON_COMPAT=( python3_{7..9} )
40 +
41 +inherit autotools elisp-common flag-o-matic python-single-r1 xdg-utils
42 +
43 +DESCRIPTION="Free computer algebra environment based on Macsyma"
44 +HOMEPAGE="http://maxima.sourceforge.net/"
45 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
46 +
47 +LICENSE="GPL-2 GPL-2+"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
50 +
51 +IUSE="clisp clozurecl clozurecl64 cmucl ecls emacs gcl gui nls +sbcl unicode vtk X test"
52 +RESTRICT="!test? ( test )"
53 +
54 +# Languages
55 +LANGS="de es pt pt_BR"
56 +for lang in ${LANGS}; do
57 + IUSE="${IUSE} l10n_${lang/_/-}"
58 +done
59 +
60 +LISP_DEPEND="
61 + clisp? ( dev-lisp/clisp )
62 + clozurecl? ( dev-lisp/clozurecl app-misc/rlwrap )
63 + clozurecl64? ( dev-lisp/clozurecl app-misc/rlwrap )
64 + cmucl? ( dev-lisp/cmucl app-misc/rlwrap )
65 + ecls? ( dev-lisp/ecls app-misc/rlwrap )
66 + gcl? ( dev-lisp/gcl[ansi,readline] )
67 + sbcl? ( dev-lisp/sbcl app-misc/rlwrap )
68 +"
69 +
70 +# Python is used in e.g. doc/info/build_html.sh to build the docs.
71 +# LISP_DEPEND is included in both BDEPEND and DEPEND because the various
72 +# lisp engines are used to both compile and run maxima. It's possible
73 +# that they don't (all?) need to be listed in DEPEND; who knows.
74 +BDEPEND="
75 + ${PYTHON_DEPS}
76 + ${LISP_DEPEND}
77 + test? ( sci-visualization/gnuplot )
78 + sys-apps/texinfo
79 +"
80 +
81 +DEPEND="
82 + ${LISP_DEPEND}
83 + emacs? ( >=app-editors/emacs-26:* )
84 + gui? ( dev-lang/tk:0 )
85 +"
86 +
87 +# texlive-latexrecommended needed by imaxima for breqn.sty
88 +#
89 +# VTK is an optional plotting backend that can be enabled by
90 +# running "draw_renderer: 'vtk;" within maxima.
91 +#
92 +# It's NON-optional for the scene() command, but that command is
93 +# currently useless since Tcl/Tk support was dropped in sci-libs/vtk.
94 +# Thus we include VTK only as an optional dependency.
95 +#
96 +# We require app-misc/rlwrap for any lisps that don't support readline
97 +# themselves.
98 +RDEPEND="
99 + ${DEPEND}
100 + X? (
101 + x11-misc/xdg-utils
102 + sci-visualization/gnuplot[gd]
103 + vtk? (
104 + ${PYTHON_DEPS}
105 + sci-libs/vtk[python,rendering,${PYTHON_SINGLE_USEDEP}]
106 + )
107 + )
108 + emacs? (
109 + virtual/latex-base
110 + app-emacs/auctex
111 + app-text/ghostscript-gpl
112 + dev-texlive/texlive-latexrecommended
113 + )"
114 +
115 +# Maxima can make use of X features like plotting (and launching a PNG
116 +# viewer) from the console, but you can't use the xmaxima GUI without X.
117 +REQUIRED_USE="
118 + ${PYTHON_REQUIRED_USE}
119 + || ( clisp clozurecl clozurecl64 cmucl ecls gcl sbcl )
120 + gui? ( X )"
121 +
122 +TEXMF="${EPREFIX}"/usr/share/texmf-site
123 +
124 +pkg_setup() {
125 + # Set the PYTHON variable to whatever it should be.
126 + python-single-r1_pkg_setup
127 +}
128 +
129 +PATCHES=(
130 + "${FILESDIR}/dont-hardcode-python.patch"
131 + "${FILESDIR}/imaxima-0.patch"
132 + "${FILESDIR}/xdg-utils-1.patch"
133 + "${FILESDIR}/wish-2.patch"
134 + "${FILESDIR}/rmaxima-0.patch"
135 + "${FILESDIR}/emacs-0.patch"
136 + "${FILESDIR}/clisp-1.patch"
137 + "${FILESDIR}/clozurecl-3.patch"
138 + "${FILESDIR}/ecls-4.patch"
139 + "${FILESDIR}/cmucl-1.patch"
140 + "${FILESDIR}/sbcl-2.patch"
141 +)
142 +
143 +src_prepare() {
144 + default
145 +
146 + # bug #343331
147 + rm share/Makefile.in || die
148 + rm src/Makefile.in || die
149 + touch src/*.mk
150 + touch src/Makefile.am
151 +
152 + eautoreconf
153 +}
154 +
155 +src_configure() {
156 + local CONFS=""
157 +
158 + # enable existing translated doc
159 + if use nls; then
160 + for lang in ${LANGS}; do
161 + if use "l10n_${lang/_/-}"; then
162 + CONFS="${CONFS} --enable-lang-${lang}"
163 + use unicode && CONFS="${CONFS} --enable-lang-${lang}-utf8"
164 + fi
165 + done
166 + fi
167 +
168 + # Using raw-ldflags fixes the error,
169 + #
170 + # x86_64-pc-linux-gnu/bin/ld: fatal error: -O1 -Wl: invalid option
171 + # value (expected an integer): 1 -Wl
172 + #
173 + # when building the maxima.fas library for ECL. See upstream bugs:
174 + #
175 + # * https://sourceforge.net/p/maxima/bugs/3759/
176 + # * https://gitlab.com/embeddable-common-lisp/ecl/-/issues/636
177 + #
178 + # The 32-bit and 64-bit version of the clozurecl executable
179 + # are both called "ccl" on Gentoo, so we need the additional
180 + # use_with for clozurecl64. See bugs 665364 and 715278....
181 + #
182 + # The usex works around https://sourceforge.net/p/maxima/bugs/3757/
183 + #
184 + econf ${CONFS} \
185 + LDFLAGS="$(raw-ldflags)" \
186 + $(use_enable clisp) \
187 + $(use_enable clozurecl ccl) \
188 + $(use_enable clozurecl64 ccl64) \
189 + $(usex clozurecl64 "--with-ccl64=ccl" "") \
190 + $(use_enable cmucl) \
191 + $(use_enable ecls ecl) \
192 + $(use_enable emacs) \
193 + $(use_enable gcl) \
194 + $(use_with gui wish) \
195 + $(use_enable sbcl) \
196 + --with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
197 +}
198 +
199 +src_compile() {
200 + # The variable PYTHONBIN is used in one place while building the
201 + # German documentation. Some day that script should be converted
202 + # to use the value of @PYTHON@ obtained during ./configure.
203 + emake PYTHONBIN="${PYTHON}"
204 + if use emacs; then
205 + pushd interfaces/emacs/emaxima > /dev/null
206 + elisp-compile *.el
207 + popd > /dev/null
208 + pushd interfaces/emacs/imaxima > /dev/null
209 + BYTECOMPFLAGS="-L . -L ../emaxima"
210 + elisp-compile *.el
211 + popd > /dev/null
212 + fi
213 +}
214 +
215 +src_install() {
216 + docompress -x /usr/share/info
217 + emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
218 +
219 + # do not use dodoc because interfaces can't read compressed files
220 + # read COPYING before attempt to remove it from dodoc
221 + insinto /usr/share/${PN}/${PV}/doc
222 + doins AUTHORS COPYING README README-lisps.md
223 + dodir /usr/share/doc
224 + dosym ../${PN}/${PV}/doc /usr/share/doc/${PF}
225 +
226 + if use emacs; then
227 + elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp}
228 + elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el
229 +
230 + rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die
231 + insinto ${TEXMF}/tex/latex/emaxima
232 + doins interfaces/emacs/emaxima/emaxima.sty
233 +
234 + insinto /usr/share/${PN}/${PV}/doc/imaxima
235 + doins interfaces/emacs/imaxima/README
236 + doins -r interfaces/emacs/imaxima/imath-example
237 +
238 + if ! use gcl; then
239 + # This emacs package is used to run gcl, maxima, gdb, etc.
240 + # all at once and possibly in the same buffer. As such, it's
241 + # no use without gcl (more to the point: it requires gcl.el).
242 + find "${ED}" -name 'dbl.el' -type f -delete || die
243 + fi
244 + fi
245 +
246 + if use ecls; then
247 + # Use ECL to find the path where it expects to load packages from.
248 + ECLLIB=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
249 + insinto "${ECLLIB#${EPREFIX}}"
250 + doins src/binary-ecl/maxima.fas
251 + fi
252 +}
253 +
254 +pkg_postinst() {
255 + xdg_mimeinfo_database_update
256 + if use emacs; then
257 + elisp-site-regen
258 + mktexlsr
259 + fi
260 +}
261 +
262 +pkg_postrm() {
263 + xdg_mimeinfo_database_update
264 + if use emacs; then
265 + elisp-site-regen
266 + mktexlsr
267 + fi
268 +}