commit:     9b9a67b683e829719607f11e750b08e4d8ce1919
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 26 07:14:38 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 26 07:14:51 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b9a67b6

dev-libs/capnproto: fix build w/ gcc 13

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/capnproto/capnproto-0.10.2.ebuild          |  6 +++++-
 .../capnproto/files/capnproto-0.10.2-gcc-13.patch   | 21 +++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/dev-libs/capnproto/capnproto-0.10.2.ebuild 
b/dev-libs/capnproto/capnproto-0.10.2.ebuild
index 85fd8fe94d06..2c126974f18a 100644
--- a/dev-libs/capnproto/capnproto-0.10.2.ebuild
+++ b/dev-libs/capnproto/capnproto-0.10.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,6 +25,10 @@ DEPEND="${RDEPEND}
        test? ( dev-cpp/gtest )
 "
 
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc-13.patch
+)
+
 src_configure() {
        if use arm || use ppc || use mips || [[ ${CHOST} == *i486* ]] ; then
                # append-libs won't work here, cmake doesn't respect it

diff --git a/dev-libs/capnproto/files/capnproto-0.10.2-gcc-13.patch 
b/dev-libs/capnproto/files/capnproto-0.10.2-gcc-13.patch
new file mode 100644
index 000000000000..576e785437da
--- /dev/null
+++ b/dev-libs/capnproto/files/capnproto-0.10.2-gcc-13.patch
@@ -0,0 +1,21 @@
+https://github.com/capnproto/capnproto/commit/1ae1e9990c7603f0dc99e64470f96693f869b00a
+
+From 1ae1e9990c7603f0dc99e64470f96693f869b00a Mon Sep 17 00:00:00 2001
+From: Heiko Becker <[email protected]>
+Date: Wed, 25 Jan 2023 23:40:27 +0100
+Subject: [PATCH] Fix build with gcc 13 by including <stdint.h> (#1613)
+
+Like other versions before, gcc 13 moved some includes around and as
+a result <stdint.h> is no longer transitively included. Explicitly
+include it for uint8_t.
+--- a/src/kj/string-test.c++
++++ b/src/kj/string-test.c++
+@@ -24,6 +24,7 @@
+ #include <string>
+ #include "vector.h"
+ #include <locale.h>
++#include <stdint.h>
+ 
+ namespace kj {
+ namespace _ {  // private
+

Reply via email to