From 9cfdbc44172cc9a3b67696b1a55298498d568f7c Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Apr 06 2017 09:08:57 +0000 Subject: Update to 2.9.2 (see CHANGES for details) Also: build with -Wno-implicit-fallthrough because upstream code intentionally falls through switch cases all over the place. --- diff --git a/.rpmlint b/.rpmlint new file mode 100644 index 0000000..da999ee --- /dev/null +++ b/.rpmlint @@ -0,0 +1,7 @@ +from Config import * +addFilter("spelling-error %description -l en_US factorizations -> "); +addFilter("spelling-error %description -l en_US gp -> "); +addFilter("incorrect-fsf-address"); +addFilter("hardcoded-library-path in %{_prefix}/lib/pari"); +addFilter("only-non-binary-in-usr-lib"); +addFilter("no-documentation"); diff --git a/pari-2.9.0-declaration-not-prototype.patch b/pari-2.9.0-declaration-not-prototype.patch deleted file mode 100644 index e8e0697..0000000 --- a/pari-2.9.0-declaration-not-prototype.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- src/headers/paripriv.h -+++ src/headers/paripriv.h -@@ -523,10 +523,10 @@ void pari_init_parser(void); - void pari_init_rand(void); - void pari_init_seadata(void); - void pari_pthread_init_seadata(void); --void pari_pthread_init_varstate(); -+void pari_pthread_init_varstate(void); - void pari_thread_close_files(void); - void pari_thread_init_seadata(void); --void pari_thread_init_varstate(); -+void pari_thread_init_varstate(void); - - /* BY FILES */ - ---- src/language/eval.c -+++ src/language/eval.c -@@ -1240,11 +1240,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; \ -@@ -1275,7 +1275,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; -@@ -1294,7 +1299,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; -@@ -1303,7 +1313,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; -@@ -1311,11 +1326,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 -@@ -126,7 +126,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-2.9.2-declaration-not-prototype.patch b/pari-2.9.2-declaration-not-prototype.patch new file mode 100644 index 0000000..3109f45 --- /dev/null +++ b/pari-2.9.2-declaration-not-prototype.patch @@ -0,0 +1,91 @@ +--- src/language/eval.c ++++ src/language/eval.c +@@ -1246,11 +1246,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; \ +@@ -1281,7 +1281,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; +@@ -1300,7 +1305,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; +@@ -1309,7 +1319,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; +@@ -1317,11 +1332,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 +@@ -126,7 +126,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.spec b/pari.spec index 2bd1624..b708c70 100644 --- a/pari.spec +++ b/pari.spec @@ -1,6 +1,6 @@ Name: pari -Version: 2.9.1 -Release: 3%{?dist} +Version: 2.9.2 +Release: 1%{?dist} Summary: Number Theory-oriented Computer Algebra System Group: System Environment/Libraries # No version is specified @@ -11,7 +11,7 @@ Source1: gp.desktop Patch0: pari-2.5.1-xdgopen.patch Patch1: pari-2.9.0-optflags.patch Patch10: pari-2.9.0-missing-field-init.patch -Patch11: pari-2.9.0-declaration-not-prototype.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 BuildRequires: coreutils @@ -79,7 +79,7 @@ contains a wealth of number-theoretic functions. # Use our optflags, not upstream's %patch1 -sed -i -e 's|@OPTFLAGS@|%{optflags} -Wall -Wextra -Wstrict-prototypes|' config/get_cc +sed -i -e 's|@OPTFLAGS@|%{optflags} -Wall -Wextra -Wstrict-prototypes -Wno-implicit-fallthrough|' config/get_cc # Fix compiler warnings # http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1316 @@ -174,6 +174,11 @@ make test-all %{_libdir}/libpari.so %changelog +* Thu Apr 6 2017 Paul Howarth - 2.9.2-1 +- Update to 2.9.2 (see CHANGES for details) +- Build with -Wno-implicit-fallthrough because upstream code intentionally + falls through switch cases all over the place + * Sat Feb 11 2017 Fedora Release Engineering - 2.9.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 68a6364..a68648e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f997d6b526df6cd9145af0de5b822bf4 pari-2.9.1.tar.gz +SHA512 (pari-2.9.2.tar.gz) = cc1d422c206a227ea5c091129cacc6a22984a356e87f472a8ed13b0bd3a0eb6f0e5fa2fa6a8bb6dac1dbae4acc1468c9ef5e3f539ee8b2bcaa8dfc051733edfa