Merge remote-tracking branch 'upstream/master' into hardened-stdenv

This commit is contained in:
Robin Gloster
2016-07-15 14:41:01 +00:00
1603 changed files with 132258 additions and 39568 deletions
@@ -1,16 +1,16 @@
{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices }:
{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices, git, mercurial }:
with lib;
stdenv.mkDerivation rec {
version = "0.22.0";
version = "0.28.0";
name = "flow-${version}";
src = fetchFromGitHub {
owner = "facebook";
repo = "flow";
rev = "v${version}";
sha256 = "1p8a5cf85ydz6g04zsvsa6sh2b4p94mj9cqj7k6llf0dsiihrv54";
sha256 = "1xryv1366zc385r82r6n832xkaqcm63zs1baizl02qchfzfa3am2";
};
installPhase = ''
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
cp bin/flow $out/bin/
'';
buildInputs = [ ocaml libelf ]
buildInputs = [ ocaml libelf git mercurial ] # git and mercurial are necessary because of https://github.com/facebook/flow/issues/1981
++ optionals stdenv.isDarwin [ cf-private CoreServices ];
meta = with stdenv.lib; {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake pkgconfig zlib curl elfutils python libiberty binutils ];
meta = with stdenv.lib; {
description = "code coverage tester for compiled programs, Python scripts and shell scripts";
description = "Code coverage tester for compiled programs, Python scripts and shell scripts";
longDescription = ''
Kcov is a code coverage tester for compiled programs, Python
@@ -1,31 +1,20 @@
{stdenv, fetchurl, perl}:
stdenv.mkDerivation rec {
name = "lcov-1.10";
name = "lcov-1.12";
src = fetchurl {
url = "mirror://sourceforge/ltp/${name}.tar.gz";
sha256 = "13xq2ln4jjasslqzzhr5g11q1c19gwpng1jphzbzmylmrjz62ila";
sha256 = "19wfifdpxxivhq9adbphanjfga9bg9spms9v7c3589wndjff8x5l";
};
patches =
[ ./lcov-except-unreach.patch ./no-warn-missing.patch ]
++ stdenv.lib.optional stdenv.isFreeBSD ./freebsd-install.patch;
buildInputs = [ perl ];
preBuild = ''
patchShebangs bin/
makeFlagsArray=(PREFIX=$out BIN_DIR=$out/bin MAN_DIR=$out/share/man)
'';
preInstall = ''
substituteInPlace bin/install.sh --replace /bin/bash $shell
'';
postInstall = ''
for i in "$out/bin/"*; do
substituteInPlace $i --replace /usr/bin/perl ${perl}/bin/perl
done
'';
meta = with stdenv.lib; {
description = "Code coverage tool that enhances GNU gcov";
@@ -41,7 +30,7 @@ stdenv.mkDerivation rec {
homepage = http://ltp.sourceforge.net/coverage/lcov.php;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ maintainers.mornfall ];
maintainers = with maintainers; [ dezgeg mornfall ];
platforms = platforms.all;
};
}
@@ -1,13 +0,0 @@
FreeBSD's `install' doesn't support `-D'. Thus, use GNU install instead,
since `stdenv-native' assumes that `ginstall' is available.
--- lcov-1.9/bin/install.sh 2010-08-06 13:05:17.000000000 +0200
+++ lcov-1.9/bin/install.sh 2012-03-02 16:53:28.000000000 +0100
@@ -34,6 +34,6 @@
local TARGET=$2
local PARAMS=$3
- install -p -D $PARAMS $SOURCE $TARGET
+ ginstall -p -D $PARAMS $SOURCE $TARGET
}
@@ -1,13 +0,0 @@
http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/lcov/bin/geninfo?r1=1.117&r2=1.118&view=patch
--- a/bin/geninfo 2012/10/10 08:36:16 1.117
+++ b/bin/geninfo 2012/11/13 09:58:53 1.118
@@ -1833,7 +1833,7 @@
push(@result, 0);
} else {
# Check for zero count
- if ($count eq "#####") {
+ if ($count =~ /^[#=]/) {
$count = 0;
}
push(@result, 1);
@@ -1,54 +0,0 @@
http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/lcov/bin/geninfo?view=log
--- a/bin/geninfo 2013/01/10 09:02:32 1.119
+++ b/bin/geninfo 2013/02/22 14:09:08 1.120
@@ -864,7 +864,6 @@
my $source; # gcov source header information
my $object; # gcov object header information
my @matches; # List of absolute paths matching filename
- my @unprocessed; # List of unprocessed source code files
my $base_dir; # Base directory for current file
my @tmp_links; # Temporary links to be cleaned up
my @result;
@@ -1060,7 +1059,6 @@
# Traverse the list of generated .gcov files and combine them into a
# single .info file
- @unprocessed = keys(%{$instr});
foreach $gcov_file (sort(@gcov_list))
{
my $i;
@@ -1143,16 +1141,6 @@
\@matches, \@gcov_content);
}
- # Remove processed file from list
- for ($index = scalar(@unprocessed) - 1; $index >= 0; $index--)
- {
- if ($unprocessed[$index] eq $source_filename)
- {
- splice(@unprocessed, $index, 1);
- last;
- }
- }
-
# Skip external files if requested
if (!$opt_external) {
if (is_external($source_filename)) {
@@ -1297,16 +1285,6 @@
unlink($gcov_file);
}
- # Check for files which show up in the graph file but were never
- # processed
- if (@unprocessed && @gcov_list)
- {
- foreach (@unprocessed)
- {
- warn("WARNING: no data found for $_\n");
- }
- }
-
if (!($output_filename && ($output_filename eq "-")))
{
close(INFO_HANDLE);
@@ -11,8 +11,9 @@ stdenv.mkDerivation rec {
sha256 = "03fl2wgbc1cilaw8hrhfqjsbpi05cid6k4cr3s2vmv5gx0dnrgy4";
};
patchPhase = ''
postPatch = ''
substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
sed '7i#include <math.h>' -i src/Scheduler.cc
patchShebangs .
'';