summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-03 12:15:11 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-03 12:15:11 -0500
commitb7f02b9741f313a6d6b96c1829d45fe09a39d0de (patch)
tree9d504613fe7b4ee55cd4986c58feb2fc47ae22c2 /pcr
parent20715decf4d41f95876e431d029ef69b89205ffa (diff)
downloadabslibre-b7f02b9741f313a6d6b96c1829d45fe09a39d0de.tar.gz
abslibre-b7f02b9741f313a6d6b96c1829d45fe09a39d0de.tar.bz2
abslibre-b7f02b9741f313a6d6b96c1829d45fe09a39d0de.zip
add pcr/lcov
Diffstat (limited to 'pcr')
-rw-r--r--pcr/lcov/PKGBUILD35
-rw-r--r--pcr/lcov/fix-undef-behaviour.patch37
-rw-r--r--pcr/lcov/handle-equals-signs.patch23
3 files changed, 95 insertions, 0 deletions
diff --git a/pcr/lcov/PKGBUILD b/pcr/lcov/PKGBUILD
new file mode 100644
index 000000000..d9a20b7a1
--- /dev/null
+++ b/pcr/lcov/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Luke Shumaker <lukeshu@parabola.nu>
+# Contributor (AUR): Jordi De Groof <jordi.degroof@gmail.com>
+# Contributor (AUR): Andre Klitzing <aklitzing@gmail.com>
+
+pkgname=lcov
+pkgver=1.13
+pkgrel=2
+pkgdesc="front-end for GCC's coverage testing tool gcov"
+arch=('any')
+url="http://ltp.sourceforge.net/coverage/lcov.php"
+license=('GPL')
+depends=('perl')
+source=("http://downloads.sourceforge.net/ltp/$pkgname-$pkgver.tar.gz"
+ "handle-equals-signs.patch"
+ "fix-undef-behaviour.patch"
+ )
+
+prepare()
+{
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 -i $srcdir/handle-equals-signs.patch
+ patch -p1 -i $srcdir/fix-undef-behaviour.patch
+}
+
+
+package()
+{
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make PREFIX="$pkgdir/usr" install
+}
+
+sha256sums=('44972c878482cc06a05fe78eaa3645cbfcbad6634615c3309858b207965d8a23'
+ '54728aa4e244d3662c65ba91fb486dc1d5c64d9d55745ee334c4131109dc233c'
+ 'ceaf41f7cc9cea5a6fc4b0385ffef10d1ab8812acd2a5b16dcd8d7bca7120488')
diff --git a/pcr/lcov/fix-undef-behaviour.patch b/pcr/lcov/fix-undef-behaviour.patch
new file mode 100644
index 000000000..3621fc898
--- /dev/null
+++ b/pcr/lcov/fix-undef-behaviour.patch
@@ -0,0 +1,37 @@
+Author: Alastair McKinstry <mckinstry@debian.org>
+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;
+
diff --git a/pcr/lcov/handle-equals-signs.patch b/pcr/lcov/handle-equals-signs.patch
new file mode 100644
index 000000000..8ab09985b
--- /dev/null
+++ b/pcr/lcov/handle-equals-signs.patch
@@ -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 <zackw@panix.com>
+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