summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2014-03-11 19:07:35 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2014-03-11 19:07:35 +0000
commit6965d941b6387712280cd67592be9aa47211c1bf (patch)
tree671f8f4f1d96c75e97c5c268d218eabcb91289c3 /sci-mathematics/singular
parentdisable xlib with USE=-X (diff)
downloadhistorical-6965d941b6387712280cd67592be9aa47211c1bf.tar.gz
historical-6965d941b6387712280cd67592be9aa47211c1bf.tar.bz2
historical-6965d941b6387712280cd67592be9aa47211c1bf.zip
Version bump adapted from sage-on-gentoo
Package-Manager: portage-2.2.8-prefix/cvs/Linux x86_64 Manifest-Sign-Key: 0x13CB1360
Diffstat (limited to 'sci-mathematics/singular')
-rw-r--r--sci-mathematics/singular/ChangeLog11
-rw-r--r--sci-mathematics/singular/Manifest17
-rw-r--r--sci-mathematics/singular/files/singular-3.1.6-factory_template_instantiation.patch26
-rw-r--r--sci-mathematics/singular/files/singular-3.1.6-ntl6compat.patch43
-rw-r--r--sci-mathematics/singular/metadata.xml3
-rw-r--r--sci-mathematics/singular/singular-3.1.6.ebuild176
6 files changed, 266 insertions, 10 deletions
diff --git a/sci-mathematics/singular/ChangeLog b/sci-mathematics/singular/ChangeLog
index 552b33a4d3b3..95592b0b74fe 100644
--- a/sci-mathematics/singular/ChangeLog
+++ b/sci-mathematics/singular/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-mathematics/singular
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/ChangeLog,v 1.54 2012/08/15 09:59:46 tomka Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/ChangeLog,v 1.55 2014/03/11 19:07:22 bicatali Exp $
+
+*singular-3.1.6 (11 Mar 2014)
+
+ 11 Mar 2014; SĂ©bastien Fabbro <bicatali@gentoo.org>
+ +files/singular-3.1.6-factory_template_instantiation.patch,
+ +files/singular-3.1.6-ntl6compat.patch, +singular-3.1.6.ebuild, metadata.xml:
+ Version bump adapted from sage-on-gentoo
15 Aug 2012; Thomas Kahle <tomka@gentoo.org>
+files/singular-3.1.3.3-install_name.patch:
diff --git a/sci-mathematics/singular/Manifest b/sci-mathematics/singular/Manifest
index ec50223f2904..7c163caf8490 100644
--- a/sci-mathematics/singular/Manifest
+++ b/sci-mathematics/singular/Manifest
@@ -10,6 +10,8 @@ AUX singular-3.1.3.3-Minor.h.patch 234 SHA256 87419ec7ec7c51672c77dee048e1ca4dfa
AUX singular-3.1.3.3-install_name.patch 862 SHA256 2e3d0ca4e072d66feb2a5e2e3db0314f134510a734a78526ba1546d3f00548b8 SHA512 9f641503a62f8de151e9774003b9b52634f27ad8b4355bb72b49239acf4086fc066a7688f1ba2df7a42b05aaf8c89c9fff6100706d7bf71043d931a049804497 WHIRLPOOL 661725f3e8d81bd70cc0b9735dc67d5a71daa2d622f7e43e86c31a8ab68822d2026868030a131d4d7b1fd0ee08a28cc8d403f8048771fface1869d250823b31c
AUX singular-3.1.3.3-os_x_ppc.patch 368 SHA256 33dbb7ab84a24c9c4e08e49acd955d8a4cb97884780c74a3b3d1123f3ed5cd08 SHA512 b590a13e7da750a6e57e259ea9866ffe85e702a2f96c7b6c11098cc079a8849478aa2f29340ced20819f43411c43eacbb3607d0a317fc1801da5f5decf4cf378 WHIRLPOOL e6ac57568befeeeef4b9fe8f3c7c6cc053e569ee48793175d2c16a1f9176d89f105e19bc14a8f3f1bc5ee320d05dc261605fa8c98906a84435421524ead80508
AUX singular-3.1.3.3.make_parallel.2.patch 1498 SHA256 4d16186fc3e218d86a99f45d414e84b0d91d2ca0c10a1431fc73d9275acd0686 SHA512 368690aa1063bf78b211f3291ec5a00a6369a83978f371d2dc6557b8924fff4ced8a438b1ca5464d3886ae94c155b67db5a00470644c8a03b7aeadb4aa74d2e7 WHIRLPOOL d5bf887e95ee5b321bcd3dd7ddd406e540a9cd00406009d381f191bccce572d95493d273114a5e9c055c6dcd4c12fd391d4eef098d97815500abb114ab961313
+AUX singular-3.1.6-factory_template_instantiation.patch 900 SHA256 03c64c0f4946a4de9b57f4ae644bb364283763b56075e712c617972de4636c37 SHA512 0a0d7a271fddf543de6d8d987322e4062997a6283ccbb90f55c8d70ed39a2e58a0d68e881c0d260ad9f4ceaf60352bcd78a48b6f707a7719369c0b4cbe47542f WHIRLPOOL 8b0a5903c6d13cb94e68791fa1ab7e6846909059ebf4d9d5eda5a04693fc09eed93c1c95ad03af018068c044846b9da6d98cc11da03a8277d29ce4860671946c
+AUX singular-3.1.6-ntl6compat.patch 1298 SHA256 66ef7bbfba0bd3c6476bec26d38d7898b629e900af8d6c2556809d45c608f925 SHA512 cd962050f68812a698bf121430714f8046b702074a343f258aeadec7a01b4304cb02b1b6e16ede72a30f1dba49f5b545b8ace178ba1c107a2f2ba0969e515f0b WHIRLPOOL 9be3d676ddc0adcc07d9b9aeb665c59f13edd0f10389e7b828955716bce85b5bc13313ea383bb42ff464d5b61a851fae00e8685e1628b1a0a815ce1f07ad2089
DIST Singular-3-1-2-share.tar.gz 9341118 SHA256 03ca31608684a02f645c3ab75fe06402fc076f05e1ed7154427855affbfab45e SHA512 dbb30a77fc48cb0d7c284157d530fcb122469d4be76966599fd304d183fbd4c8be71495b320c521e4f75f05958415bf87c38fa34b4ab05f38ea424b3b7519291 WHIRLPOOL 48e0276b45f4c8d87bb743c6efd0a89e6dce90afd87087def9ea6b78fc2eb9894841c6d9c19acc12d69631bd9be77ef8828ba410635cd254194a7f6eb09e2e44
DIST Singular-3-1-2.tar.gz 19564373 SHA256 4fbe46cca2aef42fdf73ef8556350278f9f3b3d5d0d1b8e21c1a182e59f2b88a SHA512 3b42ac7b831f54954afdf5bb6e3ff37a5b01832b243e330201e4b5b600c2a90c0868a76cc013ac545d561f3203ecf3dfcc395209ebaa900ed8dcb2c517cbb751 WHIRLPOOL 58c6ec080b0b5523db3ddd8919e9e9f06d3329a6ff50dc071dffe7274d52638e2addaa1c5d5f162e8e5a3a8da314f0d0f2addc7a12dead4753414d43e699706b
DIST Singular-3-1-3-1-share.tar.gz 9413521 SHA256 d02d7fc41e0b0b5699f818271a01ae10cff576b320eb9044e814c95e52659d11 SHA512 fc66355364447e58a2981ba655efaea2b28e4d3638c0ed1aaf409cef00dfd09b43cbabd6df36be70890158d2c1d407a74f02e073461e3aa5d3f33370291e1edf WHIRLPOOL 34379c6ef8fb03490e258557533e694e3e22e8af8b89d6d2806f4a8a3e8c587bf570d3314d75829375115ab7a1ca08e0d6805cfeabdec8a803e033bf5eb849ce
@@ -18,17 +20,20 @@ DIST Singular-3-1-3-3-share.tar.gz 9451406 SHA256 a9fe1bf80a95352a6d502d47c47eb5
DIST Singular-3-1-3-3.tar.gz 20050926 SHA256 1228c05fcd3a70244bc7fd676c46a65d64c57a223511ae2ac2fb1f6b5699ce39 SHA512 b4efe917a65bf0d510966131970376add0bda2f04bdc4db805cfe78dfb4a1f3734fd6edc45a9f21d1af7ba9c9abd4f2741d2b81c697a540152fa53c28684615e WHIRLPOOL 7638efa8ec75c3768aca5e01f02f20ac88634eb83b8c219b0ca10981d188f36ece3baec18d7201b09da1054e221f96d3dc87e8ac257e18a5ab27057f7c0abc01
DIST Singular-3-1-4-share.tar.gz 9544863 SHA256 8e4f36163b258cfaf7a4e8379e1e031721092326693264a0c4154381d15c871a SHA512 4d9f1c92c8cb8adc92091a1c93a14143049fa5c2aec6b943fda69564bc1f21b93aaf510a0a2288ffbcc23d3d9c18cbf57aa10dbfca15616a87dda840ae9be4ce WHIRLPOOL ca05b11c3d751b548800091a5c73799e6c367b49abe5fd1babd9e19b19f5b5d3a3a897b7e23f89c9e6d9f40e5f978b89c3497266a32ff5ebb4c90cdbefc594c5
DIST Singular-3-1-4.tar.gz 20662954 SHA256 e15ec070b277981a7b6448e0ae3127a6b8539f4312a1e755c1003054e4ef6e84 SHA512 4795b495a40bbc24bd2887e0b2c1eeb717aabecd24b10f1ed672fa68ae5fc1ccbc643228b8823b4a94a57f74bdf2f731ca784e01246d57c82fd88e255b9f584e WHIRLPOOL a846886686e05c66efedf506000611b7fdaaf2976558272d276f1c8649a634e01006d21c030216668d28fb4c429228bb88ab095b8cec32d3275e3caee0f5e4d9
+DIST Singular-3-1-6-share.tar.gz 10620177 SHA256 c74a97b7eb8ed53417682637fe11c2480aeb1a6cbf4a8db27a1b16a162e83c4d SHA512 54bff29c5d64609583ec8b1c43005a1ff453c8f2cedfe9a26ac840888e9d306e3104e14aea5a3cc923fac916215c4285ecfe5ae7e1242aee0308b5e4c6e2d48d WHIRLPOOL a1edc8fa9cad189af413870b0e63316e135e8456075f13b3d8036afafd6c25f4bcc854432cdcb8c2ec690c63b43f616367aa9f1027c096e95f22aa0508943f67
+DIST Singular-3-1-6.tar.gz 25535111 SHA256 7956a17a0b5d428fea25bc0bc6c19c753748fb98bb2926c49b9fbcbec94172ff SHA512 103a10dd474d93cceb678bcef1a4aae5ec693cb9e68c9d63a7536929b738a0127501ee145a79cc3b9ddfa4bd1ca0f05e640eeb3b0fbdb60de4f56aa5beacc213 WHIRLPOOL 71ef6d505f7c8b2eeacd46666640d7b3c79f75d6c2c858b135553b1fb3a9dd7d88df74924009468c32aa4aa748b88ccb7762010ab4d36eec420a07fd36e8dd22
EBUILD singular-3.1.2-r2.ebuild 4829 SHA256 5d13a92d0b9d48b44b2ee10f7b9abf989d861f6ec9ec7a78a794e61cef529048 SHA512 93ef6c2d43a7c0c895ec90e7cf9b8d2ec45dfe2fba483228fdd7ff1b0bf290c8a61bad80fab69c2d5329d95c979efe2cf70bb5f6ab9da007b8050f5edb547799 WHIRLPOOL 86f27228e171ad6269b068d66d38d426689171a8be6732bb1938224801a88d012b3dc7d7c66bab6eb7a0eaacded20d7a4d792dd0636026c2fc3af6ebad56086e
EBUILD singular-3.1.3.1.ebuild 4655 SHA256 e3f7b6d0a80560a4571e1426c4b7fcd6bae7cd8b1622a4392e78809f73d5f3d0 SHA512 94355432afdb547af077974e5c3096345a55e4ac1024239b66be029fe1be914bf079de70f20d316e7150d42ad07bd54e28444b20958d6c996ff8c426173aaeaa WHIRLPOOL d9ccfe783fab88e89dd6f95c11b2f4c121c55ca5e56ffd32de2b3b547e16aea0f45d5e08a224f642e43681c54a6956e1148c8111ac4a46db97c4e0368c0b74b1
EBUILD singular-3.1.3.3.ebuild 4956 SHA256 8c41de9bb23dafa5314c595ab989f67b4236be8fb42f223c1bec8f4bfdc4437a SHA512 1f694f153e92019af530ed96758c0c2b91d88c2e661e9ee9c64cf6a62cff1bdf8c3356549fd602a1f52200aa878843429a6166143b613df9bd879a613becf876 WHIRLPOOL 7e920c0b6a525afc0c1ff10c8bc2a08b92bb545b063c04484a05f2a3cdf2ba32e4c5bfa8334ede3e2dd9f9e635f6448cd56f93d37f1b98fe26e85e544189a4ef
EBUILD singular-3.1.4-r1.ebuild 5235 SHA256 f7308200a46692fc2e3e7a74ca5c1a21766c3eac6926aa9cefe685da390a7d42 SHA512 bab21030e8d807176dafca3b2ad13761c97a589f22ab91b905e337b1fff6aea614dd21093cc39e8e54c030ac19e2925ad60a1f8c12cf89a5eaf8dc7fa5456d63 WHIRLPOOL aaae72ef8bdd784ea9e67e49ba72fe15871097e81374e8d802bc36ea0d4739d22bac158c249756fd456c2d5a2ac013f82320f039913a340a4b487ec20ae7765e
EBUILD singular-3.1.4.ebuild 4829 SHA256 1df5d0586016870eeca68ed58dd4f5857449eca4e2716b1eb55a3b8560891cca SHA512 0005efc8eedfe576149064705151aa0b60e6cc6713dfb5dd6185e170e32c88c32acfcfc483d24654d31d3f8981a25af32b4cee5ac699cbea2e3a7d95d37c5e50 WHIRLPOOL b66c7b788fd737716eae11f461296f0b00668068480cbd04314e963b46ae51233476c32647a22bbc1409ec9f8d6b02441555b497bfed71f799c03e5698c7e15d
-MISC ChangeLog 12286 SHA256 046469c54786a8f374ae6cc8b8fc329254177c2022327468480e2d97177d4a78 SHA512 873677a6b1e4fe4348b80abd635f60c44eb45afc5182142b5b9d43908a5ead73028630b948734a15b94744f87589cf90047d616686377aaa610763b9e7b0aeed WHIRLPOOL 3aef817052828c45cb604d2bcc2e109f328cc2337671fe4bd8e0c5e7e484fb115e6d7b1b94bd7d27bbe811caabdf251c26bf46d0c85fe6246cd50dadbda44189
-MISC metadata.xml 369 SHA256 cff5f6b561efdc5121015bb0afc25656aa698d41b6c3c62019e13b5fa0980e20 SHA512 f2bf4cb48d751e7654a142938403c79ac26bb00388e65c72eefd97fc53ff415eb2e520c0a2fd4d58123551496937f7d395ff359b41c61d81770661235d23ae27 WHIRLPOOL babbb56c4790587b31d82249c862fb13cfa30ea078385d329e6adaef49335e848fc08ecbe9c380dc8c5e51ca2b77217880c97595c4805d4c5e37548422ce74f7
+EBUILD singular-3.1.6.ebuild 4778 SHA256 7800c7034824f60df0a0c50afb06c723cf1c4e2016c2122fc73c1f0c27ed6cf9 SHA512 6c2ac7b79a36af7683fee8c05eba7a4f0b35e879faeb85b2e017a4e68f2dabb9d4d31e845978fab45513e9e5ce67268c7796a302ef0a953e299454bae93a9f7d WHIRLPOOL c4b4582fd12bd6fe1c44117cc002f68cbe72480e291a64567a9854342de4dd4200b5c3cffad787f050c065a7f8bd0fa52bfb1b6643ec393c1acd3166b722ca18
+MISC ChangeLog 12561 SHA256 6ab0b5c70f5a4ccc40e70dd1e8b8c201dfbfb8b3caa6b5cf302fc565c3d6882e SHA512 2cce3249b10391fe6e3b33e0ee1a0732def693a9bd325735d298fda60880812810afb1d97dbfdf61775c471dc12fce297ddbe915d406a580d595bc58ce0a77cd WHIRLPOOL 4a4e96cba0abb2334304cb66e104d8fab4de2faabdd24cba8c0e3bf5ed0b31f46bfcd71eb63fb1a6acd1305ec189cf3a665482e8024b8174a8448b122189fc6b
+MISC metadata.xml 365 SHA256 ac35c79b9ab936fa88b962ea0ba2e1b6935271ee592e665e250bcfd90bf0adb2 SHA512 0845e50be660dadde53fea0e197237deed03a1d3d1e4d0386fa90300b45beda27030de1865e2364ca5eb3ded1ef949776470a0e3bc744d174699ee914c8c8072 WHIRLPOOL c9c8aca5068103fd7a96690b6ddc2f59d1cca983521d4a8f63c6d96ba4b8bdcc6796585489923ff12053e929777f308294349f10561935444b3f34bafdae421a
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
+Version: GnuPG v2.0.22 (GNU/Linux)
-iF4EAREIAAYFAlArcx8ACgkQid6yGVZcMrwWcwD9E+UVdQ0PNuCG3cW17/lJpQYn
-kDMkXV3tJIFEcPNMlbEBALAjtksF9KRiLKu2lwFmerWEGhjbgy2FqF/WhB3bSh83
-=aWb4
+iEYEAREIAAYFAlMfXu8ACgkQ1ycZbhPLE2A4EwCcDviYYKZAzI0mVeqsftKc9Lx5
+i3IAn38KenaMQlzurj2FJSIrKHU2NOIF
+=DuVu
-----END PGP SIGNATURE-----
diff --git a/sci-mathematics/singular/files/singular-3.1.6-factory_template_instantiation.patch b/sci-mathematics/singular/files/singular-3.1.6-factory_template_instantiation.patch
new file mode 100644
index 000000000000..edf764a758eb
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.1.6-factory_template_instantiation.patch
@@ -0,0 +1,26 @@
+diff --git a/libfac/factor/tmpl_inst.cc b/libfac/factor/tmpl_inst.cc
+index bda287a..2f5ba49 100644
+Index: libfac/factor/tmpl_inst.cc
+===================================================================
+--- a/libfac/factor/tmpl_inst.cc
++++ b/libfac/factor/tmpl_inst.cc
+@@ -3,7 +3,7 @@
+ ////////////////////////////////////////////////////////////
+
+
+-//#include <templates/ftmpl_array.cc>
++#include <factory/templates/ftmpl_array.cc>
+ //#include <templates/ftmpl_factor.cc>
+ #include <templates/ftmpl_list.h>
+ #include <factory/templates/ftmpl_list.cc>
+@@ -75,8 +75,8 @@ template OSTREAM & operator << ( OSTREAM &, const List<Variable> & );
+ template OSTREAM & operator << ( OSTREAM &, const Array<int> & );
+ #endif
+
+-template class Array<int>;
+-template class Array<Variable>;
++//template class Array<int>;
++//template class Array<Variable>;
+ //template class Array<REvaluation>;
+
+ // for database
diff --git a/sci-mathematics/singular/files/singular-3.1.6-ntl6compat.patch b/sci-mathematics/singular/files/singular-3.1.6-ntl6compat.patch
new file mode 100644
index 000000000000..2fcbcba33e02
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.1.6-ntl6compat.patch
@@ -0,0 +1,43 @@
+diff --git a/Singular/claptmpl.cc b/Singular/claptmpl.cc
+index 0fa6109..553afa5 100644
+Index: Singular/claptmpl.cc
+===================================================================
+--- a/Singular/claptmpl.cc
++++ b/Singular/claptmpl.cc
+@@ -123,3 +123,36 @@ template class std::list<PolyMinorValue>;
+ template class Cache<MinorKey, IntMinorValue>;
+ template class Cache<MinorKey, PolyMinorValue>;
+
++#ifdef HAVE_NTL
++#include<NTL/version.h>
++#if NTL_MAJOR_VERSION == 6
++
++#include<NTL/tools.h>
++#include<NTL/lzz_pE.h>
++#include<NTL/lzz_pEX.h>
++#include<NTL/lzz_p.h>
++#include<NTL/vector.h>
++#include<NTL/pair.h>
++#include<NTL/GF2X.h>
++#include<NTL/GF2EX.h>
++#include<NTL/ZZ.h>
++#include<NTL/ZZX.h>
++#include<NTL/ZZ_pX.h>
++#ifdef NTL_CLIENT // in <NTL/tools.h>: using of name space NTL
++NTL_CLIENT
++#endif
++template class Vec<zz_p>;
++template class Vec<zz_pE>;
++template class Mat<zz_p>;
++template class Mat<zz_pE>;
++template class Mat<ZZ>;
++template class Vec<Pair<zz_pEX, long> >;
++template class Vec<Pair<GF2EX, long> >;
++template class Vec<Pair<ZZX, long> >;
++template class Vec<Pair<ZZ_pX, long> >;
++template class Vec<Pair<GF2X, long> >;
++template void swap<zz_pE>(Vec<zz_pE>&, Vec<zz_pE>&);
++template long operator==<zz_p>(Vec<zz_p> const&, Vec<zz_p> const&);
++#endif
++
++#endif
diff --git a/sci-mathematics/singular/metadata.xml b/sci-mathematics/singular/metadata.xml
index ec150ef78eb2..936baecd730d 100644
--- a/sci-mathematics/singular/metadata.xml
+++ b/sci-mathematics/singular/metadata.xml
@@ -7,7 +7,6 @@
</maintainer>
<herd>sci-mathematics</herd>
<use>
- <flag name='boost'>Compile against external boost headers
- (<pkg>dev-libs/boost</pkg>)</flag>
+ <flag name='boost'>Compile against external boost headers (<pkg>dev-libs/boost</pkg>)</flag>
</use>
</pkgmetadata>
diff --git a/sci-mathematics/singular/singular-3.1.6.ebuild b/sci-mathematics/singular/singular-3.1.6.ebuild
new file mode 100644
index 000000000000..ba1372a4f72e
--- /dev/null
+++ b/sci-mathematics/singular/singular-3.1.6.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/singular-3.1.6.ebuild,v 1.1 2014/03/11 19:07:22 bicatali Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+
+inherit autotools eutils elisp-common flag-o-matic multilib prefix python-single-r1 versionator
+
+MY_PN=Singular
+MY_PV=$(replace_all_version_separators -)
+MY_DIR=$(get_version_component_range 1-3 ${MY_PV})
+# Note: Upstream's share tarball may not get updated on every release
+MY_SHARE_DIR="3-1-6"
+MY_PV_SHARE="${MY_PV}"
+
+DESCRIPTION="Computer algebra system for polynomial computations"
+HOMEPAGE="http://www.singular.uni-kl.de/"
+
+SRC_COM="http://www.mathematik.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/"
+SRC_URI="${SRC_COM}${MY_DIR}/${MY_PN}-${MY_PV}.tar.gz
+ ${SRC_COM}${MY_SHARE_DIR}/${MY_PN}-${MY_PV_SHARE}-share.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-linux"
+IUSE="boost doc emacs examples python readline test"
+
+RDEPEND="
+ dev-libs/gmp:0=
+ dev-libs/ntl:0=
+ emacs? ( >=virtual/emacs-22 )
+ readline? ( sys-libs/readline:0= )"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ boost? ( dev-libs/boost:0= )"
+
+# Upstream does not care about tests
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${MY_DIR}"
+
+pkg_setup() {
+ append-flags -fPIC
+ append-ldflags -fPIC
+ tc-export CC CPP CXX
+ use emacs && elisp-need-emacs 22
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare () {
+ epatch \
+ "${FILESDIR}"/${PN}-3.1.0-gentoo.patch \
+ "${FILESDIR}"/${PN}-3.1.0-emacs-22.patch \
+ "${FILESDIR}"/${PN}-3.0.4.4-nostrip.patch \
+ "${FILESDIR}"/${PN}-3.1.3.3-Minor.h.patch \
+ "${FILESDIR}"/${PN}-3.1.6-ntl6compat.patch \
+ "${FILESDIR}"/${PN}-3.1.6-factory_template_instantiation.patch
+ use python && epatch "${FILESDIR}"/${PN}-3.1.3.2-python.patch
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ epatch "${FILESDIR}"/${PN}-3.1.3.3-install_name.patch
+ eprefixify kernel/Makefile.in
+ eprefixify Singular/Makefile.in
+ fi
+
+ eprefixify kernel/feResource.cc
+
+ # The SLDFLAGS mangling prevents passing raw LDLAGS to gcc (see e.g. bug 414709)
+ sed -i \
+ -e "/CXXFLAGS/ s/--no-exceptions//g" \
+ -e "s/SLDFLAGS=-shared/SLDFLAGS=\"$(raw-ldflags) -shared\"\n\t \tSLDFLAGS2=\"${LDFLAGS} -shared\"/" \
+ -e "s/ SLDFLAGS=/ SLDFLAGS=\n SLDFLAGS2=/" \
+ -e "s/AC_SUBST(SLDFLAGS)/AC_SUBST(SLDFLAGS)\nAC_SUBST(SLDFLAGS2)/" \
+ "${S}"/Singular/configure.in || die
+
+ sed -i \
+ -e "s/@SLDFLAGS@/@SLDFLAGS@\nSLDFLAGS2\t= @SLDFLAGS2@/" \
+ -e "/\$(CXX).*SLDFLAGS/s/SLDFLAGS/SLDFLAGS2/" \
+ "${S}"/Singular/Makefile.in || die
+
+ # remove ntl sources for safety.
+ rm -r ntl || die
+
+ cd "${S}"/Singular || die "failed to cd into Singular/"
+
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ --prefix="${S}"/build \
+ --exec-prefix="${S}"/build \
+ --bindir="${S}"/build/bin \
+ --libdir="${S}"/build/lib \
+ --libexecdir="${S}"/build/lib \
+ --includedir="${S}"/build/include \
+ --with-apint=gmp \
+ --with-NTL \
+ --disable-doc \
+ --without-MP \
+ --without-flint \
+ --enable-factory \
+ --enable-libfac \
+ --enable-IntegerProgramming \
+ --enable-Singular \
+ --with-malloc=system \
+ $(use_with python python embed) \
+ $(use_with boost Boost) \
+ $(use_enable emacs) \
+ $(use_with readline)
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}/emacs/
+ elisp-compile *.el
+ fi
+}
+
+src_test() {
+ # Tests fail to link -lsingular, upstream ticket #243
+ emake test
+}
+
+src_install () {
+ dodoc README
+ # execs and libraries
+ cd "${S}"/build/bin
+ dobin ${MY_PN}* gen_test change_cost solve_IP toric_ideal LLL
+ insinto /usr/$(get_libdir)/${PN}
+ doins *.so
+
+ dosym ${MY_PN}-${MY_DIR} /usr/bin/${MY_PN}
+ dosym ${MY_PN}-${MY_DIR} /usr/bin/${PN}
+
+ # stuff from the share tar ball
+ cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}
+ insinto /usr/share/${PN}
+ doins -r LIB
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+ if use doc; then
+ dohtml -r html/*
+ insinto /usr/share/${PN}
+ doins doc/singular.idx
+ cp info/${PN}.hlp info/${PN}.info &&
+ doinfo info/${PN}.info
+ fi
+ if use emacs; then
+ elisp-install ${PN} emacs/*.el emacs/*.elc emacs/.emacs*
+ elisp-site-file-install "${FILESDIR}"/60${PN}-gentoo.el
+ fi
+}
+
+pkg_postinst() {
+ einfo "The authors ask you to register as a SINGULAR user."
+ einfo "Please check the license file for details."
+ if use emacs; then
+ echo
+ ewarn "Please note that the ESingular emacs wrapper has been"
+ ewarn "removed in favor of full fledged singular support within"
+ ewarn "Gentoo's emacs infrastructure; i.e. just fire up emacs"
+ ewarn "and you should be good to go! See bug #193411 for more info."
+ echo
+ fi
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}