mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-09 00:17:31 +00:00
community/giac to 1.9.0.29-1
This commit is contained in:
parent
07931b63c5
commit
2888d1566f
3 changed files with 73 additions and 25 deletions
|
@ -4,7 +4,7 @@
|
|||
# - delete shipped x86 binary src/mkjs to force rebuild for ARM
|
||||
|
||||
pkgname=giac
|
||||
_pkgver=1.9.0-25
|
||||
_pkgver=1.9.0-29
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
pkgdesc='A free computer algebra system'
|
||||
|
@ -17,13 +17,13 @@ optdepends=('perl: for pgiac')
|
|||
replaces=(libgiac xcas)
|
||||
provides=(libgiac xcas)
|
||||
source=(http://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/${pkgname}_$_pkgver.tar.gz
|
||||
giac-pari-2.15.patch)
|
||||
sha256sums=('a449c1de1136d0fe45c162fcd84821ff3e68f8995512affeac683e0abc1f8b71'
|
||||
'cb1d6e783f2a1f05c2ec7319874089e6a2ab6316f65661087796452b9b8efb21')
|
||||
format-security.patch)
|
||||
sha256sums=('f6351572cad5f2331faab9a7ca6678bc869695a6c5f69a42baaed50e56790b0e'
|
||||
'4a5278dc6196b2e9642eed8550f940b0fb08f837ec8fa4dffabade31fdafc4da')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-${pkgver%.*}
|
||||
patch -p1 < ../giac-pari-2.15.patch # Fix build with pari 2.15
|
||||
patch -p1 < ../format-security.patch # Fix -Werror=format-security errors
|
||||
rm -f src/mkjs # force rebuild for ARM
|
||||
}
|
||||
|
||||
|
|
68
community/giac/format-security.patch
Normal file
68
community/giac/format-security.patch
Normal file
|
@ -0,0 +1,68 @@
|
|||
diff -ru giac-1.9.0.orig/src/Graph.cc giac-1.9.0/src/Graph.cc
|
||||
--- giac-1.9.0.orig/src/Graph.cc 2022-11-04 19:00:52.059786792 +0100
|
||||
+++ giac-1.9.0/src/Graph.cc 2022-11-04 19:05:34.765503717 +0100
|
||||
@@ -5640,7 +5640,7 @@
|
||||
}
|
||||
|
||||
bool inputdouble(const char * msg,double & d,GIAC_CONTEXT){
|
||||
- const char * ch=fl_input(msg,print_DOUBLE_(d).c_str());
|
||||
+ const char * ch=fl_input("%s",msg,print_DOUBLE_(d).c_str());
|
||||
if (!ch) return false;
|
||||
gen g(ch,contextptr);
|
||||
g=evalf_double(g,1,contextptr);
|
||||
@@ -5779,14 +5779,14 @@
|
||||
if (operation==2){ // root near curt
|
||||
sol=newton(y,t,curt,NEWTON_DEFAULT_ITERATION,eps,1e-12,true,tmin._DOUBLE_val,tmax._DOUBLE_val,1,0,1,contextptr);
|
||||
if (sol.type==_DOUBLE_){
|
||||
- fl_alert((gettext("Root at ")+sol.print(contextptr)).c_str());
|
||||
+ fl_alert("%s",(gettext("Root at ")+sol.print(contextptr)).c_str());
|
||||
sto(sol,gen("Zero",contextptr),contextptr);
|
||||
}
|
||||
}
|
||||
if (operation==4){ // horizontal tangent near curt
|
||||
sol=newton(y1,t,curt,NEWTON_DEFAULT_ITERATION,eps,1e-12,true,tmin._DOUBLE_val,tmax._DOUBLE_val,1,0,1,contextptr);
|
||||
if (sol.type==_DOUBLE_){
|
||||
- fl_alert((gettext("y'=0, extremum/singular pt at ")+sol.print(contextptr)).c_str());
|
||||
+ fl_alert("%s",(gettext("y'=0, extremum/singular pt at ")+sol.print(contextptr)).c_str());
|
||||
sto(sol,gen("Extremum",contextptr),contextptr);
|
||||
}
|
||||
}
|
||||
@@ -5796,7 +5796,7 @@
|
||||
else {
|
||||
sol=newton(x1,t,curt,NEWTON_DEFAULT_ITERATION,eps,1e-12,true,tmin._DOUBLE_val,tmax._DOUBLE_val,1,0,1,contextptr);
|
||||
if (sol.type==_DOUBLE_){
|
||||
- fl_alert((gettext("x'=0, vertical or singular: ")+sol.print(contextptr)).c_str());
|
||||
+ fl_alert("%s",(gettext("x'=0, vertical or singular: ")+sol.print(contextptr)).c_str());
|
||||
sto(sol,gen("Vertical",contextptr),contextptr);
|
||||
}
|
||||
}
|
||||
@@ -5804,7 +5804,7 @@
|
||||
if (operation==6){ // inflexion
|
||||
sol=newton(x1*y2-x2*y1,t,curt,NEWTON_DEFAULT_ITERATION,eps,1e-12,true,tmin._DOUBLE_val,tmax._DOUBLE_val,1,0,1,contextptr);
|
||||
if (sol.type==_DOUBLE_){
|
||||
- fl_alert(("x'*y''-x''*y'=0: "+sol.print(contextptr)).c_str());
|
||||
+ fl_alert("%s",("x'*y''-x''*y'=0: "+sol.print(contextptr)).c_str());
|
||||
sto(sol,gen("Inflexion",contextptr),contextptr);
|
||||
}
|
||||
}
|
||||
@@ -5826,9 +5826,9 @@
|
||||
tracemode_disp.push_back(giac::eval(res,1,contextptr));
|
||||
string ss=res.print(contextptr);
|
||||
if (!tegral(f,t,a,b,1e-6,1<<10,res,false,contextptr))
|
||||
- fl_alert((gettext("Numerical Integration Error: ")+ss).c_str());
|
||||
+ fl_alert("%s",(gettext("Numerical Integration Error: ")+ss).c_str());
|
||||
else {
|
||||
- fl_alert((ss+": "+res.print(contextptr)).c_str());
|
||||
+ fl_alert("%s",(ss+": "+res.print(contextptr)).c_str());
|
||||
sto(res,gen((operation==9?"Area":"Arclength"),contextptr),contextptr);
|
||||
}
|
||||
}
|
||||
@@ -5938,7 +5938,7 @@
|
||||
curve_infos1 = f.print(contextptr)+": "+curve_infos1;
|
||||
}
|
||||
}
|
||||
- fl_alert((curve_infos1+'\n'+curve_infos2).c_str());
|
||||
+ fl_alert("%s",(curve_infos1+'\n'+curve_infos2).c_str());
|
||||
}
|
||||
tracemode_add="";
|
||||
if (Gx.type==_DOUBLE_ && Gy.type==_DOUBLE_){
|
|
@ -1,20 +0,0 @@
|
|||
ANYARG patch
|
||||
|
||||
diff --git a/src/pari.cc b/src/pari.cc
|
||||
index 76ce8e1..50d08ab 100644
|
||||
--- a/src/pari.cc
|
||||
+++ b/src/pari.cc
|
||||
@@ -40,6 +40,13 @@ using namespace std;
|
||||
|
||||
#ifdef HAVE_LIBPARI
|
||||
|
||||
+// Anyarg disappeared from PARI 2.15.0
|
||||
+#ifdef __cplusplus
|
||||
+# define ANYARG ...
|
||||
+#else
|
||||
+# define ANYARG
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
#include <pthread.h>
|
||||
#endif
|
Loading…
Reference in a new issue