[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/10: gnu: datefudge: Only use glibc-2.31 workaround on supported platf
From: |
guix-commits |
Subject: |
03/10: gnu: datefudge: Only use glibc-2.31 workaround on supported platforms. |
Date: |
Thu, 24 Sep 2020 06:39:19 -0400 (EDT) |
efraim pushed a commit to branch wip-ppc
in repository guix.
commit 42c8941fab096e3f6ac7adcd85a28c6211e08259
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)))
- branch wip-ppc created (now 904549c), guix-commits, 2020/09/24
- 01/10: gnu: bootstrap: Add support for powerpc-linux., guix-commits, 2020/09/24
- 04/10: gnu: gd: Fix tests., guix-commits, 2020/09/24
- 02/10: gnu: binutils-final: Provide bash for binary on powerpc-linux., guix-commits, 2020/09/24
- 06/10: gnu: Add mac-fdisk., guix-commits, 2020/09/24
- 07/10: gnu: american-fuzzy-lop: Add support for powerpc-linux., guix-commits, 2020/09/24
- 03/10: gnu: datefudge: Only use glibc-2.31 workaround on supported platforms.,
guix-commits <=
- 05/10: gnu: mesa: Add support for powerpc-linux., guix-commits, 2020/09/24
- 08/10: build: qemu-command: Add support for powerpc., guix-commits, 2020/09/24
- 10/10: gnu: nss: Skip tests on powerpc-linux., guix-commits, 2020/09/24
- 09/10: gnu: mercurial: Skip tests on powerpc-linux., guix-commits, 2020/09/24