aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-01-08 08:52:49 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-01-08 09:40:50 +0000
commitf8bbe9d10a9e053088c4550f1ea7db3ab4507666 (patch)
treed56a054c7ba14788aee6af0422c4a40d7bf07028
parent019de3fad32a6d0d433f7fe672555c1e46479716 (diff)
downloadports-f8bbe9d10a9e053088c4550f1ea7db3ab4507666.tar.gz
ports-f8bbe9d10a9e053088c4550f1ea7db3ab4507666.zip
cad/py-edalize: New port: Library for interfacing EDA tools
-rw-r--r--cad/Makefile1
-rw-r--r--cad/py-edalize/Makefile36
-rw-r--r--cad/py-edalize/distinfo3
-rw-r--r--cad/py-edalize/pkg-descr3
4 files changed, 43 insertions, 0 deletions
diff --git a/cad/Makefile b/cad/Makefile
index 9ac5b05745f3..2cca46611f66 100644
--- a/cad/Makefile
+++ b/cad/Makefile
@@ -102,6 +102,7 @@
SUBDIR += pdnmesh
SUBDIR += py-cadquery
SUBDIR += py-cq-editor
+ SUBDIR += py-edalize
SUBDIR += py-ezdxf
SUBDIR += py-gdspy
SUBDIR += py-gmsh
diff --git a/cad/py-edalize/Makefile b/cad/py-edalize/Makefile
new file mode 100644
index 000000000000..dda4ff499875
--- /dev/null
+++ b/cad/py-edalize/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= edalize
+DISTVERSION= 0.4.1
+CATEGORIES= cad python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Library for interfacing EDA tools
+WWW= https://github.com/olofk/edalize
+
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}types-Jinja2>0:devel/py-types-Jinja2@${PY_FLAVOR} \
+ gmake:devel/gmake \
+ yosys:cad/yosys
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}vunit-hdl>0:cad/py-vunit-hdl@${PY_FLAVOR}
+
+USES= python:3.6+ shebangfix
+USE_PYTHON= distutils autoplist pytest
+
+SHEBANG_FILES= tests/mock_commands/* scripts/el_docker
+
+NO_ARCH= yes
+
+post-patch:
+ @${GREP} -rl '"make"' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -i '' -e 's|"make"|"${GMAKE}"|'
+ @${GREP} -rl '"python3"' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -i '' -e 's|"python3"|"${PYTHON_CMD}"|'
+ @${GREP} -rl 'shell python3 ' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -i '' -e 's|shell python3 |shell ${PYTHON_CMD} |'
+ @${GREP} -rl '$$(shell which python3)' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -i '' -e 's|$$(shell which python3)|${PYTHON_CMD}|'
+ @${REINPLACE_CMD} -i '' -e 's|/usr/bin/env python3|${PYTHON_CMD}|' ${WRKSRC}/tests/mock_commands/vcs
+
+# testsuite has intemittent failures: in many runs many tests fail, but sometimes all tests but 1 succeed, see https://github.com/olofk/edalize/issues/368
+# 1 test (test_modelsim) always fails because it depends on Intel's modelsim
+
+.include <bsd.port.mk>
diff --git a/cad/py-edalize/distinfo b/cad/py-edalize/distinfo
new file mode 100644
index 000000000000..8ccf64bcb7ea
--- /dev/null
+++ b/cad/py-edalize/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1673149710
+SHA256 (edalize-0.4.1.tar.gz) = 50dd5f7bf29f5d6b224b0ef714dd37d9c7deea3676b62a020fdda84426dc1afb
+SIZE (edalize-0.4.1.tar.gz) = 342459
diff --git a/cad/py-edalize/pkg-descr b/cad/py-edalize/pkg-descr
new file mode 100644
index 000000000000..1d102132350d
--- /dev/null
+++ b/cad/py-edalize/pkg-descr
@@ -0,0 +1,3 @@
+Edalize is an award winning Python library for interacting with EDA tools.
+It can create project files for supported tools and run them in batch or
+GUI mode (where supported).