From f38d92c429e3360d2963ffe59ed82fa5be9a7724 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 8 Aug 2017 13:02:51 +0200 Subject: [PATCH] Fix intltool-update to work with perl 5.26 Patch taken from Debian's intltool_0.51.0-4.debian.tar.xz https://bugzilla.redhat.com/show_bug.cgi?id=1462217 --- ...tch => intltool-perl5.26-regex-fixes.patch | 23 +++++++++++++++---- intltool.spec | 9 ++++++-- 2 files changed, 26 insertions(+), 6 deletions(-) rename intltool-0.51.0-perl-5.22.patch => intltool-perl5.26-regex-fixes.patch (66%) diff --git a/intltool-0.51.0-perl-5.22.patch b/intltool-perl5.26-regex-fixes.patch similarity index 66% rename from intltool-0.51.0-perl-5.22.patch rename to intltool-perl5.26-regex-fixes.patch index be672d0..234b82b 100644 --- a/intltool-0.51.0-perl-5.22.patch +++ b/intltool-perl5.26-regex-fixes.patch @@ -1,7 +1,15 @@ -diff -Naur intltool-0.51.0.orig/intltool-update.in intltool-0.51.0/intltool-update.in ---- intltool-0.51.0.orig/intltool-update.in 2015-03-09 02:39:54.000000000 +0100 -+++ intltool-0.51.0/intltool-update.in 2015-06-19 01:52:07.171228154 +0200 -@@ -1062,7 +1062,7 @@ +Description: Escape "{", to prevent complaints from perl 5.22 and 5.26 +Author: Roderich Schupp +Author: gregor herrmann +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788705 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826471 +Bug-Upstream: https://bugs.launchpad.net/intltool/+bug/1490906 + +Index: intltool-0.51.0/intltool-update.in +=================================================================== +--- intltool-0.51.0.orig/intltool-update.in 2017-07-23 17:24:35.113169465 +0200 ++++ intltool-0.51.0/intltool-update.in 2017-07-23 17:24:35.109169052 +0200 +@@ -1062,13 +1062,13 @@ } } @@ -10,6 +18,13 @@ diff -Naur intltool-0.51.0.orig/intltool-update.in intltool-0.51.0/intltool-upda { my $rest = $3; my $untouched = $1; + my $sub = ""; + # Ignore recursive definitions of variables +- $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/; ++ $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\$\{?$2}?/; + + return SubstituteVariable ("$untouched$sub$rest"); + } @@ -1190,10 +1190,10 @@ $name =~ s/\(+$//g; $version =~ s/\(+$//g; diff --git a/intltool.spec b/intltool.spec index 432ac5e..742ad53 100644 --- a/intltool.spec +++ b/intltool.spec @@ -1,7 +1,7 @@ Name: intltool Summary: Utility for internationalizing various kinds of data files Version: 0.51.0 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 with exceptions Group: Development/Tools #VCS: bzr:https://code.edge.launchpad.net/~intltool/intltool/trunk @@ -23,7 +23,9 @@ BuildRequires: gettext # Martin Pitt: As the reporter of the bug I close this, as the new API du jour is gsettings, # which has a sensible gettext integration. #Patch0: schemas-merge.patch -Patch1: intltool-0.51.0-perl-5.22.patch +# Fix intltool-update to work with perl 5.26. Patch taken from +# Debian's intltool_0.51.0-4.debian.tar.xz +Patch1: intltool-perl5.26-regex-fixes.patch # https://bugs.launchpad.net/intltool/+bug/1505260 # https://bugzilla.redhat.com/show_bug.cgi?id=1249051 Patch2: intltool-merge-Create-cache-file-atomically.patch @@ -67,6 +69,9 @@ fi %{_mandir}/man8/intltool*.8* %changelog +* Tue Aug 08 2017 Kalev Lember - 0.51.0-10 +- Fix intltool-update to work with perl 5.26 (#1462217) + * Wed Jul 26 2017 Fedora Release Engineering - 0.51.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild