From 4ec15456b333c87a2ccfffeb6d2c9b96ba579a4a Mon Sep 17 00:00:00 2001 From: Matthias Treydte Date: Thu, 28 May 2020 15:54:44 +0200 Subject: [PATCH] ccache: 3.4.1 -> 3.7.10 The fix-debug-prefix-map-suite patch became obsolete with upstream commit: https://github.com/ccache/ccache/commit/82010e0eb9cb629f61ea516542daf05a53010716 The skip-fs-dependent-test patch with PR: https://github.com/ccache/ccache/pull/444 --- .../development/tools/misc/ccache/default.nix | 28 +++++-------- .../ccache/fix-debug-prefix-map-suite.patch | 42 ------------------- .../misc/ccache/skip-fs-dependent-test.patch | 26 ------------ 3 files changed, 10 insertions(+), 86 deletions(-) delete mode 100644 pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch delete mode 100644 pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index 61ed3825bd93..ead30a56e274 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -1,30 +1,22 @@ -{ stdenv, fetchurl, perl, zlib, makeWrapper }: +{ stdenv, fetchFromGitHub, asciidoc-full, gperf, perl, autoreconfHook, zlib, makeWrapper }: let ccache = stdenv.mkDerivation rec { pname = "ccache"; - version = "3.4.1"; + version = "3.7.10"; - src = fetchurl { - sha256 = "1pppi4jbkkj641cdynmc35jaj40jjicw7gj75ran5qs5886jcblc"; - url = "mirror://samba/ccache/${pname}-${version}.tar.xz"; + src = fetchFromGitHub { + owner = "ccache"; + repo = "ccache"; + rev = "v${version}"; + sha256 = "0v6pvj50y18fxh2f6cx6xyg545xcpxfmrcg9bzbc6lc5acrvvjm7"; }; - nativeBuildInputs = [ perl ]; + nativeBuildInputs = [ asciidoc-full autoreconfHook gperf perl ]; buildInputs = [ zlib ]; outputs = [ "out" "man" ]; - # non to be fail on filesystems with unconventional blocksizes (zfs on Hydra?) - patches = [ - ./fix-debug-prefix-map-suite.patch - ./skip-fs-dependent-test.patch - ]; - - postPatch = '' - substituteInPlace Makefile.in --replace 'objs) $(extra_libs)' 'objs)' - ''; - doCheck = !stdenv.isDarwin; passthru = { @@ -71,8 +63,8 @@ let ccache = stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Compiler cache for fast recompilation of C/C++ code"; - homepage = "http://ccache.samba.org/"; - downloadPage = "https://ccache.samba.org/download.html"; + homepage = "https://ccache.dev/"; + downloadPage = "https://ccache.dev/download.html"; license = licenses.gpl3Plus; platforms = platforms.unix; }; diff --git a/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch b/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch deleted file mode 100644 index 98a6fbf10bf1..000000000000 --- a/pkgs/development/tools/misc/ccache/fix-debug-prefix-map-suite.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/test/suites/debug_prefix_map.bash -+++ b/test/suites/debug_prefix_map.bash -@@ -29,7 +29,7 @@ - expect_stat 'cache hit (preprocessed)' 0 - expect_stat 'cache miss' 1 - expect_stat 'files in cache' 2 -- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then -+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then - test_failed "Source dir (`pwd`) found in test.o" - fi - -@@ -39,7 +39,7 @@ - expect_stat 'cache hit (preprocessed)' 0 - expect_stat 'cache miss' 1 - expect_stat 'files in cache' 2 -- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then -+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then - test_failed "Source dir (`pwd`) found in test.o" - fi - -@@ -52,10 +52,10 @@ - expect_stat 'cache hit (preprocessed)' 0 - expect_stat 'cache miss' 1 - expect_stat 'files in cache' 2 -- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then -+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then - test_failed "Source dir (`pwd`) found in test.o" - fi -- if ! grep "name" test.o >/dev/null 2>&1; then -+ if ! objdump -g test.o | grep ": name$" >/dev/null 2>&1; then - test_failed "Relocation (name) not found in test.o" - fi - -@@ -65,7 +65,7 @@ - expect_stat 'cache hit (preprocessed)' 0 - expect_stat 'cache miss' 1 - expect_stat 'files in cache' 2 -- if grep -E "[^=]`pwd`[^=]" test.o >/dev/null 2>&1; then -+ if objdump -g test.o | grep ": `pwd`$" >/dev/null 2>&1; then - test_failed "Source dir (`pwd`) found in test.o" - fi - } diff --git a/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch b/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch deleted file mode 100644 index 7b233df6531b..000000000000 --- a/pkgs/development/tools/misc/ccache/skip-fs-dependent-test.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/test/suites/cleanup.bash -+++ b/test/suites/cleanup.bash -@@ -94,23 +94,6 @@ - - $CCACHE -F 0 -M 256K >/dev/null - CCACHE_LOGFILE=/tmp/foo $CCACHE -c >/dev/null -- expect_file_count 3 '*.o' $CCACHE_DIR -- expect_file_count 3 '*.d' $CCACHE_DIR -- expect_file_count 3 '*.stderr' $CCACHE_DIR -- expect_stat 'files in cache' 9 -- expect_stat 'cleanups performed' 1 -- for i in 3 4 5; do -- file=$CCACHE_DIR/a/result$i-4017.o -- if [ ! -f $file ]; then -- test_failed "File $file removed when it shouldn't" -- fi -- done -- for i in 0 1 2 6 7 8 9; do -- file=$CCACHE_DIR/a/result$i-4017.o -- if [ -f $file ]; then -- test_failed "File $file not removed when it should" -- fi -- done - - # ------------------------------------------------------------------------- - TEST "Automatic cache cleanup, limit_multiple 0.9"