aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-08-28 15:27:55 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-08-28 16:53:22 +0000
commit8784bcc9751df4e9d5439d9c2612adc5c2548196 (patch)
tree7e0fddb3f8f661338ce87a40f3e4095b975200d5
parent13b6c560f8507730b7e3ef9d1929b037c9cd0d95 (diff)
downloadports-8784bcc9751df4e9d5439d9c2612adc5c2548196.tar.gz
ports-8784bcc9751df4e9d5439d9c2612adc5c2548196.zip
cad/py-gdstk: New port: Library for creation and manipulation of GDSII and OASIS files
-rw-r--r--cad/Makefile1
-rw-r--r--cad/py-gdstk/Makefile25
-rw-r--r--cad/py-gdstk/distinfo3
-rw-r--r--cad/py-gdstk/files/patch-pyproject.toml9
-rw-r--r--cad/py-gdstk/pkg-descr11
5 files changed, 49 insertions, 0 deletions
diff --git a/cad/Makefile b/cad/Makefile
index d0f48e1d9673..62b2e6edda2c 100644
--- a/cad/Makefile
+++ b/cad/Makefile
@@ -111,6 +111,7 @@
SUBDIR += py-edalize
SUBDIR += py-ezdxf
SUBDIR += py-gdspy
+ SUBDIR += py-gdstk
SUBDIR += py-gmsh
SUBDIR += py-lcapy
SUBDIR += py-ocp
diff --git a/cad/py-gdstk/Makefile b/cad/py-gdstk/Makefile
new file mode 100644
index 000000000000..9aed69397199
--- /dev/null
+++ b/cad/py-gdstk/Makefile
@@ -0,0 +1,25 @@
+PORTNAME= gdstk
+DISTVERSION= 0.9.42
+CATEGORIES= cad
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Library for creation and manipulation of GDSII and OASIS files
+WWW= https://heitzmann.github.io/gdstk/
+
+LICENSE= BSL
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= cmake:devel/cmake-core \
+ ${PY_SETUPTOOLS} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
+ ${PYNUMPY}
+
+USES= compiler:c++11-lang python
+USE_PYTHON= pep517 autoplist
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/gdstk${PYTHON_EXT_SUFFIX}.so
+
+.include <bsd.port.mk>
diff --git a/cad/py-gdstk/distinfo b/cad/py-gdstk/distinfo
new file mode 100644
index 000000000000..60456b065423
--- /dev/null
+++ b/cad/py-gdstk/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1693240074
+SHA256 (gdstk-0.9.42.tar.gz) = bd7ab2f72e50df3ca396e94b82c202a4dfbef1e1206ab6d371d961ab12edfa97
+SIZE (gdstk-0.9.42.tar.gz) = 513544
diff --git a/cad/py-gdstk/files/patch-pyproject.toml b/cad/py-gdstk/files/patch-pyproject.toml
new file mode 100644
index 000000000000..9c5fa81d18bb
--- /dev/null
+++ b/cad/py-gdstk/files/patch-pyproject.toml
@@ -0,0 +1,9 @@
+--- pyproject.toml.orig 2023-08-28 16:28:32 UTC
++++ pyproject.toml
+@@ -38,5 +38,5 @@ requires = [
+ "setuptools>=42",
+ "wheel",
+ "numpy; platform_system=='Darwin'",
+- "oldest-supported-numpy; platform_system!='Darwin'",
++ "numpy; platform_system!='Darwin'",
+ ]
diff --git a/cad/py-gdstk/pkg-descr b/cad/py-gdstk/pkg-descr
new file mode 100644
index 000000000000..1300c7e4f921
--- /dev/null
+++ b/cad/py-gdstk/pkg-descr
@@ -0,0 +1,11 @@
+Gdstk (GDSII Tool Kit) is a C++ library for creation and manipulation
+of GDSII and OASIS files. It is also available as a Python module
+meant to be a successor to Gdspy.
+
+Key features for the creation of complex CAD layouts are included:
+* Boolean operations on polygons (AND, OR, NOT, XOR) based on clipping algorithm
+* Polygon offset (inward and outward rescaling of polygons)
+* Efficient point-in-polygon solutions for large array sets
+
+Typical applications of Gdstk are in the fields of electronic chip design,
+planar lightwave circuit design, and mechanical engineering.