From 38d9cf0bd45404cd25aeb03f79bcb0af256de343 Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Thu, 8 May 2025 04:13:13 +0900 Subject: [PATCH] [yaml-cpp] Fix builds with GCC 15 (#45339) --- ports/yaml-cpp/portfile.cmake | 1 + ports/yaml-cpp/vcpkg.json | 2 +- ports/yaml-cpp/yaml-cpp-pr-1310.patch | 38 +++++++++++++++++++++++++++ versions/baseline.json | 2 +- versions/y-/yaml-cpp.json | 5 ++++ 5 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 ports/yaml-cpp/yaml-cpp-pr-1310.patch diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 795d93e24e..b8bd785bc4 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES "yaml-cpp-pr-1212.patch" + "yaml-cpp-pr-1310.patch" ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" YAML_BUILD_SHARED_LIBS) diff --git a/ports/yaml-cpp/vcpkg.json b/ports/yaml-cpp/vcpkg.json index 214fe0ff21..2a2d4d708e 100644 --- a/ports/yaml-cpp/vcpkg.json +++ b/ports/yaml-cpp/vcpkg.json @@ -1,7 +1,7 @@ { "name": "yaml-cpp", "version-semver": "0.8.0", - "port-version": 2, + "port-version": 3, "description": "yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec.", "homepage": "https://github.com/jbeder/yaml-cpp", "documentation": "https://codedocs.xyz/jbeder/yaml-cpp/index.html", diff --git a/ports/yaml-cpp/yaml-cpp-pr-1310.patch b/ports/yaml-cpp/yaml-cpp-pr-1310.patch new file mode 100644 index 0000000000..698a66401a --- /dev/null +++ b/ports/yaml-cpp/yaml-cpp-pr-1310.patch @@ -0,0 +1,38 @@ +From 0bcee982a6556649ff2af9a7aa0845fa92e893e2 Mon Sep 17 00:00:00 2001 +From: Christopher Fore +Date: Wed, 14 Aug 2024 21:02:32 -0400 +Subject: [PATCH] emitterutils: Explicitly include + +GCC 15 will no longer include it by default, resulting in build +failures in projects that do not explicitly include it. + +Error: +src/emitterutils.cpp:221:11: error: 'uint16_t' was not declared in this scope + 221 | std::pair EncodeUTF16SurrogatePair(int codePoint) { + | ^~~~~~~~ +src/emitterutils.cpp:13:1: note: 'uint16_t' is defined in header ''; +this is probably fixable by adding '#include ' + 12 | #include "yaml-cpp/null.h" + +++ |+#include + 13 | #include "yaml-cpp/ostream_wrapper.h" + +Tests pass. + +Closes: #1307 +See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html +See-also: https://bugs.gentoo.org/937412 +Signed-off-by: Christopher Fore +--- + src/emitterutils.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/emitterutils.cpp b/src/emitterutils.cpp +index fc41011a5..f801b1d0c 100644 +--- a/src/emitterutils.cpp ++++ b/src/emitterutils.cpp +@@ -1,4 +1,5 @@ + #include ++#include + #include + #include + diff --git a/versions/baseline.json b/versions/baseline.json index b43627e63c..da6b126c09 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -10278,7 +10278,7 @@ }, "yaml-cpp": { "baseline": "0.8.0", - "port-version": 2 + "port-version": 3 }, "yara": { "baseline": "4.5.2", diff --git a/versions/y-/yaml-cpp.json b/versions/y-/yaml-cpp.json index 0ea8411c80..179fc43923 100644 --- a/versions/y-/yaml-cpp.json +++ b/versions/y-/yaml-cpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "30bb4f655d874206182c1db07bb6cd4f1f9f1c79", + "version-semver": "0.8.0", + "port-version": 3 + }, { "git-tree": "447c1a228690199df9139b51e254e51403d9a963", "version-semver": "0.8.0",