intltool: Add patch to fix regular expressions and avoid warnings in perl 5.22 and...
authorTed Hess <thess@kitschensync.net>
Wed, 12 Dec 2018 14:55:18 +0000 (09:55 -0500)
committerJo-Philipp Wich <jo@mein.io>
Wed, 24 Apr 2019 05:35:52 +0000 (07:35 +0200)
Signed-off-by: Ted Hess <thess@kitschensync.net>
(backported from commit 5c823596dd4f51969425b7a39f9b3c2730aa4e72)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libs/intltool/Makefile
libs/intltool/patches/200-intltool-0.51.0-perl-5.22.patch [new file with mode: 0644]

index cebae5370ca277bc8ef58a6e69b069edda6c5cd3..13352b3ec1185fc5375f321a82894a26c6ea20c5 100644 (file)
@@ -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 (file)
index 0000000..6fad449
--- /dev/null
@@ -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?