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)
committerTed Hess <thess@kitschensync.net>
Wed, 12 Dec 2018 18:20:27 +0000 (13:20 -0500)
Signed-off-by: Ted Hess <thess@kitschensync.net>
libs/intltool/Makefile
libs/intltool/patches/200-intltool-0.51.0-perl-5.22.patch [new file with mode: 0644]

index 4c672f2f9cc8a624470a8f88d26bf75d68ee4c08..89d7a39c12fbacba68ca5258bafbacbd405361c0 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.
 #
@@ -8,9 +6,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=intltool
-PKG_LIBVER:=0.51
-PKG_VERSION:=$(PKG_LIBVER).0
-PKG_RELEASE:=1
+PKG_VERSION:=0.51.0
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://launchpad.net/intltool/trunk/$(PKG_VERSION)/+download
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..097c511
--- /dev/null
@@ -0,0 +1,48 @@
+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
+@@ -1062,7 +1062,7 @@
+       }
+     }
+-    if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
++    if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
+     {
+       my $rest = $3;
+       my $untouched = $1;
+@@ -1190,10 +1190,10 @@
+       $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)
+@@ -1219,11 +1219,11 @@
+       $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?