diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2015-01-15 07:40:48 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2015-01-15 07:40:48 +0000 |
commit | e2881573f1472c4bd4cf2f03244de2862690c1dd (patch) | |
tree | 63eba0539254a7e482c78ceada2d3c6f0a1574b2 /astro/stellarium-qt4 | |
parent | a7c9e17d6925947ffc18464c65b32d8246dfb61c (diff) |
Notes
Diffstat (limited to 'astro/stellarium-qt4')
-rw-r--r-- | astro/stellarium-qt4/Makefile | 1 | ||||
-rw-r--r-- | astro/stellarium-qt4/files/patch-src_core_StelFileMgr.cpp | 27 |
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()); ++ } + } + + |