commit:     411a9d0f4f826c7bfc9dff734ff08d14ebb87e6e
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sat Apr  5 13:19:14 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Apr  9 02:04:15 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=411a9d0f

sci-astronomy/stellarium: fix build with qt6.9

Closes: https://bugs.gentoo.org/953056
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Closes: https://github.com/gentoo/gentoo/pull/41466
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../stellarium/files/stellarium-0.25.1-qt69.patch  | 58 ++++++++++++++++++++++
 sci-astronomy/stellarium/stellarium-25.1.ebuild    |  1 +
 2 files changed, 59 insertions(+)

diff --git a/sci-astronomy/stellarium/files/stellarium-0.25.1-qt69.patch 
b/sci-astronomy/stellarium/files/stellarium-0.25.1-qt69.patch
new file mode 100644
index 000000000000..ed59c719dc19
--- /dev/null
+++ b/sci-astronomy/stellarium/files/stellarium-0.25.1-qt69.patch
@@ -0,0 +1,58 @@
+From bbcd60ae52b6f1395ef2390a2d2ba9d0f98db548 Mon Sep 17 00:00:00 2001
+From: "Alexander V. Wolf" <[email protected]>
+Date: Wed, 26 Mar 2025 01:55:43 +0700
+Subject: [PATCH] [Qt 6.9] Fix compilation
+
+---
+ src/core/modules/ZoneArray.cpp |  2 +-
+ src/gui/AngleSpinBox.cpp       | 12 +++++-------
+ 2 files changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/src/core/modules/ZoneArray.cpp b/src/core/modules/ZoneArray.cpp
+index 19567500ae9bc..6ce092112767f 100644
+--- a/src/core/modules/ZoneArray.cpp
++++ b/src/core/modules/ZoneArray.cpp
+@@ -564,7 +564,7 @@ void SpecialZoneArray<Star>::searchAround(const StelCore* 
core, int index, const
+       const float dyrs = 
static_cast<float>(core->getJDE()-STAR_CATALOG_JDEPOCH)/365.25;
+       const SpecialZoneData<Star> *const z = getZones()+index;
+       Vec3d tmp;
+-      double RA, DEC, pmra, pmdec, PlxErr, Plx, RadialVel;
++      double RA, DEC, pmra, pmdec, Plx, RadialVel;
+       for (const Star* s=z->getStars();s<z->getStars()+z->size;++s)
+       {
+               s->getFull6DSolution(RA, DEC, Plx, pmra, pmdec, RadialVel, 
dyrs);
+diff --git a/src/gui/AngleSpinBox.cpp b/src/gui/AngleSpinBox.cpp
+index 3b1e4f9f2267b..bb7cb5da0166a 100644
+--- a/src/gui/AngleSpinBox.cpp
++++ b/src/gui/AngleSpinBox.cpp
+@@ -509,25 +509,23 @@ QSize AngleSpinBox::minimumSizeHint() const
+               case DMSSymbolsUnsigned:
+               {
+                       if (angleSpinBoxFormat == DMSLetters || 
angleSpinBoxFormat == DMSLettersUnsigned)
+-                              refText = QString("%1%2d %3m 
%4s").arg(signPlaceholder).arg(359).arg(59)
+-                                                                .arg(0, 0, 
'f', decimalPlaces, ' ');
++                              refText = QString("%1%2d %3m 
%4s").arg(signPlaceholder).arg(359).arg(59).arg(0., 0, 'f', decimalPlaces, ' ');
+                       else
+-                              refText = QString("%1%2° %3' 
%4\"").arg(signPlaceholder).arg(359).arg(59)
+-                                                                 .arg(0, 0, 
'f', decimalPlaces, ' ');
++                              refText = QString("%1%2° %3' 
%4\"").arg(signPlaceholder).arg(359).arg(59).arg(0., 0, 'f', decimalPlaces, ' 
');
+                       break;
+               }
+               case HMSLetters:
+               case HMSSymbols:
+               {
+                       if (angleSpinBoxFormat == HMSLetters)
+-                              refText = QString("%1h %2m 
%3s").arg(23).arg(59).arg(0, 0, 'f', decimalPlaces, ' ');
++                              refText = QString("%1h %2m 
%3s").arg(23).arg(59).arg(0., 0, 'f', decimalPlaces, ' ');
+                       else
+-                              refText = QString("%1h %2' 
%3\"").arg(23).arg(59).arg(0, 0, 'f', decimalPlaces, ' ');
++                              refText = QString("%1h %2' 
%3\"").arg(23).arg(59).arg(0., 0, 'f', decimalPlaces, ' ');
+                       break;
+               }
+               case DecimalDeg:
+               {
+-                      refText = 
QString("%1%2°").arg(signPlaceholder).arg(360, 0, 'f', decimalPlaces, ' ');
++                      refText = 
QString("%1%2°").arg(signPlaceholder).arg(360., 0, 'f', decimalPlaces, ' ');
+                       break;
+               }
+               default:

diff --git a/sci-astronomy/stellarium/stellarium-25.1.ebuild 
b/sci-astronomy/stellarium/stellarium-25.1.ebuild
index 0786419d3f70..48c2561592e4 100644
--- a/sci-astronomy/stellarium/stellarium-25.1.ebuild
+++ b/sci-astronomy/stellarium/stellarium-25.1.ebuild
@@ -87,6 +87,7 @@ RESTRICT="!test? ( test )"
 PATCHES=(
        "${FILESDIR}/stellarium-0.25.1-md4c.patch"
        "${FILESDIR}/stellarium-0.25.1-astrometry.patch"
+       "${FILESDIR}/stellarium-0.25.1-qt69.patch"
 )
 
 VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/stellarium.asc

Reply via email to