diff --git a/gp.desktop b/gp.desktop index 38cf7bc..0027233 100644 --- a/gp.desktop +++ b/gp.desktop @@ -2,9 +2,8 @@ Name=PARI/GP Comment=Programmable calculator based on PARI Exec=gp -Icon=/usr/share/pari/misc/pari.xpm +Icon=/usr/share/pixmaps/pari-gp.xpm Terminal=true Type=Application -Categories=Application;Education;Science;Math; -Encoding=UTF-8 +Categories=Science;Math; X-Desktop-File-Install-Version=0.10 diff --git a/pari-2.13.0-clobbered.patch b/pari-2.13.0-clobbered.patch new file mode 100644 index 0000000..177344b --- /dev/null +++ b/pari-2.13.0-clobbered.patch @@ -0,0 +1,49 @@ +--- src/basemath/bibli1.c.orig 2020-10-15 02:36:36.000000000 -0600 ++++ src/basemath/bibli1.c 2020-10-19 15:10:33.130950212 -0600 +@@ -1902,7 +1902,7 @@ END: + GEN + fincke_pohst(GEN a, GEN B0, long stockmax, long PREC, FP_chk_fun *CHECK) + { +- pari_sp av = avma; ++ VOLATILE pari_sp av = avma; + VOLATILE long i,j,l; + VOLATILE GEN r,rinv,rinvtrans,u,v,res,z,vnorm,rperm,perm,uperm, bound = B0; + +--- src/gp/gp.c.orig 2020-10-15 02:36:36.000000000 -0600 ++++ src/gp/gp.c 2020-10-19 15:10:33.131950211 -0600 +@@ -433,7 +433,8 @@ break_loop(int numerr) + { + filtre_t F; + Buffer *b; +- int sigint = numerr<0, go_on = sigint; ++ int sigint = numerr<0; ++ VOLATILE int go_on = sigint; + struct gp_context rec1, rec2; + const char *prompt, *msg; + long nenv, oldframe_level = frame_level; +--- src/language/gplib.c.orig 2020-10-15 02:36:36.000000000 -0600 ++++ src/language/gplib.c 2020-10-19 15:10:33.132950211 -0600 +@@ -938,7 +938,7 @@ parse_key_val(char *src, char **ps, char + void + gp_initrc(pari_stack *p_A) + { +- FILE *file = gprc_get(); ++ FILE * VOLATILE file = gprc_get(); + Buffer *b; + filtre_t F; + VOLATILE long c = 0; +--- src/modules/stark.c.orig 2020-10-15 02:36:36.000000000 -0600 ++++ src/modules/stark.c 2020-10-19 16:19:30.113213038 -0600 +@@ -2548,10 +2548,11 @@ quadray_init(GEN *pD, GEN f, GEN *pbnf, + /* compute the polynomial over Q of the Hilbert class field of + Q(sqrt(D)) where D is a positive fundamental discriminant */ + static GEN +-quadhilbertreal(GEN D, long prec) ++quadhilbertreal(GEN D, long baseprec) + { + pari_sp av = avma; + GEN bnf, pol, bnr, dtQ, data, M; ++ VOLATILE long prec = baseprec; + long newprec; + pari_timer T; + diff --git a/pari-2.13.0-declaration-not-prototype.patch b/pari-2.13.0-declaration-not-prototype.patch new file mode 100644 index 0000000..6b477cf --- /dev/null +++ b/pari-2.13.0-declaration-not-prototype.patch @@ -0,0 +1,149 @@ +--- src/basemath/buch2.c.orig 2020-10-15 08:30:54.000000000 -0600 ++++ src/basemath/buch2.c 2020-10-19 16:08:02.707935874 -0600 +@@ -1140,7 +1140,7 @@ getfu(GEN nf, GEN *ptA, GEN *ptU, long p + } + + static void +-err_units() { pari_err_PREC("makeunits [cannot get units, use bnfinit(,1)]"); } ++err_units(void) { pari_err_PREC("makeunits [cannot get units, use bnfinit(,1)]"); } + + /* bound for log2 |sigma(u)|, sigma complex embedding, u fundamental unit + * attached to bnf_get_logfu */ +--- src/basemath/mftrace.c.orig 2020-10-15 02:36:36.000000000 -0600 ++++ src/basemath/mftrace.c 2020-10-19 16:07:40.945917453 -0600 +@@ -625,7 +625,7 @@ mfcharGL(GEN G, GEN L) + return mkvec4(G, L, o, polcyclo(ord,vt)); + } + static GEN +-mfchartrivial() ++mfchartrivial(void) + { return mfcharGL(znstar0(gen_1,1), cgetg(1,t_COL)); } + /* convert a generic character into an 'mfchar' */ + static GEN +@@ -1712,7 +1712,7 @@ mfcoef(GEN F, long n) + } + + static GEN +-paramconst() { return tagparams(t_MF_CONST, mkNK(1,0,mfchartrivial())); } ++paramconst(void) { return tagparams(t_MF_CONST, mkNK(1,0,mfchartrivial())); } + static GEN + mftrivial(void) { retmkvec2(paramconst(), cgetg(1,t_VEC)); } + static GEN +--- src/basemath/modsym.c.orig 2020-10-15 02:36:36.000000000 -0600 ++++ src/basemath/modsym.c 2020-10-19 16:07:40.947917455 -0600 +@@ -1404,11 +1404,11 @@ indices_backward(GEN W, GEN C) + + /*[0,-1;1,-1]*/ + static GEN +-mkTAU() ++mkTAU(void) + { return mkmat22(gen_0,gen_m1, gen_1,gen_m1); } + /* S */ + static GEN +-mkS() ++mkS(void) + { return mkmat22(gen_0,gen_1, gen_m1,gen_0); } + /* N = integer > 1. Returns data describing Delta_0 = Z[P^1(Q)]_0 seen as + * a Gamma_0(N) - module. */ +--- src/language/eval.c.orig 2020-10-15 02:36:36.000000000 -0600 ++++ src/language/eval.c 2020-10-19 16:07:40.948917456 -0600 +@@ -1345,11 +1345,11 @@ closure_eval(GEN C) + break; + } + +-#define EVAL_f(f) \ ++#define EVAL_f0(f) f() ++#define EVAL_f1(f) sp--; f(st[sp]) ++#define EVAL_fn(f) \ + switch (ep->arity) \ + { \ +- case 0: f(); break; \ +- case 1: sp--; f(st[sp]); break; \ + case 2: sp-=2; f(st[sp],st[sp+1]); break; \ + case 3: sp-=3; f(st[sp],st[sp+1],st[sp+2]); break; \ + case 4: sp-=4; f(st[sp],st[sp+1],st[sp+2],st[sp+3]); break; \ +@@ -1380,7 +1380,12 @@ closure_eval(GEN C) + GEN res; + /* Macro Madness : evaluate function ep->value on arguments + * st[sp-ep->arity .. sp]. Set res = result. */ +- EVAL_f(res = ((GEN (*)(ANYARG))ep->value)); ++ switch (ep->arity) ++ { ++ case 0: EVAL_f0(res = ((GEN (*)(void))ep->value)); break; ++ case 1: EVAL_f1(res = ((GEN (*)(long))ep->value)); break; ++ default: EVAL_fn(res = ((GEN (*)(long, ...))ep->value)); ++ } + if (br_status) goto endeval; + gel(st,sp++)=res; + break; +@@ -1399,7 +1404,12 @@ closure_eval(GEN C) + { + entree *ep = (entree *)operand; + long res; +- EVAL_f(res = ((long (*)(ANYARG))ep->value)); ++ switch (ep->arity) ++ { ++ case 0: EVAL_f0(res = ((long (*)(void))ep->value)); break; ++ case 1: EVAL_f1(res = ((long (*)(long))ep->value)); break; ++ default: EVAL_fn(res = ((long (*)(long, ...))ep->value)); ++ } + if (br_status) goto endeval; + st[sp++] = res; + break; +@@ -1408,7 +1418,12 @@ closure_eval(GEN C) + { + entree *ep = (entree *)operand; + long res; +- EVAL_f(res = ((int (*)(ANYARG))ep->value)); ++ switch (ep->arity) ++ { ++ case 0: EVAL_f0(res = ((int (*)(void))ep->value)); break; ++ case 1: EVAL_f1(res = ((int (*)(long))ep->value)); break; ++ default: EVAL_fn(res = ((int (*)(long, ...))ep->value)); ++ } + if (br_status) goto endeval; + st[sp++] = res; + break; +@@ -1416,11 +1431,18 @@ closure_eval(GEN C) + case OCcallvoid: + { + entree *ep = (entree *)operand; +- EVAL_f(((void (*)(ANYARG))ep->value)); ++ switch (ep->arity) ++ { ++ case 0: EVAL_f0(((void (*)(void))ep->value)); break; ++ case 1: EVAL_f1(((void (*)(long))ep->value)); break; ++ default: EVAL_fn(((void (*)(long, ...))ep->value)); ++ } + if (br_status) goto endeval; + break; + } +-#undef EVAL_f ++#undef EVAL_f0 ++#undef EVAL_f1 ++#undef EVAL_fn + + case OCcalluser: + { +--- src/language/init.c.orig 2020-10-15 02:36:36.000000000 -0600 ++++ src/language/init.c 2020-10-19 16:07:40.950917458 -0600 +@@ -121,7 +121,7 @@ void (*cb_pari_pre_recover)(long); + void (*cb_pari_err_recover)(long); + int (*cb_pari_break_loop)(int); + int (*cb_pari_is_interactive)(void); +-void (*cb_pari_start_output)(); ++void (*cb_pari_start_output)(void); + + const char * pari_library_path = NULL; + +--- src/modules/mpqs.c.orig 2020-10-19 11:13:10.000000000 -0600 ++++ src/modules/mpqs.c 2020-10-19 16:08:21.266951580 -0600 +@@ -1495,7 +1495,7 @@ mpqs_solve_linear_system(mpqs_handle_t * + /** MAIN ENTRY POINT AND DRIVER ROUTINE **/ + /*********************************************************************/ + static void +-toolarge() ++toolarge(void) + { pari_warn(warner, "MPQS: number too big to be factored with MPQS,\n\tgiving up"); } + + /* Factors N using the self-initializing multipolynomial quadratic sieve diff --git a/pari-2.13.0-optflags.patch b/pari-2.13.0-optflags.patch new file mode 100644 index 0000000..e6bd3ef --- /dev/null +++ b/pari-2.13.0-optflags.patch @@ -0,0 +1,24 @@ +--- config/get_cc.orig 2020-09-21 00:29:25.000000000 -0600 ++++ config/get_cc 2020-10-19 15:07:44.937970813 -0600 +@@ -93,7 +93,7 @@ if test -n "$__gnuc__"; then + cmd="$CC $CFLAGS $extraflag -fno-strict-aliasing -o $exe gnu.c" + . log_cmd + if test -s $exe; then +- OPTFLAGS="$OPTFLAGS -fno-strict-aliasing" ++ OPTFLAGS="@OPTFLAGS@ -fno-strict-aliasing" + fi + . cleanup_exe + case "$optimization" in +@@ -118,12 +118,6 @@ if test -n "$__gnuc__"; then + # omit-frame-pointer incompatible with -pg + PRFFLAGS="-pg $OPTFLAGS" + GCOVFLAGS="-fprofile-arcs -ftest-coverage" +- case "$optimization" in +- full) case "$osname" in +- mingw) ;; +- *) OPTFLAGS="$OPTFLAGS -fomit-frame-pointer";; +- esac;; +- esac + else + DBGFLAGS=${DBGFLAGS:-'-g'} + PRFFLAGS='-pg' diff --git a/pari-2.13.0-signed-unsigned-comparison.patch b/pari-2.13.0-signed-unsigned-comparison.patch new file mode 100644 index 0000000..66e35ef --- /dev/null +++ b/pari-2.13.0-signed-unsigned-comparison.patch @@ -0,0 +1,22 @@ +--- src/basemath/mftrace.c.orig 2020-10-19 16:07:40.945917453 -0600 ++++ src/basemath/mftrace.c 2020-10-19 16:21:03.543190445 -0600 +@@ -3714,7 +3714,7 @@ static GEN + RgV_shimura(GEN A, long n, long t, long N, long r, GEN CHI) + { + GEN R, a0, Pn = mfcharpol(CHI); +- long m, st, ord = mfcharorder(CHI), vt = varn(Pn), Nt = t == 1? N: ulcm(N,t); ++ long m, st, ord = mfcharorder(CHI), vt = varn(Pn), Nt = t == 1? N: (long)ulcm(N,t); + + R = cgetg(n + 2, t_VEC); + st = odd(r)? -t: t; +--- src/basemath/polarit3.c.orig 2020-10-15 02:36:36.000000000 -0600 ++++ src/basemath/polarit3.c 2020-10-19 16:20:19.515201075 -0600 +@@ -936,7 +936,7 @@ gen_inccrt_i(const char *str, GEN worker + forprime_t *S, GEN *pH, GEN *pmod, GEN crt(GEN, GEN, GEN*), + GEN center(GEN, GEN, GEN)) + { +- long m = mmin? minss(mmin, n): usqrt(n); ++ long m = mmin? minss(mmin, n): (long)usqrt(n); + GEN H, P, mod; + pari_timer ti; + if (DEBUGLEVEL > 4) diff --git a/pari-2.13.0-xdgopen.patch b/pari-2.13.0-xdgopen.patch new file mode 100644 index 0000000..f3c2255 --- /dev/null +++ b/pari-2.13.0-xdgopen.patch @@ -0,0 +1,13 @@ +--- doc/gphelp.in.orig 2020-09-21 00:29:25.000000000 -0600 ++++ doc/gphelp.in 2020-10-19 15:06:32.498979687 -0600 +@@ -43,8 +43,8 @@ $datadir= "@datadir@"; + # + $wwwsite= "http://pari.math.u-bordeaux.fr/"; + +-$xdvi = $ENV{GPXDVI} || "xdvi"; +-$xdviref = $ENV{GPXDVIREF} || "$xdvi -paper 29.7x21cm"; ++$xdvi = $ENV{GPXDVI} || "xdg-open"; ++$xdviref = $ENV{GPXDVIREF} || "$xdvi"; + $gzip = "gzip"; + $zcat = "$gzip -dc"; + $bzip = "bzip2"; diff --git a/pari-2.5.1-xdgopen.patch b/pari-2.5.1-xdgopen.patch deleted file mode 100644 index f118230..0000000 --- a/pari-2.5.1-xdgopen.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- doc/gphelp.in -+++ doc/gphelp.in -@@ -45,8 +45,8 @@ - # no expanded material (@key@) below - $wwwsite= "http://pari.math.u-bordeaux.fr/"; - --$xdvi = $ENV{GPXDVI} || "xdvi"; --$xdviref = $ENV{GPXDVIREF} || "$xdvi -paper 29.7x21cm"; -+$xdvi = $ENV{GPXDVI} || "xdg-open"; -+$xdviref = $ENV{GPXDVIREF} || "$xdvi"; - $gzip = "gzip"; - $zcat = "$gzip -dc"; - $bzip = "bzip2"; diff --git a/pari-2.9.0-clobbered.patch b/pari-2.9.0-clobbered.patch deleted file mode 100644 index d822d06..0000000 --- a/pari-2.9.0-clobbered.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- src/basemath/bibli1.c -+++ src/basemath/bibli1.c -@@ -1875,7 +1875,7 @@ END: - GEN - fincke_pohst(GEN a, GEN B0, long stockmax, long PREC, FP_chk_fun *CHECK) - { -- pari_sp av = avma; -+ VOLATILE pari_sp av = avma; - VOLATILE long i,j,l; - VOLATILE GEN r,rinv,rinvtrans,u,v,res,z,vnorm,rperm,perm,uperm, bound = B0; - ---- src/gp/gp.c -+++ src/gp/gp.c -@@ -420,7 +420,8 @@ break_loop(int numerr) - { - filtre_t F; - Buffer *b; -- int sigint = numerr<0, go_on = sigint; -+ int sigint = numerr<0; -+ VOLATILE int go_on = sigint; - struct gp_context rec1, rec2; - const char *prompt, *msg; - long nenv, oldframe_level = frame_level; ---- src/language/gplib.c -+++ src/language/gplib.c -@@ -936,7 +936,7 @@ parse_key_val(char *src, char **ps, char - void - gp_initrc(pari_stack *p_A) - { -- FILE *file = gprc_get(); -+ FILE * VOLATILE file = gprc_get(); - Buffer *b; - filtre_t F; - VOLATILE long c = 0; ---- src/modules/stark.c -+++ src/modules/stark.c -@@ -2781,9 +2781,10 @@ quadray_init(GEN *pD, GEN f, GEN *pbnf, - /* compute the polynomial over Q of the Hilbert class field of - Q(sqrt(D)) where D is a positive fundamental discriminant */ - static GEN --quadhilbertreal(GEN D, long prec) -+quadhilbertreal(GEN D, long baseprec) - { - pari_sp av = avma; -+ VOLATILE long prec = baseprec; - long newprec; - GEN bnf; - VOLATILE GEN bnr, dtQ, data, nf, cyc, M; diff --git a/pari-2.9.0-optflags.patch b/pari-2.9.0-optflags.patch deleted file mode 100644 index 3e7bd48..0000000 --- a/pari-2.9.0-optflags.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- config/get_cc -+++ config/get_cc -@@ -93,7 +93,7 @@ if test -n "$__gnuc__"; then - cmd="$CC $CFLAGS $extraflag -fno-strict-aliasing -o $exe gnu.c" - . log_cmd - if test -s $exe; then -- OPTFLAGS="$OPTFLAGS -fno-strict-aliasing" -+ OPTFLAGS="@OPTFLAGS@ -fno-strict-aliasing" - fi - . cleanup_exe - KERNELCFLAGS=-funroll-loops -@@ -116,12 +116,6 @@ if test -n "$__gnuc__"; then - # omit-frame-pointer incompatible with -pg - PRFFLAGS="-pg $OPTFLAGS" - GCOVFLAGS="-fprofile-arcs -ftest-coverage" -- case "$optimization" in -- full) case "$osname" in -- mingw) ;; -- *) OPTFLAGS="$OPTFLAGS -fomit-frame-pointer";; -- esac;; -- esac - else - DBGFLAGS=${DBGFLAGS:-'-g'} - PRFFLAGS='-pg' diff --git a/pari-2.9.0-signed-unsigned-comparison.patch b/pari-2.9.0-signed-unsigned-comparison.patch deleted file mode 100644 index ef6951c..0000000 --- a/pari-2.9.0-signed-unsigned-comparison.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- src/basemath/arith1.c -+++ src/basemath/arith1.c -@@ -3621,7 +3621,7 @@ GEN - Fp_order(GEN a, GEN o, GEN p) { - if (lgefint(p) == 3 && (!o || typ(o) == t_INT)) - { -- ulong pp = p[2], oo = (o && lgefint(o)==3)? o[2]: pp-1; -+ ulong pp = p[2], oo = (o && lgefint(o)==3)? (ulong)(o[2]): pp-1; - return utoi( Fl_order(umodiu(a, pp), oo, pp) ); - } - return gen_order(a, o, (void*)p, &Fp_star); -@@ -4109,7 +4109,7 @@ Fl_log_Fp(ulong a, ulong g, ulong ord, u - { - pari_sp av = avma; - GEN r = Fp_log(utoi(a),utoi(g),utoi(ord),utoi(p)); -- ulong z = typ(r)==t_INT ? itou(r): ~0L; -+ ulong z = (typ(r)==t_INT) ? itou(r): ~0UL; - avma = av; return z; - } - ---- src/basemath/base4.c -+++ src/basemath/base4.c -@@ -504,7 +504,7 @@ idealHNF_Z_factor_i(GEN x, GEN f0, GEN * - for (i = 1; i < l; i++) - { - GEN p = gel(P,i); -- vZ[i] = f0? Z_pval(xZ, p): itou(gel(E,i)); -+ vZ[i] = f0? Z_pval(xZ, p): itos(gel(E,i)); - vN[i] = idealHNF_norm_pval(x,p, vZ[i]); - } - return P; ---- src/basemath/char.c -+++ src/basemath/char.c -@@ -407,7 +407,7 @@ zv_cyc_minimize(GEN cyc, GEN g, GEN copr - gk = vecmoduu(gk, cyc); - if (vecsmall_lexcmp(gk, best) < 0) { best = gk; bestk = k; } - } -- avma = av; return bestk == 1? k0: Fl_mul(k0, bestk, o); -+ avma = av; return bestk == 1? k0: (long)Fl_mul(k0, bestk, o); - } - /* g of order o in abelian group G attached to cyc. Is g a minimal generator - * [wrt lex order] of the cyclic subgroup it generates; ---- src/basemath/hyperell.c -+++ src/basemath/hyperell.c -@@ -683,7 +683,7 @@ Flx_genus2charpoly_naive(GEN H, ulong p) - { - GEN r2 = gel(V, n+1); - c += uel(r2,2) ? -- (uel(r2,1) ? k[1+Fl2_norm_pre(r2, D, p, pi)]: e) -+ (uel(r2,1) ? (ulong)(k[1+Fl2_norm_pre(r2, D, p, pi)]): e) - : !!uel(r2,1); - if (i == p-1) break; - V = Fl2V_next(V, p); ---- src/basemath/mftrace.c -+++ src/basemath/mftrace.c -@@ -10980,7 +10980,7 @@ mfslashexpansion(GEN mf, GEN f, GEN ga, - long CD = (C * D) % N, BC = (B * C) % F; - GEN CV, t; - /* weight of f * Theta in 1/2-integral weight */ -- k = typ(gk) == t_INT? itou(gk): MF_get_r(mf)+1; -+ k = (typ(gk) == t_INT)? itos(gk): MF_get_r(mf)+1; - CV = odd(k) ? powuu(N, k - 1) : powuu(N, k >> 1); - deg = ulcm(ulcm(ord, N/ugcd(N,CD)), F/ugcd(F,BC)); - if (typ(gk) != t_INT && (C & 3) && odd(deg)) deg <<= 2;/* must adjoin I */ ---- src/basemath/nffactor.c -+++ src/basemath/nffactor.c -@@ -2062,7 +2062,7 @@ guess_roots(GEN nf) - /* the gcd of the p^f - 1 is p^(gcd of the f's) - 1 */ - for (i = 1; i <= nfdegree; i++) - if (F[i]) { -- gcdf = gcdf? ugcd(gcdf, i): i; -+ gcdf = gcdf? (long)ugcd(gcdf, i): i; - if (gcdf == 1) break; - } - pf_1 = subiu(powuu(p, gcdf), 1); ---- src/language/sumiter.c -+++ src/language/sumiter.c -@@ -269,14 +269,14 @@ forfactored(GEN a, GEN b, GEN code) - sb = signe(b); - if (sa < 0) - { -- stop = forfactoredneg((sb < 0)? b[2]: 1UL, itou(a), code); -+ stop = forfactoredneg((sb < 0)? (ulong)b[2]: 1UL, itou(a), code); - if (!stop && sb >= 0) stop = eval0(code); - if (!stop && sb > 0) forfactoredpos(1UL, b[2], code); - } - else - { - if (!sa) stop = eval0(code); -- if (!stop && sb) forfactoredpos(sa? a[2]: 1UL, itou(b), code); -+ if (!stop && sb) forfactoredpos(sa? (ulong)a[2]: 1UL, itou(b), code); - } - pop_lex(1); avma = av; - } diff --git a/pari-2.9.2-declaration-not-prototype.patch b/pari-2.9.2-declaration-not-prototype.patch deleted file mode 100644 index f72e9f0..0000000 --- a/pari-2.9.2-declaration-not-prototype.patch +++ /dev/null @@ -1,127 +0,0 @@ ---- src/basemath/mftrace.c -+++ src/basemath/mftrace.c -@@ -579,7 +579,7 @@ mfcharGL(GEN G, GEN L) - return mkvec4(G, L, o, polcyclo(ord,vt)); - } - static GEN --mfchartrivial() -+mfchartrivial(void) - { return mfcharGL(znstar0(gen_1,1), cgetg(1,t_COL)); } - /* convert a generic character into an 'mfchar' */ - static GEN -@@ -1593,7 +1593,7 @@ mfcoef(GEN F, long n) - } - - static GEN --paramconst() { return tagparams(t_MF_CONST, mkNK(1,0,mfchartrivial())); } -+paramconst(void) { return tagparams(t_MF_CONST, mkNK(1,0,mfchartrivial())); } - static GEN - mftrivial(void) { retmkvec2(paramconst(), cgetg(1,t_VEC)); } - static GEN ---- src/basemath/modsym.c -+++ src/basemath/modsym.c -@@ -1442,11 +1442,11 @@ indices_backward(GEN W, GEN C) - - /*[0,-1;1,-1]*/ - static GEN --mkTAU() -+mkTAU(void) - { return mkmat22(gen_0,gen_m1, gen_1,gen_m1); } - /* S */ - static GEN --mkS() -+mkS(void) - { return mkmat22(gen_0,gen_1, gen_m1,gen_0); } - /* N = integer > 1. Returns data describing Delta_0 = Z[P^1(Q)]_0 seen as - * a Gamma_0(N) - module. */ ---- src/language/eval.c -+++ src/language/eval.c -@@ -1262,11 +1262,11 @@ closure_eval(GEN C) - break; - } - --#define EVAL_f(f) \ -+#define EVAL_f0(f) f() -+#define EVAL_f1(f) sp--; f(st[sp]) -+#define EVAL_fn(f) \ - switch (ep->arity) \ - { \ -- case 0: f(); break; \ -- case 1: sp--; f(st[sp]); break; \ - case 2: sp-=2; f(st[sp],st[sp+1]); break; \ - case 3: sp-=3; f(st[sp],st[sp+1],st[sp+2]); break; \ - case 4: sp-=4; f(st[sp],st[sp+1],st[sp+2],st[sp+3]); break; \ -@@ -1297,7 +1297,12 @@ closure_eval(GEN C) - GEN res; - /* Macro Madness : evaluate function ep->value on arguments - * st[sp-ep->arity .. sp]. Set res = result. */ -- EVAL_f(res = ((GEN (*)(ANYARG))ep->value)); -+ switch (ep->arity) -+ { -+ case 0: EVAL_f0(res = ((GEN (*)(void))ep->value)); break; -+ case 1: EVAL_f1(res = ((GEN (*)(long))ep->value)); break; -+ default: EVAL_fn(res = ((GEN (*)(long, ...))ep->value)); -+ } - if (br_status) goto endeval; - gel(st,sp++)=res; - break; -@@ -1316,7 +1321,12 @@ closure_eval(GEN C) - { - entree *ep = (entree *)operand; - long res; -- EVAL_f(res = ((long (*)(ANYARG))ep->value)); -+ switch (ep->arity) -+ { -+ case 0: EVAL_f0(res = ((long (*)(void))ep->value)); break; -+ case 1: EVAL_f1(res = ((long (*)(long))ep->value)); break; -+ default: EVAL_fn(res = ((long (*)(long, ...))ep->value)); -+ } - if (br_status) goto endeval; - st[sp++] = res; - break; -@@ -1325,7 +1335,12 @@ closure_eval(GEN C) - { - entree *ep = (entree *)operand; - long res; -- EVAL_f(res = ((int (*)(ANYARG))ep->value)); -+ switch (ep->arity) -+ { -+ case 0: EVAL_f0(res = ((int (*)(void))ep->value)); break; -+ case 1: EVAL_f1(res = ((int (*)(long))ep->value)); break; -+ default: EVAL_fn(res = ((int (*)(long, ...))ep->value)); -+ } - if (br_status) goto endeval; - st[sp++] = res; - break; -@@ -1333,11 +1348,18 @@ closure_eval(GEN C) - case OCcallvoid: - { - entree *ep = (entree *)operand; -- EVAL_f(((void (*)(ANYARG))ep->value)); -+ switch (ep->arity) -+ { -+ case 0: EVAL_f0(((void (*)(void))ep->value)); break; -+ case 1: EVAL_f1(((void (*)(long))ep->value)); break; -+ default: EVAL_fn(((void (*)(long, ...))ep->value)); -+ } - if (br_status) goto endeval; - break; - } --#undef EVAL_f -+#undef EVAL_f0 -+#undef EVAL_f1 -+#undef EVAL_fn - - case OCcalluser: - { ---- src/language/init.c -+++ src/language/init.c -@@ -120,7 +120,7 @@ void (*cb_pari_pre_recover)(long); - void (*cb_pari_err_recover)(long); - int (*cb_pari_break_loop)(int); - int (*cb_pari_is_interactive)(void); --void (*cb_pari_start_output)(); -+void (*cb_pari_start_output)(void); - - const char * pari_library_path = NULL; - diff --git a/pari-gp.xpm b/pari-gp.xpm new file mode 100644 index 0000000..32a5d2d --- /dev/null +++ b/pari-gp.xpm @@ -0,0 +1,60 @@ +/* XPM */ +static char *pari-gp-tiny[] = { +/* width height num_colors chars_per_pixel */ +" 56 40 13 1", +/* colors */ +". c #ffffff", +"# c #006cf8", +"a c #20d010", +"b c #a0d3ff", +"c c #88ff68", +"d c #009900", +"e c #000000", +"f c #9f9f9f", +"g c #0000cc", +"h c #b0032b", +"i c #bfbfbf", +"j c #ffc1b9", +"k c #f71814", +/* pixels */ +"........................................................", +".......................#a...............................", +"......................#bcd..............................", +"............eeeeef....#bcd....eeeeef...eeee.............", +".............ee..ef...gbcd.....ee..ef...ee..............", +".............ee..ee..#bhhca....ee..ee...ee..............", +".............ee..ef..g.hh.d....ee..ef...ee..............", +".............eeeef...hhhhhh....eeeef....ee..............", +".............ee.....bhhhhhhc...eeiei....ee..............", +".............ee.....g..hh..d...ee.iei...ee..............", +".............ee....bg.bhhc.dc..ee..iei..ee..............", +"............eeee...gb.b..c.cd.eeee.eeefeeee.............", +"..................bg..b..c..dc..........................", +".................#gb.bb..cc.ad..........................", +".................g#..bb..cc.c...........................", +"........................................................", +"........................................................", +".......jkkkkkjj..k...jkkkkkkkkkkj.......................", +"......kkkkkkkkkj.k.....kkkkk...kkkj.....................", +"....jkkkj.....jkjk......kkkk....jkkk....................", +"....kkkj.......jkk......kkkk.....kkkj...................", +"...jkkk.........kk......kkkk.....kkkk..hhhhj............", +"...kkkj..........k......kkkk.....kkkk...hhhhhj..........", +"..jkkk...........k......kkkk.....kkkk....jhhhhh.........", +"..kkkk..................kkkk.....kkkj......hhhhhj.......", +"..kkkk..................kkkk....kkkk........jhhhhh......", +"..kkkk..................kkkk..jkkkk...........hhhhhj....", +"..kkkk..................kkkkkkkkkj.............jhhhhh...", +"..kkkk.......kkkkkk.....kkkk.....................hhhhh..", +"..kkkkj.......kkkk......kkkk...................jhhhhh...", +"..jkkkj.......kkkk......kkkk..................hhhhhj....", +"...kkkk.......kkkk......kkkk................jhhhhh......", +"...jkkkj......kkkk......kkkk...............hhhhhj.......", +"....jkkk.....jkkkk......kkkk.............jhhhhh.........", +".....jkkkj..jkkkkj.....jkkkkj...........hhhhhj..........", +".......jkkkkkkkjj....kkkkkkkkkk........hhhhj............", +"........................................................", +"........................................................", +"........................................................", +"........................................................" +}; diff --git a/pari.spec b/pari.spec index cbed544..e6b794d 100644 --- a/pari.spec +++ b/pari.spec @@ -1,6 +1,6 @@ Name: pari -Version: 2.11.4 -Release: 2%{?dist} +Version: 2.13.0 +Release: 1%{?dist} Summary: Number Theory-oriented Computer Algebra System License: GPLv2+ URL: http://pari.math.u-bordeaux.fr/ @@ -9,28 +9,30 @@ Source1: http://pari.math.u-bordeaux.fr/pub/pari/unix/%{name}-%{version}. # Public key 0x4522e387, Bill Allombert Source2: gpgkey-42028EA404A2E9D80AC453148F0E7C2B4522E387.gpg Source3: gp.desktop -Source4: pari.xpm +Source4: pari-gp.xpm Source5: pari.abignore -Patch0: pari-2.5.1-xdgopen.patch -Patch1: pari-2.9.0-optflags.patch +# Use xdg-open rather than xdvi to display DVI files (#530565) +Patch0: pari-2.13.0-xdgopen.patch +# Use our optflags, not upstream's +Patch1: pari-2.13.0-optflags.patch +# Fix compiler warnings +# http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1316 Patch10: pari-2.9.0-missing-field-init.patch -Patch11: pari-2.9.2-declaration-not-prototype.patch -Patch12: pari-2.9.0-clobbered.patch -Patch13: pari-2.9.0-signed-unsigned-comparison.patch +Patch11: pari-2.13.0-declaration-not-prototype.patch +Patch12: pari-2.13.0-clobbered.patch +Patch13: pari-2.13.0-signed-unsigned-comparison.patch BuildRequires: coreutils BuildRequires: desktop-file-utils BuildRequires: findutils -BuildRequires: gcc +BuildRequires: fltk-devel +BuildRequires: gcc-c++ BuildRequires: gmp-devel BuildRequires: gnupg2 BuildRequires: make BuildRequires: perl-generators BuildRequires: pkgconfig(readline) -BuildRequires: pkgconfig(x11) BuildRequires: sed -BuildRequires: tex(tex) -BuildRequires: tex(dvips) -BuildRequires: tex-latex +BuildRequires: tex(latex) BuildRequires: xmkmf # Test suite requirements BuildRequires: pari-elldata @@ -73,31 +75,20 @@ symbolically as long as possible, numerically where needed, and contains a wealth of number-theoretic functions. %prep -%setup -q +# Verify the source file +%{gpgverify} --data=%{SOURCE0} --signature=%{SOURCE1} --keyring=%{SOURCE2} + +%autosetup -p0 # Silence abidiff warnings about the size of functions_basic[] changing cp -p %{SOURCE5} . -# Use xdg-open rather than xdvi to display DVI files (#530565) -%patch0 - # Use our optflags, not upstream's -%patch1 sed -i -e "s|@OPTFLAGS@|%{optflags} -Wextra -Wstrict-prototypes -Wno-implicit-fallthrough $RPM_LD_FLAGS|" config/get_cc -# Fix compiler warnings -# http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1316 -%patch10 -%patch11 -%patch12 -%patch13 - # Avoid unwanted rpaths sed -i "s|runpathprefix='.*'|runpathprefix=''|" config/get_ld -# Verify the source file -%{gpgverify} --keyring=%{SOURCE2} --signature=%{SOURCE1} --data=%{SOURCE0} - %build ./Configure \ --prefix=%{_prefix} \ @@ -107,6 +98,8 @@ sed -i "s|runpathprefix='.*'|runpathprefix=''|" config/get_ld --mandir=%{_mandir}/man1 \ --datadir=%{_datadir}/pari \ --includedir=%{_includedir} \ + --enable-tls \ + --with-fltk \ --with-gmp %make_build gp @@ -125,11 +118,8 @@ mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \ %{SOURCE3} -install -p -m 644 %{SOURCE4} %{buildroot}%{_datadir}/pari/misc/ - -# Don't bother installing the simple gp wrapper script, so avoiding the -# need to patch it to fix the path to the executable -find %{buildroot} -name xgp -delete +mkdir -p %{buildroot}%{_datadir}/pixmaps +install -p -m 644 %{SOURCE4} %{buildroot}%{_datadir}/pixmaps %check make test-all @@ -142,12 +132,12 @@ make test-all %endif %doc AUTHORS CHANGES* COMPAT NEW README %doc Olinux-*/pari.cfg pari.abignore -%{_libdir}/libpari-gmp.so.%{version} -%{_libdir}/libpari-gmp.so.6 +%{_libdir}/libpari-gmp-tls.so.%{version} +%{_libdir}/libpari-gmp-tls.so.7 %files gp %{_bindir}/gp -%{_bindir}/gp-2.11 +%{_bindir}/gp-2.13 %{_bindir}/gphelp %{_bindir}/tex2mail %config(noreplace) %{_sysconfdir}/gprc @@ -157,8 +147,9 @@ make test-all %doc %{_datadir}/pari/examples/ %{_datadir}/pari/misc/ %{_datadir}/pari/pari.desc -%{_datadir}/applications/*gp.desktop -%{_mandir}/man1/gp-2.11.1* +%{_datadir}/applications/gp.desktop +%{_datadir}/pixmaps/pari-gp.xpm +%{_mandir}/man1/gp-2.13.1* %{_mandir}/man1/gp.1* %{_mandir}/man1/gphelp.1* %{_mandir}/man1/pari.1* @@ -169,6 +160,12 @@ make test-all %{_libdir}/libpari.so %changelog +* Mon Nov 9 2020 Jerry James - 2.13.0-1 +- Update to 2.13.0 (see CHANGES for details) +- Enable TLS support +- Build the GUI with fltk instead of X11 +- Ship the xgp wrapper script + * Tue Jul 28 2020 Fedora Release Engineering - 2.11.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/pari.xpm b/pari.xpm deleted file mode 100644 index 32a5d2d..0000000 --- a/pari.xpm +++ /dev/null @@ -1,60 +0,0 @@ -/* XPM */ -static char *pari-gp-tiny[] = { -/* width height num_colors chars_per_pixel */ -" 56 40 13 1", -/* colors */ -". c #ffffff", -"# c #006cf8", -"a c #20d010", -"b c #a0d3ff", -"c c #88ff68", -"d c #009900", -"e c #000000", -"f c #9f9f9f", -"g c #0000cc", -"h c #b0032b", -"i c #bfbfbf", -"j c #ffc1b9", -"k c #f71814", -/* pixels */ -"........................................................", -".......................#a...............................", -"......................#bcd..............................", -"............eeeeef....#bcd....eeeeef...eeee.............", -".............ee..ef...gbcd.....ee..ef...ee..............", -".............ee..ee..#bhhca....ee..ee...ee..............", -".............ee..ef..g.hh.d....ee..ef...ee..............", -".............eeeef...hhhhhh....eeeef....ee..............", -".............ee.....bhhhhhhc...eeiei....ee..............", -".............ee.....g..hh..d...ee.iei...ee..............", -".............ee....bg.bhhc.dc..ee..iei..ee..............", -"............eeee...gb.b..c.cd.eeee.eeefeeee.............", -"..................bg..b..c..dc..........................", -".................#gb.bb..cc.ad..........................", -".................g#..bb..cc.c...........................", -"........................................................", -"........................................................", -".......jkkkkkjj..k...jkkkkkkkkkkj.......................", -"......kkkkkkkkkj.k.....kkkkk...kkkj.....................", -"....jkkkj.....jkjk......kkkk....jkkk....................", -"....kkkj.......jkk......kkkk.....kkkj...................", -"...jkkk.........kk......kkkk.....kkkk..hhhhj............", -"...kkkj..........k......kkkk.....kkkk...hhhhhj..........", -"..jkkk...........k......kkkk.....kkkk....jhhhhh.........", -"..kkkk..................kkkk.....kkkj......hhhhhj.......", -"..kkkk..................kkkk....kkkk........jhhhhh......", -"..kkkk..................kkkk..jkkkk...........hhhhhj....", -"..kkkk..................kkkkkkkkkj.............jhhhhh...", -"..kkkk.......kkkkkk.....kkkk.....................hhhhh..", -"..kkkkj.......kkkk......kkkk...................jhhhhh...", -"..jkkkj.......kkkk......kkkk..................hhhhhj....", -"...kkkk.......kkkk......kkkk................jhhhhh......", -"...jkkkj......kkkk......kkkk...............hhhhhj.......", -"....jkkk.....jkkkk......kkkk.............jhhhhh.........", -".....jkkkj..jkkkkj.....jkkkkj...........hhhhhj..........", -".......jkkkkkkkjj....kkkkkkkkkk........hhhhj............", -"........................................................", -"........................................................", -"........................................................", -"........................................................" -}; diff --git a/sources b/sources index 36e6cd2..6f1a841 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (pari-2.11.4.tar.gz) = 1312f452244cd1d814a1e43e108378c956669b614845f21199b7039fe6462881168983d4badb8a80bb1bac202cd82d92788a2b4f3c23d16f993cae6e251c4fe1 -SHA512 (pari-2.11.4.tar.gz.asc) = 877f9dd80831f979d8f763b58e0c582728cafa9c4ab5d1362ec0f0c604bb8e9268aff4d899080bae4eeb67d67abc1e70978d98f895f4a19dfd4091bddaa5f81d +SHA512 (pari-2.13.0.tar.gz) = 671bed101be0ba0eef2c4aa4d9580477f2492f2cd354f04773df00c2fa1456d1d6d8e568d617675dc4adce3e6d1f8cbaafae45452891ceb10eba60cd669b529f +SHA512 (pari-2.13.0.tar.gz.asc) = 02c07bf454f2b090151e7efc65c247996ddb3b5310d99394acde75eaafe765c11011e3f8bd0c8c13731d5a54edc951e9d8cfada1c1596961f169d8e886ca2ad6