Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-mathematics/Macaulay2/, sci-mathematics/Macaulay2/files/
Date: Mon, 01 Feb 2021 06:31:24
Message-Id: 1612161024.1331916dfa9c5dfa3956973cdf12ad37c4c19634.andrewammerlaan@gentoo
1 commit: 1331916dfa9c5dfa3956973cdf12ad37c4c19634
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
3 AuthorDate: Mon Feb 1 06:30:24 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Mon Feb 1 06:30:24 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=1331916d
7
8 sci-mathematics/Macaulay: remove pack, py2 only
9
10 build system explicitly looks for py2
11
12 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
13
14 sci-mathematics/Macaulay2/Macaulay2-9999.ebuild | 178 ---------------------
15 .../Macaulay2/files/70Macaulay2-gentoo.el | 11 --
16 sci-mathematics/Macaulay2/files/9999-lapack.patch | 50 ------
17 .../files/9999-paths-of-external-programs.patch | 73 ---------
18 .../Macaulay2/files/paths-of-dependencies.patch | 48 ------
19 sci-mathematics/Macaulay2/metadata.xml | 15 --
20 6 files changed, 375 deletions(-)
21
22 diff --git a/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild b/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild
23 deleted file mode 100644
24 index 5b4e608c7..000000000
25 --- a/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild
26 +++ /dev/null
27 @@ -1,178 +0,0 @@
28 -# Copyright 1999-2021 Gentoo Authors
29 -# Distributed under the terms of the GNU General Public License v2
30 -
31 -EAPI=7
32 -
33 -PYTHON_COMPAT=( python2_7 )
34 -
35 -inherit autotools elisp-common flag-o-matic git-r3 python-single-r1 toolchain-funcs
36 -
37 -FACTORY="factory-4.0.0+m4"
38 -FACTORY_GFTABLES="factory.4.0.1-gftables"
39 -
40 -DESCRIPTION="Research tool for commutative algebra and algebraic geometry"
41 -HOMEPAGE="https://faculty.math.illinois.edu/Macaulay2"
42 -BASE_URI="https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/"
43 -SRC_URI="
44 - ${BASE_URI}/${FACTORY}.tar.gz
45 - ${BASE_URI}/${FACTORY_GFTABLES}.tar.gz
46 - ${BASE_URI}/gtest-1.7.0.tar.gz"
47 -EGIT_REPO_URI="git://github.com/Macaulay2/M2.git"
48 -
49 -SLOT="0"
50 -LICENSE="GPL-2"
51 -KEYWORDS=""
52 -IUSE="debug emacs +optimization"
53 -
54 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
55 -
56 -DEPEND="${PYTHON_DEPS}
57 - sys-process/time
58 - virtual/pkgconfig
59 - app-arch/unzip
60 - app-text/dos2unix"
61 -# Unzip and dos2unix just for normaliz
62 -
63 -RDEPEND="${PYTHON_DEPS}
64 - sys-libs/gdbm
65 - dev-libs/ntl
66 - sci-mathematics/pari[gmp]
67 - >=sys-libs/readline-6.1
68 - dev-libs/libxml2:2
69 - sci-mathematics/flint[gc(-)]
70 - sci-mathematics/frobby
71 - sci-mathematics/4ti2
72 - sci-mathematics/nauty
73 - >=sci-mathematics/normaliz-2.8
74 - sci-mathematics/gfan
75 - sci-libs/mpir[cxx]
76 - dev-libs/mpfr
77 - sci-libs/cdd+
78 - sci-libs/cddlib
79 - sci-libs/lrslib[gmp]
80 - virtual/blas
81 - virtual/lapack
82 - dev-util/ctags
83 - sys-libs/ncurses
84 - >=dev-libs/boehm-gc-7.2_alpha6[threads]
85 - dev-libs/libatomic_ops
86 - emacs? ( app-editors/emacs )"
87 -
88 -SITEFILE=70Macaulay2-gentoo.el
89 -
90 -S="${WORKDIR}/${PN}-${PV}/"
91 -
92 -RESTRICT="mirror"
93 -
94 -src_unpack (){
95 - # unpack "Normaliz2.8.zip"
96 - git-r3_src_unpack
97 - # Undo one level of directory until git allows to checkout
98 - # subdirectories
99 - mv "${S}"/M2/* "${S}" || die
100 - # Need to get rid of this now because install wants this location later
101 - rm -r "${S}/M2" || die
102 -}
103 -
104 -pkg_setup () {
105 - tc-export CC CPP CXX PKG_CONFIG
106 - append-cppflags "-I/usr/include/frobby"
107 - # gtest needs python:2
108 - python-single-r1_pkg_setup
109 -}
110 -
111 -src_prepare() {
112 - # Put updated Normaliz.m2 in place
113 - # cp "${WORKDIR}/Normaliz2.8/Macaulay2/Normaliz.m2" \
114 - # "${S}/Macaulay2/packages" || die
115 - # dos2unix "${S}/Macaulay2/packages/Normaliz.m2" || die
116 -
117 - # Patching .m2 files to look for external programs in
118 - # /usr/bin
119 - eapply "${FILESDIR}"/${PV}-paths-of-external-programs.patch
120 -
121 - # Shortcircuit lapack tests
122 - eapply "${FILESDIR}"/${PV}-lapack.patch
123 -
124 - eapply_user
125 -
126 - # Factory is a statically linked library which (in this flavor) are not used by any
127 - # other program. We build it internally and don't install it.
128 - cp "${DISTDIR}/${FACTORY}.tar.gz" "${S}/BUILD/tarfiles/" \
129 - || die "copy failed"
130 - cp "${DISTDIR}/${FACTORY_GFTABLES}.tar.gz" "${S}/BUILD/tarfiles/" \
131 - || die "copy failed"
132 - # Macaulay2 developers want that gtest is built internally because
133 - # the documentation says it may fail if build with options not the
134 - # same as the tested program.
135 - cp "${DISTDIR}/gtest-1.7.0.tar.gz" "${S}/BUILD/tarfiles/" \
136 - || die "copy failed"
137 -
138 - eautoreconf
139 -}
140 -
141 -src_configure (){
142 - # Recommended in bug #268064 Possibly unecessary
143 - # but should not hurt anybody.
144 - if ! use emacs; then
145 - tags="ctags"
146 - fi
147 -
148 - # configure instead of econf to enable install with --prefix
149 - ./configure LIBS="$($(tc-getPKG_CONFIG) --libs lapack)" \
150 - --prefix="${D}/usr" \
151 - --disable-encap \
152 - --disable-strip \
153 - --with-issue=Gentoo \
154 - $(use_enable optimization optimize) \
155 - $(use_enable debug) \
156 - --enable-build-libraries="factory" \
157 - --with-unbuilt-programs="4ti2 gfan normaliz nauty cddplus lrslib" \
158 - || die "failed to configure Macaulay"
159 -}
160 -
161 -src_compile() {
162 - # Parallel build not supported yet
163 - # emake -j1
164 - # For trunk builds we may wish to ignore example errors
165 - emake IgnoreExampleErrors=true -j1
166 -
167 - if use emacs; then
168 - cd "${S}/Macaulay2/emacs" || die
169 - elisp-compile *.el
170 - fi
171 -}
172 -
173 -src_test() {
174 - # No parallel tests yet & Need to increase the time
175 - # limit for long running tests in Schubert2 to pass
176 - emake TLIMIT=550 -j1 check
177 -}
178 -
179 -src_install () {
180 - # Parallel install not supported yet
181 - # NumericalAlgebraicGeometry fails (during install too?)
182 - emake IgnoreExampleErrors=true -j1 install
183 -
184 - # Remove emacs files and install them in the
185 - # correct place if use emacs
186 - rm -rf "${ED}"/usr/share/emacs/site-lisp || die
187 - if use emacs; then
188 - cd "${S}/Macaulay2/emacs" || die
189 - elisp-install ${PN} *.elc *.el
190 - elisp-site-file-install "${FILESDIR}/${SITEFILE}"
191 - fi
192 -}
193 -
194 -pkg_postinst() {
195 - if use emacs; then
196 - elisp-site-regen
197 - elog "If you want to set a hot key for Macaulay2 in Emacs add a line similar to"
198 - elog "(global-set-key [ f12 ] 'M2)"
199 - elog "in order to set it to F12 (or choose a different one)."
200 - fi
201 -}
202 -
203 -pkg_postrm() {
204 - use emacs && elisp-site-regen
205 -}
206
207 diff --git a/sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el b/sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el
208 deleted file mode 100644
209 index ac86e2132..000000000
210 --- a/sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el
211 +++ /dev/null
212 @@ -1,11 +0,0 @@
213 -;; sci-mathematics/Macaulay2 init file
214 -
215 -(add-to-list 'load-path "/usr/share/emacs/site-lisp/Macaulay2")
216 -
217 -(defvar M2-exe "/usr/bin/M2" "*The default Macaulay2 executable name.")
218 -(autoload 'M2 "M2.el" "Run Macaulay 2 in a buffer." t)
219 -(autoload 'Macaulay2 "M2" "Run Macaulay 2 in a buffer, non-interactive." t)
220 -(autoload 'M2-mode "M2" "Macaulay 2 editing mode" t)
221 -(autoload 'm2-mode "M2" "Macaulay 2 editing mode, name in lower case" t)
222 -(autoload 'm2-comint-mode "M2" "Macaulay 2 command interpreter mode, name in lower case" t)
223 -(setq auto-mode-alist (append auto-mode-alist '(("\\.m2$" . M2-mode))))
224 \ No newline at end of file
225
226 diff --git a/sci-mathematics/Macaulay2/files/9999-lapack.patch b/sci-mathematics/Macaulay2/files/9999-lapack.patch
227 deleted file mode 100644
228 index e9a434eeb..000000000
229 --- a/sci-mathematics/Macaulay2/files/9999-lapack.patch
230 +++ /dev/null
231 @@ -1,50 +0,0 @@
232 ---- configure.ac 2012-10-24 09:29:55.240498786 -0700
233 -+++ configure.ac.2 2012-10-30 15:07:27.172846300 -0700
234 -@@ -1285,46 +1285,7 @@
235 - done
236 - test $BUILD_factory = yes && BUILTLIBS="$SINGULARLIBS $BUILTLIBS"
237 -
238 --# we need to do the fortran library testing last, in case AC_SEARCH_LIBS adds
239 --# one of them to $LIBS, making it impossible to check for the presence of C or
240 --# C++ libraries. (I'm not sure why putting -llapack on the gcc command line
241 --# needlessly causes the library to be linked against.)
242 --FORTRANUSED=no
243 --if test "$LAPACK" = yes
244 --then AC_MSG_CHECKING([whether the vecLib framework is available])
245 -- SAVELIBS=$LIBS LIBS="-framework vecLib $LIBS"
246 -- AC_LANG(C)
247 -- AC_LINK_IFELSE(
248 -- [AC_LANG_PROGRAM(,[sgemv_();dgetrf_();])],
249 -- [
250 -- AC_MSG_RESULT(yes)
251 -- ],
252 -- [
253 -- AC_MSG_RESULT(no)
254 -- LIBS=$SAVELIBS
255 -- FORTRANUSED=yes
256 -- if test $BUILD_lapack = no
257 -- then AC_LANG(Fortran)
258 -- if test "$FC" = ""
259 -- then AC_MSG_ERROR(no fortran compiler found)
260 -- else AC_MSG_NOTICE(using fortran compiler $FC)
261 -- fi
262 -- AC_SEARCH_LIBS(sgemv,blas f77blas,,BUILD_lapack=yes)
263 -- AC_SEARCH_LIBS(dgetrf,lapack,,BUILD_lapack=yes)
264 -- fi
265 -- ])
266 --fi
267 --test $BUILD_lapack = yes && BUILTLIBS="-llapack -lblas $BUILTLIBS"
268 --
269 --if test $BUILD_lapack = yes
270 --then # test whether the fortran compiler can handle lapack, which, starting with
271 -- # version 3.2, requires fortran 90, not fortran 77
272 -- AC_LANG(Fortran)
273 -- AC_MSG_CHECKING([whether the fortran compiler is modern enough for lapack])
274 -- AC_COMPILE_IFELSE([instrinsic maxloc],
275 -- AC_MSG_ERROR(the fortran compiler ($FC) does not support the Fortran 90 language required for compiling lapack),
276 -- AC_MSG_RESULT(yes))
277 --fi
278 -+BUILTLIBS="$(${PKG_CONFIG} --libs lapack) $BUILTLIBS"
279 -
280 - if test $BUILD_memtailor = yes
281 - then BUILTLIBS="-lmemtailor $BUILTLIBS"
282
283 diff --git a/sci-mathematics/Macaulay2/files/9999-paths-of-external-programs.patch b/sci-mathematics/Macaulay2/files/9999-paths-of-external-programs.patch
284 deleted file mode 100644
285 index 4c090deec..000000000
286 --- a/sci-mathematics/Macaulay2/files/9999-paths-of-external-programs.patch
287 +++ /dev/null
288 @@ -1,73 +0,0 @@
289 -diff -U 3 -dHrN M2source/Macaulay2/packages/FourTiTwo.m2 M2source.patch/Macaulay2/packages/FourTiTwo.m2
290 ---- M2source/Macaulay2/packages/FourTiTwo.m2 2011-09-22 14:36:51.000000000 +0100
291 -+++ M2source.patch/Macaulay2/packages/FourTiTwo.m2 2011-09-24 21:24:12.000000000 +0100
292 -@@ -47,7 +47,7 @@
293 -
294 - path'4ti2 = (options FourTiTwo).Configuration#"path"
295 - -- NOTE: the absolute path should be put into the .init file for 4ti2 inside the .Macaulay2 directory.
296 --if path'4ti2 == "" then path'4ti2 = prefixDirectory | currentLayout#"programs"
297 -+if path'4ti2 == "" then path'4ti2 = "/usr/bin/"
298 -
299 - getFilename = () -> (
300 - filename := temporaryFileName();
301 -diff -U 3 -dHrN M2source/Macaulay2/packages/gfanInterface.m2 M2source.patch/Macaulay2/packages/gfanInterface.m2
302 ---- M2source/Macaulay2/packages/gfanInterface.m2 2011-05-14 12:00:59.000000000 +0100
303 -+++ M2source.patch/Macaulay2/packages/gfanInterface.m2 2011-09-24 21:24:12.000000000 +0100
304 -@@ -25,7 +25,7 @@
305 - }
306 -
307 - gfan'path = gfanInterface#Options#Configuration#"path"
308 --if gfan'path == "" then gfan'path = prefixDirectory | currentLayout#"programs"
309 -+if gfan'path == "" then gfan'path = "/usr/bin/"
310 - if instance(gfan'path, String) then gfan'path = {gfan'path}
311 - if not instance(gfan'path,List) then error "expected configuration option gfan'path to be a list of strings or a string"
312 - gfan'path = join(
313 -diff -U 3 -dHrN M2source/Macaulay2/packages/NautyGraphs.m2 M2source.patch/Macaulay2/packages/NautyGraphs.m2
314 ---- M2source/Macaulay2/packages/NautyGraphs.m2 2011-08-26 11:05:30.000000000 +0100
315 -+++ M2source.patch/Macaulay2/packages/NautyGraphs.m2 2011-09-24 21:25:53.000000000 +0100
316 -@@ -32,7 +32,7 @@
317 - -- Check the ~/.Macaulay2/init-NautyGraphs.m2 file for the absolute path.
318 - -- If it's not there, then use the M2-Programs directory.
319 - nauty'path = (options NautyGraphs).Configuration#"path";
320 --if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs";
321 -+if nauty'path == "" then nauty'path = "/usr/bin/";
322 -
323 - -------------------
324 - -- Exports
325 -diff -U 3 -dHrN M2source/Macaulay2/packages/Nauty.m2 M2source.patch/Macaulay2/packages/Nauty.m2
326 ---- M2source/Macaulay2/packages/Nauty.m2 2011-08-26 11:05:30.000000000 +0100
327 -+++ M2source.patch/Macaulay2/packages/Nauty.m2 2011-09-24 21:24:12.000000000 +0100
328 -@@ -48,7 +48,8 @@
329 - -- Check the ~/.Macaulay2/init-Nauty.m2 file for the absolute path.
330 - -- If it's not there, then use the M2-Programs directory.
331 - nauty'path = (options Nauty).Configuration#"path";
332 --if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs";
333 -+if nauty'path == "" then nauty'path = "/usr/bin/";
334 -+
335 -
336 - -------------------
337 - -- Exports
338 -diff -U 3 -dHrN M2source/Macaulay2/packages/Normaliz.m2 M2source.patch/Macaulay2/packages/Normaliz.m2
339 ---- M2source/Macaulay2/packages/Normaliz.m2 2011-05-25 16:47:50.000000000 +0100
340 -+++ M2source.patch/Macaulay2/packages/Normaliz.m2 2011-09-24 21:24:12.000000000 +0100
341 -@@ -166,7 +166,7 @@
342 - nmzExec="normaliz";
343 - );
344 - -- return nmzExec;
345 -- return prefixDirectory | currentLayout#"programs" | nmzExec;
346 -+ return "/usr/bin/" | nmzExec;
347 - );
348 -
349 -
350 -diff -U 3 -dHrN M2source/Macaulay2/packages/StatePolytope.m2 M2source.patch/Macaulay2/packages/StatePolytope.m2
351 ---- M2source/Macaulay2/packages/StatePolytope.m2 2010-09-10 16:47:20.000000000 +0100
352 -+++ M2source.patch/Macaulay2/packages/StatePolytope.m2 2011-09-24 21:24:12.000000000 +0100
353 -@@ -31,7 +31,7 @@
354 -
355 -
356 - gfanCommand = (options StatePolytope)#Configuration#"gfan command"
357 --if gfanCommand === "gfan" then gfanCommand = prefixDirectory | currentLayout#"programs" | gfanCommand
358 -+if gfanCommand === "gfan" then gfanCommand = "/usr/bin/" | gfanCommand
359 - gfanCommand = "!" | gfanCommand
360 -
361 - --The next two functions print out the ring and the ideal in the format required by gfan
362
363 diff --git a/sci-mathematics/Macaulay2/files/paths-of-dependencies.patch b/sci-mathematics/Macaulay2/files/paths-of-dependencies.patch
364 deleted file mode 100644
365 index f8117a5fa..000000000
366 --- a/sci-mathematics/Macaulay2/files/paths-of-dependencies.patch
367 +++ /dev/null
368 @@ -1,48 +0,0 @@
369 -diff -rupN 1.3.1/Macaulay2/packages/FourTiTwo.m2 1.3.1-pathspatched/Macaulay2/packages/FourTiTwo.m2
370 ---- 1.3.1/Macaulay2/packages/FourTiTwo.m2 2009-11-12 18:40:50.000000000 +0100
371 -+++ 1.3.1-pathspatched/Macaulay2/packages/FourTiTwo.m2 2009-11-16 11:41:01.000000000 +0100
372 -@@ -47,7 +47,7 @@ export {
373 -
374 - path'4ti2 = (options FourTiTwo).Configuration#"path"
375 - -- NOTE: the absolute path should be put into the .init file for 4ti2 inside the .Macaulay2 directory.
376 --if path'4ti2 == "" then path'4ti2 = prefixDirectory | currentLayout#"programs"
377 -+if path'4ti2 == "" then path'4ti2 = "/usr/bin/"
378 -
379 - getFilename = () -> (
380 - filename := temporaryFileName();
381 -diff -rupN 1.3.1/Macaulay2/packages/gfanInterface.m2 1.3.1-pathspatched/Macaulay2/packages/gfanInterface.m2
382 ---- 1.3.1/Macaulay2/packages/gfanInterface.m2 2009-11-12 18:40:50.000000000 +0100
383 -+++ 1.3.1-pathspatched/Macaulay2/packages/gfanInterface.m2 2009-11-16 11:41:17.000000000 +0100
384 -@@ -26,7 +26,7 @@ export {
385 - }
386 -
387 - gfan'path = gfanInterface#Options#Configuration#"path"
388 --if gfan'path == "" then gfan'path = prefixDirectory | currentLayout#"programs"
389 -+if gfan'path == "" then gfan'path = "/usr/bin/"
390 -
391 - fig2dev'path = gfanInterface#Options#Configuration#"fig2devpath"
392 -
393 -diff -rupN 1.3.1/Macaulay2/packages/Normaliz.m2 1.3.1-pathspatched/Macaulay2/packages/Normaliz.m2
394 ---- 1.3.1/Macaulay2/packages/Normaliz.m2 2009-11-12 18:40:50.000000000 +0100
395 -+++ 1.3.1-pathspatched/Macaulay2/packages/Normaliz.m2 2009-11-16 11:42:01.000000000 +0100
396 -@@ -30,7 +30,7 @@ export{setNmzExecPath, getNmzExecPath,
397 -
398 -
399 - -- initialising some values
400 --nmzExecPath=prefixDirectory|currentLayout#"programs";
401 -+nmzExecPath="/usr/bin/";
402 - nmzDataPath="";
403 - nmzFilename="";
404 - nmzUserCalled=true; -- wether the user calls a method
405 -diff -rupN 1.3.1/Macaulay2/packages/StatePolytope.m2 1.3.1-pathspatched/Macaulay2/packages/StatePolytope.m2
406 ---- 1.3.1/Macaulay2/packages/StatePolytope.m2 2009-11-12 18:40:50.000000000 +0100
407 -+++ 1.3.1-pathspatched/Macaulay2/packages/StatePolytope.m2 2009-11-16 11:41:13.000000000 +0100
408 -@@ -31,7 +31,7 @@ export {
409 -
410 -
411 - gfanCommand = (options StatePolytope)#Configuration#"gfan command"
412 --if gfanCommand === "gfan" then gfanCommand = prefixDirectory | currentLayout#"programs" | gfanCommand
413 -+if gfanCommand === "gfan" then gfanCommand = "/usr/bin/" | gfanCommand
414 - gfanCommand = "!" | gfanCommand
415 -
416 - --The next two functions print out the ring and the ideal in the format required by gfan
417
418 diff --git a/sci-mathematics/Macaulay2/metadata.xml b/sci-mathematics/Macaulay2/metadata.xml
419 deleted file mode 100644
420 index 703c18dee..000000000
421 --- a/sci-mathematics/Macaulay2/metadata.xml
422 +++ /dev/null
423 @@ -1,15 +0,0 @@
424 -<?xml version="1.0" encoding="UTF-8"?>
425 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
426 -<pkgmetadata>
427 - <maintainer type="person">
428 - <email>tom111@×××.de</email>
429 - <name>Thomas Kahle</name>
430 - </maintainer>
431 - <maintainer type="project">
432 - <email>sci-mathematics@g.o</email>
433 - <name>Gentoo Mathematics Project</name>
434 - </maintainer>
435 - <use>
436 - <flag name="optimization">Disable to build with -O0 for debugging.</flag>
437 - </use>
438 -</pkgmetadata>