guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/11: gnu: datefudge: Only use glibc-2.31 workaround on supported platf


From: guix-commits
Subject: 04/11: gnu: datefudge: Only use glibc-2.31 workaround on supported platforms.
Date: Mon, 21 Sep 2020 03:24:41 -0400 (EDT)

efraim pushed a commit to branch wip-ppc
in repository guix.

commit 322a9080d3d1c9c40ee3b3c05e7cfa67f086c88c
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sat Apr 25 22:21:27 2020 +0300

    gnu: datefudge: Only use glibc-2.31 workaround on supported platforms.
    
    The powerPC port is using glibc-2.30.
    
    * gnu/packages/time.scm (datefudge)[source]: Remove patch.
    [arguments]: When not on powerpc-linux, add phase to adapt the code for
    glibc-2.31.
    * gnu/packages/patches/datefudge-gettimeofday.patch: Remove file.
    * gnu/local.mk (dist_patch_DATA): Remove it.
---
 gnu/local.mk                                      |  1 -
 gnu/packages/patches/datefudge-gettimeofday.patch | 13 -------------
 gnu/packages/time.scm                             | 12 ++++++++++--
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 8c93e19..871a3ab 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -887,7 +887,6 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/cvs-CVE-2017-12836.patch                \
   %D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch         \
   %D%/packages/patches/date-output-pkg-config-files.patch      \
-  %D%/packages/patches/datefudge-gettimeofday.patch            \
   %D%/packages/patches/dbacl-include-locale.h.patch            \
   %D%/packages/patches/dbus-helper-search-path.patch           \
   %D%/packages/patches/dbus-CVE-2020-12049.patch               \
diff --git a/gnu/packages/patches/datefudge-gettimeofday.patch 
b/gnu/packages/patches/datefudge-gettimeofday.patch
deleted file mode 100644
index 11c7640..0000000
--- a/gnu/packages/patches/datefudge-gettimeofday.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Add the 'restrict' qualifier to match the 'gettimeofday' declaration found
-in glibc 2.31.
-
---- datefudge-1.23/datefudge.c 2020-02-17 22:35:21.343341725 +0100
-+++ datefudge-1.23/datefudge.c 2020-02-17 22:35:49.619117874 +0100
-@@ -78,6 +78,6 @@
-     return 0;
- }
- 
--int gettimeofday(struct timeval *x, struct timezone *y) {
-+int gettimeofday(struct timeval *restrict x, void *restrict y) {
-     return __gettimeofday(x,y);
- }
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index e396412..babe325 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -462,8 +462,7 @@ datetime type.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "0ifnlb0mc8qc2kb5042pbz0ns6rwcb7201di8wyrsphl0yhnhxiv"))
-              (patches (search-patches "datefudge-gettimeofday.patch"))))
+                "0ifnlb0mc8qc2kb5042pbz0ns6rwcb7201di8wyrsphl0yhnhxiv"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -478,6 +477,15 @@ datetime type.")
                (("VERSION := \\$\\(shell dpkg-parsechangelog .*")
                 (string-append "VERSION = " ,version)))
              #t))
+         ,@(if (string-prefix? "powerpc" (or (%current-target-system)
+                                             (%current-system)))
+             '()
+             '((add-after 'unpack 'patch-for-glibc-2.31
+                 (lambda _
+                   (substitute* "datefudge.c"
+                     (("int gettimeofday\\(struct timeval \\*x, struct 
timezone \\*y")
+                      "int gettimeofday(struct timeval *restrict x, void 
*restrict y"))
+                   #t))))
          (delete 'configure))))
     (native-inputs
      `(("perl" ,perl)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]