summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorPetr Rockai <me@mornfall.net>2013-05-28 10:08:39 +0200
committerEvgeny Egorochkin <phreedom@yandex.ru>2013-12-13 20:56:36 +0200
commitf9d66c239eb112619654ee2b831f78749d12bcef (patch)
tree60c8040accbc001f6545580a7443a892f03a8861 /pkgs/development/tools
parentc5927837413edd3d738cfc500e0988125ee6495a (diff)
downloadnixlib-f9d66c239eb112619654ee2b831f78749d12bcef.tar
nixlib-f9d66c239eb112619654ee2b831f78749d12bcef.tar.gz
nixlib-f9d66c239eb112619654ee2b831f78749d12bcef.tar.bz2
nixlib-f9d66c239eb112619654ee2b831f78749d12bcef.tar.lz
nixlib-f9d66c239eb112619654ee2b831f78749d12bcef.tar.xz
nixlib-f9d66c239eb112619654ee2b831f78749d12bcef.tar.zst
nixlib-f9d66c239eb112619654ee2b831f78749d12bcef.zip
lcov: Update to 1.10 as 1.9 fails with gcc 4.7 .gcno files.
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/analysis/lcov/default.nix7
-rw-r--r--pkgs/development/tools/analysis/lcov/find-source.patch84
2 files changed, 3 insertions, 88 deletions
diff --git a/pkgs/development/tools/analysis/lcov/default.nix b/pkgs/development/tools/analysis/lcov/default.nix
index 21064ebe870a..a8d376ef23c8 100644
--- a/pkgs/development/tools/analysis/lcov/default.nix
+++ b/pkgs/development/tools/analysis/lcov/default.nix
@@ -1,16 +1,15 @@
 {stdenv, fetchurl, perl}:
 
 stdenv.mkDerivation rec {
-  name = "lcov-1.9";
+  name = "lcov-1.10";
 
   src = fetchurl {
     url = "mirror://sourceforge/ltp/${name}.tar.gz";
-    sha256 = "1jhs1x2qy5la5gpdfl805zm11rsz6anla3b0wffk6wq79xfi4zn3";
+    sha256 = "13xq2ln4jjasslqzzhr5g11q1c19gwpng1jphzbzmylmrjz62ila";
   };
 
   patches =
-    [ ./find-source.patch ]
-    ++ (stdenv.lib.optional stdenv.isFreeBSD ./freebsd-install.patch);
+    (stdenv.lib.optional stdenv.isFreeBSD ./freebsd-install.patch);
 
   preBuild = ''
     makeFlagsArray=(PREFIX=$out BIN_DIR=$out/bin MAN_DIR=$out/share/man)
diff --git a/pkgs/development/tools/analysis/lcov/find-source.patch b/pkgs/development/tools/analysis/lcov/find-source.patch
deleted file mode 100644
index 428ae399d4ea..000000000000
--- a/pkgs/development/tools/analysis/lcov/find-source.patch
+++ /dev/null
@@ -1,84 +0,0 @@
---- lcov-1.8/bin/geninfo	2010-01-29 11:14:46.000000000 +0100
-+++ lcov-1.8/bin/geninfo	2010-04-18 23:33:43.000000000 +0200
-@@ -51,6 +51,7 @@
- 
- use strict;
- use File::Basename; 
-+use Cwd qw(abs_path);
- use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute splitdir
- 			      splitpath rel2abs/;
- use Getopt::Long;
-@@ -95,6 +96,7 @@ sub match_filename($@);
- sub solve_ambiguous_match($$$);
- sub split_filename($);
- sub solve_relative_path($$);
-+sub find_source_file($$);
- sub read_gcov_header($);
- sub read_gcov_file($);
- sub info(@);
-@@ -964,7 +966,7 @@ sub process_dafile($$)
- 
- 		if (defined($source))
- 		{
--			$source = solve_relative_path($base_dir, $source);
-+ 			$source = find_source_file($base_dir, $source);
- 		}
- 
- 		# gcov will happily create output even if there's no source code
-@@ -981,18 +983,9 @@ sub process_dafile($$)
- 			die("ERROR: could not read source file $source\n");
- 		}
- 
--		@matches = match_filename(defined($source) ? $source :
--					  $gcov_file, keys(%{$instr}));
-+		next if ! -r $source;
- 
--		# Skip files that are not mentioned in the graph file
--		if (!@matches)
--		{
--			warn("WARNING: cannot find an entry for ".$gcov_file.
--			     " in $graph_file_extension file, skipping ".
--			     "file!\n");
--			unlink($gcov_file);
--			next;
--		}
-+		@matches = ($source);
- 
- 		# Read in contents of gcov file
- 		@result = read_gcov_file($gcov_file);
-@@ -1242,6 +1235,25 @@ sub solve_relative_path($$)
- }
- 
- 
-+sub find_source_file($$)
-+{
-+        my ($base_dir, $source) = @_;
-+        my $dir = $base_dir;
-+
-+        # Hack to make absolute paths work on Nixpkgs coverage
-+        # reports.  The source is in /nix/store/<bla>/.build/<bla>.
-+        $source = $1 if $source =~ /^\/.*\/\.build\/(.*)$/;
-+        
-+        while (!-e "$dir/$source") {
-+                $dir = $dir . "/..";
-+                if (length $dir > 1000) {
-+                        return "$base_dir/$source";
-+                }
-+        }
-+        return abs_path("$dir/$source");
-+}
-+
-+
- #
- # match_filename(gcov_filename, list)
- #
-@@ -1918,7 +1930,7 @@ sub process_graphfile($$)
- 
- 	# Get path to data file in absolute and normalized form (begins with /,
- 	# contains no more ../ or ./)
--	$graph_filename = solve_relative_path($cwd, $graph_filename);
-+	$graph_filename = find_source_file($cwd, $graph_filename);
- 
- 	# Get directory and basename of data file
- 	($graph_dir, $graph_basename) = split_filename($graph_filename);
-