dev-util/intltool: fix runtime warnings w/newer perl
authorMike Frysinger <vapier@gentoo.org>
Thu, 17 Dec 2015 14:48:20 +0000 (09:48 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 17 Dec 2015 15:12:37 +0000 (10:12 -0500)
dev-util/intltool/files/intltool-0.51.0-perl-5.22.patch [new file with mode: 0644]
dev-util/intltool/intltool-0.51.0-r1.ebuild [new file with mode: 0644]

diff --git a/dev-util/intltool/files/intltool-0.51.0-perl-5.22.patch b/dev-util/intltool/files/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?
diff --git a/dev-util/intltool/intltool-0.51.0-r1.ebuild b/dev-util/intltool/intltool-0.51.0-r1.ebuild
new file mode 100644 (file)
index 0000000..7fef558
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Internationalization Tool Collection"
+HOMEPAGE="https://launchpad.net/intltool/"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND="
+       >=dev-lang/perl-5.8.1
+       dev-perl/XML-Parser
+"
+RDEPEND="${DEPEND}
+       sys-devel/gettext
+"
+DOCS=( AUTHORS ChangeLog NEWS README TODO doc/I18N-HOWTO )
+
+src_prepare() {
+       # Fix handling absolute paths in single file key output, bug #470040
+       # https://bugs.launchpad.net/intltool/+bug/1168941
+       epatch "${FILESDIR}/${PN}-0.50.2-absolute-paths.patch"
+       epatch "${FILESDIR}"/${PN}-0.51.0-perl-5.22.patch
+}