diff --git a/math/py-topologic/Makefile b/math/py-topologic/Makefile index b0d03f7b23ed..c0120d79b79b 100644 --- a/math/py-topologic/Makefile +++ b/math/py-topologic/Makefile @@ -1,38 +1,44 @@ PORTNAME= topologic DISTVERSIONPREFIX= v -DISTVERSION= 0.6.0 -PORTREVISION= 3 +DISTVERSION= 6.0.2 CATEGORIES= math PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} PKGNAMESUFFIX= -space-modeling-library MAINTAINER= yuri@FreeBSD.org COMMENT= Library for topological representations of architectural spaces WWW= https://topologic.app/ LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/../LICENSE -LIB_DEPENDS= libTopologicCore.so:math/topologic \ - libTKernel.so:cad/opencascade +BUILD_DEPENDS= pybind11>0:devel/pybind11 +LIB_DEPENDS= libTopologicCore.so:math/topologic USES= cmake compiler:c++17-lang localbase:ldflags python USE_GITHUB= yes GH_ACCOUNT= wassimj GH_PROJECT= Topologic -WRKSRC_SUBDIR= Python-Bindings +WRKSRC_SUBDIR= TopologicPythonBindings -CXXFLAGS+= -I${LOCALBASE}/include/OpenCASCADE +CXXFLAGS+= -I${LOCALBASE}/include/OpenCASCADE \ + -I${LOCALBASE}/include/TopologicCore +LDFLAGS+= -L${LOCALBASE}/lib/TopologicCore -PLIST_FILES= ${PYTHON_SITELIBDIR}/topologic${PYTHON_EXT_SUFFIX}.so +PLIST_FILES= ${PYTHON_SITELIBDIR}/topologic_core${PYTHON_EXT_SUFFIX}.so + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} do-install: # workaround for https://github.com/wassimj/Topologic/issues/34 ${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} - ${INSTALL_LIB} ${BUILD_WRKSRC}/topologic${PYTHON_EXT_SUFFIX}.so ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + ${INSTALL_LIB} ${BUILD_WRKSRC}/topologic_core${PYTHON_EXT_SUFFIX}.so ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -do-test: install - ${PYTHON_CMD} ${WRKSRC}/test/topologictest01.py +do-test: +.for tst in topologictest01 topologictest02 + ${ECHO} "====> Running test ${tst}" + ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${WRKSRC}/test/${tst}.py +.endfor .include diff --git a/math/py-topologic/distinfo b/math/py-topologic/distinfo index 3350d9e594fe..c332b42ebe53 100644 --- a/math/py-topologic/distinfo +++ b/math/py-topologic/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1650340528 -SHA256 (wassimj-Topologic-v0.6.0_GH0.tar.gz) = 48f7f96c9d1552aa8bc1cf3336c0713aa8c1db3e42842a982e4748756d4107c9 -SIZE (wassimj-Topologic-v0.6.0_GH0.tar.gz) = 3848281 +TIMESTAMP = 1714893793 +SHA256 (wassimj-Topologic-v6.0.2_GH0.tar.gz) = 5a56c4847879e43d82e28db4d7f113e68d0f19bd9532aefcebeb6df92441058f +SIZE (wassimj-Topologic-v6.0.2_GH0.tar.gz) = 274112 diff --git a/math/py-topologic/files/patch-CMakeLists.txt b/math/py-topologic/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..15cf231be73b --- /dev/null +++ b/math/py-topologic/files/patch-CMakeLists.txt @@ -0,0 +1,38 @@ +--- CMakeLists.txt.orig 2024-05-04 20:00:40 UTC ++++ CMakeLists.txt +@@ -4,9 +4,7 @@ set(PROJECT_NAMESPACE Topologic) + set(PROJECT_NAMESPACE Topologic) + + +-# Import pybind11 +-set(PYBIND11_FINDPYTHON ON) +-add_subdirectory(pybind11) ++find_Package(pybind11 REQUIRED) + + + # Source groups +@@ -50,12 +48,14 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${P + target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include) + + # Import TopologicCore from parent dir when not building from global project ++if (FALSE) + if(NOT TARGET ${PROJECT_NAMESPACE}::TopologicCore) + add_subdirectory(${PROJECT_SOURCE_DIR}/../TopologicCore ${PROJECT_BINARY_DIR}/TopologicCore) + endif() ++endif() + + # Dependency: TopologicCore +-target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAMESPACE}::TopologicCore) ++target_link_libraries(${PROJECT_NAME} PRIVATE TopologicCore) + + + # install definitions +@@ -66,7 +66,7 @@ install(TARGETS ${PROJECT_NAME} + + # set install rpaths to origin if TopologicCore is built as a shared lib + # in this case TopologicCore is expected to be copied into the TopologicPythonBindings install dir post-install +-get_property(TopologicCore_TARGET_TYPE TARGET TopologicCore PROPERTY TYPE) ++set(TopologicCore_TARGET_TYPE SHARED_LIBRARY) + if (${TopologicCore_TARGET_TYPE} STREQUAL SHARED_LIBRARY) + if(NOT CMAKE_INSTALL_RPATH) + if(NOT APPLE) diff --git a/math/topologic/Makefile b/math/topologic/Makefile index 215e91921fa6..12ebcf6e5c84 100644 --- a/math/topologic/Makefile +++ b/math/topologic/Makefile @@ -1,28 +1,27 @@ PORTNAME= topologic DISTVERSIONPREFIX= v -DISTVERSION= 0.6.0-3 -PORTREVISION= 2 -DISTVERSIONSUFFIX= -gdbddce9 +DISTVERSION= 6.0.2 CATEGORIES= math PKGNAMESUFFIX= -space-modeling-library MAINTAINER= yuri@FreeBSD.org COMMENT= Library for topological representations of architectural spaces WWW= https://topologic.app/ LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE -LIB_DEPENDS= libTKernel.so:cad/opencascade \ +LIB_DEPENDS= libtbb.so:devel/onetbb \ + libTKernel.so:cad/opencascade \ libuuid.so:misc/e2fsprogs-libuuid USES= cmake compiler:c++14-lang localbase:ldflags -USE_LDCONFIG= yes +USE_LDCONFIG= ${PREFIX}/lib/TopologicCore USE_GITHUB= yes GH_ACCOUNT= wassimj GH_PROJECT= Topologic CMAKE_ARGS= -DOCC_INCLUDE_DIR=${LOCALBASE}/include/OpenCASCADE .include diff --git a/math/topologic/distinfo b/math/topologic/distinfo index f0e003b311c1..35490e0ff7b1 100644 --- a/math/topologic/distinfo +++ b/math/topologic/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1668894036 -SHA256 (wassimj-Topologic-v0.6.0-3-gdbddce9_GH0.tar.gz) = fc974cde5d036d38b80dfe199bd8f04c02b2ee73478a5a4fdcc6662c23b5490b -SIZE (wassimj-Topologic-v0.6.0-3-gdbddce9_GH0.tar.gz) = 3848416 +TIMESTAMP = 1714892488 +SHA256 (wassimj-Topologic-v6.0.2_GH0.tar.gz) = 5a56c4847879e43d82e28db4d7f113e68d0f19bd9532aefcebeb6df92441058f +SIZE (wassimj-Topologic-v6.0.2_GH0.tar.gz) = 274112 diff --git a/math/topologic/files/patch-CMakeLists.txt b/math/topologic/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..5f2b6955a614 --- /dev/null +++ b/math/topologic/files/patch-CMakeLists.txt @@ -0,0 +1,7 @@ +--- CMakeLists.txt.orig 2024-05-05 07:06:42 UTC ++++ CMakeLists.txt +@@ -12,4 +12,3 @@ add_subdirectory(TopologicCore) + + # Sub-projects + add_subdirectory(TopologicCore) +-add_subdirectory(TopologicPythonBindings) diff --git a/math/topologic/files/patch-TopologicCore_CMakeLists.txt b/math/topologic/files/patch-TopologicCore_CMakeLists.txt deleted file mode 100644 index 5f694111c83a..000000000000 --- a/math/topologic/files/patch-TopologicCore_CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ ---- TopologicCore/CMakeLists.txt.orig 2022-01-30 22:24:17 UTC -+++ TopologicCore/CMakeLists.txt -@@ -378,6 +378,7 @@ endif() - ################################################################################ - # Post build events - ################################################################################ -+if (FALSE) - if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Any CPU") - add_custom_command_if( - TARGET ${PROJECT_NAME} -@@ -414,6 +415,7 @@ elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") - COMMANDS - COMMAND $ copy "$references\\opencascade-7.4.0\\win32\\vc14\\bin\\*.dll" "$output\\${CMAKE_VS_PLATFORM_NAME}\\$" - ) -+endif() - endif() - - ################################################################################ diff --git a/math/topologic/pkg-plist b/math/topologic/pkg-plist index dbdec39b1e79..01157daff640 100644 --- a/math/topologic/pkg-plist +++ b/math/topologic/pkg-plist @@ -1,57 +1,57 @@ include/TopologicCore/About.h include/TopologicCore/Aperture.h include/TopologicCore/ApertureFactory.h include/TopologicCore/Attribute.h include/TopologicCore/AttributeManager.h include/TopologicCore/Bitwise.h include/TopologicCore/Cell.h include/TopologicCore/CellComplex.h include/TopologicCore/CellComplexFactory.h include/TopologicCore/CellFactory.h include/TopologicCore/Cluster.h include/TopologicCore/ClusterFactory.h include/TopologicCore/ContentManager.h include/TopologicCore/Context.h include/TopologicCore/ContextManager.h include/TopologicCore/Dictionary.h include/TopologicCore/DoubleAttribute.h include/TopologicCore/Edge.h include/TopologicCore/EdgeFactory.h include/TopologicCore/Face.h include/TopologicCore/FaceFactory.h include/TopologicCore/Geometry.h -include/TopologicCore/GlobalCluster.h include/TopologicCore/Graph.h include/TopologicCore/InstanceGUIDManager.h include/TopologicCore/IntAttribute.h include/TopologicCore/Line.h include/TopologicCore/ListAttribute.h include/TopologicCore/NurbsCurve.h include/TopologicCore/NurbsSurface.h include/TopologicCore/PlanarSurface.h include/TopologicCore/Shell.h include/TopologicCore/ShellFactory.h include/TopologicCore/StringAttribute.h include/TopologicCore/Surface.h include/TopologicCore/TopologicalQuery.h include/TopologicCore/Topology.h include/TopologicCore/TopologyFactory.h include/TopologicCore/TopologyFactoryManager.h include/TopologicCore/Utilities.h include/TopologicCore/Utilities/CellUtility.h include/TopologicCore/Utilities/Direction.h include/TopologicCore/Utilities/EdgeUtility.h include/TopologicCore/Utilities/FaceUtility.h +include/TopologicCore/Utilities/Guid.h include/TopologicCore/Utilities/ShellUtility.h include/TopologicCore/Utilities/TopologyUtility.h include/TopologicCore/Utilities/TransformationMatrix2D.h include/TopologicCore/Utilities/Vector.h include/TopologicCore/Utilities/VertexUtility.h include/TopologicCore/Utilities/WireUtility.h include/TopologicCore/Vertex.h include/TopologicCore/VertexFactory.h include/TopologicCore/Wire.h include/TopologicCore/WireFactory.h -lib/libTopologicCore.so -lib/libTopologicCore.so.0 -lib/libTopologicCore.so.0.0.0 +lib/TopologicCore/libTopologicCore.so +lib/TopologicCore/libTopologicCore.so.6 +lib/TopologicCore/libTopologicCore.so.6.0.0