diff options
author | danfe <danfe@FreeBSD.org> | 2015-01-15 15:40:48 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2015-01-15 15:40:48 +0800 |
commit | 7e2560ca0f2bc71f15f12b9d78dd2347f2a9285b (patch) | |
tree | 63eba0539254a7e482c78ceada2d3c6f0a1574b2 /astro | |
parent | 6b6102daae0f60ba2c79e7e7161bc1d7a37a1546 (diff) | |
download | freebsd-ports-gnome-7e2560ca0f2bc71f15f12b9d78dd2347f2a9285b.tar.gz freebsd-ports-gnome-7e2560ca0f2bc71f15f12b9d78dd2347f2a9285b.tar.zst freebsd-ports-gnome-7e2560ca0f2bc71f15f12b9d78dd2347f2a9285b.zip |
Merge upstream patch that fixes saving of screenshots when $HOME/Pictures
directory does not yet exist. While it might deem a minor issue, bump
port revision; the port is fast to build even on relatively slow hardware.
Launchpad bug #: 1410263
Bazaar revision: 0.12/5816
Diffstat (limited to 'astro')
-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()); ++ } + } + + |