git: b676735c115b - main - cad/gdscpp: New port: C++ library to create and read GDSII file

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 02 Mar 2023 23:19:15 UTC
The branch main has been updated by yuri:

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

commit b676735c115b4340c83a743f8ee7c83537e3d9d7
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-03-02 16:04:19 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-03-02 23:19:12 +0000

    cad/gdscpp: New port: C++ library to create and read GDSII file
---
 cad/Makefile                          |  1 +
 cad/gdscpp/Makefile                   | 32 ++++++++++++++++++++++++++++++++
 cad/gdscpp/distinfo                   |  3 +++
 cad/gdscpp/files/patch-CMakeLists.txt | 22 ++++++++++++++++++++++
 cad/gdscpp/pkg-descr                  | 10 ++++++++++
 5 files changed, 68 insertions(+)

diff --git a/cad/Makefile b/cad/Makefile
index 65b27223a834..1051d7e7c5d6 100644
--- a/cad/Makefile
+++ b/cad/Makefile
@@ -37,6 +37,7 @@
     SUBDIR += freehdl
     SUBDIR += fritzing
     SUBDIR += gds3d
+    SUBDIR += gdscpp
     SUBDIR += gdsreader
     SUBDIR += gdt
     SUBDIR += geda
diff --git a/cad/gdscpp/Makefile b/cad/gdscpp/Makefile
new file mode 100644
index 000000000000..f824f3c3a25e
--- /dev/null
+++ b/cad/gdscpp/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	gdscpp
+DISTVERSION=	g20200611
+CATEGORIES=	cad
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	C++ library to create and read GDSII file
+WWW=		https://github.com/judefdiv/gdscpp
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		cmake compiler:c++17-lang
+USE_LDCONFIG=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	judefdiv
+GH_TAGNAME=	20018e1
+
+CMAKE_ON=	BUILD_SHARED_LIBS
+
+PLIST_FILES=	bin/gdscpp \
+		include/gdscpp/gdsCpp.hpp \
+		include/gdscpp/gdsForge.hpp \
+		include/gdscpp/gdsParser.hpp \
+		lib/libgds.so
+
+do-install:
+	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${STAGEDIR}${LOCALBASE}/bin
+	${INSTALL_LIB} ${BUILD_WRKSRC}/libgds.so ${STAGEDIR}${LOCALBASE}/lib
+	cd ${WRKSRC}/include && ${COPYTREE_SHARE} ${PORTNAME} ${STAGEDIR}${LOCALBASE}/include
+
+.include <bsd.port.mk>
diff --git a/cad/gdscpp/distinfo b/cad/gdscpp/distinfo
new file mode 100644
index 000000000000..e104a1333668
--- /dev/null
+++ b/cad/gdscpp/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1677789358
+SHA256 (judefdiv-gdscpp-g20200611-20018e1_GH0.tar.gz) = 45578dc125db5da8104299951a22b688885d1fea8a9ec697fa3bd63ba6c174ec
+SIZE (judefdiv-gdscpp-g20200611-20018e1_GH0.tar.gz) = 32504
diff --git a/cad/gdscpp/files/patch-CMakeLists.txt b/cad/gdscpp/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..a4ff3d5c0706
--- /dev/null
+++ b/cad/gdscpp/files/patch-CMakeLists.txt
@@ -0,0 +1,22 @@
+--- CMakeLists.txt.orig	2020-06-11 07:02:00 UTC
++++ CMakeLists.txt
+@@ -14,8 +14,17 @@ set(SOURCES
+ )
+ 
+ add_executable(${PROJECT_NAME} ${SOURCES})
++add_library(gds
++  src/gdsCpp.cpp
++  src/gdsParser.cpp
++  src/gdsForge.cpp
++  src/gdsImport.cpp
++)
+ 
+ # Ensures that the header files of the project is included
+ target_include_directories(${PROJECT_NAME} PRIVATE
++  ${PROJECT_SOURCE_DIR}/include/gdscpp
++)
++target_include_directories(gds PRIVATE
+   ${PROJECT_SOURCE_DIR}/include/gdscpp
+-)
+\ No newline at end of file
++)
diff --git a/cad/gdscpp/pkg-descr b/cad/gdscpp/pkg-descr
new file mode 100644
index 000000000000..953d3e3d751b
--- /dev/null
+++ b/cad/gdscpp/pkg-descr
@@ -0,0 +1,10 @@
+GDScpp is a C++ library that make GDS file manipulation easier.
+
+Features:
+* Convert GDS data to ASCII.
+* Easily create GDS files.
+* Import GDS files.
+* Extract the root GDS structures.
+* Create a hierarchy diagram of all the GDS structure dependencies.
+* Direct importing of GDS files with redundancy checking.
+* Create bounding box of all the GDS structures.