;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (guix packages)
#:use-module ((guix licenses) #:select (gpl3+))
#:use-module (guix download)
- #:use-module (guix build-system gnu)
+ #:use-module (guix build-system cmake)
#:use-module (gnu packages)
#:use-module (gnu packages perl)
#:use-module (gnu packages compression))
(define-public ccache
(package
(name "ccache")
- (version "3.3.5")
+ (version "4.2")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://www.samba.org/ftp/ccache/ccache-"
- version ".tar.xz"))
- (sha256
- (base32
- "1iih5d171rq29366c1z90dri2h8173yyc8rm2740wxiqx6k7c18r"))))
- (build-system gnu-build-system)
- (native-inputs `(("perl" ,perl) ;for test.sh
+ (method url-fetch)
+ (uri (string-append "https://github.com/ccache/ccache/releases/download/v"
+ version "/ccache-" version ".tar.xz"))
+ (sha256
+ (base32 "0kx9ggbbm899zwyyxvm4dgzn1b95zi1niz0l734pi5y3i0cb251g"))))
+ (build-system cmake-build-system)
+ (native-inputs `(("perl" ,perl) ; for test/run
("which" ,(@ (gnu packages base) which))))
- (inputs `(("zlib" ,zlib)))
+ (inputs `(("zlib" ,zlib)
+ ("zstd" ,zstd "lib")))
(arguments
- '(#:phases (modify-phases %standard-phases
- (add-before 'check 'setup-tests
- (lambda _
- (substitute* '("test/test_hashutil.c" "test.sh")
- (("#!/bin/sh") (string-append "#!" (which "sh"))))
- #t))
- (add-before 'check 'munge-failing-test
- (lambda _
- ;; XXX The new ‘Multiple -fdebug-prefix-map’ test added in
- ;; 3.3.5 fails (why?). Force it to report success instead.
- (substitute* "test.sh"
- (("grep \"name\"") "true"))
- #t)))))
- (home-page "https://ccache.samba.org/")
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'setup-tests
+ (lambda _
+ (substitute* '("unittest/test_hashutil.cpp" "test/suites/base.bash")
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))
+ #t))
+ ;; tests require a writable HOME
+ (add-before 'check 'set-home
+ (lambda _
+ (setenv "HOME" (getenv "TMPDIR"))
+ #t)))))
+ (home-page "https://ccache.dev/")
(synopsis "Compiler cache")
(description
"Ccache is a compiler cache. It speeds up recompilation by caching
previous compilations and detecting when the same compilation is being done
-again. Supported languages are C, C++, Objective-C, Objective-C++, and
-Fortran 77.")
+again. Supported languages are C, C++, Objective-C and Objective-C++.")
(license gpl3+)))