summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Fore <csfore@posteo.net>2024-08-15 09:59:39 -0400
committerSam James <sam@gentoo.org>2024-08-15 15:06:25 +0100
commit75c4eaca10479779ec6ef97d4f583d49e808ccfe (patch)
tree21cac80274594b358924984b56337477d27c2ae7 /dev-cpp
parentsys-cluster/spark-bin: drop 2.4.3, 3.0.1-r2 (diff)
downloadgentoo-75c4eaca10479779ec6ef97d4f583d49e808ccfe.tar.gz
gentoo-75c4eaca10479779ec6ef97d4f583d49e808ccfe.tar.bz2
gentoo-75c4eaca10479779ec6ef97d4f583d49e808ccfe.zip
dev-cpp/yaml-cpp: Fix compilation on GCC 15
- Include patch from upstream PR (refer to patch file) - Tests pass Closes: https://bugs.gentoo.org/937412 Signed-off-by: Christopher Fore <csfore@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/38163 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-include-cstdint.patch33
-rw-r--r--dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild3
2 files changed, 35 insertions, 1 deletions
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-include-cstdint.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-include-cstdint.patch
new file mode 100644
index 000000000000..d017b43fa440
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.8.0-include-cstdint.patch
@@ -0,0 +1,33 @@
+https://github.com/jbeder/yaml-cpp/pull/1310
+
+From: Christopher Fore <csfore@posteo.net>
+Date: Wed, 14 Aug 2024 21:02:32 -0400
+Subject: [PATCH] emitterutils: Explicitly include <cstdint>
+
+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<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
+ | ^~~~~~~~
+src/emitterutils.cpp:13:1: note: 'uint16_t' is defined in header '<cstdint>';
+this is probably fixable by adding '#include <cstdint>'
+ 12 | #include "yaml-cpp/null.h"
+ +++ |+#include <cstdint>
+ 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 <csfore@posteo.net>
+--- a/src/emitterutils.cpp
++++ b/src/emitterutils.cpp
+@@ -1,4 +1,5 @@
+ #include <algorithm>
++#include <cstdint>
+ #include <iomanip>
+ #include <sstream>
+
diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild
index dc3a8a58c33c..5691f9d3a803 100644
--- a/dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -22,6 +22,7 @@ DEPEND="
PATCHES=(
"${FILESDIR}/yaml-cpp-0.8.0-gtest.patch"
"${FILESDIR}/yaml-cpp-0.8.0-gcc13.patch"
+ "${FILESDIR}/yaml-cpp-0.8.0-include-cstdint.patch"
)
src_configure() {