From owner-svn-ports-head@freebsd.org Wed Jun 13 17:02:33 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23D0A101DDD3; Wed, 13 Jun 2018 17:02:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 707736E052; Wed, 13 Jun 2018 17:02:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 387311C527; Wed, 13 Jun 2018 17:02:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5DH2WfB047984; Wed, 13 Jun 2018 17:02:32 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5DH2VEi047982; Wed, 13 Jun 2018 17:02:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201806131702.w5DH2VEi047982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 13 Jun 2018 17:02:31 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r472335 - in head/devel/qt5-core: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/devel/qt5-core: . files X-SVN-Commit-Revision: 472335 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2018 17:02:33 -0000 Author: jhb (src,doc committer) Date: Wed Jun 13 17:02:31 2018 New Revision: 472335 URL: https://svnweb.freebsd.org/changeset/ports/472335 Log: Recognize timezones on FreeBSD for the default install. By default, FreeBSD copies the current timezone database to /etc/localtime and stores the name of the symlink in /var/db/zoneinfo. Qt expects /etc/localtime to be a symlink and uses the symlink's target to infer the name of the default timezone. The existing code in Qt includes some workarounds for Linux distributions that also copy the current timezone to /etc/localtime by checking for files that contain the name of the timezone. Add a similar check for /var/db/zoneinfo on FreeBSD. PR: 200763 Reviewed by: tcberner Differential Revision: https://reviews.freebsd.org/D15792 Added: head/devel/qt5-core/files/patch-src_corelib_tools_qtimezoneprivate_tz.cpp (contents, props changed) Modified: head/devel/qt5-core/Makefile Modified: head/devel/qt5-core/Makefile ============================================================================== --- head/devel/qt5-core/Makefile Wed Jun 13 17:00:28 2018 (r472334) +++ head/devel/qt5-core/Makefile Wed Jun 13 17:02:31 2018 (r472335) @@ -2,7 +2,7 @@ PORTNAME= core DISTVERSION= ${QT5_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel PKGNAMEPREFIX= qt5- Added: head/devel/qt5-core/files/patch-src_corelib_tools_qtimezoneprivate_tz.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/qt5-core/files/patch-src_corelib_tools_qtimezoneprivate_tz.cpp Wed Jun 13 17:02:31 2018 (r472335) @@ -0,0 +1,20 @@ +--- src/corelib/tools/qtimezoneprivate_tz.cpp.orig 2018-06-13 08:09:13.578248000 -0700 ++++ src/corelib/tools/qtimezoneprivate_tz.cpp 2018-06-13 08:11:15.328743000 -0700 +@@ -1072,6 +1072,17 @@ QByteArray QTzTimeZonePrivate::systemTim + } + } + ++ // On many FreeBSD systems, /etc/localtime is a regular file while the actual name is in /var/db/zoneinfo ++ if (ianaId.isEmpty()) { ++ QFile tzif(QStringLiteral("/var/db/zoneinfo")); ++ if (tzif.open(QIODevice::ReadOnly)) { ++ // TODO QTextStream inefficient, replace later ++ QTextStream ts(&tzif); ++ if (!ts.atEnd()) ++ ianaId = ts.readLine().toUtf8(); ++ } ++ } ++ + // On some Red Hat distros /etc/localtime is real file with name held in /etc/sysconfig/clock + // in a line like ZONE="Europe/Oslo" or TIMEZONE="Europe/Oslo" + if (ianaId.isEmpty()) {