diff --git a/srcpkgs/lcov/patches/fix-undef-behaviour.patch b/srcpkgs/lcov/patches/fix-undef-behaviour.patch new file mode 100644 index 00000000000..15d954defc7 --- /dev/null +++ b/srcpkgs/lcov/patches/fix-undef-behaviour.patch @@ -0,0 +1,37 @@ +Author: Alastair McKinstry +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 +=================================================================== +--- bin/lcov ++++ 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 +=================================================================== +--- bin/geninfo ++++ 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/srcpkgs/lcov/patches/handle-equals-signs.patch b/srcpkgs/lcov/patches/handle-equals-signs.patch new file mode 100644 index 00000000000..5f4edb82786 --- /dev/null +++ b/srcpkgs/lcov/patches/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 +Last-Update: 2013-02-01 + +Index: lcov-1.12/bin/geninfo +=================================================================== +--- bin/geninfo ++++ 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 diff --git a/srcpkgs/lcov/template b/srcpkgs/lcov/template new file mode 100644 index 00000000000..7116b1ac212 --- /dev/null +++ b/srcpkgs/lcov/template @@ -0,0 +1,13 @@ +# Template file for 'lcov' +pkgname=lcov +version=1.13 +revision=1 +build_style=gnu-makefile +depends="perl" +hostmakedepends="perl" +short_desc="Front-end for GCC's coverage testing tool gcov" +maintainer="Andre Klitzing " +license="GPL-2" +homepage="http://ltp.sourceforge.net/coverage/lcov.php" +distfiles="https://github.com/linux-test-project/${pkgname}/archive/v${version}.tar.gz" +checksum=3650ad22773c56aaf8c5288e068dd35bd03f57659b6455dc6f8e21451c83b5e8