[arch-commits] Commit in cloc/repos/community-any (PKGBUILD PKGBUILD perl522.patch)

Evangelos Foutras foutrelis at archlinux.org
Sun Jun 28 19:22:38 UTC 2015


    Date: Sunday, June 28, 2015 @ 21:22:38
  Author: foutrelis
Revision: 136055

archrelease: copy trunk to community-any

Added:
  cloc/repos/community-any/PKGBUILD
    (from rev 136054, cloc/trunk/PKGBUILD)
  cloc/repos/community-any/perl522.patch
    (from rev 136054, cloc/trunk/perl522.patch)
Deleted:
  cloc/repos/community-any/PKGBUILD

---------------+
 PKGBUILD      |   49 +++++++++++++++++++++------------------
 perl522.patch |   70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 22 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2015-06-28 19:22:29 UTC (rev 136054)
+++ PKGBUILD	2015-06-28 19:22:38 UTC (rev 136055)
@@ -1,22 +0,0 @@
-# $Id$
-# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
-# Contributor: Diogo Ferreira <diogo at underdev.org>
-
-pkgname=cloc
-pkgver=1.62
-pkgrel=1
-pkgdesc="Count Lines of Code"
-arch=('any')
-url="http://cloc.sourceforge.net/"
-license=('GPL')
-depends=('perl')
-source=(https://downloads.sourceforge.net/project/$pkgname/$pkgname/v$pkgver/$pkgname-$pkgver.pl)
-sha256sums=('fa3793b576895cde2acae26a49447bf0c55ab3f79bdacfb00a88fc1d255c2570')
-
-package() {
-  cd "$srcdir"
-
-  install -D $pkgname-$pkgver.pl "$pkgdir/usr/bin/$pkgname"
-}
-
-# vim:set ts=2 sw=2 et:

Copied: cloc/repos/community-any/PKGBUILD (from rev 136054, cloc/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2015-06-28 19:22:38 UTC (rev 136055)
@@ -0,0 +1,27 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Diogo Ferreira <diogo at underdev.org>
+
+pkgname=cloc
+pkgver=1.64
+pkgrel=1
+pkgdesc="Count Lines of Code"
+arch=('any')
+url="http://cloc.sourceforge.net/"
+license=('GPL')
+depends=('perl')
+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:

Copied: cloc/repos/community-any/perl522.patch (from rev 136054, cloc/trunk/perl522.patch)
===================================================================
--- perl522.patch	                        (rev 0)
+++ perl522.patch	2015-06-28 19:22:38 UTC (rev 136055)
@@ -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";
+         }



More information about the arch-commits mailing list