From: Ted Hess Date: Wed, 12 Dec 2018 14:55:18 +0000 (-0500) Subject: intltool: Add patch to fix regular expressions and avoid warnings in perl 5.22 and... X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bcf889b3625199c938fa9e288da871eadbd3b40c;p=feed%2Fpackages.git intltool: Add patch to fix regular expressions and avoid warnings in perl 5.22 and later. Signed-off-by: Ted Hess (backported from commit 5c823596dd4f51969425b7a39f9b3c2730aa4e72) Signed-off-by: Jo-Philipp Wich --- diff --git a/libs/intltool/Makefile b/libs/intltool/Makefile index cebae5370c..13352b3ec1 100644 --- a/libs/intltool/Makefile +++ b/libs/intltool/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2009-2014 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -10,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=intltool PKG_LIBVER:=0.40 PKG_VERSION:=$(PKG_LIBVER).6 -PKG_RELEASE:=3 +PKG_RELEASE:=3.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@GNOME/intltool/$(PKG_LIBVER) diff --git a/libs/intltool/patches/200-intltool-0.51.0-perl-5.22.patch b/libs/intltool/patches/200-intltool-0.51.0-perl-5.22.patch new file mode 100644 index 0000000000..6fad4497c3 --- /dev/null +++ b/libs/intltool/patches/200-intltool-0.51.0-perl-5.22.patch @@ -0,0 +1,55 @@ +https://bugs.launchpad.net/intltool/+bug/1490906 + +fix warnings w/newer perl: +Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^(.*)\${ <-- HERE ?([A-Z_]+)}?(.*)$/ at /usr/bin/intltool-update line 1065. + +--- a/intltool-update.in ++++ b/intltool-update.in +@@ -983,13 +983,13 @@ sub SubstituteVariable + } + } + +- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) ++ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/) + { + 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"); + } +@@ -1111,10 +1111,10 @@ sub FindPackageName + $name =~ s/\(+$//g; + $version =~ s/\(+$//g; + +- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); +- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); +- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); +- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); ++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/); ++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/); ++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/); ++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/); + } + + if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m) +@@ -1129,11 +1129,11 @@ sub FindPackageName + $version =~ s/\(+$//g; + $bugurl =~ s/\(+$//g if (defined $bugurl); + +- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); +- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); +- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); +- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); +- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/); ++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/); ++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/); ++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/); ++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/); ++ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/); + } + + # \s makes this not work, why?