summaryrefslogtreecommitdiff
path: root/sci-mathematics
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
commit8d5dbd847cbc704a6a06405856e94b461011afe3 (patch)
tree4d26462d027b14926335894749d2e01d982234d0 /sci-mathematics
parent5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (diff)
gentoo resync : 27.03.2021
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/Manifest.gzbin13343 -> 13350 bytes
-rw-r--r--sci-mathematics/gimps/Manifest6
-rw-r--r--sci-mathematics/gimps/gimps-30.5.2.ebuild (renamed from sci-mathematics/gimps/gimps-30.5.1.ebuild)0
-rw-r--r--sci-mathematics/maxima/Manifest7
-rw-r--r--sci-mathematics/maxima/files/dont-hardcode-python.patch38
-rw-r--r--sci-mathematics/maxima/files/ecls-4.patch16
-rw-r--r--sci-mathematics/maxima/files/support-new-vtk.patch26
-rw-r--r--sci-mathematics/maxima/maxima-5.44.0-r4.ebuild (renamed from sci-mathematics/maxima/maxima-5.44.0.ebuild)75
-rw-r--r--sci-mathematics/maxima/metadata.xml3
-rw-r--r--sci-mathematics/singular/Manifest5
-rw-r--r--sci-mathematics/singular/files/singular-4.0.3-gfan_linking.patch13
-rw-r--r--sci-mathematics/singular/files/singular-4.1.3-doc_install.patch62
-rw-r--r--sci-mathematics/singular/files/singular-4.2.0-no-static.patch69
-rw-r--r--sci-mathematics/singular/singular-4.2.0_p1.ebuild104
14 files changed, 404 insertions, 20 deletions
diff --git a/sci-mathematics/Manifest.gz b/sci-mathematics/Manifest.gz
index 82667e972a1b..08c87a5277a0 100644
--- a/sci-mathematics/Manifest.gz
+++ b/sci-mathematics/Manifest.gz
Binary files differ
diff --git a/sci-mathematics/gimps/Manifest b/sci-mathematics/gimps/Manifest
index 446abde1c298..6dcc0a89f865 100644
--- a/sci-mathematics/gimps/Manifest
+++ b/sci-mathematics/gimps/Manifest
@@ -5,8 +5,8 @@ AUX gimps.service 283 BLAKE2B db6c0c777d514aa0216c1af087418ead25561ffa950752e237
AUX gimps.tmpfiles 38 BLAKE2B c306d739ed0a0cc8bb4c80c7051ad93326cf0054d3f7fd61c4ed8a7d518356d521f7d3c3202d0b8b69723b8e7178457a34c65e92732eb15e8e64c3dff468ae2a SHA512 61c5eda13289175cdf55704442ceab4d5391d24cfa49f04155799fc2798e5ad5f1e624802e1c04b99685b1560f9898d1b0fc0c15c82251d1a765dd5de93024d8
DIST p95v303b6.linux32.tar.gz 5702312 BLAKE2B 728c8b8e7e2b5187dc8126bccc5e2c165fbfbc0900d6c35517cd21b78e5292df143641e3766cc0146918062039b1eecab568f9b278f64b1b9197ee2f775603b9 SHA512 3e06fb77be07334949ece3ae152bdf5491f0b7f8e33e0e8ed2af3c34332841975a9514d1993ed2355abfa4e09f93e42093d02f96dc30c3471ae9f974cc2de11a
DIST p95v303b6.linux64.tar.gz 7046127 BLAKE2B 9cde9c2670203071cfc463434a47c8123064cb232bfeb25d8767cad2c25ea75b395e2ec135b7b4a6dc9616e9d6b05ead371e1083274a82468f62a0e1de93c98f SHA512 6d6ded9a1724993d42adee28d400b0337835c52a4ce42271e62efb37134adfc6f017f55475860fbc1224e377a227ef8547b8852a35c082c37e996f4a1c1b570c
-DIST p95v305b1.linux32.tar.gz 5695975 BLAKE2B d2ab3724cf8743292533a7cb5c73b2fc6743c6e11507f92218b6b65f39e78c2f61147a6898d0a77fef590a0c989aa6f17d1984a6e4801594fbe4c3a7484d1750 SHA512 74e2592c1f3c4bb45cc076e35cd70d5c295d613ab142feb1c18138ea8816c21c56f5531c4938c49706bbb66f30ad84c5dd2f76f2184e1a1ea0de7423e941df52
-DIST p95v305b1.linux64.tar.gz 7166108 BLAKE2B 60880e36ed618ad94aacd0f89811b72137fd27e99dff33b02286ea0f4778bce320c9b8da7b470fa491ea2e333f03d9d2994c2ea1513289acfc2f5b63695509fd SHA512 c38416b83850104d8d78191a4591fbef1bd356f8804725ccfdd7ebe065bc05ed86c09a128ac7824f809242712d60a1eb7ecb200358c1cde37fc4b7c13b82006f
+DIST p95v305b2.linux32.tar.gz 5695951 BLAKE2B d97f5b553e0a0563d51a08049c08fe31231e2689cfe6ec979b832603bace334755e947be2d7a106d4f4b807070568746f2cdabf869c5c4c6e125155c332b10bf SHA512 b5caa642e742438f10b5ee89d27213834755051679fe0d4d452e446b2f7628c8a874227971473d4319b8841f47a0bb32e7de9731d8b45e808356efb11922716e
+DIST p95v305b2.linux64.tar.gz 7165963 BLAKE2B 3ae20e8e29273650e94ff8774f973240c6b57d7a54e1674e7f741a9d366d3fdad98bb91b8e2abfcf7e1df6319476aa116e921171f2b585a568ee7d5038635531 SHA512 5fe250f7dcc35767fd5f4529219351095d1076f631528d80fa09498e27fa211abc621ef070548c398402143bec5e1d6e6e974155f50eb9f42af0ca179e4e03a8
EBUILD gimps-30.3.6.ebuild 1808 BLAKE2B 3483a73734d0b0008c992a946d36558f1e8ac93872a46bf80d79bb21ae65720c5614df1e1380fb15c2db2537559bc1969fc90dba0614afef1c2f8a6419ea996d SHA512 0dd32cf22373ec922a2716afc7f60ed5af2b0f76ba8f91b94eef891b1137b1dc597f0aca3609f76cb56b3f90b973953decd946d37e02cb6a1db1df1fd81c55a4
-EBUILD gimps-30.5.1.ebuild 1884 BLAKE2B ab8a5f9fec9a8cef6bdd4284364201fd29bb7a25070170f4de072e18be7749a7e0406a37f8a5321cbeb5709f1cfb2f1d4d655914d0032d9ee2ec67c59d720b62 SHA512 d2f7e56482733997dc72872e83e0b64a47d15ff1985b61bde6be2aec8c3543a97638d625125e4b30ec4a057e748f3fb422fc06c0c8d25c22a74a221bb675fcc9
+EBUILD gimps-30.5.2.ebuild 1884 BLAKE2B ab8a5f9fec9a8cef6bdd4284364201fd29bb7a25070170f4de072e18be7749a7e0406a37f8a5321cbeb5709f1cfb2f1d4d655914d0032d9ee2ec67c59d720b62 SHA512 d2f7e56482733997dc72872e83e0b64a47d15ff1985b61bde6be2aec8c3543a97638d625125e4b30ec4a057e748f3fb422fc06c0c8d25c22a74a221bb675fcc9
MISC metadata.xml 559 BLAKE2B ab97b02069d576618a0055447960e4831ee40c80dea70657b50e7cd729cdefb00ea0fe1d66e402470e7a1b29e1cda6db37f6c52c923ca0f31bd1056a72bc6e88 SHA512 4e0a74efc9add574ccdb07bc011ccb6b111f1b2182ba2d83c9528d0b6c5ee9d663fd6f50ac8a789888c59be5a4579c5a27bbdbf0b84970a6b4178ba53da834b0
diff --git a/sci-mathematics/gimps/gimps-30.5.1.ebuild b/sci-mathematics/gimps/gimps-30.5.2.ebuild
index 7a7160c336ab..7a7160c336ab 100644
--- a/sci-mathematics/gimps/gimps-30.5.1.ebuild
+++ b/sci-mathematics/gimps/gimps-30.5.2.ebuild
diff --git a/sci-mathematics/maxima/Manifest b/sci-mathematics/maxima/Manifest
index b1bcc5966933..1dbaad4eddca 100644
--- a/sci-mathematics/maxima/Manifest
+++ b/sci-mathematics/maxima/Manifest
@@ -3,14 +3,17 @@ AUX clisp-1.patch 1194 BLAKE2B b64764d80b5908a35081b9bb7114e18de266156cb80bae1c7
AUX clozurecl-2.patch 1505 BLAKE2B c5550f79e67dd007c970759c5e734009d1cb4fa0af728d414ce271175770ed32bd2cf5e58c9738e32afa76b0053b2eee77c886650b0ba99c7e0e3176bc946d69 SHA512 41664b77eae0f2c3cc0e551bd2c26c02769faed339b5725dc790691929094cd5d5008169eba9788515392d9fed00919aaacbb24ee91b76f5d51eb6468335cf9c
AUX clozurecl-3.patch 1499 BLAKE2B 080d9bdd90ba34f9b63e9a3409da90ec84e4de7f35dd0c1aff3be431a6b11c515e10c310a43f987f933d70923a21a5ee63920f88174eb840e2b653975e6512ef SHA512 c5f31f515e1a13d4e0f251e52d2f96142ff917c03e12c52c3463bc576a1add783d2cd4239f8f321495f0c4de5f93e0d4174a95e3c2bc0d63c88683250ac9cf18
AUX cmucl-1.patch 1336 BLAKE2B 59767907f9f2734fa43e8d9c0e876cf2bf1f2cb0e360976ddd08b4eda9685cd1b862aa072a2f0202733db5ab91958bf0d6b48af3d20e6748f4de2e6b366f49ed SHA512 3b8c01ecbbcd87101e4e31356293216d9c2a018ddabc076905a8b87eeda27bea6cd36242ab6b9caf7553fb9187544beb620b739211c63e21afa1b2f050ef318e
+AUX dont-hardcode-python.patch 1702 BLAKE2B 8d784d665840325f40db95c0f50158e1c89e90d1266b9ac41f7f1020c125a285d5b79281b8374d1b46dc153491b0ca13ed62ac5aade2bff9bfe19a569e8ab2b7 SHA512 c6100cca8bf0e652a7a4b4533558ada6193991a53f847662028056624937a3e4c583c20f1509a0f9e4e35bda3a49d913e0be2c56a602ec550210b1403e64af1c
AUX ecls-3.patch 2147 BLAKE2B d454b620f01d734d6a774f64dbac67f0996aeacc2a029225cc8a9269211169e7b69237f8b734b92b1f037b5abdcd7ec3ba374924b498fdc63025a1eca5a0d9e6 SHA512 1fcaa4a79d4aaf08dd4162c6d59f8f168909320575a43dcb435cbd758338244ac3b89888501f4cb1fc0f9d8d43b3abe587bc898aacb45c19ba0858f74512366e
+AUX ecls-4.patch 726 BLAKE2B 7aa2520c10b1c142297791c0d87c9e65578ba6b2f3c7402f2c4bb2474fc1c22f85f0f27bed0530bd711e785a0bec500ef6a57b53d9481300901d11f1131126c9 SHA512 0d1616aba389a43e646ef99dd5d9176b2e49ad0569d9a63dea5562b829748f1a1e0d599fb0b359ffc7031ed43c7f08c4cea2ab9a3a97be49f09a7394a280aa15
AUX emacs-0.patch 807 BLAKE2B 82c879f9c252c4efefb007f8553e845ddc52d76af5cbeab740a1f2bde459b5e87957e0f3e5a9d76d5c1e879ddbebdfb9a6d6b80745cc40e3ddc4379887f4e9b2 SHA512 f62d364651838ed196a2e8965930b42313cb73f912b898b953b526ffc5dc0135841b53618fbbb6a32d21d3412ba5f2bfb253bf41c640a136f68d830f43628ac4
AUX rmaxima-0.patch 552 BLAKE2B 8b8ceb5ea671049490ab006be31f6e81f85d9e43950296db920b3a0d4eb8b19cd14b8b599c98e1dc82f69d441d04c631c4aec2315eaee68f791ddce75dc7ed56 SHA512 a60c8c5ac23b0342823fbcd15e27f44ea85652640271ea845e383796422fa416b221dd036eb0a1639f70f9b09473471657612c7a5f99892cfb214d52156a6907
AUX sbcl-2.patch 1072 BLAKE2B 3e16339b7b9acbbfcd424780432be4a4267b994c3a7a8774c95ff8335d48565d15dae3cba16b127a9184e4fe20b5d6930df2e385c2a15b9f58e2d0fa597665a1 SHA512 b8df0b53f4ae04e175dfab8889206ea8ffa83c51b2408322423d5f52cf956b1084e7d1ba0c054032f9121cb1684fcc6bb9d48b1a967f9e01492ad25c035b1c62
+AUX support-new-vtk.patch 924 BLAKE2B 960c3342ca4374c03aff30d7d2326c6e826ffb2cb025952c8af381102ef2556b21e78ec9a4316740871ebf7afea1c8053f50342a7a66ad897fa6b79ac29b30fe SHA512 6cc8b0a67d6aa6bc87f003181a891c480420bed228ede8cd9f7143c5473f8e11a4fceb405e182ac00ce26f7380d714c6487ebb9fe4603d94e7e0111cbef68f75
AUX wish-2.patch 662 BLAKE2B ccc3879c7445fd916c921857ea9642fb54cc6b8eb647cb23c3f93b949a05de9226d19d7898daf998cbedc61a77556c923f3f6f8e57508b73f3cae117f62d214d SHA512 110db85899241e1f9ea8427ffb397737aefe0bb6286d037c2c04cfad9726838521ef6403242aeb1e4246d06f13cf83af84bba38567a99b00ed6a081f17b38ead
AUX xdg-utils-1.patch 1313 BLAKE2B 35d6f88c505c5b1bb5ecf5691e17522b427a3f035f64de095ba088fa9c6a6076e4c0f7f57794804b588798c2289d36397a95101bde890c363aee9675bf8401e7 SHA512 5e5ab3196cf012ee768d108cc47da25c5afbaffca6f9a1aed9338a7154d377e6baf791d2c7bbe9191b823e056056379f190d8bf7b8ce689f44db892f5e375116
DIST maxima-5.42.1.tar.gz 41865510 BLAKE2B d3b8a50594dc0cef0c354c42be1aee96df77a4e222dbe457edeb47d7fe77a8fe376b10ce8da9e4ff6c447242e9c53a32286d09a64d8600112f6feda92f1fb58d SHA512 79c5e70119b0384d9dd8aa47c7e96a0ccb7e6367526b8a14d21f00137a1c2f0c8b7990bb7231d7c90ffa0090f67c1fa30a418d013d9c5982030ae68de9717f48
DIST maxima-5.44.0.tar.gz 34976354 BLAKE2B d6870b6fb0581d9e60d6ed97c7daed8ce12b8b1ae49d0edb7b8d31dd723f9b879eb70440659ff958f53cee16d8d2a92f80dcaa3898d9f6dbabd79a5059073a65 SHA512 1e043bebb7c6d002c113d8de20a98d58d1a8e7bedfc9bcf52819e7c7554655991dc2f42f0333889706574249736db833a237b3e59b967e7e42ede28262e31f2f
EBUILD maxima-5.42.1.ebuild 4895 BLAKE2B dd388cfe14cef36137a91ff71912c23390e176d796ce02c36f59cbb1e8993a03b16ee32b4e6d792e59d95bad3bcd90e3e9ded23abb1e3c371f466bd53f44502c SHA512 64c8a759525fff99c99831be56ea268b213392c65b1ef2e9db133addfaefead39710264c6a599eee7c53262ef16f75fbdbb35a9516a7054f0934d6fd46303520
-EBUILD maxima-5.44.0.ebuild 4734 BLAKE2B dcd011520dd59a9d31f0e652c8f6c2d71ab8d4b60ba188c85f87a5c95dc2585edaa9338c8e841c819e5ffc1185e7e5c9817097ac0bebb206105528263efe6435 SHA512 0a996621e2ac31d3104690d1184e18493095f709de2fab773f7a0147cfdbedb4570c8afdfaee4564ad6677ec2076626d7c2a056b17787d4e2ee6e65dc7faba3e
-MISC metadata.xml 1521 BLAKE2B 5b42a6b4f68699a032b2a1cc43a34b8b7a1050e41b1875f758eb8ffd82151825d3f920587cf89e25f4f692c8fc587e5b405ca8e2fb3e842b7d7ce61e068f0dc4 SHA512 d2db86fcab10cabb9533954838babc9cee4ebb26b99604ebe0cb995b1239ac2a462455cc72d6311dab142290fbf460eaec920138c09045003b46dd382ed8cbf3
+EBUILD maxima-5.44.0-r4.ebuild 6278 BLAKE2B 9da7f0e09a3b6f370b20ce11915e4d9e893c1e1ea499ebfcf22d81ee2a0c17053b1e38450551855ac62356e3d4b8201f9a067ff94e169a00eb6c5a42ed73d82d SHA512 03083941bd72b72341edd0d5b35501b309a62d14bde6be6555d670e6a21b85ed800c35810dec1a713d6ffc59e0b8279a4daa4fb85385676412d0bff877d94dd4
+MISC metadata.xml 1607 BLAKE2B 04e6a57fb68b1c61027a4cd5b1605347c48e989c246e6f5a8c3587d17778d7c55b6cb5a6ab81dee7c21d0597953d2e90211f6d16b565dae602cfe22021a8f89b SHA512 bab36eab986e0a8619e9409d63af9103bce52bb08d75bde6c6d7a92cf1c856ad7c4d462dcb65bbde141a4d62ee024414186533db1e0e5f0bebb62f0623de55e3
diff --git a/sci-mathematics/maxima/files/dont-hardcode-python.patch b/sci-mathematics/maxima/files/dont-hardcode-python.patch
new file mode 100644
index 000000000000..63dea1ea1de7
--- /dev/null
+++ b/sci-mathematics/maxima/files/dont-hardcode-python.patch
@@ -0,0 +1,38 @@
+From a640c5e357ce2aafb6edcba9b6c641cbc7753880 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 24 Mar 2021 20:57:44 -0400
+Subject: [PATCH 1/1] doc/info/build_html.sh.in: use @PYTHON@ for the python
+ interpreter.
+
+Maxima's ./configure script already detects (or is prodded to use) a
+certain python interpreter. The build_html.sh script, however, is
+still using a hard-coded "python" command. On many systems, "python"
+will be different from the python interpreter that we want to use; for
+example when "python" is python-2.7.x and "python3" is what we want to
+use with Maxima.
+
+This commit tweaks doc/info/build_html.sh.in to use the value of the
+$PYTHON variable instead.
+
+Maxima-Bug: https://sourceforge.net/p/maxima/bugs/3754
+Gentoo-Bug: https://bugs.gentoo.org/766291
+---
+ doc/info/build_html.sh.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/info/build_html.sh.in b/doc/info/build_html.sh.in
+index 37930e9..c10e38d 100755
+--- a/doc/info/build_html.sh.in
++++ b/doc/info/build_html.sh.in
+@@ -46,7 +46,7 @@ do
+ echo "filenamebase = \"$filenamebase\""
+ cat $f
+ done | @AWK@ '!/^@c / && !/^@c$/ && (/^@deffn/ || /^@defvr/ || /^@end deffn/ || /^@end defvr/ || /@category/ || /@node/ || /^filenamebase/)' | @SED@ -f @abs_srcdir@/extract_categories1.sed | @AWK@ -f @abs_srcdir@/extract_categories1.awk > make-categories.py
+-python make-categories.py
++@PYTHON@ make-categories.py
+ @SED@ -e 's/^@bye/@node Documentation Categories, , Function and Variable Index\n@chapter Documentation Categories/' @abs_srcdir@/maxima.texi > maxima.texi
+ ( for f in Category-*.texi; do echo '@include' $f; done ; echo @bye ) >> maxima.texi
+
+--
+2.26.2
+
diff --git a/sci-mathematics/maxima/files/ecls-4.patch b/sci-mathematics/maxima/files/ecls-4.patch
new file mode 100644
index 000000000000..7c597c223333
--- /dev/null
+++ b/sci-mathematics/maxima/files/ecls-4.patch
@@ -0,0 +1,16 @@
+diff --git a/src/maxima.system b/src/maxima.system
+index ee7ca0f..85ec36f 100644
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -75,6 +75,11 @@
+ ;; Convert dir/foo.fas to dir/foo.o
+ (make-pathname :type "o" :defaults p))
+ files)))
++ (c::build-fasl "binary-ecl/maxima" :lisp-files obj
++ :ld-flags
++ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
++ (find-package "MAXIMA")))))
++ (if (and x (not (string= x ""))) (list x))))
+ (c::build-program "binary-ecl/maxima" :lisp-files obj
+ :ld-flags
+ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
diff --git a/sci-mathematics/maxima/files/support-new-vtk.patch b/sci-mathematics/maxima/files/support-new-vtk.patch
new file mode 100644
index 000000000000..3296ce276467
--- /dev/null
+++ b/sci-mathematics/maxima/files/support-new-vtk.patch
@@ -0,0 +1,26 @@
+commit c21598340008892173578718afa577f93ebfdd45
+Author: Leo Butler <l_butler@users.sourceforge.net>
+Date: Sat Feb 13 16:16:20 2021 -0600
+
+ Fix SF Bug #3714, Update maxima to use vtk-8.2.0
+
+ The GlobalImmediateModeRenderingOn method was deprecated in the VTK
+ codebase in 2017,
+
+ https://github.com/Kitware/VTK/commit/67e054c91063be30e8e991de489fdda3af668e22
+
+ This commit may change or break draw-vtk user code that relies on
+ older versions of vtk.
+
+diff --git a/share/draw/vtk.lisp b/share/draw/vtk.lisp
+index 6ff0f9586..1964048d2 100644
+--- a/share/draw/vtk.lisp
++++ b/share/draw/vtk.lisp
+@@ -224,7 +224,6 @@
+ (defun vtkpolydatamapper-code (mn fn con)
+ (concatenate 'string
+ (format nil "~a=vtk.vtkPolyDataMapper()~%" mn)
+- (format nil "~a.GlobalImmediateModeRenderingOn()~%" mn)
+ (if con
+ (format nil "~a.SetInputConnection(~a.GetOutputPort())~%" mn fn)
+ "") ))
diff --git a/sci-mathematics/maxima/maxima-5.44.0.ebuild b/sci-mathematics/maxima/maxima-5.44.0-r4.ebuild
index 6588716b4947..3babe7349ba0 100644
--- a/sci-mathematics/maxima/maxima-5.44.0.ebuild
+++ b/sci-mathematics/maxima/maxima-5.44.0-r4.ebuild
@@ -1,9 +1,11 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit autotools elisp-common eutils xdg-utils
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit autotools elisp-common eutils flag-o-matic python-single-r1 xdg-utils
DESCRIPTION="Free computer algebra environment based on Macsyma"
HOMEPAGE="http://maxima.sourceforge.net/"
@@ -11,7 +13,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2 GPL-2+"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
# Supported lisps
LISPS=( sbcl cmucl gcl ecls clozurecl clisp )
@@ -20,9 +22,9 @@ SUPP_RL=( . . y . . y )
# . - just --enable-<lisp>, <flag> - --enable-<flag>
CONF_FLAG=( . . . ecl ccl . )
# patch file version; . - no patch
-PATCH_V=( 2 1 . . 3 1 )
+PATCH_V=( 2 1 . 4 3 1 )
-IUSE="emacs tk nls unicode X test ${LISPS[*]}"
+IUSE="emacs gui nls unicode vtk X test ${LISPS[*]}"
RESTRICT="!test? ( test )"
# Languages
@@ -32,15 +34,30 @@ for lang in ${LANGS}; do
done
# texlive-latexrecommended needed by imaxima for breqn.sty
+#
+# VTK is an optional plotting backend that can be enabled by
+# running "draw_renderer: 'vtk;" within maxima.
+#
+# It's NON-optional for the scene() command, but that command is
+# currently useless since Tcl/Tk support was dropped in sci-libs/vtk.
+# Thus we include VTK only as an optional dependency.
RDEPEND="
- X? ( x11-misc/xdg-utils
- sci-visualization/gnuplot[gd]
- tk? ( dev-lang/tk:0 ) )
- emacs? ( >=app-editors/emacs-23.1:*
+ X? (
+ x11-misc/xdg-utils
+ sci-visualization/gnuplot[gd]
+ vtk? (
+ ${PYTHON_DEPS}
+ sci-libs/vtk[python,rendering,${PYTHON_SINGLE_USEDEP}]
+ )
+ )
+ emacs? (
+ >=app-editors/emacs-23.1:*
virtual/latex-base
app-emacs/auctex
app-text/ghostscript-gpl
- dev-texlive/texlive-latexrecommended )"
+ dev-texlive/texlive-latexrecommended
+ )
+ gui? ( dev-lang/tk:0 )"
# generating lisp dependencies
depends() {
@@ -72,16 +89,25 @@ done
unset LISP
+# Maxima can make use of X features like plotting (and launching a PNG
+# viewer) from the console, but you can't use the xmaxima GUI without X.
+REQUIRED_USE="${PYTHON_REQUIRED_USE} gui? ( X )"
+
RDEPEND="${RDEPEND}
${DEF_DEP}"
-DEPEND="${RDEPEND}
+# Python is used in e.g. doc/info/build_html.sh to build the docs.
+DEPEND="${PYTHON_DEPS}
+ ${RDEPEND}
test? ( sci-visualization/gnuplot )
sys-apps/texinfo"
TEXMF="${EPREFIX}"/usr/share/texmf-site
pkg_setup() {
+ # Set the PYTHON variable to whatever it should be.
+ python-single-r1_pkg_setup
+
local n=${#LISPS[*]}
for ((n--; n >= 0; n--)); do
@@ -97,7 +123,8 @@ pkg_setup() {
src_prepare() {
local n PATCHES v
- PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-1 )
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-1
+ dont-hardcode-python support-new-vtk )
n=${#PATCHES[*]}
for ((n--; n >= 0; n--)); do
@@ -142,14 +169,25 @@ src_configure() {
done
fi
+ # Using raw-ldflags fixes the error,
+ #
+ # x86_64-pc-linux-gnu/bin/ld: fatal error: -O1 -Wl: invalid option
+ # value (expected an integer): 1 -Wl
+ #
+ # when building the maxima.fas library for ECL.
+ #
econf ${CONFS} \
- $(use_with tk wish) \
+ LDFLAGS="$(raw-ldflags)" \
+ $(use_with gui wish) \
$(use_enable emacs) \
--with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
}
src_compile() {
- emake
+ # The variable PYTHONBIN is used in one place while building the
+ # German documentation. Some day that script should be converted
+ # to use the value of @PYTHON@ obtained during ./configure.
+ emake PYTHONBIN="${PYTHON}"
if use emacs; then
pushd interfaces/emacs/emaxima > /dev/null
elisp-compile *.el
@@ -165,7 +203,7 @@ src_install() {
docompress -x /usr/share/info
emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
- use tk && make_desktop_entry xmaxima xmaxima \
+ use gui && make_desktop_entry xmaxima xmaxima \
/usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
"Science;Math;Education"
@@ -188,6 +226,13 @@ src_install() {
doins interfaces/emacs/imaxima/README
doins -r interfaces/emacs/imaxima/imath-example
fi
+
+ if use ecls; then
+ # Use ECL to find the path where it expects to load packages from.
+ ECLLIB=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
+ insinto "${ECLLIB#${EPREFIX}}"
+ doins src/binary-ecl/maxima.fas
+ fi
}
pkg_postinst() {
diff --git a/sci-mathematics/maxima/metadata.xml b/sci-mathematics/maxima/metadata.xml
index 2ee0d1e396a8..d87f8aea9f05 100644
--- a/sci-mathematics/maxima/metadata.xml
+++ b/sci-mathematics/maxima/metadata.xml
@@ -28,6 +28,9 @@
(<pkg>dev-lisp/gcl</pkg>)</flag>
<flag name="sbcl">Compile maxima with Steel Bank Common Lisp
(<pkg>dev-lisp/sbcl</pkg>)</flag>
+ <flag name="vtk">
+ Support plotting with <pkg>sci-libs/vtk</pkg>
+ </flag>
</use>
<upstream>
<remote-id type="sourceforge">maxima</remote-id>
diff --git a/sci-mathematics/singular/Manifest b/sci-mathematics/singular/Manifest
index dd54342ada57..2916c7c6e954 100644
--- a/sci-mathematics/singular/Manifest
+++ b/sci-mathematics/singular/Manifest
@@ -3,10 +3,15 @@ AUX singular-4.0.0-fix-omalloc-ar-detection.patch 484 BLAKE2B 801f773c434ad35a18
AUX singular-4.0.2-ntl8-compat.patch 1149 BLAKE2B ed7ca37745eb37dd6493dfc4b531c3b9dc7390bc246a5ac08480ab188746883f3320031b14f9fe542c5889a56fa6c5c93a4b3f23e581cfb11cc308caa4dfa868 SHA512 178f0130cd6a606d6c93f5cc42dfe92782a16cc6b3d0e2695ce16d2115f70e502f702e8e72fd5d3b61b1bb5b3f4038a4fbf6277418b3f0bf89cae7939d5ed606
AUX singular-4.0.3-fix-destdir.patch 992 BLAKE2B ffde08cf18fe22214acee27877090d7a7e3f458fac2f6f928cc822995c77579e705acb87b3bac4a9f84806bb3ce84eacfe7b51db3b51c94121c92b5335e207bb SHA512 6b0496d1901c51da66d75fde1b980333df8b1e03572f49ecd56f3f3c67d3af1b08527c7b764aa3b62b0296b97aaaa861d257a97a4370b3600b2cd7ffb9580936
AUX singular-4.0.3-fix-resources-name.patch 10175 BLAKE2B 54b576ab1d5db6a1d2aca507472e3eba0a4c02507c82de7dfd1d6ad069c5225c8c2957c9258f57f686b5fa845427d95cbb350bf4bb151ee13e5b4eaa8e900c17 SHA512 29c43d97598c647ac2754ed897411638f0141b60de590a53fc3f476cd1d627b270ecab29e16923b00757d8218d680c6b837070fa6899e4c770243bf71e86a09f
+AUX singular-4.0.3-gfan_linking.patch 705 BLAKE2B 9ec4dafad75885132d4f6bea65f945a5f6f383e39f3d375a70e12a86db983cc3d64e14b148db07c9577a46d2a8f534f43988d264fdb43dc61b247843af5f438d SHA512 4c2ab45f449f9c3d79165e1c9a0634fb08a9cd34dbc898e0e172409f6914ccd6e1c4e1719ccf0b36e591b4840e8cba08576ac1b57fadd08f8344b45e1af40d89
+AUX singular-4.1.3-doc_install.patch 2834 BLAKE2B d8e35169534ed9087fc1faf6029a111819d2198d5fa61134ba083920604f93a346e6f274da02361b0c03ba05fea2c4f1b23fe2af8a46d8e6705cf4ccd025751a SHA512 36d3b6f2d90479ae508c7771d4fd7724ada5f5102ece78c4d5bc113c23848973706f19a9e1467de322ecee29712dc1d915f41b491bef23529a43380ff69d84ef
+AUX singular-4.2.0-no-static.patch 2644 BLAKE2B 466705130179efe13cd4bdccb09e0bc2a5a0efaf36536009054235f6a44af932c359cee366eef860235739c480fea84e9ca48947597d2c3aaf2e26bdb3fada88 SHA512 53dd7045d717f62817b0fd03963a8cf2ba4e88387b89e854a1cc6a2817bf975fd7e16852e948b64182d049b8c184459d4e071bbb5f8c6ca5998c4c1b964deef5
DIST singular-4.0.2-share.tar.gz 8789162 BLAKE2B 357a68f68cc0508e4e197427c56232da60412a8380045ac594cbe313bf6a403068d1724f637d47de44e66baf34c74fa5c4ee622721c5bbd67764e65e66c8583a SHA512 068827df04a5d1b4407dbaab1296d0120071dc109b749037b02263d51906852a5c2c1ef321733953a181c2d3d0fe799c197ef0af3b9341810ecf31a5324e0a25
DIST singular-4.0.2.tar.gz 8635172 BLAKE2B 5f565bf14677d8414300d7a5602aa96c8cef7e863fd858083fe4561742b545d74a5fc4de95ef0c63acf4f78c66405bac7ba77a954e42b2e87a6da608e4732bcd SHA512 4543a45839ce8adc45e3b2edd84a6e398b7ba157da1eda050dbce2a8b20333eb0c63433e3e7eaf59d76bf6bcb65c1b1611bfc08c25fd493c88e2f06624898e3d
DIST singular-4.0.3-share.tar.gz 6633256 BLAKE2B c137b72aaa0926eb006624e03fe938678acb94a41da525de1ca4f7711985d253926788b550d2d98b8def15fb0cb60b2527c1c04566a29a28135fcb1a70246025 SHA512 5f8ae4ecd22a3470e5f00393e03079936d7ed334f44ae056ed1eb1719054afc4371b03e920b598033605600c843dc39cb6b01308505323e2c084dfe1f7a1b94a
DIST singular-4.0.3.tar.gz 12615042 BLAKE2B b3c63434974bb8b5fdef86cbcbe73b76a47503b28dcae6bfc6e4210e1ab1c14224ac0f6eeefa9d8004450f6d9a26843368a9b2ea16bca68bf1215ce33e83df0d SHA512 781227997c510829b02c969259d627572c0b62aa152c9ef623ff27de5b2df0c8e024f086740b89ca8f96b6e3f7def04f8d62ca79adb199d6249ade9b8cbb06ab
+DIST singular-4.2.0p1.tar.gz 14155171 BLAKE2B 444553f87d7ca8d6a62e4519c9857a6892757e92285df7c3b686913a9b51c9ae8d802c41382b0b2b6e37dc2dc496d4a10f262c98407470219cdce131e8baf127 SHA512 2ecd8940c9e8d70a93dbdb4df6da313c00151e5cb959f8eed5856e8df99089b5a03e514fbcdc70903c77df8b59fa7ef9f3b134f1de510b795fa6ea0341089bd8
EBUILD singular-4.0.2.ebuild 3580 BLAKE2B 3bd6e930a356db2fc3752e430e16ff2074b1494e42e1813108ce50eb846200a9aa1af646422a29a171ad3573387c7e46c8aef57b36dc1ce4d133e0ea090a9311 SHA512 ffcc778fb84b8475a9c3b1f8fc8c1875ac2213551b5fac54c6668d298f5bb338977ea078ce81acabcb83adea61bd514c40a4f3545ec953ac7eeb80e58010cdef
EBUILD singular-4.0.3.ebuild 2499 BLAKE2B 5d17c7d35ec1ba6073e7d4703134fe96b4f8d59ae34922947dbc0f8f2aa6ddf52535e766aa62b1f66be5ef92c9dab5b458f02266239f8ba1013920e59c73ae8b SHA512 bfb148756c9f381ccdd6e2374971c0e1e589e7739b473a86826a35d6e15e0d724fcb76cf672896dbf9f562f033d2752bdbe1bc8521cd276b1fc6358e0014ce90
+EBUILD singular-4.2.0_p1.ebuild 2261 BLAKE2B 5c3e9208ffc6bbe2e0e1be3ef26a2ac30c2b859630d9354a219575517293ca74608cdadeee539544c308ff4e495d778eb4b985449e04167df8d833ba9e1da4a8 SHA512 f77fbffe6507710d11ad0081127c2a52918d4762d52aa7741e899106b54e233cd064c28d47b0b2865f4e162cdd31f65e712fa577a2cb35d270d23ce834b52a89
MISC metadata.xml 389 BLAKE2B dcba16dd34ab572d58d76ea55f528ee1a4bb4c0c37ca272c9a11afdb8117f6982e5109a4a4783d1efc6cb31fe273f07bf79f720f178fea635af29574007c93f9 SHA512 3c5aea925276639c81a03a2a8d05ecaa48edac510f144d92e173402721dbc253638341ac8afdfbc17098ac35d2f4f47b41e5d56427c8ecaa788dc28fbb0977ae
diff --git a/sci-mathematics/singular/files/singular-4.0.3-gfan_linking.patch b/sci-mathematics/singular/files/singular-4.0.3-gfan_linking.patch
new file mode 100644
index 000000000000..f228d980ffcf
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.0.3-gfan_linking.patch
@@ -0,0 +1,13 @@
+diff --git a/gfanlib/Makefile.am b/gfanlib/Makefile.am
+index 2039af0..a1b7dce 100644
+--- a/gfanlib/Makefile.am
++++ b/gfanlib/Makefile.am
+@@ -20,6 +20,8 @@ libgfan_la_SOURCES = $(SOURCES)
+ libgfan_includedir =$(includedir)/gfanlib
+ libgfan_include_HEADERS = config.h gfanlib_mixedvolume.h gfanlib_polymakefile.h gfanlib_symmetry.h gfanlib_vector.h gfanlib_z.h _config.h gfanlib.h gfanlib_paralleltraverser.h gfanlib_q.h gfanlib_traversal.h gfanlib_zcone.h gfanlib_circuittableint.h gfanlib_matrix.h gfanlib_polyhedralfan.h gfanlib_symmetriccomplex.h gfanlib_tropicalhomotopy.h gfanlib_zfan.h
+
++libgfan_la_LIBADD = $(CDDGMPLDFLAGS)
++
+ DISTCLEANFILES = config.h
+
+ moduledir = $(libexecdir)/singular/MOD
diff --git a/sci-mathematics/singular/files/singular-4.1.3-doc_install.patch b/sci-mathematics/singular/files/singular-4.1.3-doc_install.patch
new file mode 100644
index 000000000000..10e831bea701
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.1.3-doc_install.patch
@@ -0,0 +1,62 @@
+diff --git a/Makefile.am b/Makefile.am
+index c21b6ba..ea61758 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -14,10 +14,11 @@ dist-hook:
+
+ install-data-local:
+ if test -e $(srcdir)/doc/doc.tbz2; then\
+- (cat ${top_srcdir}/doc/doc.tbz2| (cd $(DESTDIR)$(datadir)/singular; tar jxf -));\
+ mkdir $(DESTDIR)$(datadir)/info;\
+- mkdir $(DESTDIR)$(datadir)/doc;\
+- mv $(DESTDIR)$(datadir)/singular/singular.hlp $(DESTDIR)$(datadir)/info/.;\
++ mkdir -p $(DESTDIR)$(docdir);\
++ (cat ${top_srcdir}/doc/doc.tbz2| (cd $(DESTDIR)$(docdir); tar -jx --no-same-owner -f -));\
++ mv $(DESTDIR)$(docdir)/singular.hlp $(DESTDIR)$(datadir)/info/.;\
++ @INSTALL_DATA@ doc/singular.idx $(DESTDIR)$(datadir)/singular/.;\
+ fi
+
+ uninstall-local:
+diff --git a/configure.ac b/configure.ac
+index 2d53a55..d43b5fe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -248,6 +248,11 @@ AX_NORMALIZE_PATH([config_datadir],['/'])
+ AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
+ AC_SUBST(DATA_DIR, "$config_datadir")
+
++AX_RECURSIVE_EVAL([[$]docdir], [config_docdir])
++AX_NORMALIZE_PATH([config_docdir],['/'])
++AC_DEFINE_UNQUOTED([DOC_DIR],"$config_docdir",[docdir])
++AC_SUBST(DOC_DIR, "$config_docdir")
++
+ SING_SHOW_FLAGS([Compiler/linker flags: ])
+
+
+diff --git a/resources/configure.ac b/resources/configure.ac
+index cf6720f..ac5f2d0 100644
+--- a/resources/configure.ac
++++ b/resources/configure.ac
+@@ -72,5 +72,9 @@ AX_RECURSIVE_EVAL([[$]datadir], [config_datadir])
+ AX_NORMALIZE_PATH([config_datadir],['/'])
+ AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
+
++AX_RECURSIVE_EVAL([[$]htmldir], [config_htmldir])
++AX_NORMALIZE_PATH([config_htmldir],['/'])
++AC_DEFINE_UNQUOTED([HTML_DIR],"$config_datadir",[htmldir])
++
+ AC_CONFIG_FILES([singular_resources.pc Makefile])
+ AC_OUTPUT
+diff --git a/resources/feResource.cc b/resources/feResource.cc
+index 3d75bc9..7e4fc8c 100644
+--- a/resources/feResource.cc
++++ b/resources/feResource.cc
+@@ -85,7 +85,7 @@ VAR feResourceConfig_s feResourceConfigs[] =
+ {"DefaultDir",'d', feResDir, "SINGULAR_DEFAULT_DIR", SINGULAR_DEFAULT_DIR, (char *)""},
+ {"InfoFile", 'i', feResFile, "SINGULAR_INFO_FILE", "%D/info/singular.hlp", (char *)""},
+ {"IdxFile", 'x', feResFile, "SINGULAR_IDX_FILE", "%D/singular/singular.idx", (char *)""},
+- {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", "%D/singular/html", (char *)""},
++ {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", HTML_DIR, (char *)""},
+ {"ManualUrl", 'u', feResUrl, "SINGULAR_URL", "https://www.singular.uni-kl.de/Manual/", (char *)""},
+ {"ExDir", 'm', feResDir, "SINGULAR_EXAMPLES_DIR","%r/examples", (char *)""},
+ {"Path", 'p', feResPath, NULL, "%b;%P;$PATH", (char *)""},
diff --git a/sci-mathematics/singular/files/singular-4.2.0-no-static.patch b/sci-mathematics/singular/files/singular-4.2.0-no-static.patch
new file mode 100644
index 000000000000..5509c58bd6b6
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.2.0-no-static.patch
@@ -0,0 +1,69 @@
+From ef9d66230f9697caaa77dbfc275650412d0d9c0d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 22 Mar 2021 09:02:58 -0400
+Subject: [PATCH 1/1] Singular/Makefile.am: drop -static linker flags.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There are a few hard-coded "-static" flags in the Makefile.am for
+Singular that are causing weird problems for shared builds. The
+visible symptom on Gentoo was a few insecure rpaths being stripped
+from the "Singular" executable, but François Bissey was able to track
+down the root cause, namely the "-static" that is causing libtool to
+act weird.
+
+In retrospect, this problem was also reported on Stack Overflow at,
+
+ https://stackoverflow.com/questions/17905121
+
+The Gentoo bug is,
+
+ https://bugs.gentoo.org/712004
+
+If we experience no problems with this patch, it will be sent upstream.
+---
+ Singular/Makefile.am | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/Singular/Makefile.am b/Singular/Makefile.am
+index 7fe43bffb..1e440765d 100644
+--- a/Singular/Makefile.am
++++ b/Singular/Makefile.am
+@@ -153,7 +153,7 @@ Singular_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc utils.h
+
+ Singular_LDADD = libSingular.la ${OMALLOC_LIBS} ${BUILTIN_FLAGS}
+
+-Singular_LDFLAGS = -static ${AM_LDFLAGS} ${BUILTIN_FLAGS}
++Singular_LDFLAGS = ${AM_LDFLAGS} ${BUILTIN_FLAGS}
+
+ Singulard_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc utils.h
+
+@@ -166,7 +166,6 @@ dist_script_SCRIPTS = singularsurf singularsurf_jupyter singularsurf_win surfex
+
+ #### ESingular
+ ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR -DPROTO
+-# ESingular_LDFLAGS = -static ${AM_LDFLAGS}
+ ESingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \
+ ${top_builddir}/libpolys/misc/libmisc.la ${OMALLOC_LIBS} \
+ ${top_builddir}/resources/libsingular_resources.la
+@@ -176,7 +175,6 @@ ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc
+
+ #### same for TSingular
+ TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR -DPROTO
+-# TSingular_LDFLAGS = -static ${AM_LDFLAGS}
+ TSingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \
+ ${top_builddir}/libpolys/misc/libmisc.la ${OMALLOC_LIBS} \
+ ${top_builddir}/resources/libsingular_resources.la
+@@ -191,7 +189,7 @@ libparse_CPPFLAGS = ${AM_CPPFLAGS} -DSTANDALONE_PARSER
+ libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc utils.h
+
+ libparse_LDADD =
+-libparse_LDFLAGS = -static ${AM_LDFLAGS}
++libparse_LDFLAGS = ${AM_LDFLAGS}
+
+ #########################################################
+ # the Singular library (*.lib files)
+--
+2.26.2
+
diff --git a/sci-mathematics/singular/singular-4.2.0_p1.ebuild b/sci-mathematics/singular/singular-4.2.0_p1.ebuild
new file mode 100644
index 000000000000..b015ba5fee61
--- /dev/null
+++ b/sci-mathematics/singular/singular-4.2.0_p1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools elisp-common
+
+MY_PN=Singular
+MY_PV=$(ver_rs 3 '')
+# Consistency is different...
+MY_DIR2=$(ver_cut 1-3 ${PV})
+MY_DIR=$(ver_rs 1- '-' ${MY_DIR2})
+
+DESCRIPTION="Computer algebra system for polynomial computations"
+HOMEPAGE="https://www.singular.uni-kl.de/ https://github.com/Singular/Sources"
+SRC_URI="ftp://jim.mathematik.uni-kl.de/pub/Math/${MY_PN}/SOURCES/${MY_DIR}/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="BSD GPL-2 GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux"
+IUSE="emacs examples +readline static-libs"
+
+RDEPEND="dev-libs/gmp:0
+ dev-libs/ntl:=
+ emacs? ( >=app-editors/emacs-23.1:* )
+ sci-mathematics/flint
+ sci-libs/cddlib
+ dev-lang/perl
+ readline? ( sys-libs/readline )"
+
+DEPEND="${RDEPEND}"
+
+SITEFILE=60${PN}-gentoo.el
+
+S="${WORKDIR}/${PN}-${MY_DIR2}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.0.3-gfan_linking.patch"
+ "${FILESDIR}/${PN}-4.1.3-doc_install.patch"
+ "${FILESDIR}/${PN}-4.2.0-no-static.patch"
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-gmp \
+ --with-ntl="${EPREFIX}"/usr \
+ --with-flint \
+ --enable-gfanlib \
+ --disable-debug \
+ --disable-doc \
+ --enable-factory \
+ --enable-libfac \
+ --enable-IntegerProgramming \
+ --disable-polymake \
+ $(use_enable static-libs static) \
+ $(use_enable emacs) \
+ $(use_with readline)
+}
+
+src_compile() {
+ default
+
+ if use emacs; then
+ pushd "${S}"/emacs
+ elisp-compile *.el || die "elisp-compile failed"
+ popd
+ fi
+}
+
+src_install() {
+ # Do not compress singular's info file (singular.hlp)
+ # some consumer of that file do not know how to deal with compression
+ docompress -x /usr/share/info
+
+ default
+
+ dosym Singular /usr/bin/"${PN}"
+
+ # purge .la file
+ find "${ED}" -name '*.la' -delete || die
+}
+
+src_test() {
+ # SINGULAR_PROCS_DIR need to be set to "" otherwise plugins from
+ # an already installed version of singular may be used and cause segfault
+ # See https://github.com/Singular/Sources/issues/980
+ SINGULAR_PROCS_DIR="" emake check
+}
+
+pkg_postinst() {
+ einfo "Additional functionality can be enabled by installing"
+ einfo "sci-mathematics/4ti2"
+
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}