From owner-svn-ports-all@freebsd.org Tue May 23 18:51:55 2017 Return-Path: Delivered-To: svn-ports-all@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 A270ED7B07E; Tue, 23 May 2017 18:51:55 +0000 (UTC) (envelope-from sunpoet@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 63C6A17A3; Tue, 23 May 2017 18:51:55 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NIpsw0062314; Tue, 23 May 2017 18:51:54 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NIpslW062152; Tue, 23 May 2017 18:51:54 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201705231851.v4NIpslW062152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Tue, 23 May 2017 18:51:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r441540 - head/graphics/gdal/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 18:51:55 -0000 Author: sunpoet Date: Tue May 23 18:51:54 2017 New Revision: 441540 URL: https://svnweb.freebsd.org/changeset/ports/441540 Log: Fix build on i386 Obtained from: https://github.com/nextgis-borsch/lib_opencad/commit/f40ce46804f1612fbeb035d0be5a746105cfc17e Thanks to: wen Added: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.cpp (contents, props changed) head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.h (contents, props changed) head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-opencad.h (contents, props changed) Added: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.cpp Tue May 23 18:51:54 2017 (r441540) @@ -0,0 +1,81 @@ +Obtained from: https://github.com/nextgis-borsch/lib_opencad/commit/f40ce46804f1612fbeb035d0be5a746105cfc17e + +--- ogr/ogrsf_frmts/cad/libopencad/cadheader.cpp.orig 2017-04-28 16:07:33 UTC ++++ ogr/ogrsf_frmts/cad/libopencad/cadheader.cpp +@@ -310,14 +310,22 @@ CADVariant::CADVariant( const string& va + { + } + +-CADVariant::CADVariant( time_t val ) : ++CADVariant::CADVariant( long julianday, long milliseconds ) : + type ( DataType::DATETIME ), + decimalVal ( 0 ), + xVal ( 0 ), + yVal ( 0 ), +- zVal ( 0 ), +- dateTimeVal ( val ) ++ zVal ( 0 ) + { ++ // unix -> julian return ( unixSecs / 86400.0 ) + 2440587.5; ++ // julian -> unix return (julian - 2440587.5) * 86400.0 ++ ++ double dfSeconds = double( milliseconds ) / 1000; ++ double dfUnix = 0; ++ if(julianday != 0) ++ dfUnix = ( double( julianday ) - 2440587.5 ) * 86400.0; ++ dateTimeVal = static_cast( dfUnix + dfSeconds ); ++ + char str_buff[256]; + strftime(str_buff, 255, "%Y-%m-%d %H:%M:%S", localtime(&dateTimeVal)); + stringVal = str_buff; +@@ -335,33 +343,6 @@ CADVariant::CADVariant( const CADHandle& + { + } + +-CADVariant::CADVariant( const CADVariant& orig ) : +- type ( orig.type ), +- decimalVal ( orig.decimalVal ), +- xVal ( orig.xVal ), +- yVal ( orig.yVal ), +- zVal ( orig.zVal ), +- stringVal ( orig.stringVal ), +- handleVal ( orig.handleVal ), +- dateTimeVal ( orig.dateTimeVal ) +-{ +-} +- +-CADVariant& CADVariant::operator=( const CADVariant& orig ) +-{ +- if( this == & orig ) +- return * this; +- type = orig.type; +- stringVal = orig.stringVal; +- decimalVal = orig.decimalVal; +- xVal = orig.xVal; +- yVal = orig.yVal; +- zVal = orig.zVal; +- handleVal = orig.handleVal; +- dateTimeVal = orig.dateTimeVal; +- return * this; +-} +- + long CADVariant::getDecimal() const + { + return decimalVal; +@@ -461,15 +442,7 @@ int CADHeader::addValue( short code, dou + + int CADHeader::addValue( short code, long julianday, long milliseconds ) + { +- // unix -> julian return ( unixSecs / 86400.0 ) + 2440587.5; +- // julian -> unix return (julian - 2440587.5) * 86400.0 +- +- double dfSeconds = double( milliseconds ) / 1000; +- double dfUnix = 0; +- if(julianday != 0) +- dfUnix = ( double( julianday ) - 2440587.5 ) * 86400.0; +- time_t fullSeconds = static_cast( dfUnix + dfSeconds ); +- return addValue( code, CADVariant( fullSeconds ) ); ++ return addValue( code, CADVariant( julianday, milliseconds ) ); + } + + int CADHeader::getGroupCode( short code ) Added: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.h Tue May 23 18:51:54 2017 (r441540) @@ -0,0 +1,17 @@ +Obtained from: https://github.com/nextgis-borsch/lib_opencad/commit/f40ce46804f1612fbeb035d0be5a746105cfc17e + +--- ogr/ogrsf_frmts/cad/libopencad/cadheader.h.orig 2017-04-28 16:07:33 UTC ++++ ogr/ogrsf_frmts/cad/libopencad/cadheader.h +@@ -79,10 +79,8 @@ public: + // cppcheck-suppress noExplicitConstructor + CADVariant( const std::string& val ); + // cppcheck-suppress noExplicitConstructor +- CADVariant( time_t val ); +-public: +- CADVariant( const CADVariant& orig ); +- CADVariant& operator=( const CADVariant& orig ); ++ CADVariant( long julianday, long milliseconds ); ++ + public: + long getDecimal() const; + double getReal() const; Added: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-opencad.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-opencad.h Tue May 23 18:51:54 2017 (r441540) @@ -0,0 +1,17 @@ +Obtained from: https://github.com/nextgis-borsch/lib_opencad/commit/f40ce46804f1612fbeb035d0be5a746105cfc17e + +--- ogr/ogrsf_frmts/cad/libopencad/opencad.h.orig 2017-04-28 16:07:33 UTC ++++ ogr/ogrsf_frmts/cad/libopencad/opencad.h +@@ -31,10 +31,10 @@ + #ifndef OPENCAD_H + #define OPENCAD_H + +-#define OCAD_VERSION "0.3.2" ++#define OCAD_VERSION "0.3.3" + #define OCAD_VERSION_MAJOR 0 + #define OCAD_VERSION_MINOR 3 +-#define OCAD_VERSION_REV 2 ++#define OCAD_VERSION_REV 3 + + #ifndef OCAD_COMPUTE_VERSION + #define OCAD_COMPUTE_VERSION(maj,min,rev) ((maj)*10000+(min)*100+rev) // maj - any, min < 99, rev < 99