git: cbf656a2a159 - main - math/manifold: resurrect and update to 3.3.2

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Wed, 31 Dec 2025 23:32:55 UTC
The branch main has been updated by fluffy:

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

commit cbf656a2a159c5c2192011026f620ffe73259a6e
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2025-12-31 23:31:15 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2025-12-31 23:31:15 +0000

    math/manifold: resurrect and update to 3.3.2
    
    PR:     291258
---
 MOVED                                    |  1 -
 math/Makefile                            |  1 +
 math/manifold/Makefile                   | 54 ++++++++++++++++++++++++++++++++
 math/manifold/distinfo                   |  3 ++
 math/manifold/files/patch-CMakeLists.txt | 11 +++++++
 math/manifold/pkg-descr                  |  4 +++
 math/manifold/pkg-plist                  | 24 ++++++++++++++
 7 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index 660f70b5a864..639408bcba0f 100644
--- a/MOVED
+++ b/MOVED
@@ -4638,7 +4638,6 @@ lang/linux-dotnet11-runtime||2025-07-01|Has expired: Ancient version, no practic
 lang/linux-dotnet-sdk||2025-07-01|Removed: Depends on expired lang/linux-dotnet-runtime, MASTER_SITES gone
 lang/linux-dotnet-runtime||2025-07-01|Has expired: Ancient version, no practical use
 lang/linux-dotnet-cli||2025-07-01|Removed, depends on removed lang/linux-dotnet-runtime
-math/manifold||2025-07-06|Removed, planned to update BRL-CAD, but currently blocked
 shells/bash53||2025-07-07|Removed in favour of updating shells/bash
 devel/etcd31||2025-07-08|Has expired: EOLed upstream, switch to a newer version
 devel/etcd32||2025-07-08|Has expired: EOLed upstream, switch to a newer version
diff --git a/math/Makefile b/math/Makefile
index 9c3f715d6d97..47cb5b8e6506 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -492,6 +492,7 @@
     SUBDIR += ltl2ba
     SUBDIR += m4ri
     SUBDIR += m4rie
+    SUBDIR += manifold
     SUBDIR += mate-calc
     SUBDIR += math77
     SUBDIR += mathex
diff --git a/math/manifold/Makefile b/math/manifold/Makefile
new file mode 100644
index 000000000000..c663efb297f7
--- /dev/null
+++ b/math/manifold/Makefile
@@ -0,0 +1,54 @@
+PORTNAME=	manifold
+DISTVERSIONPREFIX=v
+DISTVERSION=	3.3.2
+CATEGORIES=	math cad graphics
+
+MAINTAINER=	FreeBSD@Shaneware.biz
+COMMENT=	Geometry library for topological robustness
+WWW=		https://github.com/elalish/manifold
+
+LICENSE=	APACHE20
+
+TEST_DEPENDS=	googletest>0:devel/googletest
+
+USES=		cmake:testing compiler:c++17-lang
+USE_GITHUB=	yes
+GH_ACCOUNT=	elalish
+USE_LDCONFIG=	yes
+
+CMAKE_ON=	BUILD_SHARED_LIBS
+CMAKE_OFF=	MANIFOLD_DOWNLOADS \
+		MANIFOLD_FUZZ \
+		MANIFOLD_JSBIND \
+		TRACY_ENABLE
+
+CMAKE_TESTING_ON=MANIFOLD_TEST
+TEST_TARGET=	test/manifold_test
+
+PLIST_SUB+=	VERS=${DISTVERSION}
+
+OPTIONS_DEFINE=		CBIND CROSS PARA PYBIND TEST_EXPORT
+OPTIONS_DEFAULT=	CBIND CROSS PARA
+OPTIONS_SUB=		yes
+
+CBIND_DESC=		Enable C FFI binding
+CROSS_DESC=		Enable CrossSection for 2D support
+PARA_DESC=		Enable multi-thread parallelization
+PYBIND_DESC=		Enable python binding
+TEST_EXPORT_DESC=	Enable export of models from tests
+
+CBIND_IMPLIES=		CROSS
+CBIND_CMAKE_BOOL=	MANIFOLD_CBIND
+CROSS_LIB_DEPENDS=	libClipper2.so:cad/Clipper2
+CROSS_CMAKE_BOOL=	MANIFOLD_CROSS_SECTION
+PARA_LIB_DEPENDS=	libtbb.so:devel/onetbb
+PARA_CMAKE_BOOL=	MANIFOLD_PAR
+PYBIND_IMPLIES=		CROSS
+PYBIND_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}nanobind>0:devel/py-nanobind@${PY_FLAVOR}
+PYBIND_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}nanobind>0:devel/py-nanobind@${PY_FLAVOR}
+PYBIND_USES=		python
+PYBIND_CMAKE_BOOL=	MANIFOLD_PYBIND
+TEST_EXPORT_LIB_DEPENDS=libassimp.so:multimedia/assimp
+TEST_EXPORT_CMAKE_BOOL=	MANIFOLD_EXPORT
+
+.include <bsd.port.mk>
diff --git a/math/manifold/distinfo b/math/manifold/distinfo
new file mode 100644
index 000000000000..02a99c8e567a
--- /dev/null
+++ b/math/manifold/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1764154036
+SHA256 (elalish-manifold-v3.3.2_GH0.tar.gz) = 92a37034c407156f71446f9ca03bd4487adeb1b8246a03d1c047b859b1b9d211
+SIZE (elalish-manifold-v3.3.2_GH0.tar.gz) = 29660758
diff --git a/math/manifold/files/patch-CMakeLists.txt b/math/manifold/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..b4316fe8844d
--- /dev/null
+++ b/math/manifold/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2025-11-30 01:30:39 UTC
++++ CMakeLists.txt
+@@ -53,7 +53,7 @@ option(
+   "Force optimized build, even with debugging enabled"
+   OFF
+ )
+-option(MANIFOLD_TEST "Enable testing suite" ON)
++option(MANIFOLD_TEST "Enable testing suite" OFF)
+ option(MANIFOLD_PYBIND "Build python bindings" OFF)
+ # MANIFOLD_CBIND is only available when MANIFOLD_CROSS_SECTION is enabled
+ cmake_dependent_option(
diff --git a/math/manifold/pkg-descr b/math/manifold/pkg-descr
new file mode 100644
index 000000000000..07443d902acc
--- /dev/null
+++ b/math/manifold/pkg-descr
@@ -0,0 +1,4 @@
+Manifold is a geometry library dedicated to creating and operating on
+manifold triangle meshes. A manifold mesh is a mesh that represents a
+solid object, and so is very important in manufacturing, CAD,
+structural analysis, etc.
diff --git a/math/manifold/pkg-plist b/math/manifold/pkg-plist
new file mode 100644
index 000000000000..6b1a585c6d2c
--- /dev/null
+++ b/math/manifold/pkg-plist
@@ -0,0 +1,24 @@
+include/manifold/common.h
+include/manifold/cross_section.h
+include/manifold/linalg.h
+include/manifold/manifold.h
+%%CBIND%%include/manifold/manifoldc.h
+include/manifold/meshIO.h
+include/manifold/optional_assert.h
+include/manifold/polygon.h
+%%CBIND%%include/manifold/types.h
+include/manifold/vec_view.h
+include/manifold/version.h
+lib/cmake/manifold/manifoldConfig.cmake
+lib/cmake/manifold/manifoldConfigVersion.cmake
+lib/cmake/manifold/manifoldTargets-release.cmake
+lib/cmake/manifold/manifoldTargets.cmake
+lib/libmanifold.so
+lib/libmanifold.so.3
+lib/libmanifold.so.%%VERS%%
+%%CBIND%%lib/libmanifoldc.so
+%%CBIND%%lib/libmanifoldc.so.3
+%%CBIND%%lib/libmanifoldc.so.%%VERS%%
+libdata/pkgconfig/manifold.pc
+%%PYBIND%%%%PYTHON_SITELIBDIR%%/manifold3d%%PYTHON_TAG%%.so
+%%PYBIND%%%%PYTHON_SITELIBDIR%%/manifold3d.pyi