Skip to content

Commit

Permalink
kde-apps/spectacle: allow building with GCC 12
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/934449
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Jul 5, 2024
1 parent 2ccb42c commit 7dd98a4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
30 changes: 30 additions & 0 deletions kde-apps/spectacle/files/spectacle-24.05.2-gcc12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Allow building with GCC 12
https://invent.kde.org/graphics/spectacle/-/merge_requests/383

--- a/src/Gui/Annotations/AnnotationDocument.cpp
+++ b/src/Gui/Annotations/AnnotationDocument.cpp
@@ -16,6 +16,7 @@
#include <QQuickWindow>
#include <QScreen>
#include <memory>
+#include <source_location>

using G = Geometry;

@@ -73,12 +74,12 @@
{
// Don't allow an invalid canvas rect or device pixel ratio.
if (rect.isEmpty()) {
- Log::warning() << std::format("`{}`:\n\t`rect` is empty. This should not happen.",
- std::source_location::current().function_name());
+ Log::warning() << '`' << std::source_location::current().function_name()
+ << "`:\n\t`rect` is empty. This should not happen.";
return;
} else if (dpr <= 0) {
- Log::warning() << std::format("`{}`:\n\t`dpr` <= 0. This should not happen.",
- std::source_location::current().function_name());
+ Log::warning() << '`' << std::source_location::current().function_name()
+ << "`:\n\t`dpr` <= 0. This should not happen.";
return;
}
const bool posChanged = m_canvasRect.topLeft() != rect.topLeft();
3 changes: 2 additions & 1 deletion kde-apps/spectacle/spectacle-24.05.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ EAPI=8

ECM_HANDBOOK="optional"
ECM_TEST="forceoptional"
KDE_GCC_MINIMAL=13
PVCUT=$(ver_cut 1-3)
KFMIN=6.3.0
QTMIN=6.6.2
Expand Down Expand Up @@ -62,6 +61,8 @@ BDEPEND="
dev-util/wayland-scanner
"

PATCHES=( "${FILESDIR}"/${P}-gcc12.patch )

src_configure() {
local mycmakeargs=(
$(cmake_use_find_package share KF6Purpose)
Expand Down

0 comments on commit 7dd98a4

Please sign in to comment.