clipper2, new recipe, version 1.5.2 (#12009)

This commit is contained in:
Schrijvers Luc
2025-03-18 09:30:47 +00:00
committed by GitHub
parent 00f6d39289
commit 36aca2d118
2 changed files with 111 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
SUMMARY="Polygon Clipping and Offsetting Library"
DESCRIPTION="Clipper2 is an open source freeware software library (written in C++, C# and Delphi \
Pascal) that performs line and polygon clipping, and offsetting.
Clipper2 is a major update of my original Clipper library which I'm now calling Clipper1. \
Clipper1 was written over 10 years ago and although it still works very well, Clipper2 is much \
better. And Clipper2 has all the features of Clipper1 that sets Clipper apart from other polygon \
clipping libraries, including:
* being able to clip complex self-intersecting polygons
* support polygons with multiple filling rules (EvenOdd, NonZero, Positive, Negative)
* is numerically robust, and
* is free to use in both freeware and commercial applications"
HOMEPAGE="https://www.angusj.com/clipper2/Docs/Overview.htm"
COPYRIGHT="2010-2025 Angus Johnson"
LICENSE="BSL 1.0"
REVISION="1"
SOURCE_URI="https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_$portVersion.tar.gz"
CHECKSUM_SHA256="61b60a8a668958dafcd39443f8e0973693425666161e3ca24227097617c4d288"
SOURCE_DIR="Clipper2-Clipper2_$portVersion/CPP"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
clipper2$secondaryArchSuffix = $portVersion
lib:libClipper2$secondaryArchSuffix = $libVersionCompat
lib:libClipper2Z$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
clipper2${secondaryArchSuffix}_devel = $portVersion
devel:libClipper2$secondaryArchSuffix = $libVersionCompat
devel:libClipper2Z$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
clipper2$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DBUILD_SHARED_LIBS=ON \
-DCLIPPER2_EXAMPLES=OFF \
-DCLIPPER2_TESTS=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLibs \
libClipper2 \
libClipper2Z
fixPkgconfig
# Fix usage of hardcoded "/include":
sed -e "s|\(\${_IMPORT_PREFIX}\)/include|\1/$relativeIncludeDir|" -i \
$libDir/cmake/clipper2/Clipper2Targets.cmake
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
ctest --test-dir build --output-on-failure
}

View File

@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.