aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-18 10:18:42 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-18 12:28:34 +0100
commitaf50b4abc0b577f7892dafce1a5e6f57150b88b0 (patch)
tree5ec2b8a7f61e68285f06846e96e7dd5b95175054
parent774f8bbeb1f3515c3af08e67f24e508e7c4cc067 (diff)
downloadguix-af50b4abc0b577f7892dafce1a5e6f57150b88b0.tar
guix-af50b4abc0b577f7892dafce1a5e6f57150b88b0.tar.gz
gnu: qt@5: Fix build failure on glibc 2.28.
* gnu/packages/patches/qt-5-renameat2.patch: New file. * gnu/packages/qt.scm (qt)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/qt-5-renameat2.patch35
-rw-r--r--gnu/packages/qt.scm3
3 files changed, 38 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index c4299fcbe4..447f08d201 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1099,6 +1099,7 @@ dist_patch_DATA = \
%D%/packages/patches/qt4-ldflags.patch \
%D%/packages/patches/qtbase-use-TZDIR.patch \
%D%/packages/patches/qtscript-disable-tests.patch \
+ %D%/packages/patches/qt-5-renameat2.patch \
%D%/packages/patches/quagga-reproducible-build.patch \
%D%/packages/patches/quickswitch-fix-dmenu-check.patch \
%D%/packages/patches/quilt-test-fix-regex.patch \
diff --git a/gnu/packages/patches/qt-5-renameat2.patch b/gnu/packages/patches/qt-5-renameat2.patch
new file mode 100644
index 0000000000..036070c7ff
--- /dev/null
+++ b/gnu/packages/patches/qt-5-renameat2.patch
@@ -0,0 +1,35 @@
+Avoid conflicting declaration of 'renameat2' on glibc 2.28
+(see <https://github.com/meta-qt5/meta-qt5/issues/94>.)
+
+Patch from <https://github.com/meta-qt5/meta-qt5/pull/95>
+by Andreas Müller <schnitzeltony@gmail.com>.
+
+---
+ src/corelib/io/qfilesystemengine_unix.cpp | 11 ++++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
+index be6ce48d0cb..1bf1bebc7f1 100644
+--- a/qtbase/src/corelib/io/qfilesystemengine_unix.cpp
++++ b/qtbase/src/corelib/io/qfilesystemengine_unix.cpp
+@@ -98,6 +98,17 @@ extern "C" NSString *NSTemporaryDirectory();
+ # define FICLONE _IOW(0x94, 9, int)
+ #endif
+
++// renameat2/statx features for non bootstrapped build
++#ifndef QT_BOOTSTRAPPED
++#ifdef __GLIBC_PREREQ
++# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1)
++# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1)
++#else
++# define QT_FEATURE_renameat2 -1
++# define QT_FEATURE_statx -1
++#endif
++#endif
++
+ # if defined(Q_OS_ANDROID)
+ // renameat2() and statx() are disabled on Android because quite a few systems
+ // come with sandboxes that kill applications that make system calls outside a
+--
+2.14.4
+
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index cffebc7bff..c4407fea29 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
-;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
@@ -121,6 +121,7 @@ system, and the core design of Django is reused in Grantlee.")
(sha256
(base32
"10faac59jvz6dxxljdkaknlxazpnaxgvqdcszabfbbkc1f24n466"))
+ (patches (search-patches "qt-5-renameat2.patch"))
(modules '((guix build utils)))
(snippet
'(begin