From 74deb4165202806c7f0f4df8bdcf996678a4f59f Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Aug 15 2018 11:00:54 +0000 Subject: Update to 2.030506 - New upstream release 2.030506 (see Changes for details) - Rework patches and build process to get it to build again --- diff --git a/.rpmlint b/.rpmlint deleted file mode 100644 index e6b3fe5..0000000 --- a/.rpmlint +++ /dev/null @@ -1,4 +0,0 @@ -from Config import * - -# False positive -addFilter("comparison-operator-in-deptoken 2>/dev/null") diff --git a/Math-Pari-2.010802-docs-and-testsuite.patch b/Math-Pari-2.010802-docs-and-testsuite.patch deleted file mode 100644 index dadf9d3..0000000 --- a/Math-Pari-2.010802-docs-and-testsuite.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Math-Pari-2.010802/Makefile.PL.orig 2009-10-29 10:47:15.349216927 +0000 -+++ Math-Pari-2.010802/Makefile.PL 2009-10-29 11:12:54.651293844 +0000 -@@ -102,11 +102,13 @@ - } - - my %opts; -+ -+# We want to build the docs and the test suite even though we're using the system pari lib -+build_tests $paridir; # Convert the test suite -+make_pod 'libPARI.pod', '-to_pod', $paridir; # Now the docs -+make_pod 'libPARI.dumb.pod', '-to_dumb_pod', $paridir; -+ - unless ($common::parilib) { -- build_tests $paridir; # Convert the test suite -- make_pod 'libPARI.pod', '-to_pod', $paridir; # Now the docs -- make_pod 'libPARI.dumb.pod', '-to_dumb_pod', $paridir; -- # ... and paricfg.h - %opts = build_paricfg($paridir, $common::do_configure, $pari_version); - - if ($ENV{MATH_PARI_REPORT_CODES}) { diff --git a/Math-Pari-2.01080605-include-path.patch b/Math-Pari-2.01080605-include-path.patch deleted file mode 100644 index 515059a..0000000 --- a/Math-Pari-2.01080605-include-path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Pari.xs -+++ Pari.xs -@@ -3,7 +3,7 @@ - # include - #endif - --# include -+# include - # include - # include - diff --git a/Math-Pari-2.010809b-escape-left-braces-in-regex.patch b/Math-Pari-2.010809b-escape-left-braces-in-regex.patch deleted file mode 100644 index 8471f44..0000000 --- a/Math-Pari-2.010809b-escape-left-braces-in-regex.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- libPARI/gphelp -+++ libPARI/gphelp -@@ -328,7 +328,7 @@ sub apropos - @sentence_list = @list = ""; - while () - { -- if (/^\\(subsubsec[a-z]*|subsec[a-z]*|section|chapter){/) -+ if (/^\\(subsubsec[a-z]*|subsec[a-z]*|section|chapter)\{/) - { - $new = &get_match($_,'{','}'); - &apropos_check(); -@@ -1025,8 +1025,8 @@ sub TeXprint_topod { - s/\$\$(.*?)\$\$\s*/\n\nS< >$tr{startcode}$1$tr{endcode}\n\n/gs; - s/\$([^\$]+)\$/$tr{startcode}$1$tr{endcode}/g; - -- s/\\s(?:ref|idx){\s*([^{}]*)}/$tr{startindex} . for_index($1) . $tr{endindex}/ge; -- s/\\(?:ref|idx){\s*([^{}]*)}/$tr{startindex} . for_index($1) . "$tr{endindex}$1"/ge; -+ s/\\s(?:ref|idx)\{\s*([^{}]*)}/$tr{startindex} . for_index($1) . $tr{endindex}/ge; -+ s/\\(?:ref|idx)\{\s*([^{}]*)}/$tr{startindex} . for_index($1) . "$tr{endindex}$1"/ge; - - # Conflict between different versions of PARI and refcard: - # s/\\(?:key|li)\s*{(.*)}\s*{(.+)}[ \t]*\n/\n\n=item C<$2>\n\n$1\n\n/msg; diff --git a/Math-Pari-2.030506-docs-and-testsuite.patch b/Math-Pari-2.030506-docs-and-testsuite.patch new file mode 100644 index 0000000..672e501 --- /dev/null +++ b/Math-Pari-2.030506-docs-and-testsuite.patch @@ -0,0 +1,15 @@ +--- Makefile.PL ++++ Makefile.PL +@@ -62,6 +62,12 @@ EOP + or die "Can't deduce Perl int size"; + $define .= ' -DLONG_SHORTER_THAN_IV' if $perl_int_size > $longsize; + $define .= ' -Derr=pari_err'; # On linux it can get a wrong dynamic loading ++ ++ # We want to build the docs and the test suite even though we're using the system pari lib ++ build_tests $paridir; # Convert the test suite ++ make_pod 'libPARI.pod', '-to_pod', $paridir; # Now the docs ++ make_pod 'libPARI.dumb.pod', '-to_dumb_pod', $paridir; ++ + } else { + $paridir = find_pari_dir() unless defined $paridir or $parisrc or $force_download; + ($paridir, my @patch_rc) = download_and_patch_pari($parisrc, $force_download) diff --git a/Math-Pari-2.030506-escape-left-braces-in-regex.patch b/Math-Pari-2.030506-escape-left-braces-in-regex.patch new file mode 100644 index 0000000..1570ff6 --- /dev/null +++ b/Math-Pari-2.030506-escape-left-braces-in-regex.patch @@ -0,0 +1,31 @@ +--- libPARI/gphelp ++++ libPARI/gphelp +@@ -328,7 +328,7 @@ sub apropos + @sentence_list = @list = ""; + while () + { +- if (/^\\(subsubsec[a-z]*|subsec[a-z]*|section|chapter){/) ++ if (/^\\(subsubsec[a-z]*|subsec[a-z]*|section|chapter)\{/) + { + $new = &get_match($_,'{','}'); + &apropos_check(); +@@ -733,7 +733,7 @@ sub basic_subst + + s/(\\string)?\\_/_/g; + s/\\([#\$&%|])/$1/g; +- s/\\(hat(?![a-zA-Z])|\^)({\\?\s*})?/^/g; ++ s/\\(hat(?![a-zA-Z])|\^)(\{\\?\s*})?/^/g; + # Don't eat spaces after =head: + s/((^\Q$tr{podleader}\Ehead\d\s*)?) *\\pow(?![a-zA-z]) */$1^/gmo; + +@@ -1025,8 +1025,8 @@ sub TeXprint_topod { + s/\$\$(.*?)\$\$\s*/\n\nS< >$tr{startcode}$1$tr{endcode}\n\n/gs; + s/\$([^\$]+)\$/$tr{startcode}$1$tr{endcode}/g; + +- s/\\s(?:ref|idx){\s*([^{}]*)}/$tr{startindex} . for_index($1) . $tr{endindex}/ge; +- s/\\(?:ref|idx){\s*([^{}]*)}/$tr{startindex} . for_index($1) . "$tr{endindex}$1"/ge; ++ s/\\s(?:ref|idx)\{\s*([^{}]*)}/$tr{startindex} . for_index($1) . $tr{endindex}/ge; ++ s/\\(?:ref|idx)\{\s*([^{}]*)}/$tr{startindex} . for_index($1) . "$tr{endindex}$1"/ge; + + # Conflict between different versions of PARI and refcard: + # s/\\(?:key|li)\s*{(.*)}\s*{(.+)}[ \t]*\n/\n\n=item C<$2>\n\n$1\n\n/msg; diff --git a/Math-Pari-2.030506-system-pari.patch b/Math-Pari-2.030506-system-pari.patch new file mode 100644 index 0000000..ad08b16 --- /dev/null +++ b/Math-Pari-2.030506-system-pari.patch @@ -0,0 +1,53 @@ +--- Makefile.PL ++++ Makefile.PL +@@ -52,6 +52,16 @@ if ($parilib) { + Trying to use existing PARI library (at $parilib) + (integer-formatted version $pari_version). + EOP ++ $common::parilib = $parilib; ++ $define .= " -DPARI_VERSION_EXP=$pari_version"; ++ my $offset = index($Config{byteorder}, "1"); ++ $offset = 3 if $offset > 3; # SvFLAGS is actually I32 ++ $define .= " -DLSB_in_U32=$offset"; ++ my $longsize = length(eval { pack 'l!', 1 } or pack 'l', 1); ++ my $perl_int_size = $Config{'ivsize'} || $Config{'intsize'} ++ or die "Can't deduce Perl int size"; ++ $define .= ' -DLONG_SHORTER_THAN_IV' if $perl_int_size > $longsize; ++ $define .= ' -Derr=pari_err'; # On linux it can get a wrong dynamic loading + } else { + $paridir = find_pari_dir() unless defined $paridir or $parisrc or $force_download; + ($paridir, my @patch_rc) = download_and_patch_pari($parisrc, $force_download) +@@ -241,9 +251,11 @@ EOP + LIBS => $parilib, + INC => "-I $pariincludes/include -I $pariincludes/src", + ) : +- (MYEXTLIB => 'libPARI/libPARI$(LIB_EXT)')), ++ (MYEXTLIB => 'libPARI/libPARI$(LIB_EXT)', + LIBS => $libs, + INC => $extra_inc . ' -I $(PARI_DIR)/src/headers -I $(PARI_DIR)/src -I ./libPARI', ++ ) ++ ), + VERSION_FROM => 'Pari.pm', + ($] >= 5.005 ? ## Add these new keywords supported since 5.005 + (ABSTRACT_FROM => 'Pari.pm', # retrieve abstract from module +--- Pari.xs ++++ Pari.xs +@@ -8,6 +8,7 @@ + #ifdef USE_STANDALONE_PARILIB + # include + # include ++# include + #else + # include + # include +--- utils/Math/PariBuild.pm ++++ utils/Math/PariBuild.pm +@@ -254,7 +254,7 @@ sub extract_pari_archive ($) { + return $dir; + } + +-sub fmt_version {sprintf "%03d%03d%03d", split /\./, shift} ++sub fmt_version {sprintf "%d%03d%03d", split /\./, shift} + + sub pari_formatted_version_from_includes($) { # Unsupported; to enable parilib option; based on + my $prefix = shift; # http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/math/p5-Math-Pari/patches/patch-aa diff --git a/perl-Math-Pari.rpmlintrc b/perl-Math-Pari.rpmlintrc new file mode 100644 index 0000000..e6b3fe5 --- /dev/null +++ b/perl-Math-Pari.rpmlintrc @@ -0,0 +1,4 @@ +from Config import * + +# False positive +addFilter("comparison-operator-in-deptoken 2>/dev/null") diff --git a/perl-Math-Pari.spec b/perl-Math-Pari.spec index 692c3ad..7714a06 100644 --- a/perl-Math-Pari.spec +++ b/perl-Math-Pari.spec @@ -1,18 +1,17 @@ %global extraversion %{nil} -%global extrasuffix b +%global extrasuffix %{nil} Summary: Perl interface to PARI Name: perl-Math-Pari -Version: 2.010809 -Release: 10%{?dist} +Version: 2.030506 +Release: 1%{?dist} License: GPL+ or Artistic URL: https://metacpan.org/release/Math-Pari -Source0: https://cpan.metacpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-%{version}%{extraversion}%{?extrasuffix}.tar.gz -Patch0: Math-Pari-2.010809b-no-fake-version.patch -Patch1: Math-Pari-2.010802-docs-and-testsuite.patch -Patch2: Math-Pari-2.01080605-include-path.patch +Source0: https://cpan.metacpan.org/modules/by-module/Math/Math-Pari-%{version}%{extraversion}%{?extrasuffix}.zip +Patch0: Math-Pari-2.030506-system-pari.patch +Patch1: Math-Pari-2.030506-docs-and-testsuite.patch Patch3: Math-Pari-2.010809b-utf8.patch -Patch4: Math-Pari-2.010809b-escape-left-braces-in-regex.patch +Patch4: Math-Pari-2.030506-escape-left-braces-in-regex.patch Patch5: Math-Pari-2.010809b-MP_NOGNUPLOT.patch # Module Build BuildRequires: coreutils @@ -57,16 +56,16 @@ as Perl functions, and (almost) seamless merging of PARI and Perl data. %prep %setup -q -n Math-Pari-%{version}%{extraversion} -# Don't use a fake version number when we can use a real one +# Create a directory structure for libpari23 like Math::Pari expects it to be +mkdir libpari23 +ln -s $(pkg-config --cflags-only-I libpari23 | sed -e 's/-I//') libpari23/include +ln -s $(pkg-config --variable=paridir libpari23)/src libpari23/src + +# Fix for using system pari library (with source available) %patch0 -pari_int_version=$(pkg-config --modversion libpari23 | perl -p -e 's/(\d+)\.(\d+)\.(\d+)/sprintf("%d%03d%03d",$1,$2,$3)/e') -sed -i -e "s/@@@OUR-PARI-VERSION@@@/${pari_int_version}/" Makefile.PL # We want to build the docs and test suite too -%patch1 -p1 - -# Use as per pari upstream documentation -%patch2 +%patch1 # Recode Changes file as UTF-8 %patch3 @@ -81,9 +80,10 @@ sed -i -e "s/@@@OUR-PARI-VERSION@@@/${pari_int_version}/" Makefile.PL paridir=$(pkg-config --variable=paridir libpari23) perl Makefile.PL \ INSTALLDIRS=vendor \ - OPTIMIZE="$(pkg-config --cflags-only-I libpari23) -I${paridir}/src %{optflags}" \ + OPTIMIZE="$(pkg-config --cflags-only-I libpari23) %{optflags}" \ paridir="${paridir}" \ - parilib="$(pkg-config --libs libpari23)" + pariincludes=$(pwd)/libpari23 \ + parilibs="$(pkg-config --libs libpari23)" make %{?_smp_mflags} %install @@ -108,6 +108,10 @@ make test MP_NOGNUPLOT=1 %exclude %{_mandir}/man3/Math::libPARI.dumb.3* %changelog +* Wed Aug 15 2018 Paul Howarth - 2.030506-1 +- Update to 2.030506 (see Changes for details) +- Rework patches and build process to get it to build again + * Fri Jul 13 2018 Fedora Release Engineering - 2.010809-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 0e01a3e..31ae892 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6c1e150ba676ca45e3a0a2ad0c26a668 Math-Pari-2.010809b.tar.gz +SHA512 (Math-Pari-2.010811.zip) = f8b887ee7b1d5a760f95e0b07919e58b659aedc02d13e9e766725a7d6f2322256e91e357efb206fba3a4c0373ae3589aa88499670b51ace5f52ddcce6f17b35f