[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: gnu: elogind: Fix build with glibc-2.27.
From: |
Mark H. Weaver |
Subject: |
01/01: gnu: elogind: Fix build with glibc-2.27. |
Date: |
Wed, 28 Mar 2018 00:06:43 -0400 (EDT) |
mhw pushed a commit to branch core-updates
in repository guix.
commit d4040f6e23f1777fdf5e402622edea94fa98d2be
Author: Mark H Weaver <address@hidden>
Date: Sun Mar 25 02:15:49 2018 -0400
gnu: elogind: Fix build with glibc-2.27.
* gnu/packages/patches/elogind-glibc-2.27.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/freedesktop.scm (elogind)[source]: Add patch.
[arguments]: Replace the bootstrap phase with what was previously the
autogen phase.
---
gnu/local.mk | 1 +
gnu/packages/freedesktop.scm | 6 ++++--
gnu/packages/patches/elogind-glibc-2.27.patch | 22 ++++++++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index df7c95f..786e5a6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -628,6 +628,7 @@ dist_patch_DATA =
\
%D%/packages/patches/eigen-arm-neon-fixes.patch \
%D%/packages/patches/elfutils-tests-ptrace.patch \
%D%/packages/patches/elixir-disable-failing-tests.patch \
+ %D%/packages/patches/elogind-glibc-2.27.patch \
%D%/packages/patches/einstein-build.patch \
%D%/packages/patches/emacs-browse-at-remote-cgit-gnu.patch \
%D%/packages/patches/emacs-exec-path.patch \
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index c981271..a0134c3 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2015 David Hashe <address@hidden>
;;; Copyright © 2016, 2017 Efraim Flashner <address@hidden>
;;; Copyright © 2016 Kei Kebreau <address@hidden>
-;;; Copyright © 2017 Mark H Weaver <address@hidden>
+;;; Copyright © 2017, 2018 Mark H Weaver <address@hidden>
;;; Copyright © 2017, 2018 Marius Bakke <address@hidden>
;;; Copyright © 2017 Rutger Helling <address@hidden>
;;; Copyright © 2017 Brendan Tildesley <address@hidden>
@@ -38,6 +38,7 @@
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
+ #:use-module (gnu packages)
#:use-module (gnu packages acl)
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
@@ -236,6 +237,7 @@ the freedesktop.org XDG Base Directory specification.")
(sha256
(base32
"1qcxian48z2dj5gfmp7brrngdydqf2jm00f4rjr5sy1myh8fy931"))
+ (patches (search-patches "elogind-glibc-2.27.patch"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -277,7 +279,7 @@ the freedesktop.org XDG Base Directory specification.")
(substitute* "src/basic/parse-util.c"
(("xlocale\\.h") "locale.h"))
#t))
- (add-before 'configure 'autogen
+ (replace 'bootstrap
(lambda _
(invoke "intltoolize" "--force" "--automake")
(invoke "autoreconf" "-vif")))
diff --git a/gnu/packages/patches/elogind-glibc-2.27.patch
b/gnu/packages/patches/elogind-glibc-2.27.patch
new file mode 100644
index 0000000..4ade587
--- /dev/null
+++ b/gnu/packages/patches/elogind-glibc-2.27.patch
@@ -0,0 +1,22 @@
+Look for memfd_create in sys/mman.h instead of linux/memfd.h.
+Needed to build with glibc-2.27.
+
+--- a/configure.ac 1969-12-31 19:00:00.000000000 -0500
++++ b/configure.ac 2018-03-27 23:54:15.414589005 -0400
+@@ -360,7 +360,7 @@
+ #
------------------------------------------------------------------------------
+
+ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps
headers not found])])
+-AC_CHECK_HEADERS([linux/memfd.h], [], [])
++AC_CHECK_HEADERS([sys/mman.h], [], [])
+
+ AC_CHECK_HEADERS([printf.h], [have_printf_h=yes], [have_printf_h=no])
+ AS_IF([test x$have_printf_h = xyes], [
+@@ -395,6 +395,7 @@
+ [], [], [[
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <sys/mman.h>
+ #include <sys/mount.h>
+ #include <fcntl.h>
+ #include <sched.h>