gnu: calligra: Fix build.

* gnu/packages/patches/calligra-qt-6.9.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/kde-office.scm (calligra) [source]: Apply it.

Change-Id: Iab4c1ccc3bd20f54d952564f1b6ba21934d42fc9
This commit is contained in:
Maxim Cournoyer 2025-09-15 23:43:32 +09:00
parent 5d8332a282
commit ea4a3af739
No known key found for this signature in database
GPG key ID: 1260E46482E63562
3 changed files with 50 additions and 1 deletions

View file

@ -1072,6 +1072,7 @@ dist_patch_DATA = \
%D%/packages/patches/calibre-remove-test-sqlite.patch \ %D%/packages/patches/calibre-remove-test-sqlite.patch \
%D%/packages/patches/calibre-remove-test-unrar.patch \ %D%/packages/patches/calibre-remove-test-unrar.patch \
%D%/packages/patches/calibre-remove-test-import-modules.patch \ %D%/packages/patches/calibre-remove-test-import-modules.patch \
%D%/packages/patches/calligra-qt-6.9.patch \
%D%/packages/patches/calls-disable-application-test.patch \ %D%/packages/patches/calls-disable-application-test.patch \
%D%/packages/patches/calls-disable-sip-test.patch \ %D%/packages/patches/calls-disable-sip-test.patch \
%D%/packages/patches/camlboot-dynamically-allocate-stack-signal.patch \ %D%/packages/patches/camlboot-dynamically-allocate-stack-signal.patch \

View file

@ -24,6 +24,7 @@
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages algebra) #:use-module (gnu packages algebra)
#:use-module (gnu packages boost) #:use-module (gnu packages boost)
#:use-module (gnu packages cdrom) #:use-module (gnu packages cdrom)
@ -62,7 +63,8 @@
"calligra-" version ".tar.xz")) "calligra-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0pyri2ypzva4b4rnl2p3xp0ph5xcn181msj86l5xq6sg7zkza0fl")))) "0pyri2ypzva4b4rnl2p3xp0ph5xcn181msj86l5xq6sg7zkza0fl"))
(patches (search-patches "calligra-qt-6.9.patch"))))
(build-system qt-build-system) (build-system qt-build-system)
(arguments (arguments
(list #:qtbase qtbase (list #:qtbase qtbase

View file

@ -0,0 +1,46 @@
From 659c88eec87160d908faf9b78b7b1006eb7e5bf3 Mon Sep 17 00:00:00 2001
From: Nicolas Fella <nicolas.fella@gmx.de>
Date: Fri, 10 Jan 2025 15:44:09 +0100
Subject: [PATCH] Fix build with Qt 6.9
Converting Qt::Key to QChar doesn't work any more
---
libs/basicflakes/tools/KoCreatePathTool.cpp | 2 +-
plugins/textshape/TextTool.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/basicflakes/tools/KoCreatePathTool.cpp b/libs/basicflakes/tools/KoCreatePathTool.cpp
index 699f3b0e772..6cb7f11b4a4 100644
--- a/libs/basicflakes/tools/KoCreatePathTool.cpp
+++ b/libs/basicflakes/tools/KoCreatePathTool.cpp
@@ -444,7 +444,7 @@ QList<QPointer<QWidget>> KoCreatePathTool::createOptionWidgets()
angleEdit->setValue(d->angleSnappingDelta);
angleEdit->setRange(1, 360);
angleEdit->setSingleStep(1);
- angleEdit->setSuffix(QChar(Qt::Key_degree));
+ angleEdit->setSuffix(QStringLiteral("°"));
layout->addWidget(angleEdit, 0, 1);
layout->addWidget(new QLabel(i18n("Activate angle snap:"), angleWidget), 1, 0);
QCheckBox *angleSnap = new QCheckBox(angleWidget);
diff --git a/plugins/textshape/TextTool.cpp b/plugins/textshape/TextTool.cpp
index 79e88353408..bb82e7b90c5 100644
--- a/plugins/textshape/TextTool.cpp
+++ b/plugins/textshape/TextTool.cpp
@@ -2360,7 +2360,7 @@ void TextTool::nonbreakingSpace()
{
if (!m_allowActions || !m_textEditor.data())
return;
- m_textEditor.data()->insertText(QString(QChar(Qt::Key_nobreakspace)));
+ m_textEditor.data()->insertText(QString(QChar(QChar::Nbsp)));
}
void TextTool::nonbreakingHyphen()
@@ -2374,7 +2374,7 @@ void TextTool::softHyphen()
{
if (!m_allowActions || !m_textEditor.data())
return;
- m_textEditor.data()->insertText(QString(QChar(Qt::Key_hyphen)));
+ m_textEditor.data()->insertText(QString(QChar(QChar::SoftHyphen)));
}
void TextTool::lineBreak()