git: cf6edc826a76 - main - science/py-openEMS: New port: Electromagnetic field solver using the EC-FDTD method

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 29 Aug 2024 07:12:02 UTC
The branch main has been updated by yuri:

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

commit cf6edc826a767a896baf252a0a46e2de1e3a326a
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-08-29 02:24:58 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-08-29 07:11:54 +0000

    science/py-openEMS: New port: Electromagnetic field solver using the EC-FDTD method
---
 science/Makefile             |  1 +
 science/py-openEMS/Makefile  | 41 +++++++++++++++++++++++++++++++++++++++++
 science/py-openEMS/distinfo  |  3 +++
 science/py-openEMS/pkg-descr |  6 ++++++
 4 files changed, 51 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index d45832be54ba..240e96c68189 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -382,6 +382,7 @@
     SUBDIR += py-nilearn
     SUBDIR += py-obspy
     SUBDIR += py-oddt
+    SUBDIR += py-openEMS
     SUBDIR += py-openbabel
     SUBDIR += py-openpiv
     SUBDIR += py-optking
diff --git a/science/py-openEMS/Makefile b/science/py-openEMS/Makefile
new file mode 100644
index 000000000000..b5148025e3a4
--- /dev/null
+++ b/science/py-openEMS/Makefile
@@ -0,0 +1,41 @@
+PORTNAME=	openEMS
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.0.36
+CATEGORIES=	science
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Electromagnetic field solver using the EC-FDTD method
+WWW=		https://www.openems.de/
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/../COPYING
+
+BUILD_DEPENDS=	${NONEXISTENT}:cad/py-csxcad:patch \
+		${PYTHON_PKGNAMEPREFIX}csxcad>0:cad/py-csxcad@${PY_FLAVOR}
+LIB_DEPENDS=	libCSXCAD.so:cad/csxcad \
+		libopenEMS.so:science/openems
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}csxcad>0:cad/py-csxcad@${PY_FLAVOR}
+
+USES=		pkgconfig python
+USE_PYTHON=	distutils cython autoplist
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	thliebig
+GH_PROJECT=	openEMS
+
+CFLAGS+=	-I${WRKSRC} \
+		-I`${MAKE} -C ${PORTSDIR}/cad/py-csxcad -VWRKSRC`
+
+WRKSRC_SUBDIR=	python
+
+post-patch:
+	@${CP} ${WRKSRC}/../nf2ff/*.h ${WRKSRC}/openEMS
+	@${CP} ${WRKSRC}/../*.h ${WRKSRC}/openEMS
+
+post-install:
+.for name in _nf2ff openEMS
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/openEMS/${name}${PYTHON_EXT_SUFFIX}.so
+.endfor
+
+.include <bsd.port.mk>
diff --git a/science/py-openEMS/distinfo b/science/py-openEMS/distinfo
new file mode 100644
index 000000000000..a53eac30191d
--- /dev/null
+++ b/science/py-openEMS/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1698115799
+SHA256 (thliebig-openEMS-v0.0.36_GH0.tar.gz) = ed1aa79e8b435a0e0b14aefc301a9f84dbfed4a42ee1e4829170ccd799f1019b
+SIZE (thliebig-openEMS-v0.0.36_GH0.tar.gz) = 1728767
diff --git a/science/py-openEMS/pkg-descr b/science/py-openEMS/pkg-descr
new file mode 100644
index 000000000000..acbdcdc1766d
--- /dev/null
+++ b/science/py-openEMS/pkg-descr
@@ -0,0 +1,6 @@
+openEMS is a free and open electromagnetic field solver using the FDTD method.
+Matlab or Octave are used as an easy and flexible scripting interface.
+
+It features:
+* fully 3D Cartesian and cylindrical coordinates graded mesh
+* multi-threading, SIMD (SSE) and MPI support for high speed FDTD