forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-util/cloc: add patch for perl 5.22 array error
Pretty much just what it says; this will keep cropping up in more packages. Package-Manager: portage-2.2.24
- Loading branch information
Showing
2 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
dev-util/cloc/files/cloc-fix_stupid_perl_array_error_again.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- cloc-1.64.pl.orig 2015-08-26 18:59:16.045264847 -0700 | ||
+++ cloc-1.64.pl 2015-08-26 19:30:23.241507263 -0700 | ||
@@ -1280,11 +1280,6 @@ | ||
!(@{$Filters_by_Language{$Lang_R} })) { | ||
$not_Filters_by_Language_Lang_LR = 1; | ||
} | ||
- } else { | ||
- if (!defined(@{$Filters_by_Language{$Lang_L} }) or | ||
- !defined(@{$Filters_by_Language{$Lang_R} })) { | ||
- $not_Filters_by_Language_Lang_LR = 1; | ||
- } | ||
} | ||
if ($not_Filters_by_Language_Lang_LR) { | ||
if (($Lang_L eq "(unknown)") or ($Lang_R eq "(unknown)")) { | ||
@@ -1618,7 +1613,7 @@ | ||
$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)"; | ||
@@ -1759,7 +1754,7 @@ | ||
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). | ||
@@ -3259,7 +3254,7 @@ | ||
} # 1}}} | ||
sub print_language_filters { # {{{1 | ||
my ($language,) = @_; | ||
- if (!defined @{$Filters_by_Language{$language}}) { | ||
+ if (! @{$Filters_by_Language{$language}}) { | ||
warn "Unknown language: $language\n"; | ||
warn "Use --show-lang to list all defined languages.\n"; | ||
return; | ||
@@ -4623,7 +4618,7 @@ | ||
|
||
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; } | ||
} | ||
|
||
@@ -4652,9 +4647,9 @@ | ||
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/.*//; } | ||
} | ||
} | ||
@@ -6582,7 +6577,7 @@ | ||
my $language = $rh_Language_by_Extension->{$ext}; | ||
next if defined $extension_collisions{$language}; | ||
next if $seen_it{$language}; | ||
- if (!defined @{$rhaa_Filters_by_Language->{$language}}) { | ||
+ if (! @{$rhaa_Filters_by_Language->{$language}}) { | ||
$OK = 0; | ||
warn "Missing language filter for $language\n"; | ||
} |