Date: Mon, 26 Dec 2016 14:29:06 +0000 (UTC) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r429524 - in head/cad: . libopencad libopencad/files Message-ID: <201612261429.uBQET6xF041244@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: amdmi3 Date: Mon Dec 26 14:29:06 2016 New Revision: 429524 URL: https://svnweb.freebsd.org/changeset/ports/429524 Log: Libopencad is a library written in C++11, which provides a way to read/write CAD (DWG/DXF/DXFB) files. It was designed to have a uniformal API to work with any CAD files. It has a base class - CADFile. Inheriting this class it's possible to create a driver for any CAD format, all you need to do - is to overwrite interface functions like GetGeometry(index), and others. Now it has an implementation for DWG2000 (R15), but only for read. Library comes with cadinfo utility, which prints out everything library can get from file - header variables, CAD custom classes, presented layers and geometries with their attributes. WWW: https://trac.osgeo.org/gdal/wiki/DWG_driver PR: 212129 Submitted by: lbartoletti@tuxfamily.org Added: head/cad/libopencad/ head/cad/libopencad/Makefile (contents, props changed) head/cad/libopencad/distinfo (contents, props changed) head/cad/libopencad/files/ head/cad/libopencad/files/patch-lib_cadheader.cpp (contents, props changed) head/cad/libopencad/files/patch-lib_cadheader.h (contents, props changed) head/cad/libopencad/files/patch-tests_CMakeLists.txt (contents, props changed) head/cad/libopencad/pkg-descr (contents, props changed) head/cad/libopencad/pkg-plist (contents, props changed) Modified: head/cad/Makefile Modified: head/cad/Makefile ============================================================================== --- head/cad/Makefile Mon Dec 26 14:26:47 2016 (r429523) +++ head/cad/Makefile Mon Dec 26 14:29:06 2016 (r429524) @@ -49,6 +49,7 @@ SUBDIR += layouteditor SUBDIR += ldraw SUBDIR += leocad + SUBDIR += libopencad SUBDIR += librecad SUBDIR += linux-eagle5 SUBDIR += linuxcnc-devel Added: head/cad/libopencad/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cad/libopencad/Makefile Mon Dec 26 14:29:06 2016 (r429524) @@ -0,0 +1,22 @@ +# Created by: lbartoletti <lbartoletti@tuxfamily.org> +# $FreeBSD$ + +PORTNAME= libopencad +PORTVERSION= 0.2.0 +CATEGORIES= cad graphics geography + +MAINTAINER= lbartoletti@tuxfamily.org +COMMENT= Library which provides a way to read/write CAD (DWG/DXF/DXFB) files + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BROKEN_FreeBSD_9= does not build (lack of c++11 support) + +USE_GITHUB= yes +GH_ACCOUNT= sandyre + +USES= cmake compiler:c++11-lib +USE_LDCONFIG= yes + +.include <bsd.port.mk> Added: head/cad/libopencad/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cad/libopencad/distinfo Mon Dec 26 14:29:06 2016 (r429524) @@ -0,0 +1,3 @@ +TIMESTAMP = 1472070376 +SHA256 (sandyre-libopencad-0.2.0_GH0.tar.gz) = 181a33fd8bc6046366c9d5d3a22590817d8f4ab7b87efdeac9fecdc34fe94019 +SIZE (sandyre-libopencad-0.2.0_GH0.tar.gz) = 4245877 Added: head/cad/libopencad/files/patch-lib_cadheader.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cad/libopencad/files/patch-lib_cadheader.cpp Mon Dec 26 14:29:06 2016 (r429524) @@ -0,0 +1,29 @@ +--- lib/cadheader.cpp.orig 2016-08-24 13:25:41 UTC ++++ lib/cadheader.cpp +@@ -243,6 +243,17 @@ CADVariant::CADVariant( const char * val + dateTimeVal = 0; + } + ++CADVariant::CADVariant( 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 + dateTimeVal = 0; + } + +-CADVariant::CADVariant( time_t val ) ++CADVariant::CADVariant( time_t val, bool bIsTime ) + { + type = DataType::DATETIME; + dateTimeVal = val; Added: head/cad/libopencad/files/patch-lib_cadheader.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cad/libopencad/files/patch-lib_cadheader.h Mon Dec 26 14:29:06 2016 (r429524) @@ -0,0 +1,25 @@ +--- lib/cadheader.h.orig 2016-08-24 13:25:41 UTC ++++ lib/cadheader.h +@@ -35,6 +35,7 @@ + #include <map> + #include <string> + #include <vector> ++#include <ctime> + + class OCAD_EXTERN CADHandle final + { +@@ -64,12 +65,13 @@ public: + CADVariant(); + CADVariant( const char * val ); + CADVariant( int val ); ++ CADVariant( long val ); + CADVariant( short val ); + CADVariant( double val ); + CADVariant( double x, double y, double z = 0 ); + CADVariant( const CADHandle& val ); + CADVariant( const std::string& val ); +- CADVariant( time_t val ); ++ CADVariant( time_t val, bool bIsTime ); + public: + CADVariant( const CADVariant& orig ); + CADVariant& operator=( const CADVariant& orig ); Added: head/cad/libopencad/files/patch-tests_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cad/libopencad/files/patch-tests_CMakeLists.txt Mon Dec 26 14:29:06 2016 (r429524) @@ -0,0 +1,14 @@ +--- tests/CMakeLists.txt.orig 2016-08-24 13:25:41 UTC ++++ tests/CMakeLists.txt +@@ -41,10 +41,8 @@ if(BUILD_TESTS) + + + find_package(Threads) +- set(TARGET_LINK_LIB ${TARGET_LINK_LIB} ${CMAKE_THREAD_LIBS_INIT} ${TARGET_LINK}) ++ set(TARGET_LINK_LIB ${TARGET_LINK_LIB} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${TARGET_LINK}) + +- find_library(DL_LIB dl) +- set(TARGET_LINK_LIB ${TARGET_LINK_LIB} ${DL_LIB}) + find_library(M_LIB m) + set(TARGET_LINK_LIB ${TARGET_LINK_LIB} ${M_LIB}) + Added: head/cad/libopencad/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cad/libopencad/pkg-descr Mon Dec 26 14:29:06 2016 (r429524) @@ -0,0 +1,17 @@ +Libopencad is a library written in C++11, which provides a way to +read/write CAD (DWG/DXF/DXFB) files. It was designed to have a +uniformal API to work with any CAD files. + +It has a base class - CADFile. + +Inheriting this class it's possible to create a driver for any CAD +format, all you need to do - is to overwrite interface functions +like GetGeometry(index), and others. + +Now it has an implementation for DWG2000 (R15), but only for read. + +Library comes with cadinfo utility, which prints out everything +library can get from file - header variables, CAD custom classes, +presented layers and geometries with their attributes. + +WWW: https://trac.osgeo.org/gdal/wiki/DWG_driver Added: head/cad/libopencad/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cad/libopencad/pkg-plist Mon Dec 26 14:29:06 2016 (r429524) @@ -0,0 +1,14 @@ +bin/cadinfo +include/opencad/cadclasses.h +include/opencad/cadcolors.h +include/opencad/caddictionary.h +include/opencad/cadfile.h +include/opencad/cadfileio.h +include/opencad/cadgeometry.h +include/opencad/cadheader.h +include/opencad/cadlayer.h +include/opencad/cadobjects.h +include/opencad/cadtables.h +include/opencad/opencad.h +include/opencad/opencad_api.h +lib/libopencadstatic.a
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612261429.uBQET6xF041244>