From owner-svn-ports-head@freebsd.org Mon Jul 31 15:07:04 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06DE0DB0029; Mon, 31 Jul 2017 15:07:04 +0000 (UTC) (envelope-from madpilot@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 mx1.freebsd.org (Postfix) with ESMTPS id C80B67E410; Mon, 31 Jul 2017 15:07:03 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VF72sK087894; Mon, 31 Jul 2017 15:07:02 GMT (envelope-from madpilot@FreeBSD.org) Received: (from madpilot@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VF720V087892; Mon, 31 Jul 2017 15:07:02 GMT (envelope-from madpilot@FreeBSD.org) Message-Id: <201707311507.v6VF720V087892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: madpilot set sender to madpilot@FreeBSD.org using -f From: Guido Falsi Date: Mon, 31 Jul 2017 15:07:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r446961 - in head/finance/gnucash: . files X-SVN-Group: ports-head X-SVN-Commit-Author: madpilot X-SVN-Commit-Paths: in head/finance/gnucash: . files X-SVN-Commit-Revision: 446961 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.23 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: Mon, 31 Jul 2017 15:07:04 -0000 Author: madpilot Date: Mon Jul 31 15:07:02 2017 New Revision: 446961 URL: https://svnweb.freebsd.org/changeset/ports/446961 Log: Apply patch submitted upstream to better emulate the USG UNIX daylight global variable as implemented in glibc. Obtained from: https://github.com/Gnucash/gnucash/pull/116 Modified: head/finance/gnucash/Makefile head/finance/gnucash/files/patch-src_import-export_ofx_gnc-ofx-import.c Modified: head/finance/gnucash/Makefile ============================================================================== --- head/finance/gnucash/Makefile Mon Jul 31 14:50:40 2017 (r446960) +++ head/finance/gnucash/Makefile Mon Jul 31 15:07:02 2017 (r446961) @@ -3,6 +3,7 @@ PORTNAME= gnucash PORTVERSION= 2.6.17 +PORTREVISION= 1 CATEGORIES= finance gnome MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20%28stable%29/${PORTVERSION} Modified: head/finance/gnucash/files/patch-src_import-export_ofx_gnc-ofx-import.c ============================================================================== --- head/finance/gnucash/files/patch-src_import-export_ofx_gnc-ofx-import.c Mon Jul 31 14:50:40 2017 (r446960) +++ head/finance/gnucash/files/patch-src_import-export_ofx_gnc-ofx-import.c Mon Jul 31 15:07:02 2017 (r446961) @@ -1,12 +1,26 @@ --- src/import-export/ofx/gnc-ofx-import.c.orig 2016-12-15 21:46:51 UTC +++ src/import-export/ofx/gnc-ofx-import.c -@@ -337,7 +337,11 @@ fix_ofx_bug_39 (time64 t) +@@ -336,8 +336,25 @@ fix_ofx_bug_39 (time64 t) + { #if HAVE_OFX_BUG_39 struct tm stm; - gnc_localtime_r(&t, &stm); ++ +#ifdef __FreeBSD__ -+ if (!stm.tm_isdst) ++ time64 now; ++ /* ++ * FreeBSD has it's own libc implementation which differs from glibc. In particular: ++ * There is no daylight global ++ * tzname members are set to the string " " (three spaces) when not explicitly populated ++ * ++ * To check that the current timezone does not observe DST I check if tzname[1] starts with a space. ++ */ ++ now = gnc_time (NULL); ++ gnc_localtime_r(&now, &stm); ++ tzset(); ++ ++ if (tzname[1][0] != ' ' && !stm.tm_isdst) +#else + gnc_localtime_r(&t, &stm); if (daylight && !stm.tm_isdst) +#endif t += 3600;