diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-04-18 11:00:58 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-04-18 11:22:20 +0200 |
commit | bf414c9d4f892fd4e392a5f42016b57e84402a8b (patch) | |
tree | 08c000d609ed8e608ca542fa78360e4217f3fc36 /pkgs/development/libraries/qt-5/5.3/0006-tzdir.patch | |
parent | 29901451700a7382f3f9d5a0a23cd55b187e5585 (diff) | |
parent | 9de9669496a05f64ea436c01f9b66c057cd74f90 (diff) | |
download | nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.gz nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.bz2 nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.lz nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.xz nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.zst nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.zip |
Merge 'staging' into closure-size
- there were many easy merge conflicts - cc-wrapper needed nontrivial changes Many other problems might've been created by interaction of the branches, but stdenv and a few other packages build fine now.
Diffstat (limited to 'pkgs/development/libraries/qt-5/5.3/0006-tzdir.patch')
-rw-r--r-- | pkgs/development/libraries/qt-5/5.3/0006-tzdir.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-5/5.3/0006-tzdir.patch b/pkgs/development/libraries/qt-5/5.3/0006-tzdir.patch new file mode 100644 index 00000000000..d5a74b25fb3 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.3/0006-tzdir.patch @@ -0,0 +1,52 @@ +From 775fd74351faaabd45f6751618b28e2b05812d05 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel <ttuegel@gmail.com> +Date: Mon, 1 Dec 2014 17:23:22 -0600 +Subject: [PATCH] tzdir + +--- + qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp | 21 +++++++++++++++------ + 1 file changed, 15 insertions(+), 6 deletions(-) + +diff --git a/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp b/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp +index b4ea91e..a56a245 100644 +--- a/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp ++++ b/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp +@@ -68,7 +68,10 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash; + // 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"); ++ QString path = qgetenv("TZDIR"); ++ path += "/zone.tab"; ++ if (!QFile::exists(path)) ++ path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); + if (!QFile::exists(path)) + path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); + +@@ -559,12 +562,18 @@ void QTzTimeZonePrivate::init(const QByteArray &ianaId) + if (!tzif.open(QIODevice::ReadOnly)) + return; + } else { +- // Open named tz, try modern path first, if fails try legacy path +- tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ // Try TZDIR first ++ QString zoneinfoDir = qgetenv("TZDIR"); ++ zoneinfoDir += "/" + QString::fromLocal8Bit(ianaId); ++ tzif.setFileName(zoneinfoDir); + if (!tzif.open(QIODevice::ReadOnly)) { +- tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); +- if (!tzif.open(QIODevice::ReadOnly)) +- return; ++ // 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)) { ++ tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ if (!tzif.open(QIODevice::ReadOnly)) ++ return; ++ } + } + } + +-- +2.1.3 + |