Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jan 2015 07:40:49 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r377061 - in head/astro/stellarium-qt4: . files
Message-ID:  <201501150740.t0F7enw1007974@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Thu Jan 15 07:40:48 2015
New Revision: 377061
URL: https://svnweb.freebsd.org/changeset/ports/377061
QAT: https://qat.redports.org/buildarchive/r377061/

Log:
  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

Added:
  head/astro/stellarium-qt4/files/patch-src_core_StelFileMgr.cpp   (contents, props changed)
Modified:
  head/astro/stellarium-qt4/Makefile

Modified: head/astro/stellarium-qt4/Makefile
==============================================================================
--- head/astro/stellarium-qt4/Makefile	Thu Jan 15 00:26:39 2015	(r377060)
+++ head/astro/stellarium-qt4/Makefile	Thu Jan 15 07:40:48 2015	(r377061)
@@ -3,6 +3,7 @@
 
 PORTNAME=	stellarium
 PORTVERSION=	0.12.5
+PORTREVISION=	1
 CATEGORIES=	astro
 MASTER_SITES=	SF/${PORTNAME}/Stellarium-sources/${PORTVERSION}
 PKGNAMESUFFIX=	-qt4

Added: head/astro/stellarium-qt4/files/patch-src_core_StelFileMgr.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/astro/stellarium-qt4/files/patch-src_core_StelFileMgr.cpp	Thu Jan 15 07:40:48 2015	(r377061)
@@ -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());
++	}
+ }
+ 
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501150740.t0F7enw1007974>