commit:     55a041d766c2b0030ffe12f9c5926f4a76a87280
Author:     Kostadin Shishmanov <kostadinshishmanov <AT> protonmail <DOT> com>
AuthorDate: Tue Mar 11 11:40:07 2025 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Mar 11 12:21:12 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55a041d7

x11-wm/herbstluftwm: add patch to fix building with gcc 15

Closes: https://bugs.gentoo.org/937529
Signed-off-by: Kostadin Shishmanov <kostadinshishmanov <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/41016
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../files/herbstluftwm-0.9.5-gcc15.patch           | 32 ++++++++++++++++++++++
 x11-wm/herbstluftwm/herbstluftwm-0.9.5-r2.ebuild   |  6 +++-
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/x11-wm/herbstluftwm/files/herbstluftwm-0.9.5-gcc15.patch 
b/x11-wm/herbstluftwm/files/herbstluftwm-0.9.5-gcc15.patch
new file mode 100644
index 000000000000..7b02ff122c96
--- /dev/null
+++ b/x11-wm/herbstluftwm/files/herbstluftwm-0.9.5-gcc15.patch
@@ -0,0 +1,32 @@
+https://github.com/herbstluftwm/herbstluftwm/issues/1612
+https://bugs.gentoo.org/937529
+
+From 5e4941c2aa12102cf86c8a69b65c7fa9086f50d6 Mon Sep 17 00:00:00 2001
+From: Kostadin Shishmanov <[email protected]>
+Date: Tue, 11 Mar 2025 01:13:33 +0200
+Subject: [PATCH] Add #include <stdint.h> to fix building with gcc 15
+
+With gcc 15, the C++ Standard Library no longer includes other headers
+that were internally used by the library. In herbstluftwm's case the
+missing header is <stdint.h>
+
+Downstream Gentoo bug: https://bugs.gentoo.org/937529
+
+Closes: #1612
+Signed-off-by: Kostadin Shishmanov <[email protected]>
+---
+ src/xconnection.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/xconnection.cpp b/src/xconnection.cpp
+index e2129db35..df77571e6 100644
+--- a/src/xconnection.cpp
++++ b/src/xconnection.cpp
+@@ -7,6 +7,7 @@
+ #include <X11/extensions/Xrender.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include <stdint.h>
+ #include <climits>
+ #include <cstring>
+ #include <iostream>

diff --git a/x11-wm/herbstluftwm/herbstluftwm-0.9.5-r2.ebuild 
b/x11-wm/herbstluftwm/herbstluftwm-0.9.5-r2.ebuild
index ceda002ab268..244d8babb450 100644
--- a/x11-wm/herbstluftwm/herbstluftwm-0.9.5-r2.ebuild
+++ b/x11-wm/herbstluftwm/herbstluftwm-0.9.5-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -65,6 +65,10 @@ if [[ -n "${EGIT_REPO_URI}" ]]; then
        BDEPEND+=" doc? ( app-text/asciidoc )"
 fi
 
+PATCHES=(
+        "${FILESDIR}"/${PN}-0.9.5-gcc15.patch
+)
+
 src_prepare() {
        # Do not install LICENSE and respect CMAKE_INSTALL_DOCDIR.
        sed -i \

Reply via email to