rpms/scidavis/F-11 scidavis-0.2.3-manual.patch, NONE, 1.1 scidavis-0.2.3-pro.patch, NONE, 1.1 scidavis.spec, 1.20, 1.21 scidavis-0.2.0-pro.patch, 1.2, NONE

Eric Tanguy tanguy at fedoraproject.org
Fri Jul 17 13:13:16 UTC 2009


Author: tanguy

Update of /cvs/extras/rpms/scidavis/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17629

Modified Files:
	scidavis.spec 
Added Files:
	scidavis-0.2.3-manual.patch scidavis-0.2.3-pro.patch 
Removed Files:
	scidavis-0.2.0-pro.patch 
Log Message:


scidavis-0.2.3-manual.patch:
 scidavis.pro              |    5 ++
 src/ApplicationWindow.cpp |   86 +++++++++++++++++++++++++++-------------------
 src/ApplicationWindow.h   |    6 ++-
 3 files changed, 62 insertions(+), 35 deletions(-)

--- NEW FILE scidavis-0.2.3-manual.patch ---

Index: scidavis/src/ApplicationWindow.h

===================================================================

--- scidavis/src/ApplicationWindow.h	(révision 1180)

+++ scidavis/src/ApplicationWindow.h	(révision 1181)

@@ -638,6 +638,7 @@

 	void showHelp();

 	static void showStandAloneHelp();

 	void chooseHelpFolder();

+	QString guessHelpFolder();

 	void showPlotWizard();

 	void showFitPolynomDialog();

 	void showIntegrationDialog();

@@ -1057,7 +1058,10 @@

     QAction *actionShowExpDecayDialog, *actionShowTwoExpDecayDialog, *actionShowExpDecay3Dialog;

     QAction *actionFitExpGrowth, *actionFitSigmoidal, *actionFitGauss, *actionFitLorentz, *actionShowFitDialog;

     QAction *actionShowAxisDialog, *actionShowTitleDialog;

-    QAction *actionAbout, *actionShowHelp, *actionChooseHelpFolder;

+    QAction *actionAbout, *actionShowHelp;

+#ifdef DYNAMIC_MANUAL_PATH

+   	QAction *actionChooseHelpFolder;

+#endif

     QAction *actionRename, *actionCloseWindow, *actionConvertTable;

     QAction *actionAddColToTable, *actionDeleteLayer, *actionInterpolate;

     QAction *actionResizeActiveWindow, *actionHideActiveWindow;

Index: scidavis/src/ApplicationWindow.cpp

===================================================================

--- scidavis/src/ApplicationWindow.cpp	(révision 1180)

+++ scidavis/src/ApplicationWindow.cpp	(révision 1181)

@@ -915,7 +915,9 @@

 	help->setFont(appFont);

 

 	help->addAction(actionShowHelp);

+#ifdef DYNAMIC_MANUAL_PATH

 	help->addAction(actionChooseHelpFolder);

+#endif

 	help->addSeparator();

 	help->addAction(actionHomePage);

 	help->addAction(actionCheckUpdates);

@@ -4183,42 +4185,27 @@

 	settings.beginGroup("/Paths");

 	workingDir = settings.value("/WorkingDir", qApp->applicationDirPath()).toString();

 

+#ifdef DYNAMIC_MANUAL_PATH

 #ifdef MANUAL_PATH

 	helpFilePath = settings.value("/HelpFile", MANUAL_PATH "/index.html").toString();

 #elif defined(DOC_PATH)

 	helpFilePath = settings.value("/HelpFile", DOC_PATH "/manual/index.html").toString();

-#elif defined(Q_OS_WIN)

-	helpFilePath = settings.value("/HelpFile", qApp->applicationDirPath()+"/manual/index.html").toString();

 #else

 	QVariant help_file_setting = settings.value("/HelpFile");

 	if (help_file_setting.isValid())

 		helpFilePath = help_file_setting.toString();

-	else {

-		QFileInfo help_file_info;

-		QString help_dir_base = QString("/usr/share/doc/scidavis-%1.%2.%3")

-			.arg((scidavis_version & 0xff0000) >> 16)

-			.arg((scidavis_version & 0x00ff00) >> 8)

-			.arg(scidavis_version & 0x0000ff);

-		help_file_info.setFile(help_dir_base);

-		if (!help_file_info.exists())

-			help_dir_base = "/usr/share/doc/scidavis";

-		QStringList help_dir_suffixes;

-		QString locale = QLocale().name(); // language_country according to ISO 639 and 3166, respectively

-		help_dir_suffixes

-			<< QString("-") + locale

-			<< QString("-") + locale.section('_',0,0)

-			<< QString("-") + appLanguage

-			<< "-en"

-			<< "";

-		foreach (QString suffix, help_dir_suffixes) {

-			help_file_info.setFile(help_dir_base + QString("/manual%1/index.html").arg(suffix));

-			if (help_file_info.exists())

-				break;

-		}

-		// intentionally defaults to /usr/share/doc/scidavis/manual/index.html even if it doesn't exist

-		helpFilePath = help_file_info.absoluteFilePath();

-	}

+	else

+		helpFilePath = guessHelpFolder();

 #endif

+#else // ifdef DYNAMIC_MANUAL_PATH

+#ifdef MANUAL_PATH

+	helpFilePath = MANUAL_PATH "/index.html";

+#elif defined(DOC_PATH)

+	helpFilePath = DOC_PATH "/manual/index.html";

+#else

+	helpFilePath = guessHelpFolder();

+#endif

+#endif

 

 #ifdef Q_OS_WIN

 	fitPluginsPath = settings.value("/FitPlugins", "fitPlugins").toString();

@@ -8237,13 +8224,8 @@

 				tr("Please indicate the location of the help file!")+"<br>"+

 				tr("The manual can be downloaded from the following internet address:")+

 				"<p><a href = http://sourceforge.net/project/showfiles.php?group_id=199120>http://sourceforge.net/project/showfiles.php?group_id=199120</a></p>");

-		QString fn = QFileDialog::getOpenFileName(QDir::currentDirPath(), "*.html", this );

-		if (!fn.isEmpty())

-		{

-			QFileInfo fi(fn);

-			helpFilePath=fi.absFilePath();

-			saveSettings();

-		}

+		chooseHelpFolder();

+		saveSettings();

 	}

 

 	QFileInfo fi(helpFilePath);

@@ -10721,8 +10703,10 @@

 	actionShowHelp->setShortcut( tr("Ctrl+H") );

 	connect(actionShowHelp, SIGNAL(activated()), this, SLOT(showHelp()));

 

+#ifdef DYNAMIC_MANUAL_PATH

 	actionChooseHelpFolder = new QAction(tr("&Choose Help Folder..."), this);

 	connect(actionChooseHelpFolder, SIGNAL(activated()), this, SLOT(chooseHelpFolder()));

+#endif

 

 	actionRename = new QAction(tr("&Rename Window"), this);

 	connect(actionRename, SIGNAL(activated()), this, SLOT(renameActiveWindow()));

@@ -11187,7 +11171,10 @@

 	actionShowHelp->setMenuText(tr("&Help"));

 	actionShowHelp->setShortcut(tr("Ctrl+H"));

 

+#ifdef DYNAMIC_MANUAL_PATH

 	actionChooseHelpFolder->setMenuText(tr("&Choose Help Folder..."));

+#endif

+

 	actionRename->setMenuText(tr("&Rename Window"));

 

 	actionCloseWindow->setMenuText(tr("Close &Window"));

@@ -13695,3 +13682,34 @@

 		result.append(aspect->name());

 	return result;

 }

+

+QString ApplicationWindow::guessHelpFolder()

+{

+#if defined(Q_OS_WIN)

+	return qApp->applicationDirPath()+"/manual/index.html";

+#else

+	QFileInfo help_file_info;

+	QString help_dir_base = QString("/usr/share/doc/scidavis-%1.%2.%3")

+		.arg((SciDAVis::version() & 0xff0000) >> 16)

+		.arg((SciDAVis::version() & 0x00ff00) >> 8)

+		.arg(SciDAVis::version() & 0x0000ff);

+	help_file_info.setFile(help_dir_base);

+	if (!help_file_info.exists())

+		help_dir_base = "/usr/share/doc/scidavis";

+	QStringList help_dir_suffixes;

+	QString locale = QLocale().name(); // language_country according to ISO 639 and 3166, respectively

+	help_dir_suffixes

+		<< QString("-") + locale

+		<< QString("-") + locale.section('_',0,0)

+		<< QString("-") + appLanguage

+		<< "-en"

+		<< "";

+	foreach (QString suffix, help_dir_suffixes) {

+		help_file_info.setFile(help_dir_base + QString("/manual%1/index.html").arg(suffix));

+		if (help_file_info.exists())

+			break;

+	}

+	// intentionally defaults to /usr/share/doc/scidavis/manual/index.html even if it doesn't exist

+	return help_file_info.absoluteFilePath();

+#endif

+}

Index: scidavis/scidavis.pro

===================================================================

--- scidavis/scidavis.pro	(révision 1180)

+++ scidavis/scidavis.pro	(révision 1181)

@@ -42,6 +42,11 @@

 ### Usually, the manual will be expected in the "manual" subfolder of "documentation.path" (see above).

 ### You can override this, uncomment and adjust the path behind the '=' in the next line.

 # manual.path = $$INSTALLBASE/share/doc/scidavis/manual

+### Enables choosing of help folder at runtime, instead of relying on the above path only.

+### The downside is that the help folder will be remembered as a configuration option, so a binary

+### package cannot easily update the path for its users.

+### Dynamic selection of the manual path was the only available option up until SciDAVis 0.2.3.

+DEFINES += DYNAMIC_MANUAL_PATH

 ### Important: translationfiles.path will be the directory where scidavis expects

 ### the translation .qm files at runtime. Therefore you need to set it corretly even if 

 ### you do not use this project file to generate the translation files.

scidavis-0.2.3-pro.patch:
 scidavis.pro |   36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

--- NEW FILE scidavis-0.2.3-pro.patch ---

--- scidavis-0.2.3/scidavis/scidavis.pro	2009-07-17 15:02:39.842755567 +0200

+++ scidavis-0.2.3/scidavis/scidavis.pro.new	2009-07-17 15:06:10.504756138 +0200

@@ -13,7 +13,7 @@

 

 ### what to install

 INSTALLS        += target       # this is the program itself

-INSTALLS        += documentation     # README, INSTALL.html, manual (if present in the manual subfolder), etc.

+#INSTALLS        += documentation     # README, INSTALL.html, manual (if present in the manual subfolder), etc.

 ### Comment out the next line if you do not want automatic compilation and installation of the translations

 INSTALLS        += translationfiles

 

@@ -41,12 +41,12 @@

 win32: documentation.path = "$$INSTALLBASE"                        # ... on Winodws

 ### Usually, the manual will be expected in the "manual" subfolder of "documentation.path" (see above).

 ### You can override this, uncomment and adjust the path behind the '=' in the next line.

-# manual.path = $$INSTALLBASE/share/doc/scidavis/manual

+manual.path = $$INSTALLBASE/share/doc/scidavis-manual-0.2.3

 ### Enables choosing of help folder at runtime, instead of relying on the above path only.

 ### The downside is that the help folder will be remembered as a configuration option, so a binary

 ### package cannot easily update the path for its users.

 ### Dynamic selection of the manual path was the only available option up until SciDAVis 0.2.3.

-DEFINES += DYNAMIC_MANUAL_PATH

+#DEFINES += DYNAMIC_MANUAL_PATH

 ### Important: translationfiles.path will be the directory where scidavis expects

 ### the translation .qm files at runtime. Therefore you need to set it corretly even if 

 ### you do not use this project file to generate the translation files.

@@ -87,34 +87,34 @@

 ### are compiled against Qt4), dynamically against everything else.

 #############################################################################

 

-unix:INCLUDEPATH  += ../3rdparty/qwtplot3d/include

-unix:LIBS         += ../3rdparty/qwtplot3d/lib/libqwtplot3d.a

+#unix:INCLUDEPATH  += ../3rdparty/qwtplot3d/include

+#unix:LIBS         += ../3rdparty/qwtplot3d/lib/libqwtplot3d.a

 

-unix:INCLUDEPATH  += ../3rdparty/qwt/src

-unix:LIBS         += ../3rdparty/qwt/lib/libqwt.a

+#unix:INCLUDEPATH  += ../3rdparty/qwt/src

+#unix:LIBS         += ../3rdparty/qwt/lib/libqwt.a

 

-unix:LIBS         += -L/usr/lib$${libsuff}

-unix:LIBS         += -lgsl -lgslcblas -lz

+#unix:LIBS         += -L/usr/lib$${libsuff}

+#unix:LIBS         += -lgsl -lgslcblas -lz

 ### muparser 1.30 does not compile as a shared lib on Linux

-unix:LIBS         += -L/usr/local/lib$${libsuff}

-unix:LIBS         += /usr/local/lib/libmuparser.a

-unix:INCLUDEPATH  += /usr/local/include

+#unix:LIBS         += -L/usr/local/lib$${libsuff}

+#unix:LIBS         += /usr/local/lib/libmuparser.a

+#unix:INCLUDEPATH  += /usr/local/include

 

 #############################################################################

 ### Link everything dynamically

 #############################################################################

 

-#unix:INCLUDEPATH  += /usr/include/qwt5

-#unix:LIBS         += -L/usr/lib$${libsuff}

+unix:INCLUDEPATH  += /usr/include/qwt

+unix:LIBS         += -L/usr/lib$${libsuff}

 ## dynamically link against Qwt(3D) installed system-wide

 ## WARNING: make sure they are compiled against >= Qt4.2

 ## Mixing Qt 4.2 and Qt >= 4.3 compiled stuff may also 

 ## cause problems.

-#unix:INCLUDEPATH  += /usr/include/qwtplot3d

-#unix:LIBS         += -lqwtplot3d

-#unix:LIBS         += -lqwt

+unix:INCLUDEPATH  += /usr/include/qwtplot3d

+unix:LIBS         += -lqwtplot3d

+unix:LIBS         += -lqwt

 ##dynamically link against GSL and zlib installed system-wide

-#unix:LIBS         += -lgsl -lgslcblas -lz -lmuparser

+unix:LIBS         += -lgsl -lgslcblas -lz -lmuparser

 

 #############################################################################

 ### Default settings for Windows


Index: scidavis.spec
===================================================================
RCS file: /cvs/extras/rpms/scidavis/F-11/scidavis.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- scidavis.spec	13 Jul 2009 20:34:19 -0000	1.20
+++ scidavis.spec	17 Jul 2009 13:13:16 -0000	1.21
@@ -1,10 +1,11 @@
 Summary:	Scientific Data Analysis and Visualization
 Name:		scidavis
 Version:	0.2.3
-Release: 	2%{?dist}
+Release: 	3%{?dist}
 Source0:	http://download.sourceforge.net/sourceforge/scidavis/%{name}-%{version}.tar.bz2
 Source1:	http://download.sourceforge.net/sourceforge/scidavis/scidavis-manual-0.1_2008-02-28.tar.bz2
-Patch0:		scidavis-0.2.0-pro.patch
+Patch0:		scidavis-0.2.3-manual.patch
+Patch1:		scidavis-0.2.3-pro.patch
 URL:		http://scidavis.sourceforge.net/
 License:	GPLv2
 Group: 		Applications/Engineering
@@ -29,6 +30,7 @@ This package contains the manual for Sci
 %prep
 %setup -q -a 1
 %patch0 -p1
+%patch1 -p1
 
 sed -i -e 's/50/100/' scidavis/scidavis.xml
 
@@ -98,6 +100,9 @@ rm -rf %{buildroot}
 %doc manual/*
 
 %changelog
+* Fri Jul 17 2009 Eric Tanguy <eric.tanguy at univ-nantes.fr> - 0.2.3-3
+- Patch for manual path
+
 * Mon Jul 13 2009 Eric Tanguy <eric.tanguy at univ-nantes.fr> - 0.2.3-2
 - BZ #510968
 


--- scidavis-0.2.0-pro.patch DELETED ---




More information about the fedora-extras-commits mailing list