# The Clipper C++ crystallographic library already uses the name "clipper". # The developer is fine with the choosen name polyclipping for the previous version # of the library. This rpm packages the "clipper2" polygon clipping library Name: polyclipping2 Version: 1.3.0 Release: 1%{?dist} Summary: Polygon clipping library v2 License: BSL-1.0 URL: https://angusj.com/clipper2/Docs/Overview.htm Source0: https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_%{version}.tar.gz Patch0: clipper2-removegtest.patch Patch1: clipper2-compile.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: gtest-devel %description This library primarily performs the boolean clipping operations - intersection, union, difference & xor - on 2D polygons. It also performs polygon offsetting. The library handles complex (self-intersecting) polygons, polygons with holes and polygons with overlapping co-linear edges. Input polygons for clipping can use EvenOdd, NonZero, Positive and Negative filling modes. The clipping code is based on the Vatti clipping algorithm, and outperforms other clipping libraries. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %autosetup -n Clipper2-Clipper2_%{version} -p0 rm -rf CPP/Tests/googletest %build pushd CPP %cmake %cmake_build popd %install pushd CPP %cmake_install popd %check pushd CPP %if 0%{?fedora} pushd redhat-linux-build %endif ./ClipperTests ./ClipperTestsZ %if 0%{?fedora} popd %endif popd %files %license LICENSE %doc README.md %{_libdir}/libClipper2.so.* %{_libdir}/libClipper2Z.so.* %files devel %{_libdir}/pkgconfig/Clipper2.pc %{_libdir}/pkgconfig/Clipper2Z.pc %{_includedir}/clipper2/ %{_libdir}/libClipper2.so %{_libdir}/libClipper2Z.so %changelog * Wed Jun 05 2024 Thomas Sailer - 1.3.0-1 - Initial package based on polyclipping