Date: Tuesday, September 21, 2021 @ 15:20:29
  Author: alerque
Revision: 1020490

Migrate lcov from AUR

Added:
  lcov/
  lcov/repos/
  lcov/trunk/
  lcov/trunk/PKGBUILD
  lcov/trunk/fix-undef-behaviour.patch
  lcov/trunk/handle-equals-signs.patch

---------------------------+
 PKGBUILD                  |   32 ++++++++++++++++++++++++++++++++
 fix-undef-behaviour.patch |   37 +++++++++++++++++++++++++++++++++++++
 handle-equals-signs.patch |   23 +++++++++++++++++++++++
 3 files changed, 92 insertions(+)

Added: lcov/trunk/PKGBUILD
===================================================================
--- lcov/trunk/PKGBUILD                         (rev 0)
+++ lcov/trunk/PKGBUILD 2021-09-21 15:20:29 UTC (rev 1020490)
@@ -0,0 +1,32 @@
+# Maintainer:  Caleb Maclennan <[email protected]>
+# Contributor: Jordi De Groof <[email protected]>
+# Contributor: Andre Klitzing <[email protected]>
+
+pkgname=lcov
+pkgver=1.15
+pkgrel=3
+pkgdesc='front-end for GCC’s coverage testing tool gcov'
+arch=(any)
+url="https://github.com/linux-test-project/$pkgname";
+license=(GPL)
+depends=(perl)
+backup=(etc/lcovrc)
+_archive="$pkgname-$pkgver"
+source=("$url/releases/download/v$pkgver/$_archive.tar.gz"
+        handle-equals-signs.patch
+        fix-undef-behaviour.patch)
+sha256sums=('c1cda2fa33bec9aa2c2c73c87226cfe97de0831887176b45ee523c5e30f8053a'
+            '54728aa4e244d3662c65ba91fb486dc1d5c64d9d55745ee334c4131109dc233c'
+            'ceaf41f7cc9cea5a6fc4b0385ffef10d1ab8812acd2a5b16dcd8d7bca7120488')
+
+prepare() {
+    cd "$_archive"
+    patch -p1 -i ../handle-equals-signs.patch
+    patch -p1 -i ../fix-undef-behaviour.patch
+}
+
+package () {
+    cd "$_archive"
+    make PREFIX="/usr" CFG_DIR=/etc DESTDIR="$pkgdir" install
+}
+

Added: lcov/trunk/fix-undef-behaviour.patch
===================================================================
--- lcov/trunk/fix-undef-behaviour.patch                                (rev 0)
+++ lcov/trunk/fix-undef-behaviour.patch        2021-09-21 15:20:29 UTC (rev 
1020490)
@@ -0,0 +1,37 @@
+Author: Alastair McKinstry <[email protected]>
+Description: Fix for undefined behavior in perl5.20
+Origin: http://bugs.debian.org/761308
+Forwarded: no
+Last-Updated: 2014-09-13
+
+Index: lcov-1.12/bin/lcov
+===================================================================
+--- lcov-1.12.orig/bin/lcov
++++ lcov-1.12/bin/lcov
+@@ -224,7 +224,9 @@ Getopt::Long::Configure("default");
+       # Remove spaces around rc options
+       my %new_opt_rc;
+ 
+-      while (my ($key, $value) = each(%opt_rc)) {
++      my @keys = keys %opt_rc;
++      for my $key (@keys) {
++              my $value = $opt_rc{$key};
+               $key =~ s/^\s+|\s+$//g;
+               $value =~ s/^\s+|\s+$//g;
+ 
+Index: lcov-1.12/bin/geninfo
+===================================================================
+--- lcov-1.12.orig/bin/geninfo
++++ lcov-1.12/bin/geninfo
+@@ -284,8 +284,9 @@ Getopt::Long::Configure("default");
+ {
+       # Remove spaces around rc options
+       my %new_opt_rc;
+-
+-      while (my ($key, $value) = each(%opt_rc)) {
++      my @keys = keys %opt_rc;
++      for my $key (@keys) {
++              my $value = $opt_rc{$key};
+               $key =~ s/^\s+|\s+$//g;
+               $value =~ s/^\s+|\s+$//g;
+ 

Added: lcov/trunk/handle-equals-signs.patch
===================================================================
--- lcov/trunk/handle-equals-signs.patch                                (rev 0)
+++ lcov/trunk/handle-equals-signs.patch        2021-09-21 15:20:29 UTC (rev 
1020490)
@@ -0,0 +1,23 @@
+Description: Handle "=====" as another form of zero.
+ gcov prints "=====" instead of "######" when an unexecuted line is
+ "reachable only by exceptional paths such as C++ exception handlers."
+ This should be handled the same as "######" for our purposes.
+Author: Zack Weinberg <[email protected]>
+Last-Update: 2013-02-01
+
+Index: lcov-1.12/bin/geninfo
+===================================================================
+--- lcov-1.12.orig/bin/geninfo
++++ lcov-1.12/bin/geninfo
+@@ -1771,8 +1771,9 @@ sub read_gcov_file($)
+                               $number = (split(" ",substr($_, 0, 16)))[0];
+ 
+                               # Check for zero count which is indicated
+-                              # by ######
+-                              if ($number eq "######") { $number = 0; }
++                              # by ###### or =====
++                              if ($number eq "######" or
++                                  $number eq "=====") { $number = 0; }
+ 
+                               if ($exclude_line) {
+                                       # Register uninstrumented line instead

Reply via email to