From c91071b966b4924bd9f852c314580422d330293d Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: May 19 2017 08:58:10 +0000 Subject: Escape left braces in regexes (#1452519) Also: - Fix operation of MP_NOGNUPLOT and use it - Drop redundant Group: tag --- diff --git a/.rpmlint b/.rpmlint new file mode 100644 index 0000000..e6b3fe5 --- /dev/null +++ b/.rpmlint @@ -0,0 +1,4 @@ +from Config import * + +# False positive +addFilter("comparison-operator-in-deptoken 2>/dev/null") diff --git a/Math-Pari-2.010809b-MP_NOGNUPLOT.patch b/Math-Pari-2.010809b-MP_NOGNUPLOT.patch new file mode 100644 index 0000000..6cd1e6e --- /dev/null +++ b/Math-Pari-2.010809b-MP_NOGNUPLOT.patch @@ -0,0 +1,14 @@ +--- test_eng/Testout.pm ++++ test_eng/Testout.pm +@@ -45,6 +45,11 @@ $DEFAULT = undef; + + if ($file =~ /plot|graph|all/) { + if ($ENV{MP_NOGNUPLOT}) { ++ @not_yet_defined{qw( ++ plotbox plotcolor plotcursor plotdraw ploth plothraw plotinit plotlines ++ plotmove plotpoints plotrline plotrmove plotrpoint psdraw psploth ++ psplothraw plotscale plotkill ++ )} = (1) x 10000; + $skip_gnuplot = 1; + } else { + eval { link_gnuplot() }; diff --git a/Math-Pari-2.010809b-escape-left-braces-in-regex.patch b/Math-Pari-2.010809b-escape-left-braces-in-regex.patch new file mode 100644 index 0000000..8471f44 --- /dev/null +++ b/Math-Pari-2.010809b-escape-left-braces-in-regex.patch @@ -0,0 +1,22 @@ +--- 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/perl-Math-Pari.spec b/perl-Math-Pari.spec index 1d583ab..c27ddd1 100644 --- a/perl-Math-Pari.spec +++ b/perl-Math-Pari.spec @@ -4,15 +4,16 @@ Summary: Perl interface to PARI Name: perl-Math-Pari Version: 2.010809 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL+ or Artistic -Group: Development/Libraries -Url: http://search.cpan.org/dist/Math-Pari/ +URL: http://search.cpan.org/dist/Math-Pari/ Source0: http://search.cpan.org/CPAN/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 Patch3: Math-Pari-2.010809b-utf8.patch +Patch4: Math-Pari-2.010809b-escape-left-braces-in-regex.patch +Patch5: Math-Pari-2.010809b-MP_NOGNUPLOT.patch # Module Build BuildRequires: coreutils BuildRequires: findutils @@ -70,6 +71,12 @@ sed -i -e "s/@@@OUR-PARI-VERSION@@@/${pari_int_version}/" Makefile.PL # Recode Changes file as UTF-8 %patch3 +# Escape left braces in regexes (#1452519) +%patch4 + +# Fix operation of MP_NOGNUPLOT +%patch5 + %build paridir=$(pkg-config --variable=paridir libpari23) perl Makefile.PL \ @@ -83,10 +90,10 @@ make %{?_smp_mflags} make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete find %{buildroot} -type f -name '*.bs' -empty -delete -%{_fixperms} %{buildroot} +%{_fixperms} -c %{buildroot} %check -make test +make test MP_NOGNUPLOT=1 %files %doc Changes README @@ -101,6 +108,11 @@ make test %exclude %{_mandir}/man3/Math::libPARI.dumb.3* %changelog +* Fri May 19 2017 Paul Howarth - 2.010809-4 +- Escape left braces in regexes (#1452519) +- Fix operation of MP_NOGNUPLOT and use it +- Drop redundant Group: tag + * Sat Feb 11 2017 Fedora Release Engineering - 2.010809-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild