aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
Diffstat (limited to 'astro')
-rw-r--r--astro/stellarium-qt4/Makefile1
-rw-r--r--astro/stellarium-qt4/files/patch-src_core_StelFileMgr.cpp27
2 files changed, 28 insertions, 0 deletions
diff --git a/astro/stellarium-qt4/Makefile b/astro/stellarium-qt4/Makefile
index 2a4ccba5a3b1..0fd3f90716fd 100644
--- a/astro/stellarium-qt4/Makefile
+++ b/astro/stellarium-qt4/Makefile
@@ -3,6 +3,7 @@
PORTNAME= stellarium
PORTVERSION= 0.12.5
+PORTREVISION= 1
CATEGORIES= astro
MASTER_SITES= SF/${PORTNAME}/Stellarium-sources/${PORTVERSION}
PKGNAMESUFFIX= -qt4
diff --git a/astro/stellarium-qt4/files/patch-src_core_StelFileMgr.cpp b/astro/stellarium-qt4/files/patch-src_core_StelFileMgr.cpp
new file mode 100644
index 000000000000..a4a1fa8a963a
--- /dev/null
+++ b/astro/stellarium-qt4/files/patch-src_core_StelFileMgr.cpp
@@ -0,0 +1,27 @@
+--- src/core/StelFileMgr.cpp.orig 2014-10-11 11:24:38 UTC
++++ src/core/StelFileMgr.cpp
+@@ -84,7 +84,23 @@ void StelFileMgr::init()
+ qWarning() << "WARNING: could not locate installation directory";
+ }
+
+- screenshotDir = QDesktopServices::storageLocation(QDesktopServices::PicturesLocation);
++ // Wasn't set path to screenshots directory via --screenshot-dir?
++ if (screenshotDir.isEmpty())
++ {
++ QString screenshotDirSuffix = "/Stellarium";
++ if (!QDesktopServices::storageLocation(QDesktopServices::PicturesLocation).isEmpty())
++ screenshotDir = QDesktopServices::storageLocation(QDesktopServices::PicturesLocation).append(screenshotDirSuffix);
++ else
++ screenshotDir = userDir.append(screenshotDirSuffix);
++ }
++ try
++ {
++ makeSureDirExistsAndIsWritable(screenshotDir);
++ }
++ catch (std::runtime_error &e)
++ {
++ qDebug("Error: cannot create screenshot directory: %s", e.what());
++ }
+ }
+
+