1 |
bicatali 12/08/01 21:38:31 |
2 |
|
3 |
Added: pari-2.5.1-1304.patch pari-2.5.1-1302.patch |
4 |
pari-2.5.1-no-automagic.patch |
5 |
Log: |
6 |
Fixed automagic dependencies against fltk and qt as noted by Burcin Erocal, bug #428192, added some upstream patches from sage-on-gentoo |
7 |
|
8 |
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sci-mathematics/pari/files/pari-2.5.1-1304.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.5.1-1304.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.5.1-1304.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: pari-2.5.1-1304.patch |
17 |
=================================================================== |
18 |
commit ff707a3f2ba2d5c555434ba50547453833a7570f |
19 |
Author: Karim Belabas <Karim.Belabas@××××××××××××××××.fr> |
20 |
Date: Sun Mar 18 23:54:02 2012 +0100 |
21 |
|
22 |
71- issquarefree(0) => error [#1304] |
23 |
|
24 |
diff --git a/src/basemath/ifactor1.c b/src/basemath/ifactor1.c |
25 |
index 046491f..8f9fbaa 100644 |
26 |
--- a/src/basemath/ifactor1.c |
27 |
+++ b/src/basemath/ifactor1.c |
28 |
@@ -3493,7 +3493,11 @@ moebius(GEN n) |
29 |
GEN |
30 |
gissquarefree(GEN x) { return map_proto_lG(issquarefree,x); } |
31 |
long |
32 |
-Z_issquarefree(GEN n) { return moebius(n)? 1: 0; } |
33 |
+Z_issquarefree(GEN n) |
34 |
+{ |
35 |
+ if (!signe(n)) return 0; |
36 |
+ return moebius(n)? 1: 0; |
37 |
+} |
38 |
long |
39 |
issquarefree(GEN x) |
40 |
{ |
41 |
diff --git a/src/test/32/arith b/src/test/32/arith |
42 |
new file mode 100644 |
43 |
index 0000000..3c5981a |
44 |
--- /dev/null |
45 |
+++ b/src/test/32/arith |
46 |
@@ -0,0 +1,2 @@ |
47 |
+0 |
48 |
+Total time spent: 8 |
49 |
diff --git a/src/test/in/arith b/src/test/in/arith |
50 |
new file mode 100644 |
51 |
index 0000000..fb92bed |
52 |
--- /dev/null |
53 |
+++ b/src/test/in/arith |
54 |
@@ -0,0 +1,2 @@ |
55 |
+\\#1304 |
56 |
+issquarefree(0) |
57 |
|
58 |
|
59 |
|
60 |
1.1 sci-mathematics/pari/files/pari-2.5.1-1302.patch |
61 |
|
62 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.5.1-1302.patch?rev=1.1&view=markup |
63 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.5.1-1302.patch?rev=1.1&content-type=text/plain |
64 |
|
65 |
Index: pari-2.5.1-1302.patch |
66 |
=================================================================== |
67 |
commit 917b505c86a70dda2191d380861af05becc03858 |
68 |
Author: Karim Belabas <Karim.Belabas@××××××××××××××××.fr> |
69 |
Date: Mon Mar 12 23:54:11 2012 +0100 |
70 |
|
71 |
ispower(x < 0,, &n): n could have the wrong sign [#1302] |
72 |
|
73 |
diff --git a/src/basemath/arith1.c b/src/basemath/arith1.c |
74 |
index ded946b..5502ba5 100644 |
75 |
--- a/src/basemath/arith1.c |
76 |
+++ b/src/basemath/arith1.c |
77 |
@@ -1109,6 +1109,7 @@ Z_isanypower(GEN x, GEN *pty) |
78 |
*pty = gerepileuptoint(av, y); |
79 |
return k; |
80 |
} |
81 |
+ if (pty) togglesign_safe(pty); |
82 |
} |
83 |
if (pty) *pty = gerepilecopy(av, *pty); else avma = av; |
84 |
return k; |
85 |
diff --git a/src/test/32/ispower b/src/test/32/ispower |
86 |
index bf4b6f0..84d8de7 100644 |
87 |
--- a/src/test/32/ispower |
88 |
+++ b/src/test/32/ispower |
89 |
@@ -1118,7 +1118,7 @@ |
90 |
[2, 999] |
91 |
[6, 10] |
92 |
[3, -4] |
93 |
-[3, 2] |
94 |
-[3, 21218] |
95 |
+[3, -2] |
96 |
+[3, -21218] |
97 |
[3, -1/4] |
98 |
-Total time spent: 3236 |
99 |
+Total time spent: 3012 |
100 |
|
101 |
|
102 |
|
103 |
1.1 sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch |
104 |
|
105 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch?rev=1.1&view=markup |
106 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch?rev=1.1&content-type=text/plain |
107 |
|
108 |
Index: pari-2.5.1-no-automagic.patch |
109 |
=================================================================== |
110 |
diff -Nur pari-2.5.1.orig/config/get_config_options pari-2.5.1/config/get_config_options |
111 |
--- pari-2.5.1.orig/config/get_config_options 2012-08-01 18:32:03.000000000 +0100 |
112 |
+++ pari-2.5.1/config/get_config_options 2012-08-01 20:57:09.000000000 +0100 |
113 |
@@ -83,10 +83,12 @@ |
114 |
--with-ncurses-lib=*|--with-ncurses=*) |
115 |
with_ncurses_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
116 |
|
117 |
+ --without-qt|--with-qt=no) without_qt=yes ;; |
118 |
--with-qt) with_qt=yes ;; |
119 |
--with-qt=*) |
120 |
with_qt=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
121 |
|
122 |
+ --without-fltk|--with-fltk=no) without_fltk=yes ;; |
123 |
--with-fltk) with_fltk=yes ;; |
124 |
--with-fltk=*) |
125 |
with_fltk=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
126 |
@@ -158,7 +160,9 @@ |
127 |
--with-gmp-lib=DIR specify location of gmp libs |
128 |
|
129 |
--with-qt[=DIR] use the Qt graphical library [prefix for Qt dir.] |
130 |
+ --without-qt do not try to use the Qt lib |
131 |
--with-fltk[=DIR] use the FLTK graphical library [prefix for FLTK dir.] |
132 |
+ --without-fltk do not try to use the FLTK lib |
133 |
|
134 |
EOT |
135 |
exit 1 |
136 |
diff -Nur pari-2.5.1.orig/config/get_fltk pari-2.5.1/config/get_fltk |
137 |
--- pari-2.5.1.orig/config/get_fltk 2012-08-01 18:32:03.000000000 +0100 |
138 |
+++ pari-2.5.1/config/get_fltk 2012-08-01 22:28:23.000000000 +0100 |
139 |
@@ -2,6 +2,9 @@ |
140 |
with_fltk=yes |
141 |
fi |
142 |
FLTKDIR= |
143 |
+if test -z "$without_fltk; then |
144 |
+ FLTKDIR="`fltk-config --prefix 2>/dev/null`" |
145 |
+fi |
146 |
case "$with_fltk" in |
147 |
yes) |
148 |
pth=$libpth; lib=fltk; . ./locatelib |
149 |
diff -Nur pari-2.5.1.orig/config/get_graphic_lib pari-2.5.1/config/get_graphic_lib |
150 |
--- pari-2.5.1.orig/config/get_graphic_lib 2012-08-01 18:32:03.000000000 +0100 |
151 |
+++ pari-2.5.1/config/get_graphic_lib 2012-08-01 22:16:57.000000000 +0100 |
152 |
@@ -11,6 +11,7 @@ |
153 |
else |
154 |
if test -n "$with_fltk"; then which_graphic_lib=fltk; fi |
155 |
if test -n "$with_qt"; then which_graphic_lib=Qt; fi |
156 |
+ if test -n "$without_fltk" -a -n "$without_qt"; then which_graphic_lib=none; fi |
157 |
if test "$which_graphic_lib" != none; then |
158 |
case $osname in |
159 |
mingw) case $which_graphic_lib in |
160 |
@@ -41,7 +42,7 @@ |
161 |
case $which_graphic_lib in |
162 |
auto|fltk) |
163 |
. ./get_fltk # FLTKDIR, FLTK_LIBS |
164 |
- if test -z "$FLTKDIR"; then |
165 |
+ if test -z "`fltk-config --ldflags 2> /dev/null`"; then |
166 |
case $which_graphic_lib in fltk) which_graphic_lib=none;; esac |
167 |
else |
168 |
which_graphic_lib=fltk |
169 |
diff -Nur pari-2.5.1.orig/config/get_Qt pari-2.5.1/config/get_Qt |
170 |
--- pari-2.5.1.orig/config/get_Qt 2012-08-01 18:32:03.000000000 +0100 |
171 |
+++ pari-2.5.1/config/get_Qt 2012-08-01 20:39:28.000000000 +0100 |
172 |
@@ -5,7 +5,7 @@ |
173 |
case "$with_qt" in |
174 |
yes) |
175 |
pth="/usr/local/lib /usr/local/share /usr/lib /usr/share" |
176 |
- QTDIR=`locatedir qt4/bin $pth` |
177 |
+ QTDIR=`locatedir qt4 $pth` |
178 |
QTLIB="-lQtCore -lQtGui" |
179 |
which_graphic_lib=Qt4 |
180 |
if test -z "$QTDIR"; then |
181 |
diff -Nur pari-2.5.1.orig/config/Makefile.SH pari-2.5.1/config/Makefile.SH |
182 |
--- pari-2.5.1.orig/config/Makefile.SH 2012-08-01 18:32:03.000000000 +0100 |
183 |
+++ pari-2.5.1/config/Makefile.SH 2012-08-01 21:08:20.000000000 +0100 |
184 |
@@ -65,12 +65,12 @@ |
185 |
PLOTLIBS="-L\$(QTDIR)/lib $QTLIB" |
186 |
graph=plotQt;; |
187 |
Qt4) |
188 |
- PLOTCFLAGS='-D__FANCY_WIN__ -I$(QTDIR)/include' |
189 |
- PLOTLIBS="-L\$(QTDIR)/lib $QTLIB" |
190 |
+ PLOTCFLAGS='-D__FANCY_WIN__ `pkg-config --cflags QtGui`' |
191 |
+ PLOTLIBS="`pkg-config --libs QtGui`" |
192 |
graph=plotQt4;; |
193 |
fltk) |
194 |
- PLOTCFLAGS="-I\$(FLTKDIR)/include $X11_INC" |
195 |
- PLOTLIBS="-L\$(FLTKDIR)/lib -lfltk $FLTK_LIBS" |
196 |
+ PLOTCFLAGS="`fltk-config --cxxflags` $X11_INC" |
197 |
+ PLOTLIBS="`fltk-config --ldflags`" |
198 |
postconfig='-fltk-config --post ' |
199 |
graph=plotfltk;; |
200 |
win32) |
201 |
@@ -254,7 +254,7 @@ |
202 |
GMPINCLUDE = $GMPINCLUDE |
203 |
# Graphic library. |
204 |
QTDIR = "$QTDIR" |
205 |
-MOC = \$(QTDIR)/bin/moc |
206 |
+MOC = "`which moc`" |
207 |
PLOTCFLAGS = $PLOTCFLAGS |
208 |
PLOTLIBS = $PLOTLIBS |
209 |
CPLUSPLUS = g++ |