diff --git a/ports/earcut-hpp/disable-tools.patch b/ports/earcut-hpp/disable-tools.patch new file mode 100644 index 0000000000..429b4c507c --- /dev/null +++ b/ports/earcut-hpp/disable-tools.patch @@ -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) + $<$>:-Werror> + ) + endif() ++endif() + + if (EARCUT_BUILD_TESTS) + enable_testing() diff --git a/ports/earcut-hpp/include-cstdint.patch b/ports/earcut-hpp/include-cstdint.patch deleted file mode 100644 index 806c651216..0000000000 --- a/ports/earcut-hpp/include-cstdint.patch +++ /dev/null @@ -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 - #include - #include -+#include - #include - #include - #include diff --git a/ports/earcut-hpp/portfile.cmake b/ports/earcut-hpp/portfile.cmake index 607e13cf10..054c19758f 100644 --- a/ports/earcut-hpp/portfile.cmake +++ b/ports/earcut-hpp/portfile.cmake @@ -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") diff --git a/ports/earcut-hpp/vcpkg.json b/ports/earcut-hpp/vcpkg.json index 7fece37f93..a60ef63e71 100644 --- a/ports/earcut-hpp/vcpkg.json +++ b/ports/earcut-hpp/vcpkg.json @@ -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 + } + ] } diff --git a/versions/baseline.json b/versions/baseline.json index a559b2596b..ed391935df 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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", diff --git a/versions/e-/earcut-hpp.json b/versions/e-/earcut-hpp.json index 6b9f5efd5e..2f5950394a 100644 --- a/versions/e-/earcut-hpp.json +++ b/versions/e-/earcut-hpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "da0c9cdb1eb196a33cd9713c903b429f8c1a09f7", + "version": "3.2.3", + "port-version": 0 + }, { "git-tree": "0cddb3e60853e9d725903c4fbf10336b35698166", "version": "2.2.4",