public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/earcut-hpp] rawhide: Update to version 3.2.3 (close RHBZ#2496844)
@ 2026-07-05 7:01 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-07-05 7:01 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/earcut-hpp
Branch : rawhide
Commit : 690eea6f6f76c0e29d9e4f35c7cb6b117c2e1055
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-07-05T07:18:41+01:00
Stats : +50/-131 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/earcut-hpp/c/690eea6f6f76c0e29d9e4f35c7cb6b117c2e1055?branch=rawhide
Log:
Update to version 3.2.3 (close RHBZ#2496844)
---
diff --git a/.gitignore b/.gitignore
index 67bc5c4..c2c7e54 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
/earcut.hpp-2.2.3.tar.gz
/earcut.hpp-2.2.4.tar.gz
+/earcut.hpp-3.2.3.tar.gz
+/earcut-3.2.3.tar.gz
diff --git a/0001-Use-a-range-for-CMake-minimum-versions-3.2.3.12-supp.patch b/0001-Use-a-range-for-CMake-minimum-versions-3.2.3.12-supp.patch
deleted file mode 100644
index c7bbd49..0000000
--- a/0001-Use-a-range-for-CMake-minimum-versions-3.2.3.12-supp.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 5e20982db23a736d28aeb6729912ff85575add30 Mon Sep 17 00:00:00 2001
-From: "Benjamin A. Beasley" <code@musicinmybrain.net>
-Date: Thu, 6 Mar 2025 06:58:00 -0500
-Subject: [PATCH] Use a range for CMake minimum versions, 3.2...3.12: support
- CMake 4.0
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-CMake 4.0 drops support for CMake <3.5, so minimum versions need to be
-adjusted for forward compatibility. Since CMake <3.10 is already
-deprecated, and 3.12 is the first “modern” CMake release, let’s support
-policy versions up to 3.12.
-
-https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3f65107..6626569 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 3.2)
-+cmake_minimum_required(VERSION 3.2...3.12)
- project(earcut_hpp)
-
- option(EARCUT_BUILD_TESTS "Build the earcut test program" ON)
---
-2.48.1
-
diff --git a/120.patch b/120.patch
deleted file mode 100644
index d6bd296..0000000
--- a/120.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From c2e3621bff8fc99ade9859661b2e09e372a99f2c Mon Sep 17 00:00:00 2001
-From: "Benjamin A. Beasley" <code@musicinmybrain.net>
-Date: Thu, 16 Jan 2025 15:31:10 -0500
-Subject: [PATCH] Include <cstdint> for uint32_t/int32_t
-
-Fixes failure to compile on GCC 15.
----
- include/mapbox/earcut.hpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/include/mapbox/earcut.hpp b/include/mapbox/earcut.hpp
-index b98508f..fd33814 100644
---- a/include/mapbox/earcut.hpp
-+++ b/include/mapbox/earcut.hpp
-@@ -4,6 +4,7 @@
- #include <cassert>
- #include <cmath>
- #include <cstddef>
-+#include <cstdint>
- #include <limits>
- #include <memory>
- #include <utility>
diff --git a/earcut-hpp.spec b/earcut-hpp.spec
index 0c40164..a811e8d 100644
--- a/earcut-hpp.spec
+++ b/earcut-hpp.spec
@@ -1,62 +1,59 @@
+%bcond ctest 1
+
Name: earcut-hpp
Summary: Fast, header-only polygon triangulation
-Version: 2.2.4
+Version: 3.2.3
Release: %autorelease
# SPDX
License: ISC
-# Additionally, a copy of libtess2 (https://github.com/memononen/libtess2) is
-# bundled with the tests as a reference implementation
-# (test/comparison/libtess2/); its license is SGI-B-2.0. We do not treat it as
-# a bundled system library (no virtual Provides, for example) because it is
-# provably used only in the tests, and does not contribute to anything
-# installed in the binary RPM. All of this is just as well, as libtess2 is
-# unmaintained and we would rather not have to package it separately.
-SourceLicense: %{license} AND SGI-B-2.0
URL: https://github.com/mapbox/earcut.hpp
-Source: %{url}/archive/v%{version}/earcut.hpp-%{version}.tar.gz
-
-# Include <cstdint> for uint32_t/int32_t
-#
-# Fixes failure to compile on GCC 15.
-# https://github.com/mapbox/earcut.hpp/pull/120
-Patch: %{url}/pull/120.patch
-# Use a range for CMake minimum versions, 3.2...3.12: support CMake 4.0
-# https://github.com/mapbox/earcut.hpp/pull/121
-# Cherry-picked on v2.2.4.
-Patch: 0001-Use-a-range-for-CMake-minimum-versions-3.2.3.12-supp.patch
+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:
- -DEARCUT_BUILD_TESTS:BOOL=ON
+ -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++
-
-# For tests (and benchmarks, if enabled):
-BuildRequires: pkgconfig(opengl)
-
+# 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 C++ port of earcut.js, a fast, header-only polygon triangulation library.
-
-The library implements a modified ear slicing algorithm, optimized by z-order
-curve hashing and extended to handle holes, twisted polygons, degeneracies and
-self-intersections in a way that doesn’t guarantee correctness of
+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 like geographical shapes.
-
-It’s based on ideas from FIST: Fast Industrial-Strength Triangulation of
+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}
@@ -73,51 +70,23 @@ Provides: %{name}-static = %{version}-%{release}
%description devel %{common_description}
-%prep -a
-# Increase precision of test output so we can understand any failures:
-sed --regexp-extended --in-place \
- 's/(setprecision\()6(\))/\116\2/' test/test.cpp
-
-
-%conf -p
-# Disabling floating-point contraction fixes certain failures on aarch64,
-# ppc64le, and s390x. See:
-#
-# Test “self_touching” fails on aarch64, ppc64le, s390x
-# https://github.com/mapbox/earcut.hpp/issues/97
-#
-# particularly
-#
-# https://github.com/mapbox/earcut.hpp/issues/97#issuecomment-1032813710
-#
-# and also
-#
-# New test “issue142” in 2.2.4 fails on aarch64, ppc64le, s390x
-# https://github.com/mapbox/earcut.hpp/issues/103
-#
-# Since this library is header-only, dependent packages should be advised to
-# add this flag too if they want the behavior of the library to exactly match
-# upstream’s expectations.
-export CXXFLAGS="${CXXFLAGS-} -ffp-contract=off"
-
-
-%install
-# The upstream CMakeLists.txt has no install target; there is only one file to
-# copy, so it is easy to do manually.
-install -D --preserve-timestamps --mode=0644 \
- --target='%{buildroot}%{_includedir}/mapbox' \
- 'include/mapbox/earcut.hpp'
-
-
-%check
-# The upstream CMakeLists.txt is not configured to run tests via ctest; we run
-# the test executable manually.
-%{_vpath_builddir}/tests
-
+%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 CHANGELOG.md
%doc README.md
# All -devel packages for C and C++ libraries from Mapbox should co-own this
@@ -125,6 +94,7 @@ install -D --preserve-timestamps --mode=0644 \
%dir %{_includedir}/mapbox
%{_includedir}/mapbox/earcut.hpp
+%{_datadir}/cmake/earcut_hpp/
%changelog
diff --git a/sources b/sources
index 3f48449..5e5848e 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-SHA512 (earcut.hpp-2.2.4.tar.gz) = 87f52bf99273dc47f78ebacd4ee0ccbab4edd3f9b85d97aed1c0d1165b3e2523e1a71f3a37a118e82170e79d57a2e09644d4115facb63dc6f704affb9c428e6b
+SHA512 (earcut.hpp-3.2.3.tar.gz) = 15f5ea72bddf63549bc7a178009ccc949bf078f45f527bd9d41d4e40b5972e09f5c61dd25375bf12dd7a623f9ad0df556733aa1492153c214715ad4319cb21ed
+SHA512 (earcut-3.2.3.tar.gz) = 7d870c63a595600b6b2fcaafcc5a52c580b1018730fa146db4e4996d7db72bd391844c7f47db9c40f9175464fd5409ac30ec8e6bc6526815c00aba5f62dfb310
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-05 7:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-05 7:01 [rpms/earcut-hpp] rawhide: Update to version 3.2.3 (close RHBZ#2496844) Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox