[earcut-hpp] update to 3.2.3 (#53273)

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
toge 2026-08-12 01:42:19 +09:00 committed by GitHub
parent 391dd26fda
commit d7fdd16b4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 65 additions and 32 deletions

View File

@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9809c08..1434ee6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,7 @@ target_include_directories(earcut_hpp INTERFACE
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+if (EARCUT_BUILD_TESTS OR EARCUT_BUILD_BENCH OR EARCUT_BUILD_VIZ)
# Fixtures and their expectations are read at runtime from the mapbox/earcut JS repo,
# fetched here and pinned by tag (kept in lockstep with the port — bump on version updates).
FetchContent_Declare(earcut_js
@@ -99,6 +100,7 @@ if (EARCUT_WARNING_IS_ERROR)
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Werror>
)
endif()
+endif()
if (EARCUT_BUILD_TESTS)
enable_testing()

View File

@ -1,12 +0,0 @@
diff --git a/include/mapbox/earcut.hpp b/include/mapbox/earcut.hpp
index a73ae87..6d30bc7 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>

View File

@ -1,15 +1,26 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mapbox/earcut.hpp
REF "v${VERSION}"
SHA512 87f52bf99273dc47f78ebacd4ee0ccbab4edd3f9b85d97aed1c0d1165b3e2523e1a71f3a37a118e82170e79d57a2e09644d4115facb63dc6f704affb9c428e6b
HEAD_REF master
PATCHES
include-cstdint.patch # this patch is alread merged. remove it once the next version is released.
)
# This is a header only library
file(INSTALL "${SOURCE_PATH}/include/mapbox/earcut.hpp" DESTINATION "${CURRENT_PACKAGES_DIR}/include/mapbox")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mapbox/earcut.hpp
REF "v${VERSION}"
SHA512 15f5ea72bddf63549bc7a178009ccc949bf078f45f527bd9d41d4e40b5972e09f5c61dd25375bf12dd7a623f9ad0df556733aa1492153c214715ad4319cb21ed
HEAD_REF master
PATCHES
disable-tools.patch
)
set(VCPKG_BUILD_TYPE release) # header-only
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DEARCUT_BUILD_TESTS=OFF
-DEARCUT_BUILD_BENCH=OFF
-DEARCUT_BUILD_VIZ=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(
PACKAGE_NAME earcut_hpp
CONFIG_PATH share/cmake/earcut_hpp
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,8 +1,17 @@
{
"name": "earcut-hpp",
"version": "2.2.4",
"port-version": 1,
"version": "3.2.3",
"description": "earcut.hpp is a C++ port of earcut.js, a fast, header-only polygon triangulation library.",
"homepage": "https://github.com/mapbox/earcut.hpp",
"license": "ISC"
"license": "ISC",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -2721,8 +2721,8 @@
"port-version": 0
},
"earcut-hpp": {
"baseline": "2.2.4",
"port-version": 1
"baseline": "3.2.3",
"port-version": 0
},
"eastl": {
"baseline": "3.27.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "da0c9cdb1eb196a33cd9713c903b429f8c1a09f7",
"version": "3.2.3",
"port-version": 0
},
{
"git-tree": "0cddb3e60853e9d725903c4fbf10336b35698166",
"version": "2.2.4",