diff --git a/perlprov-package.diff b/perlprov-package.diff new file mode 100644 index 0000000..8217578 --- /dev/null +++ b/perlprov-package.diff @@ -0,0 +1,26 @@ +Support package statements like "package 1.2.3;" and "package 1.2.3 {", which are +new in Perl 5.12 and 5.14 + +--- ./scripts/perl.prov.orig 2017-06-09 15:20:11.869617486 +0200 ++++ ./scripts/perl.prov 2017-06-09 15:04:59.840952250 +0200 +@@ -129,9 +129,9 @@ + # package name so we report all namespaces except some common + # false positives as if they were provided packages (really ugly). + +- if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) { ++ if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*(?:v?([0-9_.]+)\s*)?[;{]/) { + $package = $1; +- undef $version; ++ $version = $2; + if ($package eq 'main') { + undef $package; + } else { +@@ -139,7 +139,7 @@ + # the package definition is broken up over multiple blocks. + # In that case, don't stomp a previous $VERSION we might have + # found. (See BZ#214496.) +- $require{$package} = undef unless (exists $require{$package}); ++ $require{$package} = $version unless (exists $require{$package}); + } + } + diff --git a/rpm.changes b/rpm.changes index 5ad1109..5e2ac69 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 9 15:33:01 UTC 2017 - sriedel@suse.com + +- Add patch to handle newer package statement variations for Perl + 5.12+ + * perlprov-package.diff + ------------------------------------------------------------------- Mon Apr 10 14:25:07 UTC 2017 - fvogt@suse.com diff --git a/rpm.spec b/rpm.spec index 8447c34..419f6ec 100644 --- a/rpm.spec +++ b/rpm.spec @@ -145,6 +145,7 @@ Patch100: rpm-findlang-inject-metainfo.patch Patch101: nobfd.diff Patch102: emptymanifest.diff Patch103: find-lang-qt-qm.patch +Patch104: perlprov-package.diff Patch6464: auto-config-update-aarch64-ppc64le.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -240,7 +241,7 @@ rm -f rpmdb/db.h %patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 %patch -P 80 -P 81 -P 82 -P 83 -P 85 %patch -P 92 -P 93 -P 94 -P 96 -P 98 -P 99 -%patch -P 100 -P 101 -P 102 -P 103 +%patch -P 100 -P 101 -P 102 -P 103 -P 104 %ifarch aarch64 ppc64le %patch6464