Date: Sunday, June 28, 2015 @ 21:22:29 Author: foutrelis Revision: 136054
upgpkg: cloc 1.64-1 New upstream release. Added: cloc/trunk/perl522.patch Modified: cloc/trunk/PKGBUILD ---------------+ PKGBUILD | 11 ++++++-- perl522.patch | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2015-06-28 19:07:29 UTC (rev 136053) +++ PKGBUILD 2015-06-28 19:22:29 UTC (rev 136054) @@ -3,7 +3,7 @@ # Contributor: Diogo Ferreira <di...@underdev.org> pkgname=cloc -pkgver=1.62 +pkgver=1.64 pkgrel=1 pkgdesc="Count Lines of Code" arch=('any') @@ -10,13 +10,18 @@ url="http://cloc.sourceforge.net/" license=('GPL') depends=('perl') -source=(https://downloads.sourceforge.net/project/$pkgname/$pkgname/v$pkgver/$pkgname-$pkgver.pl) -sha256sums=('fa3793b576895cde2acae26a49447bf0c55ab3f79bdacfb00a88fc1d255c2570') +source=(https://downloads.sourceforge.net/project/$pkgname/$pkgname/v$pkgver/$pkgname-$pkgver.pl + perl522.patch) +sha256sums=('79edea7ea1f442b1632001e23418193ae4571810e60de8bd25e491036d60eb3d' + '57e73b9b18376edc6c37426cb3cfca1e84ae49b4ede52e21a6ae2b8aa17b949b') package() { cd "$srcdir" install -D $pkgname-$pkgver.pl "$pkgdir/usr/bin/$pkgname" + + # https://sourceforge.net/p/cloc/bugs/135/ + patch -N -i perl522.patch "$pkgdir/usr/bin/$pkgname" } # vim:set ts=2 sw=2 et: Added: perl522.patch =================================================================== --- perl522.patch (rev 0) +++ perl522.patch 2015-06-28 19:22:29 UTC (rev 136054) @@ -0,0 +1,70 @@ +--- /usr/bin/cloc 2015-06-29 01:53:16.000000000 +0800 ++++ cloc-1.64.pl 2015-06-29 02:11:09.849082768 +0800 +@@ -1281,8 +1281,8 @@ + $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; + } + } +@@ -1618,7 +1618,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 +1759,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 +3259,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 +4623,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 +4652,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 +6582,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"; + }