[packages/grantlee-qt6] - adding missing patch file

mrozowik mrozowik at pld-linux.org
Thu Oct 17 13:13:30 CEST 2024


commit 936c7c0844dd1dae8fa7c49fa3b0ee3b7f9c8742
Author: Krzysztof Mrozowicz <mrozowik at pld-linux.org>
Date:   Thu Oct 17 10:19:03 2024 +0000

    - adding missing patch file

 grantlee-qt6.spec |  6 +++---
 x87fix.patch      | 41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 3 deletions(-)
---
diff --git a/grantlee-qt6.spec b/grantlee-qt6.spec
index 3dbfb2a..7200a54 100644
--- a/grantlee-qt6.spec
+++ b/grantlee-qt6.spec
@@ -1,11 +1,11 @@
 
 %bcond_without	tests		# unit tests
 
-%define		qt_ver		5.3.0
+%define		qt_ver		6.6.0
 %define		major_ver	5.3
 
-Summary:	Grantlee - set of frameworks for use with Qt 5
-Summary(pl.UTF-8):	Grantlee - zbiór szkieletów do wykorzystania z Qt 5
+Summary:	Grantlee - set of frameworks for use with Qt 6
+Summary(pl.UTF-8):	Grantlee - zbiór szkieletów do wykorzystania z Qt 6
 Name:		grantlee-qt6
 Version:	5.3.1
 Release:	1
diff --git a/x87fix.patch b/x87fix.patch
new file mode 100644
index 0000000..41d82ce
--- /dev/null
+++ b/x87fix.patch
@@ -0,0 +1,41 @@
+From 7e34ffaff40fc085a15bb0ffabb5f247795581fd Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian at ritter-vogt.de>
+Date: Sun, 13 Nov 2022 14:01:21 +0100
+Subject: [PATCH] Fix formatting of some larger file sizes on 32bit x86
+
+With the x87 FPU available, GCC uses long double precision for some variables.
+Due to the function call passing a double, some comparisons break down.
+That resulted in "1.00 YB" being printed as "1000.00 ZB" instead.
+
+Fixes #85
+---
+ templates/lib/util.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/templates/lib/util.cpp b/templates/lib/util.cpp
+index 504674a7..5924cdf5 100644
+--- a/templates/lib/util.cpp
++++ b/templates/lib/util.cpp
+@@ -23,6 +23,7 @@
+ #include "metaenumvariable_p.h"
+ #include "metatype.h"
+ 
++#include <cfloat>
+ #include <QtCore/QStringList>
+ 
+ QString Grantlee::unescapeStringLiteral(const QString &input)
+@@ -212,7 +213,13 @@ std::pair<qreal, QString> Grantlee::calcFileSize(qreal size, int unitSystem,
+   bool found = false;
+   int count = 0;
+   const qreal baseVal = (_unitSystem == 10) ? 1000.0F : 1024.0F;
++#if FLT_EVAL_METHOD == 2
++  // Avoid that this is treated as long double, as the increased
++  // precision breaks the comparison below.
++  volatile qreal current = 1.0F;
++#else
+   qreal current = 1.0F;
++#endif
+   int units = decimalUnits.size();
+   while (!found && (count < units)) {
+     current *= baseVal;
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/grantlee-qt6.git/commitdiff/936c7c0844dd1dae8fa7c49fa3b0ee3b7f9c8742



More information about the pld-cvs-commit mailing list