unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Greg Hogan <code@greghogan.com>
To: 47340@debbugs.gnu.org
Subject: [bug#47340] [PATCH] gnu: ccache: Update to 4.2.
Date: Tue, 23 Mar 2021 08:21:17 -0400	[thread overview]
Message-ID: <CA+3U0ZnRGegSh7u0gkzeefzP+7V2_h0TLpf-KORhjP4Yt4R+BQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 3123 bytes --]

From 5a1aeefefb1ed289a4358dff0b8719e0b4c44d9c Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Mon, 22 Mar 2021 19:52:23 +0000
Subject: [PATCH] gnu: ccache: Update to 4.2.

* gnu/packages/ccache.scm (ccache): Update to 4.2.
[build-system]: Switch to cmake-build-system.
[inputs]: Add zstd:lib.
[arguments]: Move substitution before change of directory and add phase
to set HOME variable.
---
 gnu/packages/ccache.scm | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/ccache.scm b/gnu/packages/ccache.scm
index c5b9790f27..112f613c88 100644
--- a/gnu/packages/ccache.scm
+++ b/gnu/packages/ccache.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,7 +23,7 @@
   #: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))
@@ -30,25 +31,32 @@
 (define-public ccache
   (package
     (name "ccache")
-    (version "3.7.12")
+    (version "4.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "
https://github.com/ccache/ccache/releases/download/v"
                            version "/ccache-" version ".tar.xz"))
        (sha256
-        (base32 "005liq8csgxdn7m9hj2ah07hishww855p8sc96y1hrnwc21lwbx0"))))
-    (build-system gnu-build-system)
+        (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* '("unittest/test_hashutil.c"
"test/suites/base.bash")
-                        (("#!/bin/sh") (string-append "#!" (which "sh"))))
-                      #t)))))
+     '(#: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
--
2.31.0

[-- Attachment #1.2: Type: text/html, Size: 4833 bytes --]

[-- Attachment #2: 0001-gnu-ccache-Update-to-4.2.patch --]
[-- Type: application/octet-stream, Size: 3042 bytes --]

From 5a1aeefefb1ed289a4358dff0b8719e0b4c44d9c Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Mon, 22 Mar 2021 19:52:23 +0000
Subject: [PATCH] gnu: ccache: Update to 4.2.

* gnu/packages/ccache.scm (ccache): Update to 4.2.
[build-system]: Switch to cmake-build-system.
[inputs]: Add zstd:lib.
[arguments]: Move substitution before change of directory and add phase
to set HOME variable.
---
 gnu/packages/ccache.scm | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/ccache.scm b/gnu/packages/ccache.scm
index c5b9790f27..112f613c88 100644
--- a/gnu/packages/ccache.scm
+++ b/gnu/packages/ccache.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,7 +23,7 @@
   #: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))
@@ -30,25 +31,32 @@
 (define-public ccache
   (package
     (name "ccache")
-    (version "3.7.12")
+    (version "4.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/ccache/ccache/releases/download/v"
                            version "/ccache-" version ".tar.xz"))
        (sha256
-        (base32 "005liq8csgxdn7m9hj2ah07hishww855p8sc96y1hrnwc21lwbx0"))))
-    (build-system gnu-build-system)
+        (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* '("unittest/test_hashutil.c" "test/suites/base.bash")
-                        (("#!/bin/sh") (string-append "#!" (which "sh"))))
-                      #t)))))
+     '(#: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
-- 
2.31.0


             reply	other threads:[~2021-03-23 12:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 12:21 Greg Hogan [this message]
2021-03-24 13:06 ` bug#47340: [PATCH] gnu: ccache: Update to 4.2 Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+3U0ZnRGegSh7u0gkzeefzP+7V2_h0TLpf-KORhjP4Yt4R+BQ@mail.gmail.com \
    --to=code@greghogan.com \
    --cc=47340@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).