mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
imported lcov; it is useful for akabei development
This commit is contained in:
parent
9fe59cd8cf
commit
86d46d9475
40
lcov/PKGBUILD
Normal file
40
lcov/PKGBUILD
Normal file
@ -0,0 +1,40 @@
|
||||
# Contributor: Jordi De Groof <jordi dot degroof at gmail dot com>
|
||||
# Contributor: Andre Klitzing <aklitzing () gmail () com>
|
||||
|
||||
pkgname=lcov
|
||||
pkgver=1.12
|
||||
pkgrel=1
|
||||
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"
|
||||
"reproducible-manpage.patch"
|
||||
)
|
||||
sha256sums=('b474e49c6c962754063b3be97a757a2ba9e7a455f0aea612863bf67e9b8b8ea7'
|
||||
'54728aa4e244d3662c65ba91fb486dc1d5c64d9d55745ee334c4131109dc233c'
|
||||
'ceaf41f7cc9cea5a6fc4b0385ffef10d1ab8812acd2a5b16dcd8d7bca7120488'
|
||||
'd854c999a70ec8ac3e32419ece6acd62ad5517a7521a00dc1e5c79e9495c9af2')
|
||||
|
||||
prepare()
|
||||
{
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
patch -p1 -i $srcdir/handle-equals-signs.patch
|
||||
patch -p1 -i $srcdir/fix-undef-behaviour.patch
|
||||
patch -p1 -i $srcdir/reproducible-manpage.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
}
|
||||
|
||||
package()
|
||||
{
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
make PREFIX="$pkgdir" install
|
||||
}
|
37
lcov/fix-undef-behaviour.patch
Normal file
37
lcov/fix-undef-behaviour.patch
Normal file
@ -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;
|
||||
|
23
lcov/handle-equals-signs.patch
Normal file
23
lcov/handle-equals-signs.patch
Normal file
@ -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
|
19
lcov/reproducible-manpage.patch
Normal file
19
lcov/reproducible-manpage.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Author: Reiner Herrmann <reiner@reiner-h.de>
|
||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803412
|
||||
Description: Use UTC to get date independent of timezone
|
||||
Last-Updated: 2015-10-29
|
||||
Forwarded: no
|
||||
|
||||
Index: lcov-1.12/bin/updateversion.pl
|
||||
===================================================================
|
||||
--- lcov-1.12.orig/bin/updateversion.pl
|
||||
+++ lcov-1.12/bin/updateversion.pl
|
||||
@@ -83,7 +83,7 @@ sub get_file_info($)
|
||||
|
||||
return (0, 0, 0) if (!-e $filename);
|
||||
@stat = stat($filename);
|
||||
- ($sec, $min, $hour, $day, $month, $year) = localtime($stat[9]);
|
||||
+ ($sec, $min, $hour, $day, $month, $year) = gmtime($stat[9]);
|
||||
$year += 1900;
|
||||
$month += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user