ccache: Update to 3.5.
[jackhill/guix/guix.git] / gnu / packages / ccache.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages ccache)
22 #:use-module (guix packages)
23 #:use-module ((guix licenses) #:select (gpl3+))
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages perl)
28 #:use-module (gnu packages compression))
29
30 (define-public ccache
31 (package
32 (name "ccache")
33 (version "3.5")
34 (source
35 (origin
36 (method url-fetch)
37 (uri (string-append "https://www.samba.org/ftp/ccache/ccache-"
38 version ".tar.xz"))
39 (sha256
40 (base32
41 "04n0xram2416pv98qrd7pi5lfsk0bjqyz7zgvvia41j5mrr4pm5x"))))
42 (build-system gnu-build-system)
43 (native-inputs `(("perl" ,perl) ; for test/run
44 ("which" ,(@ (gnu packages base) which))))
45 (inputs `(("zlib" ,zlib)))
46 (arguments
47 '(#:phases (modify-phases %standard-phases
48 (add-before 'check 'setup-tests
49 (lambda _
50 (substitute* '("unittest/test_hashutil.c" "test/suites/base.bash")
51 (("#!/bin/sh") (string-append "#!" (which "sh"))))
52 #t)))))
53 (home-page "https://ccache.samba.org/")
54 (synopsis "Compiler cache")
55 (description
56 "Ccache is a compiler cache. It speeds up recompilation by caching
57 previous compilations and detecting when the same compilation is being done
58 again. Supported languages are C, C++, Objective-C, Objective-C++, and
59 Fortran 77.")
60 (license gpl3+)))