summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Fore <csfore@posteo.net>2024-08-15 09:47:32 -0400
committerSam James <sam@gentoo.org>2024-08-15 15:06:32 +0100
commit3fb82ca8c2c89b551977fe98aee0f578bdf6ace4 (patch)
treee90e7054340d9cf29b99958579eff19170fb3ec4
parentdev-cpp/yaml-cpp: Fix compilation on GCC 15 (diff)
downloadgentoo-3fb82ca8c2c89b551977fe98aee0f578bdf6ace4.tar.gz
gentoo-3fb82ca8c2c89b551977fe98aee0f578bdf6ace4.tar.bz2
gentoo-3fb82ca8c2c89b551977fe98aee0f578bdf6ace4.zip
sci-physics/lhapdf: Fix compilation on GCC 15
- Include patch from upstream MR (refer to patch file) Closes: https://bugs.gentoo.org/937778 Signed-off-by: Christopher Fore <csfore@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/38162 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sci-physics/lhapdf/files/lhapdf-6.5.4-include-cstdint.patch31
-rw-r--r--sci-physics/lhapdf/lhapdf-6.5.4-r1.ebuild4
2 files changed, 35 insertions, 0 deletions
diff --git a/sci-physics/lhapdf/files/lhapdf-6.5.4-include-cstdint.patch b/sci-physics/lhapdf/files/lhapdf-6.5.4-include-cstdint.patch
new file mode 100644
index 000000000000..2afed53f210b
--- /dev/null
+++ b/sci-physics/lhapdf/files/lhapdf-6.5.4-include-cstdint.patch
@@ -0,0 +1,31 @@
+https://gitlab.com/hepcedar/lhapdf/merge_requests/96
+
+From: Christopher Fore <csfore@posteo.net>
+Date: Wed, 14 Aug 2024 20:38:03 -0400
+Subject: [PATCH] yamlcpp: Explicitly include <cstdint>
+
+GCC 15 will no longer include <cstdint> by default, resulting in build
+failures in projects that do not explicitly include it.
+
+Error:
+emitterutils.cpp:221:11: error: 'uint16_t' was not declared in this scope
+ 221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
+ | ^~~~~~~~
+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"
+
+See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
+See-also: https://bugs.gentoo.org/937778
+Signed-off-by: Christopher Fore <csfore@posteo.net>
+--- a/src/yamlcpp/emitterutils.cpp
++++ b/src/yamlcpp/emitterutils.cpp
+@@ -1,4 +1,5 @@
+ #include <algorithm>
++#include <cstdint>
+ #include <iomanip>
+ #include <sstream>
+
diff --git a/sci-physics/lhapdf/lhapdf-6.5.4-r1.ebuild b/sci-physics/lhapdf/lhapdf-6.5.4-r1.ebuild
index 7e3801a3d0e3..f5d5eb09c594 100644
--- a/sci-physics/lhapdf/lhapdf-6.5.4-r1.ebuild
+++ b/sci-physics/lhapdf/lhapdf-6.5.4-r1.ebuild
@@ -42,6 +42,10 @@ BDEPEND="
')
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.5.4-include-cstdint.patch
+)
+
pkg_setup() {
use python && python-single-r1_pkg_setup
}