1 |
commit: 402214f19fac15d127352556a0699df444331879 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 11 19:41:16 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 11 19:46:29 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=402214f1 |
7 |
|
8 |
sci-mathematics/pari: [QA] Move patches to distfiles |
9 |
|
10 |
Closes: https://bugs.gentoo.org/620628 |
11 |
|
12 |
sci-mathematics/pari/Manifest | 3 + |
13 |
.../files/pari-2.3.2-ppc-powerpc-arch-fix.patch | 11 - |
14 |
sci-mathematics/pari/files/pari-2.3.2-strip.patch | 11 - |
15 |
.../pari/files/pari-2.3.5-doc-make.patch | 46 -- |
16 |
.../pari/files/pari-2.3.5-no-dot-inc.patch | 61 -- |
17 |
.../pari/files/pari-2.5.0-doc-make.patch | 82 --- |
18 |
sci-mathematics/pari/files/pari-2.5.0-macos.patch | 21 - |
19 |
sci-mathematics/pari/files/pari-2.5.0-mp.c.patch | 23 - |
20 |
.../pari/files/pari-2.5.0-no-dot-inc.patch | 61 -- |
21 |
.../pari/files/pari-2.5.1-no-automagic.patch | 100 --- |
22 |
sci-mathematics/pari/files/pari-2.5.4-polred.patch | 754 --------------------- |
23 |
.../pari/files/pari-2.5.4-slow_determinant.patch | 100 --- |
24 |
.../pari/files/pari-2.7.0-doc-make.patch | 89 --- |
25 |
.../pari/files/pari-2.7.0-no-automagic.patch | 100 --- |
26 |
.../pari/files/pari-2.7.0-no-dot-inc.patch | 64 -- |
27 |
.../pari/files/pari-2.7.0-slow-discriminant.patch | 54 -- |
28 |
.../pari/files/pari-2.7.1-perl-5.22-doc.patch | 12 - |
29 |
sci-mathematics/pari/pari-2.3.5.ebuild | 9 +- |
30 |
sci-mathematics/pari/pari-2.5.4.ebuild | 21 +- |
31 |
sci-mathematics/pari/pari-2.7.1.ebuild | 17 +- |
32 |
20 files changed, 28 insertions(+), 1611 deletions(-) |
33 |
|
34 |
diff --git a/sci-mathematics/pari/Manifest b/sci-mathematics/pari/Manifest |
35 |
index c2317db8fd8..a78f8a17c5f 100644 |
36 |
--- a/sci-mathematics/pari/Manifest |
37 |
+++ b/sci-mathematics/pari/Manifest |
38 |
@@ -1,7 +1,10 @@ |
39 |
DIST elldata.tgz 14185595 BLAKE2B eb90a0e392eeeaad81b6b01ba4e8258aaf2a4b4a01950b18a0e91f176629aecc693453d8fe99b49a28f2dfbbb6fae1a06d7d4137cb13ced298e64e5aa4062f53 SHA512 dc13d1cacb98a6c2774936997452bd34ae198da9206fea69bc7cdd28240d0cdd07bb0ec1f14b8e97bea4321a60a6a6144464ab3b629be2e37dd76a73efaf43ef |
40 |
DIST galdata.tgz 53229 BLAKE2B 08f0a1be3c5252fbe534b2ed7e66b9bc8cddab807b7caf12b783aacc2e75de82dc000e762da2ec895d52424281234af121e1edfd84adf9f02c26c4e59d23e2f3 SHA512 bc89c8a42416e8ca25c356b7ad6d80ffcfff127e561fc338df87147a9e370ec71f7ae2eb6bef73d634cc7a8f18c794d7fd5ebfd0a042d3d356526a2eee28125a |
41 |
DIST nftables.tgz 8393731 BLAKE2B d33cbf1f52d3e8a040087da28014ab727b59c641d1a53c97d311a9d1613b59f6b317b7632e0fc89943bea0a507a737543890109b888707c4fb7879279549a2e9 SHA512 cccc62fb0f6d8c578a4e165a1f2daf3b87acbbc38377044ddd98e2901a8e0554a46c8714bad0f4f4e09107b0c0c8f43069b4ddf4fba9c7832bad65ce3c901183 |
42 |
+DIST pari-2.3.5-patchset.tar.bz2 1773 BLAKE2B 08358dcb7e353eb41a784a6daa9400b74b8f331a54eea8ef159fbbecdbed5d00955a821db20e3a4f7e254160cd600d0255d6648aa0e1b2b7aca9910d5cd17f1d SHA512 f616eac3049fea684413f8f221a1604a5e62ae2804207513fcfff513d8b162a3a4d1063dad059907682404ee30f840182d75e29a44b44cda4f80266b46f75364 |
43 |
DIST pari-2.3.5.tar.gz 2018097 BLAKE2B b5f4f8bc83cd77aceab791263e1a2f0294d0663d354fea454bad8cac3cdbac9c4c8381cc83bc947d518522701c36e94ce1d6862125a9bfd3b17b1a31c9baabc8 SHA512 0e49e6310b4c76ef3370786a13aa8cbc5bb0b7dc84ec1665866d623e6284f45db8584eea759e8b5954dc9b5c8a3e866e77a377d18073ed33f11708a7e88a4cca |
44 |
+DIST pari-2.5.4-patchset.tar.bz2 11050 BLAKE2B 0ea4727bb03045c7cda9b39cd429db8ea1b8d9e2656cf81fb4d401abc57803d8a6b4c538727f6744dd75c6b95530a0cca058cfdb0e85d4b9eaf39e7d43a14929 SHA512 5b70b6e15e651118c5dba339601eee1b8dfe55eb37f30d0b350d73eef33a4119ba366ba48fa171e450e27af2823b96d8006aadf0f994ae76002f98a76adcf6bb |
45 |
DIST pari-2.5.4.tar.gz 2721861 BLAKE2B 003113716c4aaea3836ee7f813ff4aacecb40e6c7d9119c0a6d6073f951e6c5fae887ee22d87d5c7d7320e0d873585f145dd14e7014075bf198143dde68325f9 SHA512 de2f0593682d638288908636d848489acf115f4858b91c574168db26c4ab7443465a21d1e6c43be19ecc57dcedcd883e5af72b65467a59a2c8811e4eec64e0b9 |
46 |
+DIST pari-2.7.1-patchset.tar.bz2 4318 BLAKE2B 881354eec4f89f7b7e0a1d53d5fa169b0ea0de3964baff454f2e7aca1b7bd2e7ffa2f404e4df7a8ff7a662aed3920e10df4a3a1d5d86967579c360869abce557 SHA512 1ff40adcf638230e1aca951b4fdb291cd4d2048ef66215de0ec157b9ec0040e28c115c2684056cf582695e66ee8363aa776a4a50f8654c8dde7bad490a47b304 |
47 |
DIST pari-2.7.1.tar.gz 3140893 BLAKE2B 0f5c69ac2decb0ac26f51de7843c282606f854c257b06d1596eb7f4157e8f64d65b65f887e2d9bb8b77cbdffdac0bb1902e373b1d44e457ac25993bc308d3e09 SHA512 ff32c181e6810af8a38f0dfe45b9f15d930923da5759c3e88595f56bf3c65ec0a79fdb9fb5f0e4ce0adb1ebc56a84e6b1606085057762073a85c0d1946857d5f |
48 |
DIST seadata.tgz 19214199 BLAKE2B cafb89905180ff481f578ff2cdb150b04533ecbccfa96d045bdb61e5fe2c230262f3459d31b11f049ad1e16ed9dd6fb734569ee621efa3831800cc3d99583e60 SHA512 393f2fae45964ad0921fcf417113e10b296cb4c3a0e0eec138c896827f43a5464c4b42a07313e0f3a4383e8df97912e2e359a4cd5225d014d7575e80c7dd996a |
49 |
|
50 |
diff --git a/sci-mathematics/pari/files/pari-2.3.2-ppc-powerpc-arch-fix.patch b/sci-mathematics/pari/files/pari-2.3.2-ppc-powerpc-arch-fix.patch |
51 |
deleted file mode 100644 |
52 |
index e3581c9de34..00000000000 |
53 |
--- a/sci-mathematics/pari/files/pari-2.3.2-ppc-powerpc-arch-fix.patch |
54 |
+++ /dev/null |
55 |
@@ -1,11 +0,0 @@ |
56 |
-diff -Naur pari-2.3.2/config/arch-osname pari-2.3.2.new/config/arch-osname |
57 |
---- pari-2.3.2/config/arch-osname 2006-02-15 05:12:59.000000000 -0500 |
58 |
-+++ pari-2.3.2.new/config/arch-osname 2007-11-26 00:17:17.000000000 -0500 |
59 |
-@@ -30,6 +30,7 @@ |
60 |
- osf1) case "$5" in alpha) arch=alpha;; esac;; |
61 |
- linux) arch=`uname -m` |
62 |
- case $arch in |
63 |
-+ ppc) arch=powerpc;; |
64 |
- sparc64) arch=sparcv9;; |
65 |
- parisc*) arch=hppa;; |
66 |
- sparc) case "`cat /proc/cpuinfo`" in |
67 |
|
68 |
diff --git a/sci-mathematics/pari/files/pari-2.3.2-strip.patch b/sci-mathematics/pari/files/pari-2.3.2-strip.patch |
69 |
deleted file mode 100644 |
70 |
index 0fee947fd55..00000000000 |
71 |
--- a/sci-mathematics/pari/files/pari-2.3.2-strip.patch |
72 |
+++ /dev/null |
73 |
@@ -1,11 +0,0 @@ |
74 |
---- config/Makefile.SH. 2007-10-01 23:45:45.000000000 +0200 |
75 |
-+++ config/Makefile.SH 2007-10-01 23:55:10.000000000 +0200 |
76 |
-@@ -208,7 +208,7 @@ |
77 |
- MV = mv -f |
78 |
- LN = $ln_s |
79 |
- CP_F = cp -f |
80 |
--STRIP = strip |
81 |
-+STRIP = true |
82 |
- STRIPFLAGS = |
83 |
- |
84 |
- # Change these installation directories to suit your needs. |
85 |
|
86 |
diff --git a/sci-mathematics/pari/files/pari-2.3.5-doc-make.patch b/sci-mathematics/pari/files/pari-2.3.5-doc-make.patch |
87 |
deleted file mode 100644 |
88 |
index 67edc8c70f1..00000000000 |
89 |
--- a/sci-mathematics/pari/files/pari-2.3.5-doc-make.patch |
90 |
+++ /dev/null |
91 |
@@ -1,46 +0,0 @@ |
92 |
---- config/DOC_Make.SH.orig 2010-09-21 21:24:56.655520480 +1200 |
93 |
-+++ config/DOC_Make.SH 2010-09-21 21:26:24.683520242 +1200 |
94 |
-@@ -30,23 +30,23 @@ |
95 |
- -rm -f libpari.std |
96 |
- pdftex libpari |
97 |
- pdftex libpari |
98 |
-- make libpari.std; pdftex libpari; rm -f libpari.std |
99 |
-+ \$(MAKE) libpari.std; pdftex libpari; rm -f libpari.std |
100 |
- libpari.dvi: \$(PARI_TEX) \$(MACROS) |
101 |
- -rm -f libpari.std |
102 |
- tex libpari |
103 |
- tex libpari |
104 |
-- make libpari.std; tex libpari; rm -f libpari.std |
105 |
-+ \$(MAKE) libpari.std; tex libpari; rm -f libpari.std |
106 |
- |
107 |
- develop.pdf: develop.tex \$(MACROS) |
108 |
- -rm -f develop.std |
109 |
- pdftex develop |
110 |
- pdftex develop |
111 |
-- make develop.std; pdftex develop; rm -f develop.std |
112 |
-+ \$(MAKE) develop.std; pdftex develop; rm -f develop.std |
113 |
- develop.dvi: develop.tex \$(MACROS) |
114 |
- -rm -f develop.std |
115 |
- tex develop |
116 |
- tex develop |
117 |
-- make develop.std; tex develop; rm -f develop.std |
118 |
-+ \$(MAKE) develop.std; tex develop; rm -f develop.std |
119 |
- |
120 |
- tutorial.pdf: tutorial.tex \$(MACROS) |
121 |
- -rm -f tutorial.std |
122 |
-@@ -74,13 +74,13 @@ |
123 |
- -rm -f users.std |
124 |
- tex users |
125 |
- tex users |
126 |
-- make users.std; tex users; rm -f users.std |
127 |
-+ \$(MAKE) users.std; tex users; rm -f users.std |
128 |
- |
129 |
- users.pdf: \$(USERS_TEX) |
130 |
- -rm -f users.std |
131 |
- pdftex users |
132 |
- pdftex users |
133 |
-- make users.std; pdftex users; rm -f users.std |
134 |
-+ \$(MAKE) users.std; pdftex users; rm -f users.std |
135 |
- |
136 |
- gpman: gp.1 |
137 |
- nroff -man gp.1 | unix2dos -ascii > gp.man |
138 |
|
139 |
diff --git a/sci-mathematics/pari/files/pari-2.3.5-no-dot-inc.patch b/sci-mathematics/pari/files/pari-2.3.5-no-dot-inc.patch |
140 |
deleted file mode 100644 |
141 |
index cd34851a30f..00000000000 |
142 |
--- a/sci-mathematics/pari/files/pari-2.3.5-no-dot-inc.patch |
143 |
+++ /dev/null |
144 |
@@ -1,61 +0,0 @@ |
145 |
-From 4f1e00df5ea1e51042146f6277bb1af02f249cc3 Mon Sep 17 00:00:00 2001 |
146 |
-From: Kent Fredric <kentfredric@×××××.com> |
147 |
-Date: Sun, 11 Jun 2017 10:31:03 +1200 |
148 |
-Subject: [PATCH] Fix for 5.26 removal of '.' in @INC |
149 |
- |
150 |
-Previous scripts assumed CWD was in @INC and that "PARI::822" was in |
151 |
-wherever CWD was. |
152 |
- |
153 |
-This fixes both of those, and the latter, because its not obvious |
154 |
-from the build system where one should assume CWD to be. |
155 |
- |
156 |
-Instead, the absolute path of the directory of these scripts is |
157 |
-inserted into @INC |
158 |
---- |
159 |
- src/desc/gen_member | 4 ++++ |
160 |
- src/desc/gen_proto | 4 ++++ |
161 |
- src/desc/merge_822 | 4 ++++ |
162 |
- 3 files changed, 12 insertions(+) |
163 |
- |
164 |
-diff --git a/src/desc/gen_member b/src/desc/gen_member |
165 |
-index 2f3cf52..66dea2b 100755 |
166 |
---- a/src/desc/gen_member |
167 |
-+++ b/src/desc/gen_member |
168 |
-@@ -1,4 +1,8 @@ |
169 |
- #!/usr/bin/perl -w |
170 |
-+use File::Spec; |
171 |
-+use File::Basename qw( dirname ); |
172 |
-+use lib dirname(File::Spec->rel2abs(__FILE__)); |
173 |
-+ |
174 |
- use PARI::822; |
175 |
- |
176 |
- $class='member_functions'; |
177 |
-diff --git a/src/desc/gen_proto b/src/desc/gen_proto |
178 |
-index 1b507fa..2fb4d3f 100755 |
179 |
---- a/src/desc/gen_proto |
180 |
-+++ b/src/desc/gen_proto |
181 |
-@@ -1,4 +1,8 @@ |
182 |
- #!/usr/bin/perl -w |
183 |
-+use File::Spec; |
184 |
-+use File::Basename qw( dirname ); |
185 |
-+use lib dirname(File::Spec->rel2abs(__FILE__)); |
186 |
-+ |
187 |
- use PARI::822; |
188 |
- |
189 |
- $class=$ARGV[0]; |
190 |
-diff --git a/src/desc/merge_822 b/src/desc/merge_822 |
191 |
-index a02d612..9ca8252 100755 |
192 |
---- a/src/desc/merge_822 |
193 |
-+++ b/src/desc/merge_822 |
194 |
-@@ -1,4 +1,8 @@ |
195 |
- #!/usr/bin/perl -w |
196 |
-+use File::Spec; |
197 |
-+use File::Basename qw( dirname ); |
198 |
-+use lib dirname(File::Spec->rel2abs(__FILE__)); |
199 |
-+ |
200 |
- use PARI::822; |
201 |
- |
202 |
- PARI::822::read(\%funcs,$_,1) |
203 |
--- |
204 |
-2.13.1 |
205 |
- |
206 |
|
207 |
diff --git a/sci-mathematics/pari/files/pari-2.5.0-doc-make.patch b/sci-mathematics/pari/files/pari-2.5.0-doc-make.patch |
208 |
deleted file mode 100644 |
209 |
index 0882da03e6a..00000000000 |
210 |
--- a/sci-mathematics/pari/files/pari-2.5.0-doc-make.patch |
211 |
+++ /dev/null |
212 |
@@ -1,82 +0,0 @@ |
213 |
---- config/DOC_Make.SH.orig 2011-07-28 14:11:34.430896929 +1200 |
214 |
-+++ config/DOC_Make.SH 2011-07-28 14:11:39.832738158 +1200 |
215 |
-@@ -21,7 +21,8 @@ |
216 |
- |
217 |
- doc all: develop.dvi libpari.dvi users.dvi refcard.ps tutorial.dvi |
218 |
- docps: develop.ps libpari.ps refcard.ps tutorial.ps users.ps INSTALL.ps |
219 |
--docpdf: develop.pdf libpari.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf |
220 |
-+#docpdf: develop.pdf libpari.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf |
221 |
-+docpdf: \$(PARI_TEX) \$(MACROS) pass1 pass2 indexing refcard.pdf INSTALL.pdf |
222 |
- |
223 |
- .SUFFIXES: .tex .ipf .pod .inf .dumbpod .3 .html |
224 |
- |
225 |
-@@ -37,27 +38,49 @@ |
226 |
- %.dvi: %.tex \$(MACROS) |
227 |
- tex \$< |
228 |
- |
229 |
-+pass1: \$(PARI_TEX) \$(USERS_TEX) develop.tex tutorial.tex \$(MACROS) |
230 |
-+ -rm -f *.std |
231 |
-+ pdftex libpari |
232 |
-+ pdftex develop |
233 |
-+ pdftex tutorial |
234 |
-+ pdftex users |
235 |
-+ |
236 |
-+pass2: pass1 |
237 |
-+ pdftex libpari |
238 |
-+ pdftex develop |
239 |
-+ pdftex tutorial |
240 |
-+ pdftex users |
241 |
-+ |
242 |
-+indexing: pass2 |
243 |
-+ \$(MAKE) libpari.std |
244 |
-+ \$(MAKE) develop.std |
245 |
-+ \$(MAKE) users.std |
246 |
-+ pdftex libpari |
247 |
-+ pdftex develop |
248 |
-+ pdftex users |
249 |
-+ -rm -f *.std |
250 |
-+ |
251 |
- libpari.pdf: \$(PARI_TEX) \$(MACROS) |
252 |
- -rm -f libpari.std |
253 |
- pdftex libpari |
254 |
- pdftex libpari |
255 |
-- make libpari.std; pdftex libpari; rm -f libpari.std |
256 |
-+ \$(MAKE) libpari.std; pdftex libpari; rm -f libpari.std |
257 |
- libpari.dvi: \$(PARI_TEX) \$(MACROS) |
258 |
- -rm -f libpari.std |
259 |
- tex libpari |
260 |
- tex libpari |
261 |
-- make libpari.std; tex libpari; rm -f libpari.std |
262 |
-+ \$(MAKE) libpari.std; tex libpari; rm -f libpari.std |
263 |
- |
264 |
- develop.pdf: develop.tex \$(MACROS) |
265 |
- -rm -f develop.std |
266 |
- pdftex develop |
267 |
- pdftex develop |
268 |
-- make develop.std; pdftex develop; rm -f develop.std |
269 |
-+ \$(MAKE)make develop.std; pdftex develop; rm -f develop.std |
270 |
- develop.dvi: develop.tex \$(MACROS) |
271 |
- -rm -f develop.std |
272 |
- tex develop |
273 |
- tex develop |
274 |
-- make develop.std; tex develop; rm -f develop.std |
275 |
-+ \$(MAKE) develop.std; tex develop; rm -f develop.std |
276 |
- |
277 |
- tutorial.pdf: tutorial.tex \$(MACROS) |
278 |
- -rm -f tutorial.std |
279 |
-@@ -85,13 +108,13 @@ |
280 |
- -rm -f users.std |
281 |
- tex users |
282 |
- tex users |
283 |
-- make users.std; tex users; rm -f users.std |
284 |
-+ \$(MAKE) users.std; tex users; rm -f users.std |
285 |
- |
286 |
- users.pdf: \$(USERS_TEX) |
287 |
- -rm -f users.std |
288 |
- pdftex users |
289 |
- pdftex users |
290 |
-- make users.std; pdftex users; rm -f users.std |
291 |
-+ \$(MAKE) users.std; pdftex users; rm -f users.std |
292 |
- |
293 |
- gpman: gp.1 |
294 |
- nroff -man gp.1 | unix2dos -ascii > gp.man |
295 |
|
296 |
diff --git a/sci-mathematics/pari/files/pari-2.5.0-macos.patch b/sci-mathematics/pari/files/pari-2.5.0-macos.patch |
297 |
deleted file mode 100644 |
298 |
index 1b407600937..00000000000 |
299 |
--- a/sci-mathematics/pari/files/pari-2.5.0-macos.patch |
300 |
+++ /dev/null |
301 |
@@ -1,21 +0,0 @@ |
302 |
---- config/get_dlld.orig 2011-07-28 14:27:13.341072367 +1200 |
303 |
-+++ config/get_dlld 2011-07-28 14:27:46.225178023 +1200 |
304 |
-@@ -94,7 +94,7 @@ |
305 |
- *) extra=;; |
306 |
- esac |
307 |
- case "$osname" in |
308 |
-- darwin) shared=-dynamiclib;; |
309 |
-+ darwin) shared="-dynamiclib -install_name \$(PURELIBDIR)/\$(LIBPARI_DYN)";; |
310 |
- *) shared=-shared;; |
311 |
- esac |
312 |
- DLLDFLAGS="$shared $extra \$(CFLAGS) \$(DLCFLAGS) $DLLDFLAGS" |
313 |
---- config/Makefile.SH.orig 2011-07-28 14:29:06.753681364 +1200 |
314 |
-+++ config/Makefile.SH 2011-07-28 14:29:10.589276933 +1200 |
315 |
-@@ -234,6 +234,7 @@ |
316 |
- # DESTDIR is used to install to a false hierachy (to build a Debian package) |
317 |
- INCLUDEDIR= "\$(DESTDIR)$includedir" |
318 |
- LIBDIR = "\$(DESTDIR)$libdir" |
319 |
-+PURELIBDIR= $libdir |
320 |
- BINDIR = "\$(DESTDIR)$bindir" |
321 |
- MANDIR = "\$(DESTDIR)$mandir" |
322 |
- DATADIR = "\$(DESTDIR)$datadir" |
323 |
|
324 |
diff --git a/sci-mathematics/pari/files/pari-2.5.0-mp.c.patch b/sci-mathematics/pari/files/pari-2.5.0-mp.c.patch |
325 |
deleted file mode 100644 |
326 |
index 0bcfffc0817..00000000000 |
327 |
--- a/sci-mathematics/pari/files/pari-2.5.0-mp.c.patch |
328 |
+++ /dev/null |
329 |
@@ -1,23 +0,0 @@ |
330 |
-Index: src/kernel/gmp/mp.c |
331 |
-=================================================================== |
332 |
---- src/kernel/gmp/mp.c (revision 13151) |
333 |
-+++ src/kernel/gmp/mp.c (working copy) |
334 |
-@@ -45,18 +45,8 @@ |
335 |
- /*We need PARI invmod renamed to invmod_pari*/ |
336 |
- #define INVMOD_PARI |
337 |
- |
338 |
--static void *gmp_realloc(void *ptr, size_t old_size, size_t new_size) { |
339 |
-- (void)old_size; return (void *) pari_realloc(ptr,new_size); |
340 |
--} |
341 |
-- |
342 |
--static void gmp_free(void *ptr, size_t old_size){ |
343 |
-- (void)old_size; pari_free(ptr); |
344 |
--} |
345 |
-- |
346 |
- int pari_kernel_init(void) |
347 |
- { |
348 |
-- /* Use pari_malloc instead of malloc */ |
349 |
-- mp_set_memory_functions((void *(*)(size_t)) pari_malloc, gmp_realloc, gmp_free); |
350 |
- return 0; |
351 |
- } |
352 |
- |
353 |
|
354 |
diff --git a/sci-mathematics/pari/files/pari-2.5.0-no-dot-inc.patch b/sci-mathematics/pari/files/pari-2.5.0-no-dot-inc.patch |
355 |
deleted file mode 100644 |
356 |
index e34fa6b352a..00000000000 |
357 |
--- a/sci-mathematics/pari/files/pari-2.5.0-no-dot-inc.patch |
358 |
+++ /dev/null |
359 |
@@ -1,61 +0,0 @@ |
360 |
-From 03df0cdd7228a412d2adfe9ee9c746b3ec69dd6b Mon Sep 17 00:00:00 2001 |
361 |
-From: Kent Fredric <kentfredric@×××××.com> |
362 |
-Date: Sun, 11 Jun 2017 10:31:03 +1200 |
363 |
-Subject: [PATCH] Fix for 5.26 removal of '.' in @INC |
364 |
- |
365 |
-Previous scripts assumed CWD was in @INC and that "PARI::822" was in |
366 |
-wherever CWD was. |
367 |
- |
368 |
-This fixes both of those, and the latter, because its not obvious |
369 |
-from the build system where one should assume CWD to be. |
370 |
- |
371 |
-Instead, the absolute path of the directory of these scripts is |
372 |
-inserted into @INC |
373 |
---- |
374 |
- src/desc/doc_make | 4 ++++ |
375 |
- src/desc/gen_proto | 4 ++++ |
376 |
- src/desc/merge_822 | 4 ++++ |
377 |
- 3 files changed, 12 insertions(+) |
378 |
- |
379 |
-diff --git a/src/desc/doc_make b/src/desc/doc_make |
380 |
-index 02dc90d..55296ed 100755 |
381 |
---- a/src/desc/doc_make |
382 |
-+++ b/src/desc/doc_make |
383 |
-@@ -1,4 +1,8 @@ |
384 |
- #!/usr/bin/perl |
385 |
-+use File::Spec; |
386 |
-+use File::Basename qw( dirname ); |
387 |
-+use lib dirname(File::Spec->rel2abs(__FILE__)); |
388 |
-+ |
389 |
- use PARI::822; |
390 |
- |
391 |
- PARI::822::read(\%funcs, "pari.desc"); |
392 |
-diff --git a/src/desc/gen_proto b/src/desc/gen_proto |
393 |
-index 38c2daf..ffb4276 100755 |
394 |
---- a/src/desc/gen_proto |
395 |
-+++ b/src/desc/gen_proto |
396 |
-@@ -1,4 +1,8 @@ |
397 |
- #!/usr/bin/perl -w |
398 |
-+use File::Spec; |
399 |
-+use File::Basename qw( dirname ); |
400 |
-+use lib dirname(File::Spec->rel2abs(__FILE__)); |
401 |
-+ |
402 |
- use PARI::822; |
403 |
- |
404 |
- $class=$ARGV[0]; |
405 |
-diff --git a/src/desc/merge_822 b/src/desc/merge_822 |
406 |
-index 4c9217b..32b3cc9 100755 |
407 |
---- a/src/desc/merge_822 |
408 |
-+++ b/src/desc/merge_822 |
409 |
-@@ -1,4 +1,8 @@ |
410 |
- #!/usr/bin/perl -w |
411 |
-+use File::Spec; |
412 |
-+use File::Basename qw( dirname ); |
413 |
-+use lib dirname(File::Spec->rel2abs(__FILE__)); |
414 |
-+ |
415 |
- use PARI::822; |
416 |
- |
417 |
- open(IN, $ARGV[0]) || die "cannot find $ARGV[0]"; |
418 |
--- |
419 |
-2.13.1 |
420 |
- |
421 |
|
422 |
diff --git a/sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch b/sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch |
423 |
deleted file mode 100644 |
424 |
index 8fee1f7eaf7..00000000000 |
425 |
--- a/sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch |
426 |
+++ /dev/null |
427 |
@@ -1,100 +0,0 @@ |
428 |
-diff -Nur pari-2.5.1.orig/config/get_config_options pari-2.5.1/config/get_config_options |
429 |
---- pari-2.5.1.orig/config/get_config_options 2012-08-01 18:32:03.000000000 +0100 |
430 |
-+++ pari-2.5.1/config/get_config_options 2012-08-01 20:57:09.000000000 +0100 |
431 |
-@@ -83,10 +83,12 @@ |
432 |
- --with-ncurses-lib=*|--with-ncurses=*) |
433 |
- with_ncurses_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
434 |
- |
435 |
-+ --without-qt|--with-qt=no) without_qt=yes ;; |
436 |
- --with-qt) with_qt=yes ;; |
437 |
- --with-qt=*) |
438 |
- with_qt=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
439 |
- |
440 |
-+ --without-fltk|--with-fltk=no) without_fltk=yes ;; |
441 |
- --with-fltk) with_fltk=yes ;; |
442 |
- --with-fltk=*) |
443 |
- with_fltk=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
444 |
-@@ -158,7 +160,9 @@ |
445 |
- --with-gmp-lib=DIR specify location of gmp libs |
446 |
- |
447 |
- --with-qt[=DIR] use the Qt graphical library [prefix for Qt dir.] |
448 |
-+ --without-qt do not try to use the Qt lib |
449 |
- --with-fltk[=DIR] use the FLTK graphical library [prefix for FLTK dir.] |
450 |
-+ --without-fltk do not try to use the FLTK lib |
451 |
- |
452 |
- EOT |
453 |
- exit 1 |
454 |
-diff -Nur pari-2.5.1.orig/config/get_fltk pari-2.5.1/config/get_fltk |
455 |
---- pari-2.5.1.orig/config/get_fltk 2012-08-01 18:32:03.000000000 +0100 |
456 |
-+++ pari-2.5.1/config/get_fltk 2012-08-01 22:28:23.000000000 +0100 |
457 |
-@@ -2,6 +2,9 @@ |
458 |
- with_fltk=yes |
459 |
- fi |
460 |
- FLTKDIR= |
461 |
-+if test -z "$without_fltk; then |
462 |
-+ FLTKDIR="`fltk-config --prefix 2>/dev/null`" |
463 |
-+fi |
464 |
- case "$with_fltk" in |
465 |
- yes) |
466 |
- pth=$libpth; lib=fltk; . ./locatelib |
467 |
-diff -Nur pari-2.5.1.orig/config/get_graphic_lib pari-2.5.1/config/get_graphic_lib |
468 |
---- pari-2.5.1.orig/config/get_graphic_lib 2012-08-01 18:32:03.000000000 +0100 |
469 |
-+++ pari-2.5.1/config/get_graphic_lib 2012-08-01 22:16:57.000000000 +0100 |
470 |
-@@ -11,6 +11,7 @@ |
471 |
- else |
472 |
- if test -n "$with_fltk"; then which_graphic_lib=fltk; fi |
473 |
- if test -n "$with_qt"; then which_graphic_lib=Qt; fi |
474 |
-+ if test -n "$without_fltk" -a -n "$without_qt"; then which_graphic_lib=none; fi |
475 |
- if test "$which_graphic_lib" != none; then |
476 |
- case $osname in |
477 |
- mingw) case $which_graphic_lib in |
478 |
-@@ -41,7 +42,7 @@ |
479 |
- case $which_graphic_lib in |
480 |
- auto|fltk) |
481 |
- . ./get_fltk # FLTKDIR, FLTK_LIBS |
482 |
-- if test -z "$FLTKDIR"; then |
483 |
-+ if test -z "`fltk-config --ldflags 2> /dev/null`"; then |
484 |
- case $which_graphic_lib in fltk) which_graphic_lib=none;; esac |
485 |
- else |
486 |
- which_graphic_lib=fltk |
487 |
-diff -Nur pari-2.5.1.orig/config/get_Qt pari-2.5.1/config/get_Qt |
488 |
---- pari-2.5.1.orig/config/get_Qt 2012-08-01 18:32:03.000000000 +0100 |
489 |
-+++ pari-2.5.1/config/get_Qt 2012-08-01 20:39:28.000000000 +0100 |
490 |
-@@ -5,7 +5,7 @@ |
491 |
- case "$with_qt" in |
492 |
- yes) |
493 |
- pth="/usr/local/lib /usr/local/share /usr/lib /usr/share" |
494 |
-- QTDIR=`locatedir qt4/bin $pth` |
495 |
-+ QTDIR=`locatedir qt4 $pth` |
496 |
- QTLIB="-lQtCore -lQtGui" |
497 |
- which_graphic_lib=Qt4 |
498 |
- if test -z "$QTDIR"; then |
499 |
-diff -Nur pari-2.5.1.orig/config/Makefile.SH pari-2.5.1/config/Makefile.SH |
500 |
---- pari-2.5.1.orig/config/Makefile.SH 2012-08-01 18:32:03.000000000 +0100 |
501 |
-+++ pari-2.5.1/config/Makefile.SH 2012-08-01 21:08:20.000000000 +0100 |
502 |
-@@ -65,12 +65,12 @@ |
503 |
- PLOTLIBS="-L\$(QTDIR)/lib $QTLIB" |
504 |
- graph=plotQt;; |
505 |
- Qt4) |
506 |
-- PLOTCFLAGS='-D__FANCY_WIN__ -I$(QTDIR)/include' |
507 |
-- PLOTLIBS="-L\$(QTDIR)/lib $QTLIB" |
508 |
-+ PLOTCFLAGS='-D__FANCY_WIN__ `pkg-config --cflags QtGui`' |
509 |
-+ PLOTLIBS="`pkg-config --libs QtGui`" |
510 |
- graph=plotQt4;; |
511 |
- fltk) |
512 |
-- PLOTCFLAGS="-I\$(FLTKDIR)/include $X11_INC" |
513 |
-- PLOTLIBS="-L\$(FLTKDIR)/lib -lfltk $FLTK_LIBS" |
514 |
-+ PLOTCFLAGS="`fltk-config --cxxflags` $X11_INC" |
515 |
-+ PLOTLIBS="`fltk-config --ldflags`" |
516 |
- postconfig='-fltk-config --post ' |
517 |
- graph=plotfltk;; |
518 |
- win32) |
519 |
-@@ -254,7 +254,7 @@ |
520 |
- GMPINCLUDE = $GMPINCLUDE |
521 |
- # Graphic library. |
522 |
- QTDIR = "$QTDIR" |
523 |
--MOC = \$(QTDIR)/bin/moc |
524 |
-+MOC = "`which moc`" |
525 |
- PLOTCFLAGS = $PLOTCFLAGS |
526 |
- PLOTLIBS = $PLOTLIBS |
527 |
- CPLUSPLUS = g++ |
528 |
|
529 |
diff --git a/sci-mathematics/pari/files/pari-2.5.4-polred.patch b/sci-mathematics/pari/files/pari-2.5.4-polred.patch |
530 |
deleted file mode 100644 |
531 |
index 4287c9d35d6..00000000000 |
532 |
--- a/sci-mathematics/pari/files/pari-2.5.4-polred.patch |
533 |
+++ /dev/null |
534 |
@@ -1,754 +0,0 @@ |
535 |
-diff -ru src/src/basemath/base1.c b/src/basemath/base1.c |
536 |
---- src/src/basemath/base1.c 2013-05-06 16:01:56.000000000 +0200 |
537 |
-+++ b/src/basemath/base1.c 2013-05-06 16:49:09.042406927 +0200 |
538 |
-@@ -1675,40 +1675,42 @@ |
539 |
- ZX_is_better(GEN y, GEN x, GEN *dx) |
540 |
- { |
541 |
- GEN d = ZX_disc(y); |
542 |
-- long cmp = absi_cmp(d, *dx); |
543 |
-+ int cmp; |
544 |
-+ if (!*dx) *dx = ZX_disc(x); |
545 |
-+ cmp = absi_cmp(d, *dx); |
546 |
- if (cmp < 0) { *dx = d; return 1; } |
547 |
- if (cmp == 0) return cmp_abs_ZX(y, x) < 0; |
548 |
- return 0; |
549 |
- } |
550 |
- |
551 |
--static GEN polred_aux(nfbasic_t *T, GEN *pro, long flag); |
552 |
-+static void polredbest_aux(nfbasic_t *T, GEN *pro, GEN *px, GEN *pdx, GEN *pa); |
553 |
- /* Seek a simpler, polynomial pol defining the same number field as |
554 |
- * x (assumed to be monic at this point) */ |
555 |
- static GEN |
556 |
- nfpolred(nfbasic_t *T, GEN *pro) |
557 |
- { |
558 |
-- GEN x = T->x, dx = T->dx, a, z, rev, pow, dpow; |
559 |
-+ GEN x = T->x, dx, b, rev, pow, dpow; |
560 |
- long i, n = degpol(x), v = varn(x); |
561 |
- |
562 |
- if (n == 1) { |
563 |
- T->x = deg1pol_shallow(gen_1, gen_m1, v); |
564 |
- *pro = NULL; return pol_1(v); |
565 |
- } |
566 |
-- z = polred_aux(T, pro, nf_ORIG | nf_RED); |
567 |
-- if (typ(z) != t_VEC || !ZX_is_better(gel(z,1),x,&dx)) |
568 |
-- return NULL; /* no improvement */ |
569 |
-- |
570 |
-- rev = QXQ_reverse(gel(z,2), x); |
571 |
-- x = gel(z,1); if (DEBUGLEVEL>1) err_printf("xbest = %Ps\n",x); |
572 |
-+ polredbest_aux(T, pro, &x, &dx, &b); |
573 |
-+ if (x == T->x) return NULL; /* no improvement */ |
574 |
-+ if (DEBUGLEVEL>1) err_printf("xbest = %Ps\n",x); |
575 |
- |
576 |
- /* update T */ |
577 |
-+ rev = QXQ_reverse(b, T->x); |
578 |
- pow = QXQ_powers(rev, n-1, x); |
579 |
- pow = Q_remove_denom(pow, &dpow); |
580 |
-- a = T->bas; |
581 |
-- for (i=2; i<=n; i++) gel(a,i) = QX_ZXQV_eval(gel(a,i), pow, dpow); |
582 |
-+ for (i=2; i<=n; i++) gel(T->bas,i) = QX_ZXQV_eval(gel(T->bas,i), pow, dpow); |
583 |
- (void)Z_issquareall(diviiexact(dx,T->dK), &(T->index)); |
584 |
-- T->basden = get_bas_den(a); |
585 |
-- T->dx = dx; T->x = x; *pro = NULL; return rev; |
586 |
-+ T->basden = get_bas_den(T->bas); |
587 |
-+ T->dx = dx; |
588 |
-+ T->x = x; |
589 |
-+ *pro = NULL; /* reset */ |
590 |
-+ return rev; |
591 |
- } |
592 |
- |
593 |
- /* let bas a t_VEC of QX giving a Z-basis of O_K. Return the index of the |
594 |
-@@ -1776,7 +1778,7 @@ |
595 |
- x = Q_primpart(x); |
596 |
- RgX_check_ZX(x, "nfinit"); |
597 |
- if (!ZX_is_irred(x)) pari_err(redpoler, "nfinit"); |
598 |
-- if (flag & nf_RED || !gequal1(gel(x,lg(x)-1))) |
599 |
-+ if (flag & nf_RED || !equali1(gel(x,lg(x)-1))) |
600 |
- x = ZX_Q_normalize(x, &(T->lead)); |
601 |
- nfmaxord(&S, x, flag, fa); |
602 |
- index = S.index; |
603 |
-@@ -1822,26 +1824,32 @@ |
604 |
- nfinitall(GEN x, long flag, long prec) |
605 |
- { |
606 |
- const pari_sp av = avma; |
607 |
-- GEN nf; |
608 |
-+ GEN nf, lead; |
609 |
- nfbasic_t T; |
610 |
- |
611 |
- nfbasic_init(x, flag, NULL, &T); |
612 |
- nfbasic_add_disc(&T); /* more expensive after set_LLL_basis */ |
613 |
-- if (T.lead != gen_1 && !(flag & nf_RED)) |
614 |
-+ lead = T.lead; |
615 |
-+ if (lead != gen_1 && !(flag & nf_RED)) |
616 |
- { |
617 |
- pari_warn(warner,"non-monic polynomial. Result of the form [nf,c]"); |
618 |
- flag |= nf_RED | nf_ORIG; |
619 |
- } |
620 |
- if (flag & nf_RED) |
621 |
- { |
622 |
-- GEN ro, rev = nfpolred(&T, &ro); |
623 |
-+ GEN ro, rev; |
624 |
-+ /* lie to polred: more efficient to update *after* modreverse, than to |
625 |
-+ * unscale in the polred subsystem */ |
626 |
-+ T.lead = gen_1; |
627 |
-+ rev = nfpolred(&T, &ro); |
628 |
- nf = nfbasic_to_nf(&T, ro, prec); |
629 |
- if (flag & nf_ORIG) |
630 |
- { |
631 |
- if (!rev) rev = pol_x(varn(T.x)); /* no improvement */ |
632 |
-- if (T.lead != gen_1) rev = RgX_Rg_div(rev, T.lead); |
633 |
-+ if (lead != gen_1) rev = RgX_Rg_div(rev, lead); |
634 |
- nf = mkvec2(nf, mkpolmod(rev, T.x)); |
635 |
- } |
636 |
-+ T.lead = lead; /* restore */ |
637 |
- } else { |
638 |
- GEN ro; set_LLL_basis(&T, &ro, 0.99); |
639 |
- nf = nfbasic_to_nf(&T, ro, prec); |
640 |
-@@ -1948,7 +1956,7 @@ |
641 |
- get_polchar(CG_data *d, GEN x) |
642 |
- { return get_pol(d, RgM_RgC_mul(d->ZKembed,x)); } |
643 |
- |
644 |
--/* return a defining polynomial for Q(w_i) */ |
645 |
-+/* return a defining polynomial for Q(w_k) */ |
646 |
- static GEN |
647 |
- get_polmin_w(CG_data *d, long k) |
648 |
- { |
649 |
-@@ -1956,6 +1964,22 @@ |
650 |
- if (g) (void)ZX_gcd_all(g, ZX_deriv(g), &g); |
651 |
- return g; |
652 |
- } |
653 |
-+/* return a defining polynomial for Q(w_k+w_l) */ |
654 |
-+static GEN |
655 |
-+get_polmin_add2(CG_data *d, long k, long l) |
656 |
-+{ |
657 |
-+ GEN g = get_pol(d, RgV_add(gel(d->ZKembed,k), gel(d->ZKembed,l))); |
658 |
-+ if (g) (void)ZX_gcd_all(g, ZX_deriv(g), &g); |
659 |
-+ return g; |
660 |
-+} |
661 |
-+/* return a defining polynomial for Q(w_k-w_l) */ |
662 |
-+static GEN |
663 |
-+get_polmin_sub2(CG_data *d, long k, long l) |
664 |
-+{ |
665 |
-+ GEN g = get_pol(d, RgV_sub(gel(d->ZKembed,k), gel(d->ZKembed,l))); |
666 |
-+ if (g) (void)ZX_gcd_all(g, ZX_deriv(g), &g); |
667 |
-+ return g; |
668 |
-+} |
669 |
- |
670 |
- /* does x generate the correct field ? */ |
671 |
- static GEN |
672 |
-@@ -2044,13 +2068,67 @@ |
673 |
- d->v = varn(T->x); |
674 |
- d->r1= T->r1; return prec; |
675 |
- } |
676 |
-+static void |
677 |
-+update(GEN *pai, GEN *pch, nfbasic_t *T, long orig) |
678 |
-+{ |
679 |
-+ GEN ch = *pch, ai = *pai; |
680 |
-+ if (!ch) |
681 |
-+ { /* accuracy too low, compute algebraically */ |
682 |
-+ ch = ZXQ_charpoly(ai, T->x, varn(T->x)); |
683 |
-+ (void)ZX_gcd_all(ch, ZX_deriv(ch), &ch); |
684 |
-+ } |
685 |
-+ if (ZX_canon_neg(ch) && orig) ai = RgX_neg(ai); |
686 |
-+ if (DEBUGLEVEL>3) err_printf("polred: generator %Ps\n", ch); |
687 |
-+ if (T->lead != gen_1 && orig) ai = RgX_unscale(ai, ginv(T->lead)); |
688 |
-+ *pch = ch; *pai = ai; |
689 |
-+} |
690 |
-+static GEN |
691 |
-+findmindisc(GEN y, GEN *pa) |
692 |
-+{ |
693 |
-+ GEN a = *pa, x = gel(y,1), b = gel(a,1), dx = NULL; |
694 |
-+ long i, l = lg(y); |
695 |
-+ for (i = 2; i < l; i++) |
696 |
-+ { |
697 |
-+ GEN yi = gel(y,i); |
698 |
-+ if (ZX_is_better(yi,x,&dx)) { x = yi; b = gel(a,i); } |
699 |
-+ } |
700 |
-+ *pa = b; return x; |
701 |
-+} |
702 |
-+/* filter [y,b] from polred_aux: keep a single polynomial of degree n in y |
703 |
-+ * [ the best wrt discriminant ordering ], but keep all non-primitive |
704 |
-+ * polynomials */ |
705 |
-+static void |
706 |
-+filter(GEN y, GEN b, long n) |
707 |
-+{ |
708 |
-+ GEN x, a, dx; |
709 |
-+ long i, k = 1, l = lg(y); |
710 |
-+ a = x = dx = NULL; |
711 |
-+ for (i = 1; i < l; i++) |
712 |
-+ { |
713 |
-+ GEN yi = gel(y,i), ai = gel(b,i); |
714 |
-+ if (degpol(yi) == n) |
715 |
-+ { |
716 |
-+ if (dx && !ZX_is_better(yi,x,&dx)) continue; |
717 |
-+ if (!dx) dx = ZX_disc(yi); |
718 |
-+ x = yi; a = ai; continue; |
719 |
-+ } |
720 |
-+ gel(y,k) = yi; |
721 |
-+ gel(b,k) = ai; k++; |
722 |
-+ } |
723 |
-+ if (dx) |
724 |
-+ { |
725 |
-+ gel(y,k) = x; |
726 |
-+ gel(b,k) = a; k++; |
727 |
-+ } |
728 |
-+ setlg(y, k); |
729 |
-+ setlg(b, k); |
730 |
-+} |
731 |
-+ |
732 |
- static GEN |
733 |
--polred_aux(nfbasic_t *T, GEN *pro, long flag) |
734 |
-+polred_aux(nfbasic_t *T, GEN *pro, long orig) |
735 |
- { |
736 |
- GEN b, y, x = T->x; |
737 |
-- long i, v = varn(x), l = lg(T->bas); |
738 |
-- const long orig = flag & nf_ORIG; |
739 |
-- const long nfred = flag & nf_RED; |
740 |
-+ long maxi, i, j, k, v = varn(x), n = lg(T->bas)-1; |
741 |
- nffp_t F; |
742 |
- CG_data d; |
743 |
- |
744 |
-@@ -2058,27 +2136,41 @@ |
745 |
- *pro = F.ro; |
746 |
- d.ZKembed = F.M; |
747 |
- |
748 |
-- y = cgetg(l, t_VEC); |
749 |
-- b = cgetg(l, t_COL); |
750 |
-+ /* n + 2 sum_{1 <= i <= n} n-i = n + n(n-1) = n*n */ |
751 |
-+ y = cgetg(n*n + 1, t_VEC); |
752 |
-+ b = cgetg(n*n + 1, t_COL); |
753 |
-+ /* i = 1 */ |
754 |
- gel(y,1) = deg1pol_shallow(gen_1, gen_m1, v); |
755 |
- gel(b,1) = gen_1; |
756 |
-- for (i = 2; i < l; i++) |
757 |
-+ for (i = k = 2; i <= n; i++) |
758 |
- { |
759 |
-- GEN ch, ai = gel(T->bas,i); |
760 |
-+ GEN ch, ai; |
761 |
-+ ai = gel(T->bas,i); |
762 |
- ch = get_polmin_w(&d, i); |
763 |
-- /* if accuracy too low, compute algebraically */ |
764 |
-- if (!ch) |
765 |
-+ update(&ai, &ch, T, orig); |
766 |
-+ gel(y,k) = ch; |
767 |
-+ gel(b,k) = ai; k++; |
768 |
-+ } |
769 |
-+ k = i; |
770 |
-+ maxi = minss(n, 3); |
771 |
-+ for (i = 1; i <= maxi; i++) |
772 |
-+ for (j = i+1; j <= n; j++) |
773 |
- { |
774 |
-- ch = ZXQ_charpoly(ai, x, v); |
775 |
-- (void)ZX_gcd_all(ch, ZX_deriv(ch), &ch); |
776 |
-+ GEN ch, ai; |
777 |
-+ ai = gadd(gel(T->bas,i), gel(T->bas,j)); |
778 |
-+ ch = get_polmin_add2(&d, i, j); |
779 |
-+ update(&ai, &ch, T, orig); |
780 |
-+ gel(y,k) = ch; |
781 |
-+ gel(b,k) = ai; k++; |
782 |
-+ |
783 |
-+ ai = gsub(gel(T->bas,i), gel(T->bas,j)); |
784 |
-+ ch = get_polmin_sub2(&d, i, j); |
785 |
-+ update(&ai, &ch, T, orig); |
786 |
-+ gel(y,k) = ch; |
787 |
-+ gel(b,k) = ai; k++; |
788 |
- } |
789 |
-- if (ZX_canon_neg(ch) && orig) ai = RgX_neg(ai); |
790 |
-- if (nfred && degpol(ch) == l-1) return mkvec2(ch, ai); |
791 |
-- if (DEBUGLEVEL>3) err_printf("polred: generator %Ps\n", ch); |
792 |
-- if (T->lead != gen_1 && orig) ai = RgX_unscale(ai, ginv(T->lead)); |
793 |
-- gel(y,i) = ch; |
794 |
-- gel(b,i) = ai; |
795 |
-- } |
796 |
-+ setlg(y, k); |
797 |
-+ setlg(b, k); filter(y, b, n); |
798 |
- if (!orig) return gen_sort_uniq(y, (void*)cmpii, &gen_cmp_RgX); |
799 |
- (void)sort_factor_pol(mkmat2(y, b), cmpii); |
800 |
- settyp(y, t_COL); return mkmat2(b, y); |
801 |
-@@ -2089,10 +2181,58 @@ |
802 |
- { |
803 |
- pari_sp av = avma; |
804 |
- GEN ro; |
805 |
-- nfbasic_t T; nfbasic_init(x, flag & (nf_PARTIALFACT|nf_RED), fa, &T); |
806 |
-+ nfbasic_t T; nfbasic_init(x, flag & nf_PARTIALFACT, fa, &T); |
807 |
- return gerepilecopy(av, polred_aux(&T, &ro, flag & nf_ORIG)); |
808 |
- } |
809 |
- |
810 |
-+/* finds "best" polynomial in polred_aux list, defaulting to T->x if none of |
811 |
-+ * them is primitive. *px is the ZX, characteristic polynomial of *pb, *pdx |
812 |
-+ * its discriminant. |
813 |
-+ * Set *pro = polroots(T->x) [ NOT *px ], in case caller needs it. */ |
814 |
-+static void |
815 |
-+polredbest_aux(nfbasic_t *T, GEN *pro, GEN *px, GEN *pdx, GEN *pb) |
816 |
-+{ |
817 |
-+ GEN a, v, y, x = T->x, b = pol_x(varn(x)); /* default values */ |
818 |
-+ long i, l, n = degpol(x); |
819 |
-+ v = polred_aux(T, pro, nf_ORIG); |
820 |
-+ *pdx = T->dx; |
821 |
-+ y = gel(v,2); |
822 |
-+ a = gel(v,1); l = lg(a); |
823 |
-+ for (i=1; i<l; i++) |
824 |
-+ { |
825 |
-+ GEN yi = gel(y,i); |
826 |
-+ pari_sp av = avma; |
827 |
-+ if (degpol(yi) == n && ZX_is_better(yi,x,pdx)) { x = yi; b = gel(a,i); } |
828 |
-+ else avma = av; |
829 |
-+ } |
830 |
-+ *px = x; |
831 |
-+ *pb = b; |
832 |
-+} |
833 |
-+GEN |
834 |
-+polredbest(GEN x, long flag) |
835 |
-+{ |
836 |
-+ pari_sp av = avma; |
837 |
-+ GEN dx, ro, b; |
838 |
-+ long fl; |
839 |
-+ nfbasic_t T; |
840 |
-+ switch(flag) |
841 |
-+ { |
842 |
-+ default: pari_err(talker, "invalid flag in polredbest()"); |
843 |
-+ case 0: fl = nf_PARTIALFACT; break; |
844 |
-+ case 1: fl = nf_PARTIALFACT|nf_ORIG; break; |
845 |
-+ } |
846 |
-+ nfbasic_init(x, fl, NULL, &T); |
847 |
-+ polredbest_aux(&T, &ro, &x, &dx, &b); |
848 |
-+ if (flag) |
849 |
-+ { |
850 |
-+ if (x == T.x) |
851 |
-+ b = pol_x(varn(x)); /* no improvement */ |
852 |
-+ else |
853 |
-+ b = QXQ_reverse(b, T.x); |
854 |
-+ x = mkvec2(x, mkpolmod(b,x)); |
855 |
-+ } |
856 |
-+ return gerepilecopy(av, x); |
857 |
-+} |
858 |
- /* FIXME: backward compatibility */ |
859 |
- GEN |
860 |
- polred0(GEN x, long flag, GEN fa) |
861 |
-@@ -2273,22 +2413,6 @@ |
862 |
- return bound; |
863 |
- } |
864 |
- |
865 |
--static GEN |
866 |
--findmindisc(GEN y, GEN *pa) |
867 |
--{ |
868 |
-- GEN a = *pa, x = gel(y,1), b = gel(a,1), dx; |
869 |
-- long i, l = lg(y); |
870 |
-- |
871 |
-- if (l == 2) { *pa = b; return x; } |
872 |
-- dx = ZX_disc(x); |
873 |
-- for (i = 2; i < l; i++) |
874 |
-- { |
875 |
-- GEN yi = gel(y,i); |
876 |
-- if (ZX_is_better(yi,x,&dx)) { x = yi; b = gel(a,i); } |
877 |
-- } |
878 |
-- *pa = b; return x; |
879 |
--} |
880 |
-- |
881 |
- /* z "small" minimal polynomial of Mod(a,x), deg z = deg x */ |
882 |
- static GEN |
883 |
- store(GEN x, GEN z, GEN a, nfbasic_t *T, long flag, GEN u) |
884 |
-@@ -2355,7 +2479,7 @@ |
885 |
- GEN y, a, u; |
886 |
- nfbasic_t T; |
887 |
- |
888 |
-- nfbasic_init(x, flag & (nf_PARTIALFACT|nf_RED), NULL, &T); |
889 |
-+ nfbasic_init(x, flag & nf_PARTIALFACT, NULL, &T); |
890 |
- x = T.x; vx = varn(x); |
891 |
- |
892 |
- if (degpol(x) == 1) |
893 |
-diff -ru src/src/functions/number_fields/polredabs b/src/functions/number_fields/polredabs |
894 |
---- src/src/functions/number_fields/polredabs 2013-05-06 16:01:57.000000000 +0200 |
895 |
-+++ b/src/functions/number_fields/polredabs 2013-05-06 16:47:04.542393431 +0200 |
896 |
-@@ -17,8 +17,8 @@ |
897 |
- \misctitle{Warning} This routine uses an exponential-time algorithm to |
898 |
- enumerate all potential generators, and may be exceedingly slow when the |
899 |
- number field has many subfields, hence a lot of elements of small $T_2$-norm. |
900 |
-- E.g. do not try it on the compositum of many quadratic fields; in that case, |
901 |
-- use \tet{polred} instead. |
902 |
-+ The function \tet{polredbest} is in general much faster (it runs in |
903 |
-+ polynomial time), and tends to return polynomials with smaller discriminants. |
904 |
- |
905 |
- The binary digits of $\fl$ mean |
906 |
- |
907 |
-@@ -38,6 +38,15 @@ |
908 |
- (has at most one large prime factor not in the \kbd{addprimes} table), the |
909 |
- result is the same. |
910 |
- |
911 |
-+ \bprog |
912 |
-+ ? T = x^16 - 136*x^14 + 6476*x^12 - 141912*x^10 + 1513334*x^8 - 7453176*x^6 + 13950764*x^4 - 5596840*x^2 + 46225 |
913 |
-+ ? T1 = polredabs(T); T2 = polredbest(T); |
914 |
-+ ? [ norml2(polroots(T1)), norml2(polroots(T2)) ] |
915 |
-+ %3 = [88.0000000, 120.000000] |
916 |
-+ ? [ sizedigit(poldisc(T1)), sizedigit(poldisc(T2)) ] |
917 |
-+ %4 = [75, 67] |
918 |
-+ @eprog |
919 |
-+ |
920 |
- Variant: Instead of the above hardcoded numerical flags, one should use an |
921 |
- or-ed combination of |
922 |
- |
923 |
-diff -ruN src/src/functions/number_fields/polredbest b/src/functions/number_fields/polredbest |
924 |
---- src/src/functions/number_fields/polredbest 1970-01-01 01:00:00.000000000 +0100 |
925 |
-+++ b/src/functions/number_fields/polredbest 2013-01-31 14:49:05.547513332 +0100 |
926 |
-@@ -0,0 +1,21 @@ |
927 |
-+Function: polredbest |
928 |
-+Section: number_fields |
929 |
-+C-Name: polredbest |
930 |
-+Prototype: GD0,L, |
931 |
-+Help: polredbest(T,{flag=0}): reduction of the polynomial T (gives minimal |
932 |
-+ polynomials only). If flag=1, gives also elements. |
933 |
-+Doc: finds a polynomial with reasonably |
934 |
-+ small coefficients defining the same number field as $T$. |
935 |
-+ All $T$ accepted by \tet{nfinit} are also allowed here (e.g. non-monic |
936 |
-+ polynomials, \kbd{nf}, \kbd{bnf}, \kbd{[T,Z\_K\_basis]}). Contrary to |
937 |
-+ \tet{polredabs}, this routine runs in polynomial time, but it offers no |
938 |
-+ guarantee as to the minimality of its result. |
939 |
-+ |
940 |
-+ If $\fl = 1$: outputs a two-component row vector $[P,a]$, where $P$ is the |
941 |
-+ default output and \kbd{Mod(a, P)} is a root of the original $T$. |
942 |
-+ \bprog |
943 |
-+ ? polredbest(x^4 + 8, 1) |
944 |
-+ %1 = [x^4 + 2, Mod(x^3, x^4 + 2)] |
945 |
-+ ? charpoly(%[2]) |
946 |
-+ %2 = x^4 + 8 |
947 |
-+ @eprog |
948 |
-diff -ruN src/src/headers/paridecl.h b/src/headers/paridecl.h |
949 |
---- src/src/headers/paridecl.h 2012-09-25 23:10:47.000000000 +0200 |
950 |
-+++ b/src/headers/paridecl.h 2013-01-31 14:49:05.557525771 +0100 |
951 |
-@@ -889,6 +889,7 @@ |
952 |
- GEN polredabs0(GEN x, long flag); |
953 |
- GEN polredabs2(GEN x); |
954 |
- GEN polredabsall(GEN x, long flun); |
955 |
-+GEN polredbest(GEN x, long flag); |
956 |
- GEN smallpolred(GEN x); |
957 |
- GEN smallpolred2(GEN x); |
958 |
- GEN tschirnhaus(GEN x); |
959 |
-diff -ru src/src/test/32/compat b/src/test/32/compat |
960 |
---- src/src/test/32/compat 2013-05-06 16:01:57.000000000 +0200 |
961 |
-+++ b/src/test/32/compat 2013-05-06 16:47:04.542393431 +0200 |
962 |
-@@ -787,13 +787,9 @@ |
963 |
- ? factoreddiscf(p,fa) |
964 |
- 136866601 |
965 |
- ? factoredpolred(p,fa) |
966 |
--[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46 |
967 |
--*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52 |
968 |
--*x^3 - 197*x^2 - 273*x - 127] |
969 |
-+[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671] |
970 |
- ? factoredpolred2(p,fa) |
971 |
--[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46 |
972 |
--*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52 |
973 |
--*x^3 - 197*x^2 - 273*x - 127] |
974 |
-+[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671] |
975 |
- ? factornf(x^3+x^2-2*x-1,t^3+t^2-2*t-1) |
976 |
- |
977 |
- [x + mod(-t, t^3 + t^2 - 2*t - 1) 1] |
978 |
-@@ -904,7 +900,7 @@ |
979 |
- ? gcd(12345678,87654321) |
980 |
- 9 |
981 |
- ? getheap() |
982 |
--[208, 45748] |
983 |
-+[208, 45584] |
984 |
- ? getrand() |
985 |
- Vecsmall([1220248512, -582244995, 485580680, -1643185972, -2103930341, -9694 |
986 |
- 07356, 336208700, 1439513079, -1910826353, -2042699820, 222745475, 183991374 |
987 |
-@@ -2014,7 +2010,7 @@ |
988 |
- ? orderell(tcurve,[1,2]) |
989 |
- 6 |
990 |
- ? ordred(x^3-12*x+45*x-1) |
991 |
--[x - 1, x^3 - 363*x - 2663, x^3 + 33*x - 1] |
992 |
-+[x - 1, x^3 + 33*x - 1] |
993 |
- ? padicprec(padicno,127) |
994 |
- 5 |
995 |
- ? pascal(8) |
996 |
-@@ -2093,15 +2089,16 @@ |
997 |
- ? polint([0,2,3],[0,4,9],5) |
998 |
- 25 |
999 |
- ? polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568) |
1000 |
--[x - 1, x^5 - x^4 - 6*x^3 + 6*x^2 + 13*x - 5, x^5 - x^4 + 2*x^3 - 4*x^2 + x |
1001 |
--- 1, x^5 - x^4 + 4*x^3 - 2*x^2 + x - 1, x^5 + 4*x^3 - 4*x^2 + 8*x - 8] |
1002 |
-+[x - 1, x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1] |
1003 |
- ? polred2(x^4-28*x^3-458*x^2+9156*x-25321) |
1004 |
- |
1005 |
- [1 x - 1] |
1006 |
- |
1007 |
--[1/115*x^2 - 14/115*x - 327/115 x^2 - 10] |
1008 |
-+[1/115*x^2 - 14/115*x - 212/115 x^2 - 2*x - 9] |
1009 |
-+ |
1010 |
-+[-1/115*x^2 + 14/115*x + 442/115 x^2 - 2*x - 9] |
1011 |
- |
1012 |
--[2/897*x^3 - 14/299*x^2 - 1171/897*x + 9569/897 x^4 - 32*x^2 + 6] |
1013 |
-+[1/115*x^2 - 14/115*x - 327/115 x^2 - 10] |
1014 |
- |
1015 |
- [1/4485*x^3 - 7/1495*x^2 - 1034/4485*x + 7924/4485 x^4 - 8*x^2 + 6] |
1016 |
- |
1017 |
-@@ -2454,13 +2451,21 @@ |
1018 |
- ? smallinitell([0,0,0,-17,0]) |
1019 |
- [0, 0, 0, -17, 0, 0, -34, 0, -289, 816, 0, 314432, 1728] |
1020 |
- ? smallpolred(x^4+576) |
1021 |
--[x - 1, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1] |
1022 |
-+[x - 1, x^2 - 3*x + 3, x^2 - 2*x + 2, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1] |
1023 |
- ? smallpolred2(x^4+576) |
1024 |
- |
1025 |
- [1 x - 1] |
1026 |
- |
1027 |
-+[-1/192*x^3 - 1/8*x + 3/2 x^2 - 3*x + 3] |
1028 |
-+ |
1029 |
-+[1/24*x^2 + 1 x^2 - 2*x + 2] |
1030 |
-+ |
1031 |
-+[-1/24*x^2 + 1 x^2 - 2*x + 2] |
1032 |
-+ |
1033 |
- [-1/192*x^3 - 1/8*x + 1/2 x^2 - x + 1] |
1034 |
- |
1035 |
-+[1/192*x^3 + 1/8*x + 1/2 x^2 - x + 1] |
1036 |
-+ |
1037 |
- [1/24*x^2 x^2 + 1] |
1038 |
- |
1039 |
- [1/192*x^3 + 1/48*x^2 - 1/8*x x^4 - x^2 + 1] |
1040 |
-@@ -2650,6 +2655,6 @@ |
1041 |
- ? getstack() |
1042 |
- 104 |
1043 |
- ? getheap() |
1044 |
--[599, 110982] |
1045 |
-+[599, 110954] |
1046 |
- ? print("Total time spent: ",gettime); |
1047 |
--Total time spent: 236 |
1048 |
-+Total time spent: 140 |
1049 |
-diff -ru src/src/test/32/nfields b/src/test/32/nfields |
1050 |
---- src/src/test/32/nfields 2013-05-06 16:01:57.000000000 +0200 |
1051 |
-+++ b/src/test/32/nfields 2013-05-06 16:47:04.542393431 +0200 |
1052 |
-@@ -926,45 +926,50 @@ |
1053 |
- ? polgalois(x^6-3*x^2-1) |
1054 |
- [12, 1, 1, "A_4(6) = [2^2]3"] |
1055 |
- ? polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568) |
1056 |
--[x - 1, x^5 - x^4 - 6*x^3 + 6*x^2 + 13*x - 5, x^5 - x^4 + 2*x^3 - 4*x^2 + x |
1057 |
--- 1, x^5 - x^4 + 4*x^3 - 2*x^2 + x - 1, x^5 + 4*x^3 - 4*x^2 + 8*x - 8] |
1058 |
-+[x - 1, x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1] |
1059 |
- ? polred(x^4-28*x^3-458*x^2+9156*x-25321,3) |
1060 |
- |
1061 |
- [1 x - 1] |
1062 |
- |
1063 |
--[1/115*x^2 - 14/115*x - 327/115 x^2 - 10] |
1064 |
-+[1/115*x^2 - 14/115*x - 212/115 x^2 - 2*x - 9] |
1065 |
-+ |
1066 |
-+[-1/115*x^2 + 14/115*x + 442/115 x^2 - 2*x - 9] |
1067 |
- |
1068 |
--[2/897*x^3 - 14/299*x^2 - 1171/897*x + 9569/897 x^4 - 32*x^2 + 6] |
1069 |
-+[1/115*x^2 - 14/115*x - 327/115 x^2 - 10] |
1070 |
- |
1071 |
- [1/4485*x^3 - 7/1495*x^2 - 1034/4485*x + 7924/4485 x^4 - 8*x^2 + 6] |
1072 |
- |
1073 |
- ? polred(x^4+576,1) |
1074 |
--[x - 1, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1] |
1075 |
-+[x - 1, x^2 - 3*x + 3, x^2 - 2*x + 2, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1] |
1076 |
- ? polred(x^4+576,3) |
1077 |
- |
1078 |
- [1 x - 1] |
1079 |
- |
1080 |
-+[-1/192*x^3 - 1/8*x + 3/2 x^2 - 3*x + 3] |
1081 |
-+ |
1082 |
-+[1/24*x^2 + 1 x^2 - 2*x + 2] |
1083 |
-+ |
1084 |
-+[-1/24*x^2 + 1 x^2 - 2*x + 2] |
1085 |
-+ |
1086 |
- [-1/192*x^3 - 1/8*x + 1/2 x^2 - x + 1] |
1087 |
- |
1088 |
-+[1/192*x^3 + 1/8*x + 1/2 x^2 - x + 1] |
1089 |
-+ |
1090 |
- [1/24*x^2 x^2 + 1] |
1091 |
- |
1092 |
- [1/192*x^3 + 1/48*x^2 - 1/8*x x^4 - x^2 + 1] |
1093 |
- |
1094 |
- ? polred(p2,0,fa) |
1095 |
--[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46 |
1096 |
--*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52 |
1097 |
--*x^3 - 197*x^2 - 273*x - 127] |
1098 |
-+[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671] |
1099 |
- ? polred(p2,1,fa) |
1100 |
--[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46 |
1101 |
--*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52 |
1102 |
--*x^3 - 197*x^2 - 273*x - 127] |
1103 |
-+[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671] |
1104 |
- ? polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568) |
1105 |
- x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1 |
1106 |
- ? polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568,1) |
1107 |
- [x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1, Mod(2*x^4 - x^3 + 3*x^2 - 3*x - 1, x^5 - |
1108 |
- x^4 + 2*x^3 - 4*x^2 + x - 1)] |
1109 |
- ? polredord(x^3-12*x+45*x-1) |
1110 |
--[x - 1, x^3 - 363*x - 2663, x^3 + 33*x - 1] |
1111 |
-+[x - 1, x^3 + 33*x - 1] |
1112 |
- ? polsubcyclo(31,5) |
1113 |
- x^5 + x^4 - 12*x^3 - 21*x^2 + x + 5 |
1114 |
- ? setrand(1);poltschirnhaus(x^5-x-1) |
1115 |
-@@ -1028,6 +1033,6 @@ |
1116 |
- ? sizebyte(%) |
1117 |
- 152 |
1118 |
- ? getheap |
1119 |
--[175, 113027] |
1120 |
-+[175, 112999] |
1121 |
- ? print("Total time spent: ",gettime); |
1122 |
--Total time spent: 116 |
1123 |
-+Total time spent: 76 |
1124 |
-diff -ru src/src/test/64/compat b/src/test/64/compat |
1125 |
---- src/src/test/64/compat 2013-05-06 16:01:58.000000000 +0200 |
1126 |
-+++ b/src/test/64/compat 2013-05-06 16:47:04.542393431 +0200 |
1127 |
-@@ -789,13 +789,9 @@ |
1128 |
- ? factoreddiscf(p,fa) |
1129 |
- 136866601 |
1130 |
- ? factoredpolred(p,fa) |
1131 |
--[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46 |
1132 |
--*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52 |
1133 |
--*x^3 - 197*x^2 - 273*x - 127] |
1134 |
-+[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671] |
1135 |
- ? factoredpolred2(p,fa) |
1136 |
--[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46 |
1137 |
--*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52 |
1138 |
--*x^3 - 197*x^2 - 273*x - 127] |
1139 |
-+[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671] |
1140 |
- ? factornf(x^3+x^2-2*x-1,t^3+t^2-2*t-1) |
1141 |
- |
1142 |
- [x + mod(-t, t^3 + t^2 - 2*t - 1) 1] |
1143 |
-@@ -906,7 +902,7 @@ |
1144 |
- ? gcd(12345678,87654321) |
1145 |
- 9 |
1146 |
- ? getheap() |
1147 |
--[208, 44472] |
1148 |
-+[208, 44308] |
1149 |
- ? getrand() |
1150 |
- Vecsmall([-696235626332558091, -7363039021536514678, -3123062006620239999, - |
1151 |
- 2510915082749224356, -5278885121447018503, 8033304491650294704, 333461878925 |
1152 |
-@@ -2014,7 +2010,7 @@ |
1153 |
- ? orderell(tcurve,[1,2]) |
1154 |
- 6 |
1155 |
- ? ordred(x^3-12*x+45*x-1) |
1156 |
--[x - 1, x^3 - 363*x - 2663, x^3 + 33*x - 1] |
1157 |
-+[x - 1, x^3 + 33*x - 1] |
1158 |
- ? padicprec(padicno,127) |
1159 |
- 5 |
1160 |
- ? pascal(8) |
1161 |
-@@ -2093,15 +2089,16 @@ |
1162 |
- ? polint([0,2,3],[0,4,9],5) |
1163 |
- 25 |
1164 |
- ? polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568) |
1165 |
--[x - 1, x^5 - x^4 - 6*x^3 + 6*x^2 + 13*x - 5, x^5 - x^4 + 2*x^3 - 4*x^2 + x |
1166 |
--- 1, x^5 - x^4 + 4*x^3 - 2*x^2 + x - 1, x^5 + 4*x^3 - 4*x^2 + 8*x - 8] |
1167 |
-+[x - 1, x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1] |
1168 |
- ? polred2(x^4-28*x^3-458*x^2+9156*x-25321) |
1169 |
- |
1170 |
- [1 x - 1] |
1171 |
- |
1172 |
--[1/115*x^2 - 14/115*x - 327/115 x^2 - 10] |
1173 |
-+[1/115*x^2 - 14/115*x - 212/115 x^2 - 2*x - 9] |
1174 |
-+ |
1175 |
-+[-1/115*x^2 + 14/115*x + 442/115 x^2 - 2*x - 9] |
1176 |
- |
1177 |
--[2/897*x^3 - 14/299*x^2 - 1171/897*x + 9569/897 x^4 - 32*x^2 + 6] |
1178 |
-+[1/115*x^2 - 14/115*x - 327/115 x^2 - 10] |
1179 |
- |
1180 |
- [1/4485*x^3 - 7/1495*x^2 - 1034/4485*x + 7924/4485 x^4 - 8*x^2 + 6] |
1181 |
- |
1182 |
-@@ -2454,13 +2451,21 @@ |
1183 |
- ? smallinitell([0,0,0,-17,0]) |
1184 |
- [0, 0, 0, -17, 0, 0, -34, 0, -289, 816, 0, 314432, 1728] |
1185 |
- ? smallpolred(x^4+576) |
1186 |
--[x - 1, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1] |
1187 |
-+[x - 1, x^2 - 3*x + 3, x^2 - 2*x + 2, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1] |
1188 |
- ? smallpolred2(x^4+576) |
1189 |
- |
1190 |
- [1 x - 1] |
1191 |
- |
1192 |
-+[-1/192*x^3 - 1/8*x + 3/2 x^2 - 3*x + 3] |
1193 |
-+ |
1194 |
-+[1/24*x^2 + 1 x^2 - 2*x + 2] |
1195 |
-+ |
1196 |
-+[-1/24*x^2 + 1 x^2 - 2*x + 2] |
1197 |
-+ |
1198 |
- [-1/192*x^3 - 1/8*x + 1/2 x^2 - x + 1] |
1199 |
- |
1200 |
-+[1/192*x^3 + 1/8*x + 1/2 x^2 - x + 1] |
1201 |
-+ |
1202 |
- [1/24*x^2 x^2 + 1] |
1203 |
- |
1204 |
- [1/192*x^3 + 1/48*x^2 - 1/8*x x^4 - x^2 + 1] |
1205 |
-@@ -2649,6 +2654,6 @@ |
1206 |
- ? getstack() |
1207 |
- 200 |
1208 |
- ? getheap() |
1209 |
--[599, 100048] |
1210 |
-+[599, 100020] |
1211 |
- ? print("Total time spent: ",gettime); |
1212 |
--Total time spent: 152 |
1213 |
-+Total time spent: 180 |
1214 |
-diff -ru src/src/test/64/nfields b/src/test/64/nfields |
1215 |
---- src/src/test/64/nfields 2013-05-06 16:01:58.000000000 +0200 |
1216 |
-+++ b/src/test/64/nfields 2013-05-06 16:47:04.542393431 +0200 |
1217 |
-@@ -928,45 +928,50 @@ |
1218 |
- ? polgalois(x^6-3*x^2-1) |
1219 |
- [12, 1, 1, "A_4(6) = [2^2]3"] |
1220 |
- ? polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568) |
1221 |
--[x - 1, x^5 - x^4 - 6*x^3 + 6*x^2 + 13*x - 5, x^5 - x^4 + 2*x^3 - 4*x^2 + x |
1222 |
--- 1, x^5 - x^4 + 4*x^3 - 2*x^2 + x - 1, x^5 + 4*x^3 - 4*x^2 + 8*x - 8] |
1223 |
-+[x - 1, x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1] |
1224 |
- ? polred(x^4-28*x^3-458*x^2+9156*x-25321,3) |
1225 |
- |
1226 |
- [1 x - 1] |
1227 |
- |
1228 |
--[1/115*x^2 - 14/115*x - 327/115 x^2 - 10] |
1229 |
-+[1/115*x^2 - 14/115*x - 212/115 x^2 - 2*x - 9] |
1230 |
-+ |
1231 |
-+[-1/115*x^2 + 14/115*x + 442/115 x^2 - 2*x - 9] |
1232 |
- |
1233 |
--[2/897*x^3 - 14/299*x^2 - 1171/897*x + 9569/897 x^4 - 32*x^2 + 6] |
1234 |
-+[1/115*x^2 - 14/115*x - 327/115 x^2 - 10] |
1235 |
- |
1236 |
- [1/4485*x^3 - 7/1495*x^2 - 1034/4485*x + 7924/4485 x^4 - 8*x^2 + 6] |
1237 |
- |
1238 |
- ? polred(x^4+576,1) |
1239 |
--[x - 1, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1] |
1240 |
-+[x - 1, x^2 - 3*x + 3, x^2 - 2*x + 2, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1] |
1241 |
- ? polred(x^4+576,3) |
1242 |
- |
1243 |
- [1 x - 1] |
1244 |
- |
1245 |
-+[-1/192*x^3 - 1/8*x + 3/2 x^2 - 3*x + 3] |
1246 |
-+ |
1247 |
-+[1/24*x^2 + 1 x^2 - 2*x + 2] |
1248 |
-+ |
1249 |
-+[-1/24*x^2 + 1 x^2 - 2*x + 2] |
1250 |
-+ |
1251 |
- [-1/192*x^3 - 1/8*x + 1/2 x^2 - x + 1] |
1252 |
- |
1253 |
-+[1/192*x^3 + 1/8*x + 1/2 x^2 - x + 1] |
1254 |
-+ |
1255 |
- [1/24*x^2 x^2 + 1] |
1256 |
- |
1257 |
- [1/192*x^3 + 1/48*x^2 - 1/8*x x^4 - x^2 + 1] |
1258 |
- |
1259 |
- ? polred(p2,0,fa) |
1260 |
--[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46 |
1261 |
--*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52 |
1262 |
--*x^3 - 197*x^2 - 273*x - 127] |
1263 |
-+[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671] |
1264 |
- ? polred(p2,1,fa) |
1265 |
--[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46 |
1266 |
--*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52 |
1267 |
--*x^3 - 197*x^2 - 273*x - 127] |
1268 |
-+[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671] |
1269 |
- ? polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568) |
1270 |
- x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1 |
1271 |
- ? polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568,1) |
1272 |
- [x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1, Mod(2*x^4 - x^3 + 3*x^2 - 3*x - 1, x^5 - |
1273 |
- x^4 + 2*x^3 - 4*x^2 + x - 1)] |
1274 |
- ? polredord(x^3-12*x+45*x-1) |
1275 |
--[x - 1, x^3 - 363*x - 2663, x^3 + 33*x - 1] |
1276 |
-+[x - 1, x^3 + 33*x - 1] |
1277 |
- ? polsubcyclo(31,5) |
1278 |
- x^5 + x^4 - 12*x^3 - 21*x^2 + x + 5 |
1279 |
- ? setrand(1);poltschirnhaus(x^5-x-1) |
1280 |
-@@ -1030,6 +1035,6 @@ |
1281 |
- ? sizebyte(%) |
1282 |
- 288 |
1283 |
- ? getheap |
1284 |
--[175, 102929] |
1285 |
-+[175, 102901] |
1286 |
- ? print("Total time spent: ",gettime); |
1287 |
--Total time spent: 84 |
1288 |
-+Total time spent: 110 |
1289 |
|
1290 |
diff --git a/sci-mathematics/pari/files/pari-2.5.4-slow_determinant.patch b/sci-mathematics/pari/files/pari-2.5.4-slow_determinant.patch |
1291 |
deleted file mode 100644 |
1292 |
index 14833da6270..00000000000 |
1293 |
--- a/sci-mathematics/pari/files/pari-2.5.4-slow_determinant.patch |
1294 |
+++ /dev/null |
1295 |
@@ -1,100 +0,0 @@ |
1296 |
-diff -ru src/src/basemath/alglin1.c b/src/basemath/alglin1.c |
1297 |
---- src/src/basemath/alglin1.c 2012-09-25 23:10:46.000000000 +0200 |
1298 |
-+++ b/src/basemath/alglin1.c 2013-01-03 13:56:55.487513420 +0100 |
1299 |
-@@ -2969,6 +2969,21 @@ |
1300 |
- return NULL; /* not reached */ |
1301 |
- } |
1302 |
- |
1303 |
-+/* A a 2x2 matrix |
1304 |
-+ returns the determinant of A computed by the simple formula |
1305 |
-+*/ |
1306 |
-+static GEN |
1307 |
-+det2x2(GEN A) |
1308 |
-+{ |
1309 |
-+ pari_sp av = avma; |
1310 |
-+ GEN a = gcoeff(A, 1, 1), |
1311 |
-+ b = gcoeff(A, 1, 2), |
1312 |
-+ c = gcoeff(A, 2, 1), |
1313 |
-+ d = gcoeff(A, 2, 2); |
1314 |
-+ return gerepileupto(av, gsub(gmul(a, d), gmul(b, c))); |
1315 |
-+} |
1316 |
-+ |
1317 |
-+ |
1318 |
- static GEN |
1319 |
- det_simple_gauss(GEN a, GEN data, pivot_fun pivot) |
1320 |
- { |
1321 |
-@@ -3021,6 +3036,7 @@ |
1322 |
- if (typ(a)!=t_MAT) pari_err(mattype1,"det2"); |
1323 |
- if (!nbco) return gen_1; |
1324 |
- if (nbco != lg(a[1])-1) pari_err(mattype1,"det2"); |
1325 |
-+ if (nbco == 2) return det2x2 (a); |
1326 |
- pivot = get_pivot_fun(a, &data); |
1327 |
- return det_simple_gauss(a, data, pivot); |
1328 |
- } |
1329 |
-@@ -3158,11 +3174,7 @@ |
1330 |
- { |
1331 |
- case 0: return gen_1; |
1332 |
- case 1: return gcopy(gcoeff(M,1,1)); |
1333 |
-- case 2: { |
1334 |
-- GEN a = gcoeff(M,1,1), b = gcoeff(M,1,2); |
1335 |
-- GEN c = gcoeff(M,2,1), d = gcoeff(M,2,2); |
1336 |
-- return gerepileupto(av, gsub(gmul(a,d), gmul(b,c))); |
1337 |
-- } |
1338 |
-+ case 2: return det2x2(M); |
1339 |
- } |
1340 |
- if (max > ((n+2)>>1)) max = (n+2)>>1; |
1341 |
- for (j = 1; j <= n; j++) |
1342 |
-@@ -3193,9 +3205,10 @@ |
1343 |
- } |
1344 |
- if (best_row) |
1345 |
- { |
1346 |
-+ double d = lbest-1; |
1347 |
- GEN s = NULL; |
1348 |
- long k; |
1349 |
-- bound /= (lbest-1); |
1350 |
-+ bound /= d*d*d; |
1351 |
- for (k = 1; k < lbest; k++) |
1352 |
- { |
1353 |
- GEN c = coeff_det(M, best_row, best[k], max, bound); |
1354 |
-@@ -3205,9 +3218,10 @@ |
1355 |
- } |
1356 |
- if (best_col) |
1357 |
- { |
1358 |
-+ double d = lbest-1; |
1359 |
- GEN s = NULL; |
1360 |
- long k; |
1361 |
-- bound /= (lbest-1); |
1362 |
-+ bound /= d*d*d; |
1363 |
- for (k = 1; k < lbest; k++) |
1364 |
- { |
1365 |
- GEN c = coeff_det(M, best[k], best_col, max, bound); |
1366 |
-@@ -3230,15 +3244,24 @@ |
1367 |
- if (!n) return gen_1; |
1368 |
- if (n != lg(a[1])-1) pari_err(mattype1,"det"); |
1369 |
- if (n == 1) return gcopy(gcoeff(a,1,1)); |
1370 |
-- if (RgM_is_FpM(a, &p) && p) |
1371 |
-+ if (RgM_is_FpM(a, &p)) |
1372 |
- { |
1373 |
-- pari_sp av = avma; |
1374 |
-- return gerepilecopy(av, Fp_to_mod(FpM_det(RgM_to_FpM(a, p), p), p)); |
1375 |
-+ pari_sp av; |
1376 |
-+ if (!p) |
1377 |
-+ { /* ZM */ |
1378 |
-+ return det_simple_gauss(a, NULL, &gauss_get_pivot_NZ); |
1379 |
-+ } |
1380 |
-+ else |
1381 |
-+ { /* FpM */ |
1382 |
-+ av = avma; |
1383 |
-+ return gerepilecopy(av, Fp_to_mod(FpM_det(RgM_to_FpM(a, p), p), p)); |
1384 |
-+ } |
1385 |
- } |
1386 |
-+ if (n == 2) return det2x2 (a); |
1387 |
- pivot = get_pivot_fun(a, &data); |
1388 |
- if (pivot != gauss_get_pivot_NZ) return det_simple_gauss(a, data, pivot); |
1389 |
-- B = (double)n; B = B*B; B = B*B; |
1390 |
-- return det_develop(a, 7, B); |
1391 |
-+ B = (double)n; |
1392 |
-+ return det_develop(a, 7, B*B*B); |
1393 |
- } |
1394 |
- |
1395 |
- |
1396 |
|
1397 |
diff --git a/sci-mathematics/pari/files/pari-2.7.0-doc-make.patch b/sci-mathematics/pari/files/pari-2.7.0-doc-make.patch |
1398 |
deleted file mode 100644 |
1399 |
index 4292688d97a..00000000000 |
1400 |
--- a/sci-mathematics/pari/files/pari-2.7.0-doc-make.patch |
1401 |
+++ /dev/null |
1402 |
@@ -1,89 +0,0 @@ |
1403 |
-diff -Naur pari-2.7.0/config/DOC_Make.SH pari-2.7.0_a/config/DOC_Make.SH |
1404 |
---- pari-2.7.0/config/DOC_Make.SH 2014-03-20 21:59:28.000000000 +1300 |
1405 |
-+++ pari-2.7.0_a/config/DOC_Make.SH 2014-05-05 13:20:09.119923587 +1200 |
1406 |
-@@ -23,7 +23,8 @@ |
1407 |
- |
1408 |
- doc all: develop.dvi libpari.dvi parallel.dvi users.dvi refcard.ps tutorial.dvi |
1409 |
- docps: develop.ps libpari.ps parallel.ps refcard.ps tutorial.ps users.ps INSTALL.ps |
1410 |
--docpdf: develop.pdf libpari.pdf parallel.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf |
1411 |
-+#docpdf: develop.pdf libpari.pdf parallel.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf |
1412 |
-+docpdf: \$(PARI_TEX) \$(MACROS) pass1 pass2 indexing refcard.pdf INSTALL.pdf |
1413 |
- |
1414 |
- .SUFFIXES: .tex .ipf .pod .inf .dumbpod .3 .html |
1415 |
- |
1416 |
-@@ -39,38 +40,60 @@ |
1417 |
- %.dvi: %.tex \$(MACROS) |
1418 |
- \$(TEX) \$< |
1419 |
- |
1420 |
-+pass1: \$(PARI_TEX) \$(USERS_TEX) develop.tex tutorial.tex \$(MACROS) |
1421 |
-+ -rm -f *.std |
1422 |
-+ pdftex libpari |
1423 |
-+ pdftex develop |
1424 |
-+ pdftex tutorial |
1425 |
-+ pdftex users |
1426 |
-+ |
1427 |
-+pass2: pass1 |
1428 |
-+ pdftex libpari |
1429 |
-+ pdftex develop |
1430 |
-+ pdftex tutorial |
1431 |
-+ pdftex users |
1432 |
-+ |
1433 |
-+indexing: pass2 |
1434 |
-+ \$(MAKE) libpari.std |
1435 |
-+ \$(MAKE) develop.std |
1436 |
-+ \$(MAKE) users.std |
1437 |
-+ pdftex libpari |
1438 |
-+ pdftex develop |
1439 |
-+ pdftex users |
1440 |
-+ -rm -f *.std |
1441 |
-+ |
1442 |
- libpari.pdf: \$(PARI_TEX) \$(MACROS) |
1443 |
- -rm -f libpari.std |
1444 |
- \$(PDFTEX) libpari |
1445 |
- \$(PDFTEX) libpari |
1446 |
-- make libpari.std; \$(PDFTEX) libpari; rm -f libpari.std |
1447 |
-+ \$(MAKE) libpari.std; \$(PDFTEX) libpari; rm -f libpari.std |
1448 |
- libpari.dvi: \$(PARI_TEX) \$(MACROS) |
1449 |
- -rm -f libpari.std |
1450 |
- \$(TEX) libpari |
1451 |
- \$(TEX) libpari |
1452 |
-- make libpari.std; \$(TEX) libpari; rm -f libpari.std |
1453 |
-+ \$(MAKE) libpari.std; \$(TEX) libpari; rm -f libpari.std |
1454 |
- |
1455 |
- develop.pdf: develop.tex \$(MACROS) |
1456 |
- -rm -f develop.std |
1457 |
- \$(PDFTEX) develop |
1458 |
- \$(PDFTEX) develop |
1459 |
-- make develop.std; \$(PDFTEX) develop; rm -f develop.std |
1460 |
-+ \$(MAKE) develop.std; \$(PDFTEX) develop; rm -f develop.std |
1461 |
- develop.dvi: develop.tex \$(MACROS) |
1462 |
- -rm -f develop.std |
1463 |
- \$(TEX) develop |
1464 |
- \$(TEX) develop |
1465 |
-- make develop.std; \$(TEX) develop; rm -f develop.std |
1466 |
-+ \$(MAKE) develop.std; \$(TEX) develop; rm -f develop.std |
1467 |
- |
1468 |
- parallel.pdf: parallel.tex \$(MACROS) |
1469 |
- -rm -f parallel.std |
1470 |
- \$(PDFTEX) parallel |
1471 |
- \$(PDFTEX) parallel |
1472 |
-- make parallel.std; \$(PDFTEX) parallel; rm -f parallel.std |
1473 |
-+ \$(MAKE) parallel.std; \$(PDFTEX) parallel; rm -f parallel.std |
1474 |
- parallel.dvi: parallel.tex \$(MACROS) |
1475 |
- -rm -f parallel.std |
1476 |
- \$(TEX) parallel |
1477 |
- \$(TEX) parallel |
1478 |
-- make parallel.std; \$(TEX) parallel; rm -f parallel.std |
1479 |
-+ \$(MAKE) parallel.std; \$(TEX) parallel; rm -f parallel.std |
1480 |
- |
1481 |
- tutorial.pdf: tutorial.tex \$(MACROS) |
1482 |
- -rm -f tutorial.std |
1483 |
-@@ -104,7 +127,7 @@ |
1484 |
- -rm -f users.std |
1485 |
- \$(PDFTEX) users |
1486 |
- \$(PDFTEX) users |
1487 |
-- make users.std; \$(PDFTEX) users; rm -f users.std |
1488 |
-+ \$(MAKE) users.std; \$(PDFTEX) users; rm -f users.std |
1489 |
- |
1490 |
- gpman: gp.1 |
1491 |
- nroff -man gp.1 | unix2dos -ascii > gp.man |
1492 |
|
1493 |
diff --git a/sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch b/sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch |
1494 |
deleted file mode 100644 |
1495 |
index 2d77f19f9f5..00000000000 |
1496 |
--- a/sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch |
1497 |
+++ /dev/null |
1498 |
@@ -1,100 +0,0 @@ |
1499 |
-diff -Naur pari-2.7.0/config/Makefile.SH pari-2.7.0_a/config/Makefile.SH |
1500 |
---- pari-2.7.0/config/Makefile.SH 2014-03-20 21:59:28.000000000 +1300 |
1501 |
-+++ pari-2.7.0_a/config/Makefile.SH 2014-05-05 12:00:21.095724368 +1200 |
1502 |
-@@ -75,12 +75,12 @@ |
1503 |
- PLOTLIBS="-L\$(QTDIR)/lib $QTLIB" |
1504 |
- graph=plotQt;; |
1505 |
- Qt4) |
1506 |
-- PLOTCFLAGS='-D__FANCY_WIN__ -I$(QTDIR)/include' |
1507 |
-- PLOTLIBS="-L\$(QTDIR)/lib $QTLIB" |
1508 |
-+ PLOTCFLAGS='-D__FANCY_WIN__ `pkg-config --cflags QtGui`' |
1509 |
-+ PLOTLIBS="`pkg-config --libs QtGui`" |
1510 |
- graph=plotQt4;; |
1511 |
- fltk) |
1512 |
-- PLOTCFLAGS="-I\$(FLTKDIR)/include $X11_INC" |
1513 |
-- PLOTLIBS="$FLTK_LIBS" |
1514 |
-+ PLOTCFLAGS="`fltk-config --cxxflags` $X11_INC" |
1515 |
-+ PLOTLIBS="`fltk-config --ldflags`" |
1516 |
- postconfig='fltk-config --post ' |
1517 |
- graph=plotfltk;; |
1518 |
- win32) |
1519 |
-@@ -269,7 +269,7 @@ |
1520 |
- GMPINCLUDE = $GMPINCLUDE |
1521 |
- # Graphic library. |
1522 |
- QTDIR = "$QTDIR" |
1523 |
--MOC = \$(QTDIR)/bin/moc |
1524 |
-+MOC = "`which moc`" |
1525 |
- PLOTCFLAGS = $PLOTCFLAGS |
1526 |
- PLOTLIBS = $PLOTLIBS |
1527 |
- CPLUSPLUS = g++ |
1528 |
-diff -Naur pari-2.7.0/config/get_Qt pari-2.7.0_a/config/get_Qt |
1529 |
---- pari-2.7.0/config/get_Qt 2014-03-20 21:59:28.000000000 +1300 |
1530 |
-+++ pari-2.7.0_a/config/get_Qt 2014-05-05 11:56:42.453465262 +1200 |
1531 |
-@@ -5,7 +5,7 @@ |
1532 |
- case "$with_qt" in |
1533 |
- yes) |
1534 |
- pth="/usr/local/lib /usr/local/share /usr/lib /usr/share" |
1535 |
-- QTDIR=`locatedir qt4/bin $pth` |
1536 |
-+ QTDIR=`locatedir qt4 $pth` |
1537 |
- if test -n "$QTDIR"; then |
1538 |
- QTLIB="-lQtCore -lQtGui" |
1539 |
- which_graphic_lib=Qt4 |
1540 |
-diff -Naur pari-2.7.0/config/get_config_options pari-2.7.0_a/config/get_config_options |
1541 |
---- pari-2.7.0/config/get_config_options 2014-03-20 21:59:28.000000000 +1300 |
1542 |
-+++ pari-2.7.0_a/config/get_config_options 2014-05-05 11:49:14.577963840 +1200 |
1543 |
-@@ -85,10 +85,12 @@ |
1544 |
- --with-ncurses-lib=*|--with-ncurses=*) |
1545 |
- with_ncurses_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
1546 |
- |
1547 |
-+ --without-qt|--with-qt=no) without_qt=yes ;; |
1548 |
- --with-qt) with_qt=yes ;; |
1549 |
- --with-qt=*) |
1550 |
- with_qt=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
1551 |
- |
1552 |
-+ --without-fltk|--with-fltk=no) without_fltk=yes ;; |
1553 |
- --with-fltk) with_fltk=yes ;; |
1554 |
- --with-fltk=*) |
1555 |
- with_fltk=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
1556 |
-@@ -164,7 +166,9 @@ |
1557 |
- --with-gmp-lib=DIR specify location of gmp libs |
1558 |
- |
1559 |
- --with-qt[=DIR] use the Qt graphical library [prefix for Qt dir.] |
1560 |
-+ --without-qt do not try to use the Qt lib |
1561 |
- --with-fltk[=DIR] use the FLTK graphical library [prefix for FLTK dir.] |
1562 |
-+ --without-fltk do not try to use the FLTK lib |
1563 |
- |
1564 |
- Environment variables affecting the build: |
1565 |
- CC C compiler |
1566 |
-diff -Naur pari-2.7.0/config/get_fltk pari-2.7.0_a/config/get_fltk |
1567 |
---- pari-2.7.0/config/get_fltk 2014-03-20 21:59:28.000000000 +1300 |
1568 |
-+++ pari-2.7.0_a/config/get_fltk 2014-05-05 11:49:14.578963841 +1200 |
1569 |
-@@ -2,6 +2,9 @@ |
1570 |
- with_fltk=yes |
1571 |
- fi |
1572 |
- FLTKDIR= |
1573 |
-+if test -z "$without_fltk; then |
1574 |
-+ FLTKDIR="`fltk-config --prefix 2>/dev/null`" |
1575 |
-+fi |
1576 |
- case "$with_fltk" in |
1577 |
- yes) |
1578 |
- pth=$libpth; lib=fltk; . ./locatelib |
1579 |
-diff -Naur pari-2.7.0/config/get_graphic_lib pari-2.7.0_a/config/get_graphic_lib |
1580 |
---- pari-2.7.0/config/get_graphic_lib 2014-03-20 21:59:28.000000000 +1300 |
1581 |
-+++ pari-2.7.0_a/config/get_graphic_lib 2014-05-05 11:54:45.469333702 +1200 |
1582 |
-@@ -7,6 +7,7 @@ |
1583 |
- |
1584 |
- if test -n "$with_fltk"; then which_graphic_lib=fltk; fi |
1585 |
- if test -n "$with_qt"; then which_graphic_lib=Qt; fi |
1586 |
-+if test -n "$without_fltk" -a -n "$without_qt"; then which_graphic_lib=none; fi |
1587 |
- if test "$fastread" != yes; then |
1588 |
- cat << EOT |
1589 |
- ========================================================================== |
1590 |
-@@ -38,7 +39,7 @@ |
1591 |
- case $osname in |
1592 |
- darwin) ;; # fltk brings in CoreFoundation, incompatible with pari_daemon |
1593 |
- *). ./get_fltk # FLTKDIR, FLTK_LIBS ;; |
1594 |
-- if test -z "$FLTKDIR"; then |
1595 |
-+ if test -z "`fltk-config --ldflags 2> /dev/null`"; then |
1596 |
- case $which_graphic_lib in fltk) which_graphic_lib=none;; esac |
1597 |
- else |
1598 |
- which_graphic_lib=fltk |
1599 |
|
1600 |
diff --git a/sci-mathematics/pari/files/pari-2.7.0-no-dot-inc.patch b/sci-mathematics/pari/files/pari-2.7.0-no-dot-inc.patch |
1601 |
deleted file mode 100644 |
1602 |
index 9d868ef6b6a..00000000000 |
1603 |
--- a/sci-mathematics/pari/files/pari-2.7.0-no-dot-inc.patch |
1604 |
+++ /dev/null |
1605 |
@@ -1,64 +0,0 @@ |
1606 |
-From 2864fe5b852e443d98af92d8929e359525ccb1a2 Mon Sep 17 00:00:00 2001 |
1607 |
-From: Kent Fredric <kentfredric@×××××.com> |
1608 |
-Date: Sun, 11 Jun 2017 10:31:03 +1200 |
1609 |
-Subject: [PATCH] Fix for 5.26 removal of '.' in @INC |
1610 |
- |
1611 |
-Previous scripts assumed CWD was in @INC and that "PARI::822" was in |
1612 |
-wherever CWD was. |
1613 |
- |
1614 |
-This fixes both of those, and the latter, because its not obvious |
1615 |
-from the build system where one should assume CWD to be. |
1616 |
- |
1617 |
-Instead, the absolute path of the directory of these scripts is |
1618 |
-inserted into @INC |
1619 |
---- |
1620 |
- src/desc/doc_make | 5 +++++ |
1621 |
- src/desc/gen_proto | 4 ++++ |
1622 |
- src/desc/merge_822 | 4 ++++ |
1623 |
- 3 files changed, 13 insertions(+) |
1624 |
- |
1625 |
-diff --git a/src/desc/doc_make b/src/desc/doc_make |
1626 |
-index 91b894e..ffbbb78 100755 |
1627 |
---- a/src/desc/doc_make |
1628 |
-+++ b/src/desc/doc_make |
1629 |
-@@ -1,6 +1,11 @@ |
1630 |
- #!/usr/bin/perl |
1631 |
- use warnings FATAL => 'all'; |
1632 |
- use strict; |
1633 |
-+ |
1634 |
-+use File::Spec; |
1635 |
-+use File::Basename qw( dirname ); |
1636 |
-+use lib dirname(File::Spec->rel2abs(__FILE__)); |
1637 |
-+ |
1638 |
- use PARI::822; |
1639 |
- |
1640 |
- my (%funcs, %Fun_by_sec); |
1641 |
-diff --git a/src/desc/gen_proto b/src/desc/gen_proto |
1642 |
-index ee55449..5ca0305 100755 |
1643 |
---- a/src/desc/gen_proto |
1644 |
-+++ b/src/desc/gen_proto |
1645 |
-@@ -1,4 +1,8 @@ |
1646 |
- #!/usr/bin/perl -w |
1647 |
-+use File::Spec; |
1648 |
-+use File::Basename qw( dirname ); |
1649 |
-+use lib dirname(File::Spec->rel2abs(__FILE__)); |
1650 |
-+ |
1651 |
- use PARI::822; |
1652 |
- |
1653 |
- $class=$ARGV[0]; |
1654 |
-diff --git a/src/desc/merge_822 b/src/desc/merge_822 |
1655 |
-index 4c9217b..32b3cc9 100755 |
1656 |
---- a/src/desc/merge_822 |
1657 |
-+++ b/src/desc/merge_822 |
1658 |
-@@ -1,4 +1,8 @@ |
1659 |
- #!/usr/bin/perl -w |
1660 |
-+use File::Spec; |
1661 |
-+use File::Basename qw( dirname ); |
1662 |
-+use lib dirname(File::Spec->rel2abs(__FILE__)); |
1663 |
-+ |
1664 |
- use PARI::822; |
1665 |
- |
1666 |
- open(IN, $ARGV[0]) || die "cannot find $ARGV[0]"; |
1667 |
--- |
1668 |
-2.13.1 |
1669 |
- |
1670 |
|
1671 |
diff --git a/sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch b/sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch |
1672 |
deleted file mode 100644 |
1673 |
index 814dc4b2ab9..00000000000 |
1674 |
--- a/sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch |
1675 |
+++ /dev/null |
1676 |
@@ -1,54 +0,0 @@ |
1677 |
-diff -ru src/src/basemath/alglin1.c b/src/basemath/alglin1.c |
1678 |
---- src/src/basemath/alglin1.c 2014-01-29 18:00:27.000000000 +0100 |
1679 |
-+++ b/src/basemath/alglin1.c 2014-02-09 01:54:37.676725196 +0100 |
1680 |
-@@ -247,6 +247,7 @@ |
1681 |
- a = RgM_shallowcopy(a); |
1682 |
- for (i=1; i<nbco; i++) |
1683 |
- { |
1684 |
-+ int garbage = 0; /* Only gerepile() once per loop iteration */ |
1685 |
- for(k=i; k<=nbco; k++) |
1686 |
- { |
1687 |
- gcoeff(a,k,i) = ff->red(E,gcoeff(a,k,i)); |
1688 |
-@@ -271,7 +272,7 @@ |
1689 |
- for (j=i+1; j<=nbco; j++) |
1690 |
- { |
1691 |
- gcoeff(a,j,k) = ff->add(E, gcoeff(a,j,k), ff->mul(E,m,gcoeff(a,j,i))); |
1692 |
-- if (low_stack(lim, stack_lim(av,1))) |
1693 |
-+ if (low_stack(lim, stack_lim(av,1)) && (garbage++ == 0)) |
1694 |
- { |
1695 |
- if(DEBUGMEM>1) pari_warn(warnmem,"det. col = %ld",i); |
1696 |
- gerepileall(av,4, &a,&x,&q,&m); |
1697 |
-@@ -3721,6 +3722,7 @@ |
1698 |
- a = RgM_shallowcopy(a); |
1699 |
- for (i=1; i<nbco; i++) |
1700 |
- { |
1701 |
-+ int garbage = 0; /* Only gerepile() once per loop iteration */ |
1702 |
- k = pivot(a, data, i, NULL); |
1703 |
- if (k > nbco) return gerepilecopy(av, gcoeff(a,i,i)); |
1704 |
- if (k != i) |
1705 |
-@@ -3740,7 +3742,7 @@ |
1706 |
- for (j=i+1; j<=nbco; j++) |
1707 |
- { |
1708 |
- gcoeff(a,j,k) = gsub(gcoeff(a,j,k), gmul(m,gcoeff(a,j,i))); |
1709 |
-- if (low_stack(lim, stack_lim(av,3))) |
1710 |
-+ if (low_stack(lim, stack_lim(av,3)) && (garbage++ == 0)) |
1711 |
- { |
1712 |
- if(DEBUGMEM>1) pari_warn(warnmem,"det. col = %ld",i); |
1713 |
- gerepileall(av,2, &a,&x); |
1714 |
-@@ -3791,6 +3793,7 @@ |
1715 |
- { |
1716 |
- GEN ci, ck, m; |
1717 |
- int diveuc = (gequal1(pprec)==0); |
1718 |
-+ int garbage = 0; /* Only gerepile() once per loop iteration */ |
1719 |
- |
1720 |
- p = gcoeff(a,i,i); |
1721 |
- if (gequal0(p)) |
1722 |
-@@ -3827,7 +3830,7 @@ |
1723 |
- GEN p1 = gsub(gmul(p,gel(ck,j)), gmul(m,gel(ci,j))); |
1724 |
- if (diveuc) p1 = mydiv(p1,pprec); |
1725 |
- gel(ck,j) = gerepileupto(av2, p1); |
1726 |
-- if (low_stack(lim,stack_lim(av,2))) |
1727 |
-+ if (low_stack(lim,stack_lim(av,2)) && (garbage++ == 0)) |
1728 |
- { |
1729 |
- if(DEBUGMEM>1) pari_warn(warnmem,"det. col = %ld",i); |
1730 |
- gerepileall(av,2, &a,&pprec); |
1731 |
|
1732 |
diff --git a/sci-mathematics/pari/files/pari-2.7.1-perl-5.22-doc.patch b/sci-mathematics/pari/files/pari-2.7.1-perl-5.22-doc.patch |
1733 |
deleted file mode 100644 |
1734 |
index c4bbadcb2e0..00000000000 |
1735 |
--- a/sci-mathematics/pari/files/pari-2.7.1-perl-5.22-doc.patch |
1736 |
+++ /dev/null |
1737 |
@@ -1,12 +0,0 @@ |
1738 |
-diff -U2 -r pari-2.7.1.orig/src/desc/doc_make pari-2.7.1/src/desc/doc_make |
1739 |
---- pari-2.7.1.orig/src/desc/doc_make 2014-05-11 00:59:29.000000000 +0700 |
1740 |
-+++ pari-2.7.1/src/desc/doc_make 2015-11-15 00:51:11.494845695 +0600 |
1741 |
-@@ -39,6 +39,6 @@ |
1742 |
- $v =~ s/(\w\w+)/\\var{$1}/g; |
1743 |
- $v =~ s/\^([a-z])/\\hbox{\\kbd{\\pow}}$1/g; |
1744 |
-- $v =~ s/\\var{flag}/\\fl/g; |
1745 |
-- $v =~ s/\\var{(\d+)}/{$1}/g; |
1746 |
-+ $v =~ s/\\var\{flag}/\\fl/g; |
1747 |
-+ $v =~ s/\\var\{(\d+)}/{$1}/g; |
1748 |
- |
1749 |
- $v = "\$($v)\$"; |
1750 |
|
1751 |
diff --git a/sci-mathematics/pari/pari-2.3.5.ebuild b/sci-mathematics/pari/pari-2.3.5.ebuild |
1752 |
index a0f484b4677..d996d235469 100644 |
1753 |
--- a/sci-mathematics/pari/pari-2.3.5.ebuild |
1754 |
+++ b/sci-mathematics/pari/pari-2.3.5.ebuild |
1755 |
@@ -9,6 +9,7 @@ HOMEPAGE="http://pari.math.u-bordeaux.fr/" |
1756 |
|
1757 |
SRC_COM="http://pari.math.u-bordeaux.fr/pub/${PN}" |
1758 |
SRC_URI="${SRC_COM}/unix/${P}.tar.gz |
1759 |
+ https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2 |
1760 |
data? ( ${SRC_COM}/packages/elldata.tgz |
1761 |
${SRC_COM}/packages/galdata.tgz |
1762 |
${SRC_COM}/packages/seadata.tgz |
1763 |
@@ -40,10 +41,10 @@ src_prepare() { |
1764 |
if use data; then |
1765 |
mv "${WORKDIR}"/data "${S}" || die "failed to move data" |
1766 |
fi |
1767 |
- epatch "${FILESDIR}/"${PN}-2.3.2-strip.patch |
1768 |
- epatch "${FILESDIR}/"${PN}-2.3.2-ppc-powerpc-arch-fix.patch |
1769 |
- epatch "${FILESDIR}/"${PN}-2.3.5-doc-make.patch |
1770 |
- epatch "${FILESDIR}/"${PN}-2.3.5-no-dot-inc.patch |
1771 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.3.2-strip.patch |
1772 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.3.2-ppc-powerpc-arch-fix.patch |
1773 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.3.5-doc-make.patch |
1774 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.3.5-no-dot-inc.patch |
1775 |
|
1776 |
# disable default building of docs during install |
1777 |
sed -i \ |
1778 |
|
1779 |
diff --git a/sci-mathematics/pari/pari-2.5.4.ebuild b/sci-mathematics/pari/pari-2.5.4.ebuild |
1780 |
index 2c261d95efc..78f5d5418c9 100644 |
1781 |
--- a/sci-mathematics/pari/pari-2.5.4.ebuild |
1782 |
+++ b/sci-mathematics/pari/pari-2.5.4.ebuild |
1783 |
@@ -7,7 +7,8 @@ inherit eutils flag-o-matic toolchain-funcs multilib |
1784 |
|
1785 |
DESCRIPTION="Computer-aided number theory C library and tools" |
1786 |
HOMEPAGE="http://pari.math.u-bordeaux.fr/" |
1787 |
-SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz" |
1788 |
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz |
1789 |
+ https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2" |
1790 |
|
1791 |
LICENSE="GPL-2" |
1792 |
SLOT="0" |
1793 |
@@ -34,22 +35,22 @@ get_compile_dir() { |
1794 |
} |
1795 |
|
1796 |
src_prepare() { |
1797 |
- epatch "${FILESDIR}"/${PN}-2.3.2-strip.patch |
1798 |
- epatch "${FILESDIR}"/${PN}-2.3.2-ppc-powerpc-arch-fix.patch |
1799 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.3.2-strip.patch |
1800 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.3.2-ppc-powerpc-arch-fix.patch |
1801 |
# fix parallel make |
1802 |
- epatch "${FILESDIR}"/${PN}-2.5.0-doc-make.patch |
1803 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.5.0-doc-make.patch |
1804 |
# sage error handling patch |
1805 |
- epatch "${FILESDIR}"/${PN}-2.5.0-mp.c.patch |
1806 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.5.0-mp.c.patch |
1807 |
# OS X: add -install_name to the linker option |
1808 |
- epatch "${FILESDIR}"/${PN}-2.5.0-macos.patch |
1809 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.5.0-macos.patch |
1810 |
# Fix Perl 5.26 |
1811 |
- epatch "${FILESDIR}/"${PN}-2.5.0-no-dot-inc.patch |
1812 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.5.0-no-dot-inc.patch |
1813 |
# fix automagic |
1814 |
- epatch "${FILESDIR}"/${PN}-2.5.1-no-automagic.patch |
1815 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.5.1-no-automagic.patch |
1816 |
# sage-on-gentoo trac 13902: Slowdown for PARI integer determinant |
1817 |
- epatch "${FILESDIR}"/${PN}-2.5.4-slow_determinant.patch |
1818 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.5.4-slow_determinant.patch |
1819 |
# sage-on-gentoo trac 13054: polred bug / pari bug 1395 |
1820 |
- epatch "${FILESDIR}"/${PN}-2.5.4-polred.patch |
1821 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.5.4-polred.patch |
1822 |
|
1823 |
# disable default building of docs during install |
1824 |
sed -i \ |
1825 |
|
1826 |
diff --git a/sci-mathematics/pari/pari-2.7.1.ebuild b/sci-mathematics/pari/pari-2.7.1.ebuild |
1827 |
index 1bf04634442..8a691309959 100644 |
1828 |
--- a/sci-mathematics/pari/pari-2.7.1.ebuild |
1829 |
+++ b/sci-mathematics/pari/pari-2.7.1.ebuild |
1830 |
@@ -7,7 +7,8 @@ inherit eutils flag-o-matic toolchain-funcs multilib |
1831 |
|
1832 |
DESCRIPTION="Computer-aided number theory C library and tools" |
1833 |
HOMEPAGE="http://pari.math.u-bordeaux.fr/" |
1834 |
-SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz" |
1835 |
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz |
1836 |
+ https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2" |
1837 |
|
1838 |
LICENSE="GPL-2" |
1839 |
SLOT="0/4" |
1840 |
@@ -34,18 +35,18 @@ get_compile_dir() { |
1841 |
} |
1842 |
|
1843 |
src_prepare() { |
1844 |
- epatch "${FILESDIR}"/${PN}-2.3.2-strip.patch |
1845 |
- epatch "${FILESDIR}"/${PN}-2.3.2-ppc-powerpc-arch-fix.patch |
1846 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.3.2-strip.patch |
1847 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.3.2-ppc-powerpc-arch-fix.patch |
1848 |
# fix parallel make |
1849 |
- epatch "${FILESDIR}"/${PN}-2.7.0-doc-make.patch |
1850 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.7.0-doc-make.patch |
1851 |
# fix automagic |
1852 |
- epatch "${FILESDIR}"/${PN}-2.7.0-no-automagic.patch |
1853 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.7.0-no-automagic.patch |
1854 |
# sage-on-gentoo trac 15654: PARI discriminant speed depends on stack size |
1855 |
- epatch "${FILESDIR}"/${PN}-2.7.0-slow-discriminant.patch |
1856 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.7.0-slow-discriminant.patch |
1857 |
# Fix Perl 5.26 |
1858 |
- epatch "${FILESDIR}/"${PN}-2.7.0-no-dot-inc.patch |
1859 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.7.0-no-dot-inc.patch |
1860 |
# fix building docs with perl-5.22 |
1861 |
- epatch "${FILESDIR}"/${PN}-2.7.1-perl-5.22-doc.patch |
1862 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-2.7.1-perl-5.22-doc.patch |
1863 |
|
1864 |
# disable default building of docs during install |
1865 |
sed -i \ |