summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jolly <Matt.Jolly@footclan.ninja>2022-04-17 23:13:44 +1000
committerSam James <sam@gentoo.org>2022-04-18 21:29:17 +0100
commit027dc0a5290636d544eae044afbe4bbb6cdeac33 (patch)
tree7b832effef6b063585a6a458805e66451ddd069f /sci-astronomy/stellarium
parentsci-astronomy/stellarium: alphabetise patches (diff)
downloadgentoo-027dc0a5290636d544eae044afbe4bbb6cdeac33.tar.gz
gentoo-027dc0a5290636d544eae044afbe4bbb6cdeac33.tar.bz2
gentoo-027dc0a5290636d544eae044afbe4bbb6cdeac33.zip
sci-astronomy/stellarium: backport fix for segfault in star manager module
Signed-off-by: Matt Jolly <Matt.Jolly@footclan.ninja> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-astronomy/stellarium')
-rw-r--r--sci-astronomy/stellarium/files/stellarium-0.22.1-fix-star-manager-segfault.patch30
-rw-r--r--sci-astronomy/stellarium/stellarium-0.22.1.ebuild1
2 files changed, 31 insertions, 0 deletions
diff --git a/sci-astronomy/stellarium/files/stellarium-0.22.1-fix-star-manager-segfault.patch b/sci-astronomy/stellarium/files/stellarium-0.22.1-fix-star-manager-segfault.patch
new file mode 100644
index 000000000000..7f8981a006e2
--- /dev/null
+++ b/sci-astronomy/stellarium/files/stellarium-0.22.1-fix-star-manager-segfault.patch
@@ -0,0 +1,30 @@
+This patch is required to fix a segfault on startup in <=0.22.1 if star catalogue files are
+added or removed (USE=stars)
+
+Refer: https://github.com/Stellarium/stellarium/issues/2404
+
+This patch may be safely removed for 0.22.2 - it has been patched upstream.
+
+--- a/src/core/modules/StarMgr.cpp
++++ b/src/core/modules/StarMgr.cpp
+@@ -592,13 +592,13 @@ void StarMgr::setCheckFlag(const QString& catId, bool b)
+ return;
+ m["checked"]=b;
+ catalogsDescription[idx-1]=m;
+- starSettings["catalogs"]=catalogsDescription;
+- QFile tmp(starConfigFileFullPath);
+- if(tmp.open(QIODevice::WriteOnly))
+- {
+- StelJsonParser::write(starSettings, &tmp);
+- tmp.close();
+- }
++ }
++ starSettings["catalogs"]=catalogsDescription;
++ QFile tmp(starConfigFileFullPath);
++ if(tmp.open(QIODevice::WriteOnly))
++ {
++ StelJsonParser::write(starSettings, &tmp);
++ tmp.close();
+ }
+ }
+
diff --git a/sci-astronomy/stellarium/stellarium-0.22.1.ebuild b/sci-astronomy/stellarium/stellarium-0.22.1.ebuild
index 940b01d9d06d..1a8d4b878c4d 100644
--- a/sci-astronomy/stellarium/stellarium-0.22.1.ebuild
+++ b/sci-astronomy/stellarium/stellarium-0.22.1.ebuild
@@ -71,6 +71,7 @@ RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}/stellarium-0.20.3-unbundle-indi.patch"
"${FILESDIR}/stellarium-0.20.3-unbundle-zlib.patch"
+ "${FILESDIR}/stellarium-0.22.1-fix-star-manager-segfault.patch"
"${FILESDIR}/stellarium-0.22.1-unbundle-qtcompress.patch"
)