aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-12-03 09:17:57 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-12-03 09:47:44 +0000
commit27ca116ba8283c5aebf6024b9db878a84fb2fe7a (patch)
tree4238e5d8c6d96465d21437b3714b5c792119abb3
parentb19fde26dc855aa9e0f4edd22e42b8c2bd822fe1 (diff)
downloadports-27ca116ba8283c5aebf6024b9db878a84fb2fe7a.tar.gz
ports-27ca116ba8283c5aebf6024b9db878a84fb2fe7a.zip
science/polytope: New port: Library for generating Voronoi and Voronoi-like tessellations
-rw-r--r--science/Makefile1
-rw-r--r--science/polytope/Makefile33
-rw-r--r--science/polytope/distinfo3
-rw-r--r--science/polytope/files/patch-CMakeLists.txt11
-rw-r--r--science/polytope/files/patch-src_CMakeLists.txt22
-rw-r--r--science/polytope/pkg-descr8
-rw-r--r--science/polytope/pkg-plist45
7 files changed, 123 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile
index e9d5ac65faf8..2b60a49bfe35 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -265,6 +265,7 @@
SUBDIR += phonopy
SUBDIR += plumed
SUBDIR += pnetcdf
+ SUBDIR += polytope
SUBDIR += precice
SUBDIR += psi4
SUBDIR += pulseview
diff --git a/science/polytope/Makefile b/science/polytope/Makefile
new file mode 100644
index 000000000000..f8f70b3177ca
--- /dev/null
+++ b/science/polytope/Makefile
@@ -0,0 +1,33 @@
+PORTNAME= polytope
+DISTVERSION= 0.6.2-2
+DISTVERSIONSUFFIX= -g764fd19
+CATEGORIES= science
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Library for generating Voronoi and Voronoi-like tessellations
+WWW= https://github.com/pbtoast/polytope
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${LOCALBASE}/include/boost/geometry.hpp:devel/boost-libs
+LIB_DEPENDS= libsz.so:science/libaec
+
+USES= cmake:testing
+USE_LDCONFIG= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= pbtoast
+
+CMAKE_ON= BUILD_SHARED_LIBS
+CMAKE_OFF= TESTING
+CMAKE_TESTING_ON= TESTING # 1 test is known to fail, see https://github.com/pbtoast/polytope/issues/18
+
+OPTIONS_DEFINE= SILO
+OPTIONS_DEFAULT= SILO
+
+SILO_DESC= Use SILO reader/writer
+SILO_CMAKE_BOOL= USE_SILO
+SILO_LIB_DEPENDS= libsiloh5.so:science/silo
+
+.include <bsd.port.mk>
diff --git a/science/polytope/distinfo b/science/polytope/distinfo
new file mode 100644
index 000000000000..90a3e187be3a
--- /dev/null
+++ b/science/polytope/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1670054925
+SHA256 (pbtoast-polytope-0.6.2-2-g764fd19_GH0.tar.gz) = e28a965271e3c1c4cd09c015d7f1d4410b3092a64b994c41d27b9c577bebdc8c
+SIZE (pbtoast-polytope-0.6.2-2-g764fd19_GH0.tar.gz) = 6858333
diff --git a/science/polytope/files/patch-CMakeLists.txt b/science/polytope/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..9e78993b664c
--- /dev/null
+++ b/science/polytope/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2022-12-03 08:13:57 UTC
++++ CMakeLists.txt
+@@ -10,7 +10,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modul
+ project(Polytope)
+
+ # We require at least C++11
+-set(CMAKE_CXX_STANDARD 11)
++set(CMAKE_CXX_STANDARD 14)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ set(CMAKE_CXX_EXTENSIONS OFF)
+
diff --git a/science/polytope/files/patch-src_CMakeLists.txt b/science/polytope/files/patch-src_CMakeLists.txt
new file mode 100644
index 000000000000..731eabaac985
--- /dev/null
+++ b/science/polytope/files/patch-src_CMakeLists.txt
@@ -0,0 +1,22 @@
+- uses std::integer_sequence C++14 feature
+
+--- src/CMakeLists.txt.orig 2022-12-03 08:18:04 UTC
++++ src/CMakeLists.txt
+@@ -17,7 +17,7 @@ endif()
+ # TriangleTessellator and triangle source
+ if (HAVE_TRIANGLE)
+ list(APPEND TESSELLATOR_SOURCES TriangleTessellator.cc)
+- add_library(triangle STATIC predicates.cc triangle.c)
++ add_library(triangle predicates.cc triangle.c)
+ #set(TRIANGLE_LIB triangle PARENT_SCOPE)
+ set(TRIANGLE_LIB triangle)
+ set_target_properties(triangle PROPERTIES
+@@ -49,7 +49,7 @@ endif()
+ file(GLOB HEADERS *.hh)
+ list(APPEND HEADERS "${PROJECT_BINARY_DIR}/polytope.hh")
+
+-add_library(polytope STATIC
++add_library(polytope
+ ${TESSELLATOR_SOURCES} ${IO_SOURCES} ErrorHandler.cc
+ polytope_internal_abort.cc)
+
diff --git a/science/polytope/pkg-descr b/science/polytope/pkg-descr
new file mode 100644
index 000000000000..fbeefbde9e46
--- /dev/null
+++ b/science/polytope/pkg-descr
@@ -0,0 +1,8 @@
+Polytope is a C++ library for generating polygonal and polyhedral meshes.
+It makes use of various 2D and 3D tessellation techniques, but provides
+a single representation for these tessellations, and a simple interface
+for generating them.
+
+Polytope has a simple C interface for use with other languages. It also
+includes bindings for Python. These bindings allow you to easily incorporate
+Polytope into your own mesh generation tools.
diff --git a/science/polytope/pkg-plist b/science/polytope/pkg-plist
new file mode 100644
index 000000000000..1a3ad063500d
--- /dev/null
+++ b/science/polytope/pkg-plist
@@ -0,0 +1,45 @@
+include/polytope/BoostOrphanage.hh
+include/polytope/BoostTessellator.hh
+include/polytope/BoostTessellatorTraits.hh
+include/polytope/Clipper2d.hh
+include/polytope/DimensionTraits.hh
+include/polytope/ErrorHandler.hh
+include/polytope/IntPointMap.hh
+include/polytope/KeyTraits.hh
+include/polytope/MeshEditor.hh
+include/polytope/OrphanageBase.hh
+include/polytope/PLC.hh
+include/polytope/PLC_Boost_2d.hh
+include/polytope/PLC_CSG_2d.hh
+include/polytope/PLC_CSG_3d.hh
+include/polytope/Point.hh
+include/polytope/QuantTessellation.hh
+include/polytope/QuantizedCoordinates.hh
+include/polytope/QuantizedTessellation2d.hh
+include/polytope/QuantizedTessellation3d.hh
+include/polytope/ReducedPLC.hh
+include/polytope/SiloReader.hh
+include/polytope/SiloWriter.hh
+include/polytope/Tessellation.hh
+include/polytope/Tessellator.hh
+include/polytope/TessellatorInline.hh
+include/polytope/TetgenTessellator.hh
+include/polytope/TriangleTessellator.hh
+include/polytope/VoroPP_2d.hh
+include/polytope/VoroPP_3d.hh
+include/polytope/clipQuantizedTessellation.hh
+include/polytope/convexHull_2d.hh
+include/polytope/convexHull_3d.hh
+include/polytope/findBoundaryElements.hh
+include/polytope/makeBoxPLC.hh
+include/polytope/polytope.hh
+include/polytope/polytope_geometric_utilities.hh
+include/polytope/polytope_internal.hh
+include/polytope/polytope_parallel_utilities.hh
+include/polytope/polytope_serialize.hh
+include/polytope/polytope_tessellator_utilities.hh
+include/polytope/polytope_write_OOGL.hh
+include/polytope/removeElements.hh
+include/polytope/simplifyPLCfacets.hh
+include/polytope/snapToBoundary.hh
+lib/libpolytope.so