## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond ctest 1 Name: earcut-hpp Summary: Fast, header-only polygon triangulation Version: 3.2.3 Release: %autorelease # SPDX License: ISC URL: https://github.com/mapbox/earcut.hpp Source0: %{url}/archive/v%{version}/earcut.hpp-%{version}.tar.gz # The %%check section uses test fixtures from the JavaScript implementation, # normally downloaded at built time. This source is also licensed ISC, and does # not contribute to the binary RPMs. Source1: https://github.com/mapbox/earcut/archive/v%{version}/earcut-%{version}.tar.gz BuildSystem: cmake # We do want to build the tests, but we have no use for the benchmarks or the # visualizer program. BuildOption(conf): %{shrink: -DFETCHCONTENT_FULLY_DISCONNECTED:BOOL=ON -DEARCUT_BUILD_TESTS:BOOL=%{?with_ctest:ON}%{?!with_ctest:OFF} -DEARCUT_BUILD_BENCH:BOOL=OFF -DEARCUT_BUILD_VIZ:BOOL=OFF -DEARCUT_WARNING_IS_ERROR:BOOL=OFF } BuildRequires: gcc-c++ # We need picojson for a “fixtures” convenience library that is used by tests, # benchmarks, and the visualization tool. Of these, we only build tests, and # these are conditional, but the fixtures library is built unconditionally. BuildRequires: picojson-devel %if %{with ctest} # This, at least, is only required when tests are actually enabled. BuildRequires: cmake(gtest) %endif # No compiled binaries are installed, so this would be empty. %global debug_package %{nil} %global common_description %{expand: A fast, header-only C++ port of earcut.js, the fastest and smallest JavaScript polygon triangulation library. Earcut favors raw speed and simplicity over triangulation quality, while being robust enough to handle most practical datasets without crashing or producing garbage, with an option to refine the result to Delaunay quality at a small cost. Originally built for Mapbox GL, it’s a good fit for real-time triangulation of geographical shapes and other practical data. It implements a modified ear slicing algorithm, optimized by z-order curve and spatial hashing and extended to handle holes, twisted polygons, degeneracies and self-intersections in a way that doesn’t guarantee correctness of triangulation, but attempts to always produce acceptable results for practical data. It’s based on ideas from FIST: Fast Industrial-Strength Triangulation of Polygons by Martin Held and Triangulation by Ear Clipping by David Eberly.} %description %{common_description} %package devel Summary: %{summary} BuildArch: noarch # Header-only library Provides: %{name}-static = %{version}-%{release} %description devel %{common_description} %if %{with ctest} %check -p # Tests require certain fixtures (sample data files) from the JavaScript # implementation’s sources. Mimic CMake’s FetchContent: # https://cmake.org/cmake/help/latest/module/FetchContent.html # By extracting this only in %%check, we prove it is not used in the build. xdir='%{_vpath_builddir}/_deps/earcut_js-src' mkdir --parents "${xdir}" tar --extract --gzip --verbose '--file=%{SOURCE1}' \ "--directory=${xdir}" --strip-components=1 \ 'earcut-%{version}/bench/tiles-fixture.bin' \ 'earcut-%{version}/test/expected.json' \ 'earcut-%{version}/test/fixtures/' %endif %files devel %license LICENSE %doc README.md # All -devel packages for C and C++ libraries from Mapbox should co-own this # directory. %dir %{_includedir}/mapbox %{_includedir}/mapbox/earcut.hpp %{_datadir}/cmake/earcut_hpp/ %changelog ## START: Generated by rpmautospec * Sun Jul 05 2026 Benjamin A. Beasley - 3.2.3-1 - Update to version 3.2.3 (close RHBZ#2496844) * Sun May 17 2026 Benjamin A. Beasley - 2.2.4-26 - Use the cmake declarative buildsystem * Fri May 15 2026 Benjamin A. Beasley - 2.2.4-25 - Use various long options * Fri Mar 13 2026 Benjamin A. Beasley - 2.2.4-24 - The ninja backend is the default now; don’t bother specifying it * Fri Jan 16 2026 Fedora Release Engineering - 2.2.4-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Wed Jul 23 2025 Fedora Release Engineering - 2.2.4-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Thu Mar 06 2025 Benjamin A. Beasley - 2.2.4-20 - Another iteration of patching for CMake 4 * Thu Mar 06 2025 Benjamin A. Beasley - 2.2.4-19 - Updated CMake 4 patch based on upstream feedback * Thu Mar 06 2025 Benjamin A. Beasley - 2.2.4-18 - Patch for CMake 4.0 * Thu Jan 16 2025 Benjamin A. Beasley - 2.2.4-17 - Patch for GCC 15 * Thu Jan 16 2025 Fedora Release Engineering - 2.2.4-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Thu Dec 12 2024 Benjamin A. Beasley - 2.2.4-15 - Add a SourceLicense field * Fri Nov 01 2024 Benjamin A. Beasley - 2.2.4-14 - Invoke %%cmake in %%conf rather than in %%build * Wed Jul 17 2024 Fedora Release Engineering - 2.2.4-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Wed Jan 24 2024 Fedora Release Engineering - 2.2.4-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 2.2.4-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Jul 19 2023 Fedora Release Engineering - 2.2.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sat Jun 03 2023 Benjamin A. Beasley - 2.2.4-8 - Remove explicit %%set_build_flags, not needed since F36 * Thu Jan 19 2023 Fedora Release Engineering - 2.2.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Sep 08 2022 Benjamin A. Beasley - 2.2.4-4 - Fix missing “export” in spec file * Thu Sep 08 2022 Benjamin A. Beasley - 2.2.4-3 - Fix missing upstream bug URL in spec file comment * Wed Sep 07 2022 Benjamin A. Beasley - 2.2.4-2 - Fix new test failures on aarch64, ppc64le, s390x * Wed Sep 07 2022 Benjamin A. Beasley - 2.2.4-1 - Update to 2.2.4 (close RHBZ#2124846) * Mon Aug 01 2022 Benjamin A. Beasley - 2.2.3-6 - Confirm that License is SPDX ISC (no License field change) * Thu Jul 21 2022 Fedora Release Engineering - 2.2.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Sat Apr 16 2022 Benjamin A. Beasley - 2.2.3-4 - Stop numbering patches * Thu Jan 20 2022 Fedora Release Engineering - 2.2.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Dec 16 2021 Benjamin A. Beasley - 2.2.3-2 - Let the -devel package be noarch * Tue Oct 26 2021 Benjamin A. Beasley - 2.2.3-1 - Initial package (close RHBZ#2006590) ## END: Generated by rpmautospec