aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2017-11-02 23:03:24 +0100
committerHartmut Goebel <h.goebel@crazy-compilers.com>2018-02-18 18:39:18 +0100
commit64f390a40994da24d310c4894301585b4722912b (patch)
tree721f187b49e533eb0610a7917d675a50b1b541c4 /gnu/packages/patches
parentbdf0c644dafbce2a532161f04e9bf88c9310e081 (diff)
downloadguix-64f390a40994da24d310c4894301585b4722912b.tar
guix-64f390a40994da24d310c4894301585b4722912b.tar.gz
gnu: qtbase: Use the store paths for other packages and dynamically loaded libs.
Transfer the applicable NixOS patches as of 2018-01-19: - Not adopted: We don't change the .cmake.in and .prf, but use config mechanisms provided by th Qt build system. - src/corelib/tools/qtimezoneprivate_tz.cpp: Adopted patch: Use $TZDIR to search for time-zone data. Thus avoid depending on package "tzdata", which often introduces changes with near-immediate effects, so it's important to be able to update it fast. - src/corelib/kernel/qcoreapplication.cpp: Not adopted: NixOS adds plugin paths derived from PATH. We do not need this, since we already have native-search-path QT_PLUGIN_PATH. - src/network/kernel/qdnslookup_unix.cpp, src/network/kernel/qhostinfo_unix.cpp: Transferred: Use hard-coded path to libresolv. - src/network/ssl/qsslcontext_openssl.cpp: Not adopted: NixOS changes a conditional compilation for Qt 5.9 (but leaves it unchanged for Qt 5.10) to fix compilation with libressl. But Qt does not support libressl anway, see config.tests/openssl/openssl.cpp in qtbase 5.9.4. - src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp: Transferred: Use hard-coded path to libx11. - src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp: Transferred: Use hard-coded path to mess's libGL, no need for a fall-back. - src/plugins/platforms/xcb/qxcbcursor.cpp: Transferred: Use hard-coded path to Xcursor. - src/plugins/platformthemes/gtk3/main.cpp: Not adopted: NixOS changes $XDG_DATA_DIRS and $GIO_EXTRA_MODULES in the code. We already have a search-path-specification for this. - src/testlib/qtestassert.h: Decided not to adopt this for guix. * gnu/packages/patches/qtbase-use-TZDIR.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/qt.scm (qtbase): Add comment. [source]: Use new patch. [arguments]<#:phases>'patch-paths': New phase.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/qtbase-use-TZDIR.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/patches/qtbase-use-TZDIR.patch b/gnu/packages/patches/qtbase-use-TZDIR.patch
new file mode 100644
index 0000000000..11c737d844
--- /dev/null
+++ b/gnu/packages/patches/qtbase-use-TZDIR.patch
@@ -0,0 +1,39 @@
+Use $TZDIR to search for time-zone data. Thus avoid depending on package
+"tzdata", which often introduces changes with near-immediate effects, so it's
+important to be able to update it fast.
+
+Based on a patch fron NixOS.
+===================================================================
+--- qtbase-opensource-src-5.9.4.orig/src/corelib/tools/qtimezoneprivate_tz.cpp
++++ qtbase-opensource-src-5.9.4/src/corelib/tools/qtimezoneprivate_tz.cpp
+@@ -70,7 +70,11 @@
+ // Parse zone.tab table, assume lists all installed zones, if not will need to read directories
+ static QTzTimeZoneHash loadTzTimeZones()
+ {
+- QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
++ // Try TZDIR first, in case we're running on GuixSD.
++ QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab");
++ // Fallback to traditional paths in case we are not on GuixSD.
++ if (!QFile::exists(path))
++ path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
+ if (!QFile::exists(path))
+ path = QStringLiteral("/usr/lib/zoneinfo/zone.tab");
+
+@@ -645,6 +649,9 @@
+ if (!tzif.open(QIODevice::ReadOnly))
+ return;
+ } else {
++ // Try TZDIR first, in case we're running on GuixSD.
++ tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId));
++ if (!tzif.open(QIODevice::ReadOnly)) {
+ // Open named tz, try modern path first, if fails try legacy path
+ tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId));
+ if (!tzif.open(QIODevice::ReadOnly)) {
+@@ -652,6 +659,7 @@
+ if (!tzif.open(QIODevice::ReadOnly))
+ return;
+ }
++ }
+ }
+
+ QDataStream ds(&tzif);