commit:     28cfd86d9f4fe2f05f70c7b217d0c5f7652b45b6
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 21:44:00 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 21:44:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28cfd86d

net-libs/accounts-qml: Fix build with GCC-12

Thanks-to: Sam James <sam <AT> gentoo.org>
Closes: https://bugs.gentoo.org/870157
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 net-libs/accounts-qml/accounts-qml-0.7-r2.ebuild   |  5 +++-
 .../files/accounts-qml-0.7-gcc12.patch             | 30 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/net-libs/accounts-qml/accounts-qml-0.7-r2.ebuild 
b/net-libs/accounts-qml/accounts-qml-0.7-r2.ebuild
index 1510ade09dbc..2555f92d251b 100644
--- a/net-libs/accounts-qml/accounts-qml-0.7-r2.ebuild
+++ b/net-libs/accounts-qml/accounts-qml-0.7-r2.ebuild
@@ -40,7 +40,10 @@ BDEPEND="
 
 DOCS=( README.md )
 
-PATCHES=( "${WORKDIR}/${P}-patches-1" ) # bug 849773
+PATCHES=(
+       "${WORKDIR}/${P}-patches-1" # bug 849773
+       "${FILESDIR}/${P}-gcc12.patch" # bug 870157, pending upstream
+)
 
 src_prepare() {
        default

diff --git a/net-libs/accounts-qml/files/accounts-qml-0.7-gcc12.patch 
b/net-libs/accounts-qml/files/accounts-qml-0.7-gcc12.patch
new file mode 100644
index 000000000000..abe820f2383d
--- /dev/null
+++ b/net-libs/accounts-qml/files/accounts-qml-0.7-gcc12.patch
@@ -0,0 +1,30 @@
+From 6bfa9d24363e28971839d86925d9de3d7aef512c Mon Sep 17 00:00:00 2001
+From: Sam James <s...@gentoo.org>
+Date: Wed, 14 Sep 2022 22:40:30 +0100
+Subject: [PATCH] Fix build failure with GCC 12 (missing <algorithms> include)
+
+Needed for std::sort.
+
+Bug: https://bugs.gentoo.org/870157
+Fixes: 69e17dec5add40655cd9334ec7ad4eef13fed8a4
+Signed-off-by: Sam James <s...@gentoo.org>
+---
+ src/account-service-model.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/account-service-model.cpp b/src/account-service-model.cpp
+index deb157e..20a445c 100644
+--- a/src/account-service-model.cpp
++++ b/src/account-service-model.cpp
+@@ -20,6 +20,8 @@
+ #include "debug.h"
+ #include "manager.h"
+ 
++#include <algorithm>
++
+ #include <Accounts/Account>
+ #include <Accounts/AccountService>
+ #include <Accounts/Application>
+-- 
+GitLab
+

Reply via email to