Control: tags 788891 + patch pending Dear maintainer,
I've uploaded an NMU for cloc (versioned as 1.60-1.1). The diff is attached to this message and committed ti the packaging Git repository. Cheers, dam
diff -Nru cloc-1.60/debian/changelog cloc-1.60/debian/changelog --- cloc-1.60/debian/changelog 2013-08-20 07:52:24.000000000 +0300 +++ cloc-1.60/debian/changelog 2015-07-24 13:21:24.000000000 +0300 @@ -1,3 +1,12 @@ +cloc (1.60-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add a patch fixing usage of 'defined(@array)' and unescaped left brace in + regular expressions + Closes: #788891 -- FTBFS with perl 5.22 + + -- Damyan Ivanov <d...@debian.org> Fri, 24 Jul 2015 10:17:56 +0000 + cloc (1.60-1) unstable; urgency=low * New upstream release. diff -Nru cloc-1.60/debian/patches/perl-5.22.patch cloc-1.60/debian/patches/perl-5.22.patch --- cloc-1.60/debian/patches/perl-5.22.patch 1970-01-01 02:00:00.000000000 +0200 +++ cloc-1.60/debian/patches/perl-5.22.patch 2015-07-24 13:16:52.000000000 +0300 @@ -0,0 +1,57 @@ +Description: remove features deprecated in perl 5.22 + - using defined(@array) is now a fatal error + - unescaped left brace in regular expressions is deprecated +Author: Damyan Ivanov <d...@debian.org> + +--- a/cloc ++++ b/cloc +@@ -1163,8 +1163,8 @@ foreach (my $F = 0; $F < scalar @fh - 1; + $not_Filters_by_Language_Lang_LR = 1; + } + } else { +- if (!defined(@{$Filters_by_Language{$Lang_L} }) or +- !defined(@{$Filters_by_Language{$Lang_R} })) { ++ if (!@{$Filters_by_Language{$Lang_L} } or ++ !@{$Filters_by_Language{$Lang_R} }) { + $not_Filters_by_Language_Lang_LR = 1; + } + } +@@ -1495,7 +1495,7 @@ foreach my $file (sort keys %unique_sour + $Ignored{$file} = "--exclude-lang=$Language{$file}"; + next; + } +- my $Filters_by_Language_Language_file = !defined @{$Filters_by_Language{$Language{$file}} }; ++ my $Filters_by_Language_Language_file = !@{$Filters_by_Language{$Language{$file}} }; + if ($Filters_by_Language_Language_file) { + if ($Language{$file} eq "(unknown)") { + $Ignored{$file} = "language unknown (#1)"; +@@ -1630,7 +1630,7 @@ sub combine_results { + if ($PERL_516) { + next unless @{$rhaa_Filters_by_Language->{$1}}; + } else { +- next unless defined @{$rhaa_Filters_by_Language->{$1}}; ++ next unless @{$rhaa_Filters_by_Language->{$1}}; + } + # above test necessary to avoid trying to sum reports + # of reports (which have no language breakdown). +@@ -3996,7 +3996,7 @@ sub determine_lit_type { + + open (FILE, $file); + while (<FILE>) { +- if (m/^\\begin{code}/) { close FILE; return 2; } ++ if (m/^\\begin\{code\}/) { close FILE; return 2; } + if (m/^>\s/) { close FILE; return 1; } + } + +@@ -4025,9 +4025,9 @@ sub remove_haskell_comments { + if (!s/^>//) { s/.*//; } + } elsif ($literate == 2) { + if ($inlitblock) { +- if (m/^\\end{code}/) { s/.*//; $inlitblock = 0; } ++ if (m/^\\end\{code\}/) { s/.*//; $inlitblock = 0; } + } elsif (!$inlitblock) { +- if (m/^\\begin{code}/) { s/.*//; $inlitblock = 1; } ++ if (m/^\\begin\{code\}/) { s/.*//; $inlitblock = 1; } + else { s/.*//; } + } + } diff -Nru cloc-1.60/debian/patches/series cloc-1.60/debian/patches/series --- cloc-1.60/debian/patches/series 1970-01-01 02:00:00.000000000 +0200 +++ cloc-1.60/debian/patches/series 2015-07-24 13:14:32.000000000 +0300 @@ -0,0 +1 @@ +perl-5.22.patch