summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-18 07:57:18 +0100
committerSam James <sam@gentoo.org>2023-04-18 07:57:18 +0100
commit69de49ef72759bc2f6d87474bf41437b8ec5e5cd (patch)
treefd74aa5c0981c4992b18bedd68dbe28ffb4c4320 /x11-misc
parentdev-libs/pocl: fix example build (diff)
downloadgentoo-69de49ef72759bc2f6d87474bf41437b8ec5e5cd.tar.gz
gentoo-69de49ef72759bc2f6d87474bf41437b8ec5e5cd.tar.bz2
gentoo-69de49ef72759bc2f6d87474bf41437b8ec5e5cd.zip
x11-misc/synergy: fix build w/ gcc 13
Closes: https://bugs.gentoo.org/898032 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/synergy/files/synergy-1.14.1.32-gcc13.patch57
-rw-r--r--x11-misc/synergy/synergy-1.14.1.32.ebuild6
2 files changed, 62 insertions, 1 deletions
diff --git a/x11-misc/synergy/files/synergy-1.14.1.32-gcc13.patch b/x11-misc/synergy/files/synergy-1.14.1.32-gcc13.patch
new file mode 100644
index 000000000000..655199f4b04a
--- /dev/null
+++ b/x11-misc/synergy/files/synergy-1.14.1.32-gcc13.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/898032
+https://github.com/symless/synergy-core/commit/ab8a7b5ed44a3aeadc7a20f0e4020d47ac258e14
+
+From ab8a7b5ed44a3aeadc7a20f0e4020d47ac258e14 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Thu, 8 Dec 2022 09:16:44 +0000
+Subject: [PATCH] add missing <cstdint> includes for SIZE_MAX (#7237)
+
+Without the change the build on upcoming `gcc-13` ails as:
+
+ src/lib/base/Log.cpp: In member function 'void Log::print(const char*, int, const char*, ...)':
+ src/lib/base/Log.cpp:128:23:
+ error: 'SIZE_MAX' was not declared in this scope
+ 128 | if ((strnlen(fmt, SIZE_MAX) > 2) && (fmt[0] == '%' && fmt[1] == 'z')) {
+ | ^~~~~~~~
+ src/lib/base/Log.cpp:30:1:
+ note: 'SIZE_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
+ 29 | #include <ctime>
+ +++ |+#include <cstdint>
+ 30 |
+
+gcc-13 cleaned it's header dependencies and that exposes these failures.
+--- a/src/lib/base/Log.cpp
++++ b/src/lib/base/Log.cpp
+@@ -23,10 +23,11 @@
+ #include "base/log_outputters.h"
+ #include "common/Version.h"
+
++#include <cstdint>
+ #include <cstdio>
+ #include <cstring>
+ #include <iostream>
+-#include <ctime>
++#include <ctime>
+
+ // names of priorities
+ static const char* g_priority[] = {
+--- a/src/lib/base/String.cpp
++++ b/src/lib/base/String.cpp
+@@ -21,6 +21,7 @@
+ #include "common/stdvector.h"
+
+ #include <cctype>
++#include <cstdint>
+ #include <cstdio>
+ #include <cstdlib>
+ #include <cstring>
+--- a/src/lib/synergy/IKeyState.cpp
++++ b/src/lib/synergy/IKeyState.cpp
+@@ -19,6 +19,7 @@
+ #include "synergy/IKeyState.h"
+ #include "base/EventQueue.h"
+
++#include <cstdint>
+ #include <cstring>
+ #include <cstdlib>
+
diff --git a/x11-misc/synergy/synergy-1.14.1.32.ebuild b/x11-misc/synergy/synergy-1.14.1.32.ebuild
index ed1586ea37b1..a85da6a5502d 100644
--- a/x11-misc/synergy/synergy-1.14.1.32.ebuild
+++ b/x11-misc/synergy/synergy-1.14.1.32.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -60,6 +60,10 @@ BDEPEND="
DOCS=( ChangeLog doc/synergy.conf.example{,-advanced,-basic} )
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.14.1.32-gcc13.patch
+)
+
src_prepare() {
# broken on Xvfb
rm src/test/integtests/platform/XWindowsScreenTests.cpp || die