summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-05-07 00:43:24 +0300
committerEfraim Flashner <efraim@flashner.co.il>2024-05-07 00:43:24 +0300
commitcc051064c596f6f2d156c6824e77441656aa22ff (patch)
treed38ef5b772042fb60b9291aa6fa67659ecdc8f84 /gnu/packages/patches
parent0a5929033f53d9f2a476d85db2ca094042328c4d (diff)
downloadguix-patches-cc051064c596f6f2d156c6824e77441656aa22ff.tar
guix-patches-cc051064c596f6f2d156c6824e77441656aa22ff.tar.gz
gnu: grantlee: Fix build on some architectures.
* gnu/packages/qt.scm (grantlee)[source]: Add patch. * gnu/packages/patches/grantlee-register-metaenumvariable.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: Iecef53baeb023a80139ac70b9caefcfa7b79a3c6
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/grantlee-register-metaenumvariable.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/gnu/packages/patches/grantlee-register-metaenumvariable.patch b/gnu/packages/patches/grantlee-register-metaenumvariable.patch
new file mode 100644
index 0000000000..26ff20a413
--- /dev/null
+++ b/gnu/packages/patches/grantlee-register-metaenumvariable.patch
@@ -0,0 +1,54 @@
+https://patch-diff.githubusercontent.com/raw/steveire/grantlee/pull/91
+also in Debian
+https://sources.debian.org/data/main/g/grantlee5/5.3.1-3/debian/patches/register-comparator.diff
+
+From e6a2c1f4f29623f0ced1a946f5ff0c3831ab213b Mon Sep 17 00:00:00 2001
+From: Pino Toscano <toscano.pino@tiscali.it>
+Date: Sat, 12 Aug 2023 12:06:15 +0200
+Subject: [PATCH] Register MetaEnumVariable for comparison
+
+This is needed to ensure that MetaEnumVariable can be properly handled
+for comparisons, e.g. as done via QVariant::compare().
+
+Followup of commit 3b1931e30a23286a64f713a815f701d194a3c759
+
+Fixes #89
+---
+ templates/lib/engine.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/templates/lib/engine.cpp b/templates/lib/engine.cpp
+index c6a6987b..fc6b7797 100644
+--- a/templates/lib/engine.cpp
++++ b/templates/lib/engine.cpp
+@@ -24,6 +24,9 @@
+ #include "exception.h"
+ #include "grantlee_config_p.h"
+ #include "grantlee_version.h"
++#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
++#include "metaenumvariable_p.h"
++#endif
+ #ifdef QT_QML_LIB
+ #include "scriptabletags.h"
+ #endif
+@@ -32,6 +35,9 @@
+
+ #include <QtCore/QCoreApplication>
+ #include <QtCore/QDir>
++#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
++#include <QtCore/QMetaType>
++#endif
+ #include <QtCore/QPluginLoader>
+ #include <QtCore/QTextStream>
+
+@@ -48,6 +54,10 @@ Engine::Engine(QObject *parent)
+
+ d_ptr->m_pluginDirs = QCoreApplication::libraryPaths();
+ d_ptr->m_pluginDirs << QString::fromLocal8Bit(GRANTLEE_PLUGIN_PATH);
++
++#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
++ QMetaType::registerComparators<MetaEnumVariable>();
++#endif
+ }
+
+ Engine::~Engine()