git: 0dce9995e605 - main - math/polyclipper: New port: Library to clip polygons (in 2D) and polyhedra (in 3D) by planes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Dec 2022 21:56:58 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=0dce9995e60532c01b84c3fc0b008ce017811f36 commit 0dce9995e60532c01b84c3fc0b008ce017811f36 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2022-12-03 21:55:34 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2022-12-03 21:56:55 +0000 math/polyclipper: New port: Library to clip polygons (in 2D) and polyhedra (in 3D) by planes --- math/Makefile | 1 + math/polyclipper/Makefile | 36 +++++++++++++++++++++++++++++ math/polyclipper/distinfo | 7 ++++++ math/polyclipper/files/patch-CMakeLists.txt | 32 +++++++++++++++++++++++++ math/polyclipper/pkg-descr | 8 +++++++ math/polyclipper/pkg-plist | 11 +++++++++ 6 files changed, 95 insertions(+) diff --git a/math/Makefile b/math/Makefile index 46326e070e49..9808e93301c4 100644 --- a/math/Makefile +++ b/math/Makefile @@ -842,6 +842,7 @@ SUBDIR += ploticus-nox11 SUBDIR += plplot SUBDIR += poly2tri + SUBDIR += polyclipper SUBDIR += polylib SUBDIR += polymake SUBDIR += primecount diff --git a/math/polyclipper/Makefile b/math/polyclipper/Makefile new file mode 100644 index 000000000000..c18d8c3713b0 --- /dev/null +++ b/math/polyclipper/Makefile @@ -0,0 +1,36 @@ +PORTNAME= polyclipper +DISTVERSIONPREFIX= v +DISTVERSION= 1.2.3-2 +DISTVERSIONSUFFIX= -g2a727eb +CATEGORIES= math + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Library to clip polygons (in 2D) and polyhedra (in 3D) by planes +WWW= https://github.com/LLNL/PolyClipper + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= cmake + +USE_GITHUB= yes +GH_ACCOUNT= LLNL +GH_PROJECT= PolyClipper +GH_TUPLE= llnl:blt:0ae6bd2:blt/cmake/blt \ + jmikeowen:PYB11Generator:f351df2:cmake/PYB11Generator + +CMAKE_ON= ENABLE_CXXONLY # otherwise it looks for python2 +CMAKE_OFF= BUILD_TESTING + +NO_BUILD= yes +NO_ARCH= yes + +do-test: +.for f in test_array_vector_2d.cc test_array_vector_3d.cc + @${ECHO} "==> testing $f" + @cd ${WRKSRC}/test/test_array_vector && \ + ${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${f}.bin ${f} -I${STAGEDIR}${PREFIX}/include && \ + ./${f}.bin +.endfor + +.include <bsd.port.mk> diff --git a/math/polyclipper/distinfo b/math/polyclipper/distinfo new file mode 100644 index 000000000000..7faa1e547491 --- /dev/null +++ b/math/polyclipper/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1670066215 +SHA256 (LLNL-PolyClipper-v1.2.3-2-g2a727eb_GH0.tar.gz) = 6a0d2734a9cdc88e575134a7a4f0603456aa80d90fd316ace20f85d1526e7e98 +SIZE (LLNL-PolyClipper-v1.2.3-2-g2a727eb_GH0.tar.gz) = 275308 +SHA256 (llnl-blt-0ae6bd2_GH0.tar.gz) = a881609c8b3048487a230b696e38a48cb3f11c2a00bbb03034d0700fa18cf2d7 +SIZE (llnl-blt-0ae6bd2_GH0.tar.gz) = 1178467 +SHA256 (jmikeowen-PYB11Generator-f351df2_GH0.tar.gz) = 036462d577b08ac6e6c45eac4b691cda9314364ebb931dfd93d677a71c3b3e3d +SIZE (jmikeowen-PYB11Generator-f351df2_GH0.tar.gz) = 64833 diff --git a/math/polyclipper/files/patch-CMakeLists.txt b/math/polyclipper/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..24c560204f66 --- /dev/null +++ b/math/polyclipper/files/patch-CMakeLists.txt @@ -0,0 +1,32 @@ +--- CMakeLists.txt.orig 2021-12-29 18:25:59 UTC ++++ CMakeLists.txt +@@ -22,18 +22,18 @@ option(ENABLE_DOCS "enable the sphinx documentation" O + #------------------------------------------------------------------------------- + set(ENABLE_OPENMP ON CACHE BOOL "") + +-if (NOT POLYCLIPPER_BLT_DIR) ++if (FALSE AND NOT POLYCLIPPER_BLT_DIR) + set (POLYCLIPPER_BLT_REL_DIR "${PROJECT_SOURCE_DIR}/cmake/blt" CACHE PATH "") + get_filename_component(POLYCLIPPER_BLT_DIR "${POLYCLIPPER_BLT_REL_DIR}" ABSOLUTE) + endif() + +-if (NOT EXISTS "${POLYCLIPPER_BLT_DIR}/SetupBLT.cmake") ++if (FALSE AND NOT EXISTS "${POLYCLIPPER_BLT_DIR}/SetupBLT.cmake") + message(FATAL_ERROR + "${POLYCLIPPER_BLT_DIR} is not present.\n" + "call cmake with -DPOLYCLIPPER_BLT_DIR=/your/installation/of/blt\n") + endif() + +-include(${POLYCLIPPER_BLT_DIR}/SetupBLT.cmake) ++#include(${POLYCLIPPER_BLT_DIR}/SetupBLT.cmake) + + #------------------------------------------------------------------------------- + # Install +@@ -118,4 +118,6 @@ endif() + #------------------------------------------------------------------------------- + # Add any tests + #------------------------------------------------------------------------------- +-add_subdirectory(test/test_array_vector) ++if (BUILD_TESTING) ++ add_subdirectory(test/test_array_vector) ++endif() diff --git a/math/polyclipper/pkg-descr b/math/polyclipper/pkg-descr new file mode 100644 index 000000000000..fbeefbde9e46 --- /dev/null +++ b/math/polyclipper/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/math/polyclipper/pkg-plist b/math/polyclipper/pkg-plist new file mode 100644 index 000000000000..43c53739800a --- /dev/null +++ b/math/polyclipper/pkg-plist @@ -0,0 +1,11 @@ +include/polyclipper2d.hh +include/polyclipper2dImpl.hh +include/polyclipper3d.hh +include/polyclipper3dImpl.hh +include/polyclipper_adapter.hh +include/polyclipper_plane.hh +include/polyclipper_serialize.hh +include/polyclipper_serializeImpl.hh +include/polyclipper_utilities.hh +include/polyclipper_vector2d.hh +include/polyclipper_vector3d.hh