Index: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.cpp =================================================================== --- head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.cpp (nonexistent) +++ head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.cpp (revision 441540) @@ -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 ) Property changes on: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.h =================================================================== --- head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.h (nonexistent) +++ head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.h (revision 441540) @@ -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; Property changes on: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-cadheader.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-opencad.h =================================================================== --- head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-opencad.h (nonexistent) +++ head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-opencad.h (revision 441540) @@ -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 Property changes on: head/graphics/gdal/files/patch-ogr-ogrsf_frmts-cad-libopencad-opencad.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property