Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/absl/container/CMakeLists.txt b/absl/container/CMakeLists.txt
index 365c6ea..d12e585 100644
--- a/absl/container/CMakeLists.txt
+++ b/absl/container/CMakeLists.txt
@@ -1119,6 +1119,7 @@ absl_cc_library(
absl::config
absl::test_instance_tracker
GTest::gmock
+ TESTONLY
)

absl_cc_library(
20 changes: 20 additions & 0 deletions native~/vcpkg/ports/abseil/fix-mingw-dll.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake
--- a/CMake/AbseilDll.cmake
+++ b/CMake/AbseilDll.cmake
@@ -457,12 +457,14 @@ set(ABSL_INTERNAL_DLL_FILES
"strings/string_view.h"
)

-if(MSVC)
+if(MSVC OR MINGW)
list(APPEND ABSL_INTERNAL_DLL_FILES
"time/internal/cctz/src/time_zone_name_win.cc"
"time/internal/cctz/src/time_zone_name_win.h"
)
-else()
+endif()
+
+if(NOT MSVC)
list(APPEND ABSL_INTERNAL_DLL_FILES
"flags/commandlineflag.cc"
"flags/commandlineflag.h"
25 changes: 25 additions & 0 deletions native~/vcpkg/ports/abseil/fix-uwp-time-zone-lookup.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- a/absl/time/internal/cctz/src/time_zone_lookup.cc
+++ b/absl/time/internal/cctz/src/time_zone_lookup.cc
@@ -42,8 +42,12 @@
#include "absl/time/internal/cctz/src/time_zone_impl.h"

#if defined(_WIN32)
+#include <winapifamily.h>
+#endif
+
+#if defined(_WIN32) && !(defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP)
#include "absl/time/internal/cctz/src/time_zone_name_win.h"
-#endif // _WIN32
+#endif // _WIN32 && !UWP

namespace absl {
ABSL_NAMESPACE_BEGIN
@@ -164,7 +168,7 @@
zone = primary_tz.c_str();
}
#endif
-#if defined(_WIN32)
+#if defined(_WIN32) && !(defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP)
std::string win32_tz = GetWindowsLocalTimeZone();
if (!win32_tz.empty()) {
zone = win32_tz.c_str();
175 changes: 144 additions & 31 deletions native~/vcpkg/ports/abseil/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,59 +1,172 @@
# =============================================================================
# Cesium for Unreal — Custom Abseil overlay port
# =============================================================================
#
# This overlay customizes the standard vcpkg abseil port in several ways
# required for compatibility with Unreal Engine. When upgrading the abseil
# version, re-apply each customization described below and verify it is still
# necessary.
#
# CUSTOMIZATION HISTORY:
# Originally created Nov 2024 (abseil 20240722.0) to fix Android and MSVC
# build issues. Updated to 20260107.1 to match the vcpkg 2026.04.27 baseline.
#
# BACKGROUND — Unreal Engine and the Android NDK:
# Unreal Engine uses C++20. However, the Android NDK version bundled with
# Unreal has incomplete C++20 *library* support even though the compiler
# supports C++20 *language* features. This means headers that are compiled
# as part of Unreal's Android build (including installed vcpkg headers) must
# not rely on C++20 standard library types such as std::partial_ordering.
# We build abseil itself with C++17 to avoid any C++20 library dependencies
# in abseil's own compilation. We additionally patch the installed headers
# to be safe when included by Unreal's C++20 Android build.

Comment on lines +1 to +23
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the text throughout this doc for Unity?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally made this an exact copy of the overlay port in Cesium for Unreal. If I had it to do over again, I would have put less Unreal-specific stuff in there in the first place. But I think the benefit of keeping the two in sync outweighs the weirdness of the comments. The commit message explains exactly where the overlay came from (a particular commit of cesium-unreal). This is useful because, when I told Copilot to do this update, I told it specifically to look at the commit messages to understand what changed and why so that you know how to incorporate the relevant changes into the new version. That worked really well.

if(NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO abseil/abseil-cpp
REF "20240722.0"
SHA512 bd2cca8f007f2eee66f51c95a979371622b850ceb2ce3608d00ba826f7c494a1da0fba3c1427728f2c173fe50d59b701da35c2c9fdad2752a5a49746b1c8ef31
REF "20260107.1"
SHA512 f5012885d6b6844a9cf5ed92ad5468b8757db33dfe1364bfb232fff928e06c550c7eb4557f45186a8ac4d18b178df9be267681abab4a6de40823b574afbe9960
HEAD_REF master
PATCHES
# Fixes a missing TESTONLY marker that causes build errors when tests
# are not being built. Taken from the upstream vcpkg port.
fix-heterogeneous_lookup_testing-target.patch
# Fixes DLL builds when targeting MinGW. Taken from the upstream vcpkg
# port.
fix-mingw-dll.patch
# Fixes a build failure when targeting UWP (arm64-uwp-unity). In
# abseil 20260107.1, time_zone_name_win.cc is only compiled when
# PLATFORM_ID is "Windows", but on UWP CMAKE_SYSTEM_NAME is
# "WindowsStore", so the file is excluded. However, time_zone_lookup.cc
# still references GetWindowsLocalTimeZone() under #if defined(_WIN32),
# which is true on UWP. This patch guards those references so they are
# also excluded on UWP (WINAPI_FAMILY_APP).
fix-uwp-time-zone-lookup.patch
# NOTE: The upstream vcpkg port also includes 003-force-cxx-17.patch,
# which prevents abseil from advertising cxx_std_20 as a requirement
# to consumers (via target_compile_features) even when a C++20 compiler
# is in use. We intentionally omit it because we set
# ABSL_PROPAGATE_CXX_STD=OFF below, which makes abseil not propagate
# any C++ standard requirement at all.
)

# With ABSL_PROPAGATE_CXX_STD=ON abseil automatically detect if it is being
# compiled with C++14 or C++17, and modifies the installed `absl/base/options.h`
# header accordingly. This works even if CMAKE_CXX_STANDARD is not set. Abseil
# uses the compiler default behavior to update `absl/base/options.h` as needed.
set(ABSL_USE_CXX17_OPTION "")
if("cxx17" IN_LIST FEATURES)
set(ABSL_USE_CXX17_OPTION "-DCMAKE_CXX_STANDARD=17")
endif()
# -----------------------------------------------------------------------------
# CUSTOMIZATION 1: Prevent abseil from overriding CMAKE_MSVC_RUNTIME_LIBRARY
# -----------------------------------------------------------------------------
# Abseil's CMakeLists.txt unconditionally sets CMAKE_MSVC_RUNTIME_LIBRARY,
# which conflicts with Unreal Engine's choice of MultiThreadedDLL. We comment
# it out so our setting (established by the triplet) wins.
vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt"
"set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>\")"
"#set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>\")")
vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt"
"set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL\")"
"#set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL\")")

# -----------------------------------------------------------------------------
# CUSTOMIZATION 2: Rename the inline namespace
# -----------------------------------------------------------------------------
# Unreal Engine ships its own copy of abseil. To prevent ODR violations and
# linker errors when both copies are linked into the same binary, we rename
# abseil's inline namespace from "lts_20260107" to
# "lts_20260107_cesium_for_unreal". This makes all mangled symbol names unique.
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h"
"ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20260107"
"ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20260107_cesium_for_unreal")

# -----------------------------------------------------------------------------
# CUSTOMIZATION 3: Suppress ABSL_LTS_RELEASE_VERSION
# -----------------------------------------------------------------------------
# Commenting out ABSL_LTS_RELEASE_VERSION and ABSL_LTS_RELEASE_PATCH_LEVEL
# prevents code that checks those macros from treating our modified build as
# the canonical abseil LTS release. This avoids version-check mismatches when
# our customized abseil is used alongside Unreal's bundled abseil.
vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h"
"#define ABSL_LTS_RELEASE_VERSION 20260107"
"//#define ABSL_LTS_RELEASE_VERSION 20260107")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h"
"#define ABSL_LTS_RELEASE_PATCH_LEVEL 1"
"//#define ABSL_LTS_RELEASE_PATCH_LEVEL 1")

# -----------------------------------------------------------------------------
# CUSTOMIZATION 4: Disable std::ordering alias (requires C++20 library)
# -----------------------------------------------------------------------------
# ABSL_OPTION_USE_STD_ORDERING defaults to 2 (auto-detect), which enables the
# alias to std::partial_ordering / std::strong_ordering / std::weak_ordering
# when the compiler reports C++20 support. The Android NDK bundled with Unreal
# Engine supports C++20 language features but has incomplete C++20 *library*
# support, so std::ordering types may be unavailable. We force this to 0 to
# always use abseil's own ordering implementation.
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h"
"#define ABSL_OPTION_USE_STD_ORDERING 2"
"#define ABSL_OPTION_USE_STD_ORDERING 0")

# -----------------------------------------------------------------------------
# CUSTOMIZATION 5: Fix C++20 three-way comparison check in cord.h (NDK r25)
# -----------------------------------------------------------------------------
# Android NDK r25 defines __cpp_impl_three_way_comparison (indicating compiler
# support for C++20 three-way comparison syntax) but does not define
# __cpp_lib_three_way_comparison (indicating standard library support). Abseil's
# cord.h guards C++20 comparison code with __cpp_impl_three_way_comparison,
# which causes a build failure on NDK r25 when the library support is missing.
# We replace the guard with the library feature macro, which is the correct
# check. See: https://github.com/abseil/abseil-cpp/pull/1728
# NOTE: This patch has already been applied upstream to time.h; only cord.h
# still requires it as of abseil 20260107.1.
vcpkg_replace_string("${SOURCE_PATH}/absl/strings/cord.h"
"__cpp_impl_three_way_comparison"
"__cpp_lib_three_way_comparison")

set(ABSL_STATIC_RUNTIME_OPTION "")
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static")
set(ABSL_STATIC_RUNTIME_OPTION "-DABSL_MSVC_STATIC_RUNTIME=ON")
endif()

# Don't let Abseil clobber our CMAKE_MSVC_RUNTIME_LIBRARY choice.
vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL\")" "#set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL\")")

# Don't let our customized version of Abseil pose as the real thing.
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722_cesium_for_unreal")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_ANY 2" "ABSL_OPTION_USE_STD_ANY 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_OPTIONAL 2" "ABSL_OPTION_USE_STD_OPTIONAL 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_STRING_VIEW 2" "ABSL_OPTION_USE_STD_STRING_VIEW 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_VARIANT 2" "ABSL_OPTION_USE_STD_VARIANT 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_ORDERING 2" "ABSL_OPTION_USE_STD_ORDERING 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h" "#define ABSL_LTS_RELEASE_VERSION 20240722" "//#define ABSL_LTS_RELEASE_VERSION 20240722")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h" "#define ABSL_LTS_RELEASE_PATCH_LEVEL 0" "//#define ABSL_LTS_RELEASE_PATCH_LEVEL 0")

# Apply this patch to fix C++20 build with Android NDK r25
# https://github.com/abseil/abseil-cpp/pull/1728
vcpkg_replace_string("${SOURCE_PATH}/absl/time/time.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison")
vcpkg_replace_string("${SOURCE_PATH}/absl/strings/cord.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison")

set(ABSL_MINGW_OPTIONS "")
if(VCPKG_TARGET_IS_MINGW)
# LIBRT-NOTFOUND is needed since the system librt may be found by cmake in
# a cross-compile setup.
# See https://github.com/pywinrt/pywinrt/pull/83 for the FIReference
# definition issue.
set(ABSL_MINGW_OPTIONS "-DLIBRT=LIBRT-NOTFOUND"
"-DCMAKE_CXX_FLAGS=-D____FIReference_1_boolean_INTERFACE_DEFINED__")
# Specify ABSL_BUILD_MONOLITHIC_SHARED_LIBS=ON when VCPKG_LIBRARY_LINKAGE is dynamic to match Abseil's Windows (MSVC) defaults
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
vcpkg_list(APPEND ABSL_MINGW_OPTIONS "-DABSL_BUILD_MONOLITHIC_SHARED_LIBS=ON")
endif()
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
# Build abseil with C++17 rather than the upstream default of ON
# (propagate whatever standard the consumer uses). Unreal Engine uses
# C++20, but its Android NDK has incomplete C++20 library support.
# Building with C++17 avoids C++20 library dependencies in abseil's
# own compiled code. ABSL_PROPAGATE_CXX_STD=OFF prevents abseil from
# propagating a C++ standard requirement to consumers via
# target_compile_features, since Unreal controls its own standard.
-DABSL_PROPAGATE_CXX_STD=OFF
-DCMAKE_CXX_STANDARD=14
${ABSL_USE_CXX17_OPTION}
-DCMAKE_CXX_STANDARD=17
-DABSL_BUILD_TESTING=OFF
-DABSL_BUILD_TEST_HELPERS=OFF
${ABSL_TEST_HELPERS_OPTIONS}
${ABSL_STATIC_RUNTIME_OPTION}
${ABSL_MINGW_OPTIONS}
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME absl CONFIG_PATH lib/cmake/absl)

if(VCPKG_TARGET_IS_IOS OR VCPKG_TARGET_IS_OSX)
file(APPEND "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/absl_time.pc" "Libs.private: -framework CoreFoundation\n")
if(NOT VCPKG_BUILD_TYPE)
file(APPEND "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/absl_time.pc" "Libs.private: -framework CoreFoundation\n")
endif()
endif()
vcpkg_fixup_pkgconfig()

vcpkg_copy_pdbs()
Expand Down
10 changes: 3 additions & 7 deletions native~/vcpkg/ports/abseil/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "abseil",
"version": "20240722.0-cesium-for-unreal",
"version": "20260107.1-cesium-for-unreal",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: If it's not too much trouble...

Suggested change
"version": "20260107.1-cesium-for-unreal",
"version": "20260107.1-cesium-for-unity",

"description": [
"Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.",
"In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.",
Expand All @@ -17,10 +17,6 @@
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"cxx17": {
"description": "Enable compiler C++17."
}
}
]
}

50 changes: 0 additions & 50 deletions native~/vcpkg/ports/blend2d/portfile.cmake

This file was deleted.

4 changes: 0 additions & 4 deletions native~/vcpkg/ports/blend2d/usage

This file was deleted.

34 changes: 0 additions & 34 deletions native~/vcpkg/ports/blend2d/vcpkg.json

This file was deleted.

14 changes: 14 additions & 0 deletions native~/vcpkg/ports/s2geometry/fix-android-clang12-spinlock.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/src/s2/base/spinlock.h b/src/s2/base/spinlock.h
index c1cdda3..3e1d4a7 100644
--- a/src/s2/base/spinlock.h
+++ b/src/s2/base/spinlock.h
@@ -47,6 +47,8 @@ class ABSL_LOCKABLE ABSL_ATTRIBUTE_WARN_UNUSED SpinLock {
};

-class [[nodiscard]] ABSL_SCOPED_LOCKABLE SpinLockHolder {
+// [[nodiscard]] removed: Clang 12 (Android NDK r23) fails to parse the combination of a
+// C++ standard attribute ([[nodiscard]]) and a GNU attribute (from ABSL_SCOPED_LOCKABLE).
+class ABSL_SCOPED_LOCKABLE SpinLockHolder {
public:
inline explicit SpinLockHolder(SpinLock& l) ABSL_EXCLUSIVE_LOCK_FUNCTION(l)
: lock_(l) {
Loading
Loading