commit:     b1e59a56bd5f2d82a62f66650d21723e14ceee0d
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Thu Dec 21 13:20:38 2023 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Fri Jan 19 13:55:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1e59a56

gui-libs/wf-config: add gcc-14 fix

Closes: https://bugs.gentoo.org/916995
Thanks-to: Kostadin Shishmanov <kocelfc <AT> tutanota.com>
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 .../wf-config/files/wf-config-0.8.0-gcc14.patch    | 31 ++++++++++++++++++++++
 gui-libs/wf-config/wf-config-0.8.0.ebuild          |  4 +++
 2 files changed, 35 insertions(+)

diff --git a/gui-libs/wf-config/files/wf-config-0.8.0-gcc14.patch 
b/gui-libs/wf-config/files/wf-config-0.8.0-gcc14.patch
new file mode 100644
index 000000000000..4fad0e5a8e2d
--- /dev/null
+++ b/gui-libs/wf-config/files/wf-config-0.8.0-gcc14.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/916995
+https://github.com/WayfireWM/wf-config/pull/64
+https://github.com/WayfireWM/wf-config/commit/af1bddc9d7191b9902edcb4c74572eac65577806
+
+From af1bddc9d7191b9902edcb4c74572eac65577806 Mon Sep 17 00:00:00 2001
+From: Kostadin <[email protected]>
+Date: Tue, 7 Nov 2023 16:41:55 +0200
+Subject: [PATCH] Fix build with gcc 14 (#64)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fix building with gcc 14 by adding #include <algorithm> to src/file.cpp
+
+FAILED: libwf-config.so.0.9.0.p/src_file.cpp.o
+ccache c++ -Ilibwf-config.so.0.9.0.p -I. -I.. -Iinclude -I../include 
-I/usr/include/libevdev-1.0 -I/usr/include/libxml2 -fdiagnostics-color=always 
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++17 -O0 -g 
-Wno-deprecated-declarations -fPIC -MD -MQ 
libwf-config.so.0.9.0.p/src_file.cpp.o -MF 
libwf-config.so.0.9.0.p/src_file.cpp.o.d -o 
libwf-config.so.0.9.0.p/src_file.cpp.o -c ../src/file.cpp ../src/file.cpp: In 
lambda function:
+../src/file.cpp:419:25: error: ‘any_of’ is not a member of ‘std’
+  419 |             return std::any_of(
+      |                         ^~~~~~
+
+Signed-off-by: Kostadin Shishmanov <[email protected]>
+--- a/src/file.cpp
++++ b/src/file.cpp
+@@ -7,6 +7,7 @@
+ #include <fstream>
+ #include <cassert>
+ #include <set>
++#include <algorithm>
+ 
+ #include "option-impl.hpp"
+ 

diff --git a/gui-libs/wf-config/wf-config-0.8.0.ebuild 
b/gui-libs/wf-config/wf-config-0.8.0.ebuild
index 4e970b7ae0aa..1af2fe782930 100644
--- a/gui-libs/wf-config/wf-config-0.8.0.ebuild
+++ b/gui-libs/wf-config/wf-config-0.8.0.ebuild
@@ -34,6 +34,10 @@ BDEPEND="
        test? ( dev-cpp/doctest )
 "
 
+PATCHES=(
+       "${FILESDIR}/wf-config-0.8.0-gcc14.patch"
+)
+
 src_configure() {
        local emesonargs=(
                $(meson_feature test tests)

Reply via email to