On Thu, Aug 31, 2017 at 12:45:16PM +0100, Ian Abbott wrote:
> intltool-update from intltool-0.50.0 doesn't work with Perl 5.26 (and
> possibly other versions later than Perl 5.22), due to "Unescaped left
> brace in regex is illegal here" errors. In Perl 5.22 this resulted in
> warnings, but they have since been promoted to errors.
>
> For example, building "avahi" fails at the "prepare" stage:
>
> checking for intltool >= 0.35.0... Unescaped left brace in regex is illegal
> here in regex; marked by <-- HERE in m/^(.*)\${ <-- HERE ?([A-Z_]+)}?(.*)$/
> at
> /home/abbotti/work/ptxdist/projects/dbpod-socfpga-tmp/platform-dbpod-fastpod/sysroot-host/bin/intltool-update
> line 1064.
> found
> configure: error: Your intltool is too old. You need intltool 0.35.0 or
> later.
> /mnt/lindata/work/abbotti/ptxdist/ptxdist/ptxdist_git/ptxdist/rules/post/ptxd_make_world_prepare.make:12:
> recipe for target
> '/home/abbotti/work/ptxdist/projects/dbpod-socfpga-tmp/platform-dbpod-fastpod/state/avahi.prepare'
> failed
> make: ***
> [/home/abbotti/work/ptxdist/projects/dbpod-socfpga-tmp/platform-dbpod-fastpod/state/avahi.prepare]
> Error 1
>
> Apply the same patch as in the mainstream Linux distros to fix it.
>
> Note that if PTXdist updates host-intltool to version 0.51.0, it will
> need the same patch.
For the record, here are some upstream bugreports:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788705
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826471
https://bugs.launchpad.net/intltool/+bug/1490906
> Signed-off-by: Ian Abbott <[email protected]>
> ---
> patches/intltool-0.50.0/intltool-perl-5.22.patch | 43
> ++++++++++++++++++++++++
> patches/intltool-0.50.0/series | 1 +
> 2 files changed, 44 insertions(+)
> create mode 100644 patches/intltool-0.50.0/intltool-perl-5.22.patch
> create mode 100644 patches/intltool-0.50.0/series
>
> diff --git a/patches/intltool-0.50.0/intltool-perl-5.22.patch
> b/patches/intltool-0.50.0/intltool-perl-5.22.patch
> new file mode 100644
> index 000000000..a23946b39
> --- /dev/null
> +++ b/patches/intltool-0.50.0/intltool-perl-5.22.patch
> @@ -0,0 +1,43 @@
> +--- a/intltool-update.in 2015-03-09 02:39:54.000000000 +0100
> ++++ b/intltool-update.in 2015-09-01 11:43:40.595517191 +0200
> +@@ -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/patches/intltool-0.50.0/series b/patches/intltool-0.50.0/series
> new file mode 100644
> index 000000000..f0f2827c4
> --- /dev/null
> +++ b/patches/intltool-0.50.0/series
> @@ -0,0 +1 @@
> +intltool-perl-5.22.patch
> --
> 2.14.1
>
>
> _______________________________________________
> ptxdist mailing list
> [email protected]
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
[email protected]