git: cdfc8f759d7f - main - cad/antimony: New port: CAD from a parallel universe

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Mon, 16 Jan 2023 21:07:29 UTC
The branch main has been updated by yuri:

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

commit cdfc8f759d7f08e89c95d802ba11575d7eb0317f
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-01-16 20:50:37 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-01-16 21:07:26 +0000

    cad/antimony: New port: CAD from a parallel universe
---
 cad/Makefile                              |  1 +
 cad/antimony/Makefile                     | 25 ++++++++
 cad/antimony/distinfo                     |  3 +
 cad/antimony/files/patch-app_app_app.cpp  | 13 +++++
 cad/antimony/files/patch-app_app_main.cpp | 20 +++++++
 cad/antimony/pkg-descr                    |  2 +
 cad/antimony/pkg-plist                    | 96 +++++++++++++++++++++++++++++++
 7 files changed, 160 insertions(+)

diff --git a/cad/Makefile b/cad/Makefile
index 2248b9d2b435..fa412f520987 100644
--- a/cad/Makefile
+++ b/cad/Makefile
@@ -6,6 +6,7 @@
     SUBDIR += admesh
     SUBDIR += adms
     SUBDIR += alliance
+    SUBDIR += antimony
     SUBDIR += appcsxcad
     SUBDIR += archimedes
     SUBDIR += astk-client
diff --git a/cad/antimony/Makefile b/cad/antimony/Makefile
new file mode 100644
index 000000000000..4d932e8b9217
--- /dev/null
+++ b/cad/antimony/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	antimony
+DISTVERSION=	0.9.3b-37
+DISTVERSIONSUFFIX=	-g8b805c67
+CATEGORIES=	cad
+PKGNAMESUFFIX=	-cad
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	CAD from a parallel universe
+WWW=		https://www.mattkeeter.com/projects/antimony/3/
+
+LICENSE=	MIT
+
+BUILD_DEPENDS=	lemon:devel/lemon
+LIB_DEPENDS=	${PY_BOOST} \
+		libpng16.so:graphics/png
+
+USES=		cmake python qt:5
+USE_QT=		concurrent core gui network opengl widgets buildtools:build qmake:build
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	mkeeter
+
+CMAKE_ARGS=	-DPython_EXECUTABLE=${PYTHON_CMD}
+
+.include <bsd.port.mk>
diff --git a/cad/antimony/distinfo b/cad/antimony/distinfo
new file mode 100644
index 000000000000..21410ba8409c
--- /dev/null
+++ b/cad/antimony/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1673898074
+SHA256 (mkeeter-antimony-0.9.3b-37-g8b805c67_GH0.tar.gz) = d51dee5240c0adf08db367b4ece2d760420a9aee28af7efe72f1241468112c9f
+SIZE (mkeeter-antimony-0.9.3b-37-g8b805c67_GH0.tar.gz) = 1030558
diff --git a/cad/antimony/files/patch-app_app_app.cpp b/cad/antimony/files/patch-app_app_app.cpp
new file mode 100644
index 000000000000..9c8b86e03c9b
--- /dev/null
+++ b/cad/antimony/files/patch-app_app_app.cpp
@@ -0,0 +1,13 @@
+--- app/app/app.cpp.orig	2023-01-16 19:49:55 UTC
++++ app/app/app.cpp
+@@ -63,6 +63,10 @@ QStringList App::nodePaths() const
+     // If we're running Antimony from the build folder, use sb/nodes
+     paths << applicationDirPath() + "/sb/nodes";
+     paths << applicationDirPath() + "/../share/antimony/nodes";
++#elif defined Q_OS_FREEBSD
++    // If we're running Antimony from the build folder, use sb/nodes
++    paths << applicationDirPath() + "/sb/nodes";
++    paths << applicationDirPath() + "/../share/antimony/nodes";
+ #elif defined Q_OS_WIN32
+     // Windows only supports running from the build directory
+     paths << applicationDirPath() + "/sb/nodes";
diff --git a/cad/antimony/files/patch-app_app_main.cpp b/cad/antimony/files/patch-app_app_main.cpp
new file mode 100644
index 000000000000..07bb69e6cf33
--- /dev/null
+++ b/cad/antimony/files/patch-app_app_main.cpp
@@ -0,0 +1,20 @@
+--- app/app/main.cpp.orig	2023-01-16 19:52:05 UTC
++++ app/app/main.cpp
+@@ -69,6 +69,17 @@ int main(int argc, char *argv[])
+             fab_paths.push_back(p.toStdString());
+         }
+         fab::postInit(fab_paths);	
++#elif defined Q_OS_FREEBSD
++        auto dir = QCoreApplication::applicationDirPath();
++        std::vector<std::string> fab_paths =
++            {(dir + "/sb").toStdString(),
++             (dir + "/../share/antimony/").toStdString()};
++        for (auto p : QStandardPaths::standardLocations(
++                QStandardPaths::AppDataLocation))
++        {
++            fab_paths.push_back(p.toStdString());
++        }
++        fab::postInit(fab_paths);	
+ #elif defined Q_OS_WIN32
+         auto dir = QCoreApplication::applicationDirPath();
+         fab::postInit({(dir + "/sb").toStdString()});
diff --git a/cad/antimony/pkg-descr b/cad/antimony/pkg-descr
new file mode 100644
index 000000000000..ecd91d6f10bf
--- /dev/null
+++ b/cad/antimony/pkg-descr
@@ -0,0 +1,2 @@
+Antimony is a computer-aided design (CAD) tool from a parallel universe in which
+CAD software evolved from Lisp machines rather than drafting tables.
diff --git a/cad/antimony/pkg-plist b/cad/antimony/pkg-plist
new file mode 100644
index 000000000000..1c622283384e
--- /dev/null
+++ b/cad/antimony/pkg-plist
@@ -0,0 +1,96 @@
+bin/antimony
+%%DATADIR%%/fab/__init__.py
+%%DATADIR%%/fab/shapes.py
+%%DATADIR%%/fab/types.py
+%%DATADIR%%/nodes/2D → 3D/Revolve/revolve_xy_x.node
+%%DATADIR%%/nodes/2D → 3D/Revolve/revolve_xy_y.node
+%%DATADIR%%/nodes/2D → 3D/extrude.node
+%%DATADIR%%/nodes/2D → 3D/loft.node
+%%DATADIR%%/nodes/2D/Circles/circle_center.node
+%%DATADIR%%/nodes/2D/Circles/circle_edge.node
+%%DATADIR%%/nodes/2D/Rectangles/rectangle_center.node
+%%DATADIR%%/nodes/2D/Rectangles/rectangle_center_rounded.node
+%%DATADIR%%/nodes/2D/Rectangles/rectangle_corner.node
+%%DATADIR%%/nodes/2D/Rectangles/rectangle_corner_rounded.node
+%%DATADIR%%/nodes/2D/Triangles/triangle.node
+%%DATADIR%%/nodes/2D/Triangles/triangle_right.node
+%%DATADIR%%/nodes/2D/point.node
+%%DATADIR%%/nodes/2D/polygon.node
+%%DATADIR%%/nodes/2D/text.node
+%%DATADIR%%/nodes/3D → 2D/slice_xy.node
+%%DATADIR%%/nodes/3D → 2D/slice_xz.node
+%%DATADIR%%/nodes/3D → 2D/slice_yz.node
+%%DATADIR%%/nodes/3D/Cones/cone.node
+%%DATADIR%%/nodes/3D/Cones/cone_edge.node
+%%DATADIR%%/nodes/3D/Cones/cone_height.node
+%%DATADIR%%/nodes/3D/Cubes/cube_center.node
+%%DATADIR%%/nodes/3D/Cubes/cube_center_rounded.node
+%%DATADIR%%/nodes/3D/Cubes/cube_corner.node
+%%DATADIR%%/nodes/3D/Cubes/cube_corner_rounded.node
+%%DATADIR%%/nodes/3D/Cylinders/cylinder_x.node
+%%DATADIR%%/nodes/3D/Cylinders/cylinder_y.node
+%%DATADIR%%/nodes/3D/Cylinders/cylinder_z.node
+%%DATADIR%%/nodes/3D/Pyramids/pyramid_center.node
+%%DATADIR%%/nodes/3D/Pyramids/pyramid_edge.node
+%%DATADIR%%/nodes/3D/Spheres/sphere_center.node
+%%DATADIR%%/nodes/3D/Spheres/sphere_edge.node
+%%DATADIR%%/nodes/3D/Toruses/torus_x.node
+%%DATADIR%%/nodes/3D/Toruses/torus_y.node
+%%DATADIR%%/nodes/3D/Toruses/torus_z.node
+%%DATADIR%%/nodes/3D/Volumes/gyroid.node
+%%DATADIR%%/nodes/3D/Volumes/schwarz_d.node
+%%DATADIR%%/nodes/3D/Volumes/schwarz_p.node
+%%DATADIR%%/nodes/3D/point.node
+%%DATADIR%%/nodes/Array/array_2d.node
+%%DATADIR%%/nodes/Array/array_3d.node
+%%DATADIR%%/nodes/Array/array_polar.node
+%%DATADIR%%/nodes/CSG/blend.node
+%%DATADIR%%/nodes/CSG/clearance.node
+%%DATADIR%%/nodes/CSG/copy.node
+%%DATADIR%%/nodes/CSG/difference.node
+%%DATADIR%%/nodes/CSG/hide.node
+%%DATADIR%%/nodes/CSG/intersection.node
+%%DATADIR%%/nodes/CSG/invert.node
+%%DATADIR%%/nodes/CSG/morph.node
+%%DATADIR%%/nodes/CSG/offset.node
+%%DATADIR%%/nodes/CSG/shell.node
+%%DATADIR%%/nodes/CSG/union.node
+%%DATADIR%%/nodes/Color/set_color.node
+%%DATADIR%%/nodes/Color/set_color_hsb.node
+%%DATADIR%%/nodes/Deform/Shear/shear_cos_x_y.node
+%%DATADIR%%/nodes/Deform/Shear/shear_cos_xy_z.node
+%%DATADIR%%/nodes/Deform/Shear/shear_x_y.node
+%%DATADIR%%/nodes/Deform/Shear/shear_xy_z.node
+%%DATADIR%%/nodes/Deform/attract.node
+%%DATADIR%%/nodes/Deform/cylinderwrap.node
+%%DATADIR%%/nodes/Deform/repel.node
+%%DATADIR%%/nodes/Deform/twist.node
+%%DATADIR%%/nodes/Export/export_heightmap.node
+%%DATADIR%%/nodes/Export/export_stl.node
+%%DATADIR%%/nodes/Math/function_xy.node
+%%DATADIR%%/nodes/Math/function_xyz.node
+%%DATADIR%%/nodes/Math/map_xyz.node
+%%DATADIR%%/nodes/Math/show_math_string.node
+%%DATADIR%%/nodes/Reflect/reflect_x.node
+%%DATADIR%%/nodes/Reflect/reflect_xy.node
+%%DATADIR%%/nodes/Reflect/reflect_xz.node
+%%DATADIR%%/nodes/Reflect/reflect_y.node
+%%DATADIR%%/nodes/Reflect/reflect_yz.node
+%%DATADIR%%/nodes/Reflect/reflect_z.node
+%%DATADIR%%/nodes/Rotate/rotate_x.node
+%%DATADIR%%/nodes/Rotate/rotate_y.node
+%%DATADIR%%/nodes/Rotate/rotate_z.node
+%%DATADIR%%/nodes/Scale/Taper/taper_x_y.node
+%%DATADIR%%/nodes/Scale/Taper/taper_xy_z.node
+%%DATADIR%%/nodes/Scale/scale_cos_x_y.node
+%%DATADIR%%/nodes/Scale/scale_cos_xy_z.node
+%%DATADIR%%/nodes/Scale/scale_x.node
+%%DATADIR%%/nodes/Scale/scale_xy.node
+%%DATADIR%%/nodes/Scale/scale_xyz.node
+%%DATADIR%%/nodes/Scale/scale_y.node
+%%DATADIR%%/nodes/Scale/scale_z.node
+%%DATADIR%%/nodes/Scale/scale_z_r.node
+%%DATADIR%%/nodes/Translate/origin_xy.node
+%%DATADIR%%/nodes/Translate/origin_xyz.node
+%%DATADIR%%/nodes/Translate/recenter.node
+%%DATADIR%%/nodes/Translate/translate.node