3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
guix/gnu/packages/patches/qtbase-use-TZDIR.patch
TomZ 8d1ab36a56
gnu: Qt: Update to 5.14.2.
* gnu/packages/qt.scm (qtsvg, qtimageformats, qtx11extras,
qtxmlpatterns, qtconnectivity, qtwebsockets, qtsensors,
qtmultimedia, qtserialport, qtserialbus, qtwebchannel,
qtwebview, qtlocation, qttools, qtscript, qtquickcontrols,
qtquickcontrols2, qtgraphicaleffects, qtgamepad, qtscxml,
qtpurchasing, qtcharts, qtdatavis3d, qtnetworkauth,
qtspeech, qtwebengine): Update to 5.14.2.
(qtcanvas3d): Remove variable.  Upstream deprecated it.
(qtbase)[source](patches): Remove qtbase-QTBUG-81715.patch.
[arguments]: Drop X11lib substitution: patched dir no longer exists.
(qtwayland)[arguments]: Disable two tests, and add phase to prevent fatal DBus
warnings.
(qtwebglplugin)[inputs]: Add ZLIB.
(qtremoteobjects): Disable some tests that fail due to missing network.
(qtdeclarative)[native-inputs]: Add VULKAN-HEADERS.
(qtwebengine)[source](snippet): Adjust list of preserved files.
[inputs]: Add VULKAN-HEADERS.
* gnu/packages/patches/qtbase-QTBUG-81715.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.

Co-authored-by: Marius Bakke <mbakke@fastmail.com>
2020-05-26 22:32:56 +02:00

40 lines
1.7 KiB
Diff

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.14.2.orig/src/corelib/time/qtimezoneprivate_tz.cpp
+++ qtbase-opensource-src-5.15.2/src/corelib/time/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);