Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2026 18:32:18 +0000
From:      Daniel Engberg <diizzy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 34f60d89861f - main - math/manifold: Improve port
Message-ID:  <696bd5b2.3d19b.658e0d5c@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by diizzy:

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

commit 34f60d89861f4fdc98bb1930a30ca6333e6a9b8e
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2026-01-17 17:40:14 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2026-01-17 18:32:01 +0000

    math/manifold: Improve port
    
    * Use upstream release archive
    * Define LICENSE_FILE
    * Clean up "make test" related parts
    * Only extract samples dir on request (reduces I/O)
    * Respect C/CXX flags set by framework
    * Adjust Makefile layout to follow Porters Handbook more closely
      and the tree overall
    
    PR:             292089
    Approved by:    blanket (just fix it)
---
 math/manifold/Makefile                   | 35 +++++++++++++++++++++++---------
 math/manifold/distinfo                   |  6 +++---
 math/manifold/files/patch-CMakeLists.txt | 32 ++++++++++++++++++++---------
 3 files changed, 50 insertions(+), 23 deletions(-)

diff --git a/math/manifold/Makefile b/math/manifold/Makefile
index c663efb297f7..42acb06a93ef 100644
--- a/math/manifold/Makefile
+++ b/math/manifold/Makefile
@@ -1,31 +1,37 @@
 PORTNAME=	manifold
-DISTVERSIONPREFIX=v
 DISTVERSION=	3.3.2
 CATEGORIES=	math cad graphics
+MASTER_SITES=	https://github.com/elalish/${PORTNAME}/releases/download/v${DISTVERSION}/
 
 MAINTAINER=	FreeBSD@Shaneware.biz
 COMMENT=	Geometry library for topological robustness
 WWW=		https://github.com/elalish/manifold
 
 LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
 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
+EXTRACT_AFTER_ARGS=	--exclude ${PORTNAME}-${DISTVERSION}/samples \
+			--no-same-owner --no-same-permissions
+.if make(test)
+EXTRACT_AFTER_ARGS=	--include ${PORTNAME}-${DISTVERSION}/samples \
+			--no-same-owner --no-same-permissions
+.endif
+
+PLIST_SUB+=	VERS=${DISTVERSION}
+
+CMAKE_TESTING_ON=	MANIFOLD_TEST
+
 CMAKE_OFF=	MANIFOLD_DOWNLOADS \
 		MANIFOLD_FUZZ \
 		MANIFOLD_JSBIND \
+		MANIFOLD_TEST \
 		TRACY_ENABLE
-
-CMAKE_TESTING_ON=MANIFOLD_TEST
-TEST_TARGET=	test/manifold_test
-
-PLIST_SUB+=	VERS=${DISTVERSION}
+CMAKE_ON=	BUILD_SHARED_LIBS
 
 OPTIONS_DEFINE=		CBIND CROSS PARA PYBIND TEST_EXPORT
 OPTIONS_DEFAULT=	CBIND CROSS PARA
@@ -39,16 +45,25 @@ 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
+PYBIND_IMPLIES=		CROSS
+
 TEST_EXPORT_LIB_DEPENDS=libassimp.so:multimedia/assimp
 TEST_EXPORT_CMAKE_BOOL=	MANIFOLD_EXPORT
 
+pre-test:
+	@if [ ! -d ${WRKDIR}/samples ]; then \
+		(${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${DISTFILES} -C ${EXTRACT_WRKDIR} ${EXTRACT_AFTER_ARGS}) ;\
+	fi
+
 .include <bsd.port.mk>
diff --git a/math/manifold/distinfo b/math/manifold/distinfo
index 02a99c8e567a..a65f3a7e5ca9 100644
--- a/math/manifold/distinfo
+++ b/math/manifold/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1764154036
-SHA256 (elalish-manifold-v3.3.2_GH0.tar.gz) = 92a37034c407156f71446f9ca03bd4487adeb1b8246a03d1c047b859b1b9d211
-SIZE (elalish-manifold-v3.3.2_GH0.tar.gz) = 29660758
+TIMESTAMP = 1767228149
+SHA256 (manifold-3.3.2.tar.gz) = efdae7cd75aabab20fa2673603a9ac263d5b48912559664dde37f5d9e85eced8
+SIZE (manifold-3.3.2.tar.gz) = 29657433
diff --git a/math/manifold/files/patch-CMakeLists.txt b/math/manifold/files/patch-CMakeLists.txt
index b4316fe8844d..c07bf9fcead7 100644
--- a/math/manifold/files/patch-CMakeLists.txt
+++ b/math/manifold/files/patch-CMakeLists.txt
@@ -1,11 +1,23 @@
---- CMakeLists.txt.orig	2025-11-30 01:30:39 UTC
+--- CMakeLists.txt.orig	2025-11-15 08:41:27 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(
+@@ -171,13 +171,13 @@ else()
+     endif()
+   endif()
+   list(APPEND MANIFOLD_FLAGS ${WARNING_FLAGS})
+-  if(
+-    MANIFOLD_OPTIMIZED
+-    OR "${CMAKE_BUILD_TYPE}" STREQUAL "Release"
+-    OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"
+-  )
+-    list(APPEND MANIFOLD_FLAGS -O3)
+-  endif()
++#  if(
++#    MANIFOLD_OPTIMIZED
++#    OR "${CMAKE_BUILD_TYPE}" STREQUAL "Release"
++#    OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"
++#  )
++#    list(APPEND MANIFOLD_FLAGS -O3)
++#  endif()
+   if("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
+     list(APPEND MANIFOLD_FLAGS -fno-omit-frame-pointer)
+   endif()


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?696bd5b2.3d19b.658e0d5c>