Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2023 00:05:41 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f91e6f96c699 - main - cad/libopencad: fix build on armv? / powerpc
Message-ID:  <202303130005.32D05fwO080360@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f91e6f96c699f747bf3200dc5839521b3dbcbefc

commit f91e6f96c699f747bf3200dc5839521b3dbcbefc
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-03-13 00:02:41 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-03-13 00:02:41 +0000

    cad/libopencad: fix build on armv? / powerpc
    
    /wrkdirs/usr/ports/cad/libopencad/work/libopencad-0.2.0/lib/cadheader.cpp:478:28: error: ambiguous conversion for functional-style cast from 'time_t' (aka 'long long') to 'CADVariant'
        return addValue( code, CADVariant( fullSeconds ) );
                               ^~~~~~~~~~~~~~~~~~~~~~~
---
 cad/libopencad/Makefile                      |  3 ---
 cad/libopencad/files/patch-lib_cadheader.cpp | 15 +++++++++++++--
 cad/libopencad/files/patch-lib_cadheader.h   |  3 ++-
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/cad/libopencad/Makefile b/cad/libopencad/Makefile
index dfdb57aac47c..e778081fedf5 100644
--- a/cad/libopencad/Makefile
+++ b/cad/libopencad/Makefile
@@ -10,9 +10,6 @@ WWW=		https://trac.osgeo.org/gdal/wiki/DWG_driver
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BROKEN_armv6=		fails to compile: cadheader.cpp: ambiguous conversion for functional-style cast from 'time_t' to 'CADVariant'
-BROKEN_armv7=		fails to compile: cadheader.cpp: ambiguous conversion for functional-style cast from 'time_t' to 'CADVariant'
-
 USE_GITHUB=	yes
 GH_ACCOUNT=	sandyre
 
diff --git a/cad/libopencad/files/patch-lib_cadheader.cpp b/cad/libopencad/files/patch-lib_cadheader.cpp
index 0397708ca5fe..7a9c7c9ae4ac 100644
--- a/cad/libopencad/files/patch-lib_cadheader.cpp
+++ b/cad/libopencad/files/patch-lib_cadheader.cpp
@@ -1,6 +1,6 @@
 --- lib/cadheader.cpp.orig	2016-08-24 13:25:41 UTC
 +++ lib/cadheader.cpp
-@@ -243,6 +243,17 @@ CADVariant::CADVariant( const char * val
+@@ -243,6 +243,28 @@ CADVariant::CADVariant( const char * val )
      dateTimeVal = 0;
  }
  
@@ -14,11 +14,22 @@
 +    zVal        = 0;
 +    dateTimeVal = 0;
 +}
++
++CADVariant::CADVariant( long long val )
++{
++    type        = DataType ::DECIMAL;
++    decimalVal  = val;
++    stringVal   = to_string( decimalVal );
++    xVal        = 0;
++    yVal        = 0;
++    zVal        = 0;
++    dateTimeVal = 0;
++}
 +
  CADVariant::CADVariant( int val )
  {
      type        = DataType::DECIMAL;
-@@ -303,7 +314,7 @@ CADVariant::CADVariant( const string& va
+@@ -303,7 +325,7 @@ CADVariant::CADVariant( const string& val )
      dateTimeVal = 0;
  }
  
diff --git a/cad/libopencad/files/patch-lib_cadheader.h b/cad/libopencad/files/patch-lib_cadheader.h
index 3ed0dc431d7b..537314f6e783 100644
--- a/cad/libopencad/files/patch-lib_cadheader.h
+++ b/cad/libopencad/files/patch-lib_cadheader.h
@@ -8,11 +8,12 @@
  
  class OCAD_EXTERN CADHandle final
  {
-@@ -64,12 +65,13 @@ public:
+@@ -64,12 +65,14 @@ class OCAD_EXTERN CADVariant final (public)
      CADVariant();
      CADVariant( const char * val );
      CADVariant( int val );
 +    CADVariant( long val );
++    CADVariant( long long val );
      CADVariant( short val );
      CADVariant( double val );
      CADVariant( double x, double y, double z = 0 );



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303130005.32D05fwO080360>