From db234b4c753e8f1164aac54ecbdc1799312be6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Fri, 3 Feb 2017 23:34:07 +0100 Subject: [PATCH] New package: lcov-1.13 --- .../lcov/patches/fix-undef-behaviour.patch | 37 +++++++++++++++++++ .../lcov/patches/handle-equals-signs.patch | 23 ++++++++++++ srcpkgs/lcov/template | 13 +++++++ 3 files changed, 73 insertions(+) create mode 100644 srcpkgs/lcov/patches/fix-undef-behaviour.patch create mode 100644 srcpkgs/lcov/patches/handle-equals-signs.patch create mode 100644 srcpkgs/lcov/template diff --git a/srcpkgs/lcov/patches/fix-undef-behaviour.patch b/srcpkgs/lcov/patches/fix-undef-behaviour.patch new file mode 100644 index 0000000000..15d954defc --- /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 0000000000..5f4edb8278 --- /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 0000000000..7116b1ac21 --- /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