summaryrefslogtreecommitdiff
path: root/extra/qtiplot
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/qtiplot
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/qtiplot')
-rw-r--r--extra/qtiplot/PKGBUILD78
-rw-r--r--extra/qtiplot/build.conf.archlinux29
-rw-r--r--extra/qtiplot/gentoo-fix-origin-build-failure.patch72
-rw-r--r--extra/qtiplot/qtiplot-0.9.7.14-system-liborigin.patch101
-rw-r--r--extra/qtiplot/qtiplot.desktop13
-rw-r--r--extra/qtiplot/qtiplot.install12
-rw-r--r--extra/qtiplot/qtiplot.pngbin0 -> 936 bytes
-rw-r--r--extra/qtiplot/qtiplot.xml17
-rw-r--r--extra/qtiplot/qwtplot3d_gcc.patch9
-rw-r--r--extra/qtiplot/sip.patch13
10 files changed, 344 insertions, 0 deletions
diff --git a/extra/qtiplot/PKGBUILD b/extra/qtiplot/PKGBUILD
new file mode 100644
index 000000000..03644f0cf
--- /dev/null
+++ b/extra/qtiplot/PKGBUILD
@@ -0,0 +1,78 @@
+# $Id: PKGBUILD 112432 2011-03-04 22:39:07Z eric $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: damir <damir.archlinux.org>
+# Contributor: Gergely Imreh <imrehg@gmail.com>
+
+pkgname=qtiplot
+pkgver=0.9.8.2
+pkgrel=6
+pkgdesc="Data analysis and scientific plotting - free clone of Origin"
+arch=('i686' 'x86_64')
+url="http://soft.proindependent.com/qtiplot.html"
+depends=('muparser' 'gsl' 'python2-qt' 'boost-libs' 'shared-mime-info' 'mesa' 'liborigin2' 'qt-assistant-compat')
+# build against qwtplot3d provided in the package ...
+# build against qwt provided in the package ...
+# as systemwide one doesn't provide all needed functions
+makedepends=('pkg-config' 'boost')
+license=('GPL2')
+install=${pkgname}.install
+source=(http://download.berlios.de/qtiplot/qtiplot-${pkgver}.tar.bz2
+ $pkgname.desktop
+ $pkgname.png
+ build.conf.archlinux
+ qwtplot3d_gcc.patch
+ qtiplot.xml
+ qtiplot-0.9.7.14-system-liborigin.patch
+ gentoo-fix-origin-build-failure.patch)
+md5sums=('e8335a8760e8c2ac044607d5a4bb80ca' '56bd53f4f1367c285086acb969f13348'\
+ 'ad8affbd6f0d5cbdcde46c923ee2668a' '4fc37151dc30d5ca36fd7d891a8bc41b'\
+ 'ab02c436ec2c04b1838cb5517383b4eb' '35683f3b32e1edcca0bb02c471d284e9'\
+ 'fa7cfc5ba60d28f264ad53869d31fcc8' '642cb38c6579b51b86834c8640130b6f')
+sha1sums=('dd8d1003cee8767d4ba9e616e5263da1302c290d' '4d5d7cf3965a0a1b1aa9cafc34e70ee207700bc8'\
+ '4301cb2a36024a10108b689990d28c4fe5c7416e' '7afcdd4eca157f55e3ec4276712c466b3dc05106'\
+ '301bf6f70e8c1bb9ffd55eb49eedde7b29a12909' '285f57d865956d93250ec548288c5bface096b6b'\
+ '86899322f259be8594399642170f3f642d7f5f75' '9d6373fd9c0d1061796d1b920981124b6e9a49cf')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np0 -i "${srcdir}/qtiplot-0.9.7.14-system-liborigin.patch"
+ patch -Np0 -i "${srcdir}/gentoo-fix-origin-build-failure.patch"
+ install -Dm644 "${srcdir}/build.conf.archlinux" build.conf
+
+ # Make qwt
+ sed -i "s:elif:else:g" qtiplot/src/scripting/ScriptEdit.cpp
+ patch -Np1 -i "${srcdir}/qwtplot3d_gcc.patch"
+ cd ./3rdparty/qwt
+ qmake
+ make
+
+ # Make qwtplot3d
+ cd ../qwtplot3d
+ qmake
+ make
+
+ # Make qtiplot
+ cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}"
+
+ # fix stuff
+ sed -i 's|/usr/local/|/usr/share/|' qtiplot.pro
+ sed -i 's|<QAssistantClient>|<QtAssistant/qassistantclient.h>|' src/core/ApplicationWindow.cpp
+ sed -i 's#d_python_config_folder + "#"/usr/share/qtiplot#' src/core/ApplicationWindow.cpp
+
+ qmake qtiplot.pro QMAKESPEC=linux-g++
+ make QTDIR=/usr/ QMAKESPEC=linux-g++
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}"
+
+ INSTALL_ROOT="${pkgdir}" make install
+
+ # make it nice:
+ install -D -m644 "${srcdir}/${pkgname}.png" \
+ "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ install -D -m644 "${srcdir}/${pkgname}.desktop" \
+ "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -D -m644 "${srcdir}/${pkgname}.xml" \
+ "${pkgdir}/usr/share/mime/packages/${pkgname}.xml"
+}
diff --git a/extra/qtiplot/build.conf.archlinux b/extra/qtiplot/build.conf.archlinux
new file mode 100644
index 000000000..2cab47f9c
--- /dev/null
+++ b/extra/qtiplot/build.conf.archlinux
@@ -0,0 +1,29 @@
+isEmpty( QTI_ROOT ) {
+ message( "each file including this config needs to set QTI_ROOT to the dir containing this file!" )
+}
+
+SYS_INCLUDEPATH = /usr/include
+SYS_LIBS = -L/usr/lib
+
+MUPARSER_LIBS = -lmuparser
+GSL_LIBS = -lgsl -lgslcblas
+BOOST_INCLUDEPATH = /usr/include/boost
+BOOST_LIBS = -lboost_date_time -lboost_thread
+QWT_INCLUDEPATH = $$QTI_ROOT/3rdparty/qwt/src
+QWT_LIBS = $$QTI_ROOT/3rdparty/qwt/lib/libqwt.a
+QWT3D_INCLUDEPATH = $$QTI_ROOT/3rdparty/qwtplot3d/include
+QWT3D_LIBS = $$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
+LIB_ORIGIN_INCLUDEPATH = /usr/include/liborigin2
+LIB_ORIGIN_LIBS = -lorigin2
+QTEXENGINE_LIBS = $$QTI_ROOT/3rdparty/QTeXEngine
+
+PYTHON = python2
+LUPDATE = lupdate
+LRELEASE = lrelease
+
+SCRIPTING_LANGS += muParser
+SCRIPTING_LANGS += Python
+
+CONFIG += CustomInstall
+DEFINES += SCRIPTING_CONSOLE
+
diff --git a/extra/qtiplot/gentoo-fix-origin-build-failure.patch b/extra/qtiplot/gentoo-fix-origin-build-failure.patch
new file mode 100644
index 000000000..931d87009
--- /dev/null
+++ b/extra/qtiplot/gentoo-fix-origin-build-failure.patch
@@ -0,0 +1,72 @@
+--- qtiplot/src/origin/importOPJ.cpp 2010-09-01 11:07:38 +0000
++++ qtiplot/src/origin/importOPJ.cpp 2010-09-07 10:12:30 +0000
+@@ -473,6 +473,8 @@
+ }
+ table->setDayFormat(format, j);
+ break;
++ default:
++ break;
+ }
+ table->freeMemory();
+ }
+@@ -720,7 +722,6 @@
+ bkg.setAlpha(0);
+ graph->setCanvasBackground(bkg);
+
+- int auto_color = -1;
+ int style = 0;
+ bool matrixImage = false;
+ for(unsigned int c = 0; c < layer.curves.size(); ++c){
+@@ -1461,7 +1462,7 @@
+
+ if (boxWhiskersPlot){
+ QStringList curveNames;
+- for (unsigned int i = 0; i < graph->curveCount(); i++){
++ for (int i = 0; i < graph->curveCount(); i++){
+ BoxCurve *box = (BoxCurve *)graph->curve(i);
+ if (!box || box->type() != Graph::Box)
+ continue;
+@@ -1659,7 +1660,6 @@
+ for(unsigned int c = 0; c < layer.curves.size(); ++c){
+ Origin::GraphCurve& _curve = layer.curves[c];
+ QString data(_curve.dataName.c_str());
+- int color = 0;
+ double fFontScaleFactor = 2.0;
+ switch(_curve.type){
+ case Origin::GraphCurve::Line3D:
+@@ -1809,7 +1809,6 @@
+ }
+
+ QStringList formulas;
+- double start, end;
+
+ plot->showColorLegend(false);
+ plot->setFramed();
+@@ -1951,8 +1950,8 @@
+
+ QList <PieLabel *> pieTexts = p->labelsList();
+ QFont font(mw->plotLegendFont);
+- unsigned int lsize = layer.pieTexts.size();
+- for(unsigned int i = 0; i < lsize && i < pieTexts.size(); ++i){
++ int lsize = layer.pieTexts.size();
++ for(int i = 0; i < lsize && i < pieTexts.size(); ++i){
+ Origin::TextBox text = layer.pieTexts[lsize - i - 1];
+ font.setPointSizeF(text.fontSize*fFontScaleFactor);
+ QFontMetrics fm(font, graph);
+@@ -2159,12 +2158,12 @@
+ line.replace("&lbracket;", "(");
+ line.replace("&rbracket;", ")");
+
+- QRegExp fontModifier("\p(\\d)+\\(.*\\)");//remove \p163(...) like tags
++ QRegExp fontModifier("\\\\p(\\d)+\\(.*\\)");//remove \p163(...) like tags
+ int index = line.indexOf(fontModifier);
+ while (index >= 0){
+ int pos1 = line.indexOf("(", index + 2) + 1;
+ int length = fontModifier.matchedLength();
+- line = line.mid(pos1, length - pos1);
++ line = line.mid(pos1, length - pos1 - 1);
+ index = line.indexOf(fontModifier, index + length);
+ }
+
+
+
diff --git a/extra/qtiplot/qtiplot-0.9.7.14-system-liborigin.patch b/extra/qtiplot/qtiplot-0.9.7.14-system-liborigin.patch
new file mode 100644
index 000000000..71ecfd5b0
--- /dev/null
+++ b/extra/qtiplot/qtiplot-0.9.7.14-system-liborigin.patch
@@ -0,0 +1,101 @@
+=== modified file 'build.conf.example'
+--- build.conf.example 2010-04-22 18:57:40 +0000
++++ build.conf.example 2010-04-22 18:58:06 +0000
+@@ -118,6 +118,14 @@
+ EMF_ENGINE_LIBS = $$QTI_ROOT/3rdparty/EmfEngine/libEmfEngine.a
+
+ ##########################################################
++## liborigin - keep commented if you wish to use local copy
++# http://sourceforge.net/projects/liborigin/
++##########################################################
++
++# LIB_ORIGIN_INCLUDEPATH = /usr/include/liborigin2
++# LIB_ORIGIN_LIBS = -lorigin2
++
++##########################################################
+ ## python - only used if python is needed
+ ##########################################################
+
+
+=== modified file 'qtiplot/qtiplot.pro'
+--- qtiplot/qtiplot.pro 2010-04-22 18:57:40 +0000
++++ qtiplot/qtiplot.pro 2010-04-22 19:08:57 +0000
+@@ -16,6 +16,7 @@
+ INCLUDEPATH += $$QWT_INCLUDEPATH
+ INCLUDEPATH += $$QWT3D_INCLUDEPATH
+ INCLUDEPATH += $$GSL_INCLUDEPATH
++INCLUDEPATH += $$LIB_ORIGIN_INCLUDEPATH
+
+ # configurable libs
+ LIBS += $$MUPARSER_LIBS
+@@ -23,6 +24,7 @@
+ LIBS += $$QWT3D_LIBS
+ LIBS += $$QTEXENGINE_LIBS
+ LIBS += $$GSL_LIBS
++LIBS += $$LIB_ORIGIN_LIBS
+
+ #############################################################################
+ ###################### BASIC PROJECT PROPERTIES #############################
+@@ -150,6 +152,10 @@
+ SOURCES += ../3rdparty/QTeXEngine/src/QTeXPaintDevice.cpp
+ }
+
++isEmpty(LIB_ORIGIN_LIBS) {
++ INCLUDEPATH += ../3rdparty/liborigin
++}
++
+ ###############################################################
+ ##################### Scripting: PYTHON + SIP + PyQT ##########
+ ###############################################################
+
+=== modified file 'qtiplot/src/origin/origin.pri'
+--- qtiplot/src/origin/origin.pri 2010-04-22 17:58:49 +0000
++++ qtiplot/src/origin/origin.pri 2010-04-22 19:08:15 +0000
+@@ -4,24 +4,28 @@
+ INCLUDEPATH += src/origin/
+
+ HEADERS += src/origin/importOPJ.h
+-HEADERS += ../3rdparty/liborigin/OriginObj.h
+-HEADERS += ../3rdparty/liborigin/OriginFile.h
+-HEADERS += ../3rdparty/liborigin/OriginParser.h
+-HEADERS += ../3rdparty/liborigin/OriginDefaultParser.h
+-HEADERS += ../3rdparty/liborigin/Origin600Parser.h
+-HEADERS += ../3rdparty/liborigin/Origin610Parser.h
+-HEADERS += ../3rdparty/liborigin/Origin700Parser.h
+-HEADERS += ../3rdparty/liborigin/Origin750Parser.h
+-HEADERS += ../3rdparty/liborigin/Origin800Parser.h
+-HEADERS += ../3rdparty/liborigin/Origin810Parser.h
+
+ SOURCES += src/origin/importOPJ.cpp
+-SOURCES += ../3rdparty/liborigin/OriginFile.cpp
+-SOURCES += ../3rdparty/liborigin/OriginParser.cpp
+-SOURCES += ../3rdparty/liborigin/OriginDefaultParser.cpp
+-SOURCES += ../3rdparty/liborigin/Origin600Parser.cpp
+-SOURCES += ../3rdparty/liborigin/Origin610Parser.cpp
+-SOURCES += ../3rdparty/liborigin/Origin700Parser.cpp
+-SOURCES += ../3rdparty/liborigin/Origin750Parser.cpp
+-SOURCES += ../3rdparty/liborigin/Origin800Parser.cpp
+-SOURCES += ../3rdparty/liborigin/Origin810Parser.cpp
++
++isEmpty(LIB_ORIGIN_LIBS) {
++ HEADERS += ../3rdparty/liborigin/OriginObj.h
++ HEADERS += ../3rdparty/liborigin/OriginFile.h
++ HEADERS += ../3rdparty/liborigin/OriginParser.h
++ HEADERS += ../3rdparty/liborigin/OriginDefaultParser.h
++ HEADERS += ../3rdparty/liborigin/Origin600Parser.h
++ HEADERS += ../3rdparty/liborigin/Origin610Parser.h
++ HEADERS += ../3rdparty/liborigin/Origin700Parser.h
++ HEADERS += ../3rdparty/liborigin/Origin750Parser.h
++ HEADERS += ../3rdparty/liborigin/Origin800Parser.h
++ HEADERS += ../3rdparty/liborigin/Origin810Parser.h
++
++ SOURCES += ../3rdparty/liborigin/OriginFile.cpp
++ SOURCES += ../3rdparty/liborigin/OriginParser.cpp
++ SOURCES += ../3rdparty/liborigin/OriginDefaultParser.cpp
++ SOURCES += ../3rdparty/liborigin/Origin600Parser.cpp
++ SOURCES += ../3rdparty/liborigin/Origin610Parser.cpp
++ SOURCES += ../3rdparty/liborigin/Origin700Parser.cpp
++ SOURCES += ../3rdparty/liborigin/Origin750Parser.cpp
++ SOURCES += ../3rdparty/liborigin/Origin800Parser.cpp
++ SOURCES += ../3rdparty/liborigin/Origin810Parser.cpp
++}
diff --git a/extra/qtiplot/qtiplot.desktop b/extra/qtiplot/qtiplot.desktop
new file mode 100644
index 000000000..ab64b3852
--- /dev/null
+++ b/extra/qtiplot/qtiplot.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Exec=qtiplot
+Comment=An application for plotting and analysis of data sets and functions
+Comment[de]=Ein Programm zum Plotten und analysieren von Daten und Funktionen
+Terminal=false
+Name=QtiPlot
+Protocols=file
+Icon=/usr/share/pixmaps/qtiplot.png
+# Categories=QT;KDE;Science;Utility;X-KDE-More
+# Categories=Qt;KDE;Math;Education
+Categories=Science;X-Plotting;
diff --git a/extra/qtiplot/qtiplot.install b/extra/qtiplot/qtiplot.install
new file mode 100644
index 000000000..66631520d
--- /dev/null
+++ b/extra/qtiplot/qtiplot.install
@@ -0,0 +1,12 @@
+post_install() {
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove () {
+ post_install
+}
+
diff --git a/extra/qtiplot/qtiplot.png b/extra/qtiplot/qtiplot.png
new file mode 100644
index 000000000..5b4b87b21
--- /dev/null
+++ b/extra/qtiplot/qtiplot.png
Binary files differ
diff --git a/extra/qtiplot/qtiplot.xml b/extra/qtiplot/qtiplot.xml
new file mode 100644
index 000000000..7ad4c4aa0
--- /dev/null
+++ b/extra/qtiplot/qtiplot.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-qtiplot-project">
+ <sub-class-of type="text/plain"/>
+ <comment>QtiPlot project file</comment>
+ <glob pattern="*.qti" />
+ </mime-type>
+ <mime-type type="application/x-qtiplot-project-compressed">
+ <comment>Compressed QtiPlot project file</comment>
+ <glob pattern="*.qti.gz" />
+ </mime-type>
+ <mime-type type="application/x-qtiplot-project-backup">
+ <sub-class-of type="text/plain"/>
+ <comment>QtiPlot project file backup</comment>
+ <glob pattern="*.qti~" />
+ </mime-type>
+</mime-info>
diff --git a/extra/qtiplot/qwtplot3d_gcc.patch b/extra/qtiplot/qwtplot3d_gcc.patch
new file mode 100644
index 000000000..06aeb50f5
--- /dev/null
+++ b/extra/qtiplot/qwtplot3d_gcc.patch
@@ -0,0 +1,9 @@
+--- a/3rdparty/qwtplot3d/src/qwt3d_function.cpp 2009-07-25 20:03:28.000000000 -0700
++++ b/3rdparty/qwtplot3d/src/qwt3d_function.cpp 2009-07-25 20:03:28.000000000 -0700
+@@ -1,5 +1,6 @@
+ #include "qwt3d_surfaceplot.h"
+ #include "qwt3d_function.h"
++#include <cstdio>
+
+ using namespace Qwt3D;
+
diff --git a/extra/qtiplot/sip.patch b/extra/qtiplot/sip.patch
new file mode 100644
index 000000000..146f4c277
--- /dev/null
+++ b/extra/qtiplot/sip.patch
@@ -0,0 +1,13 @@
+--- qtiplot/src/scripting/scripting.pri.bak 2009-09-09 07:18:51.000000000 +0800
++++ qtiplot/src/scripting/scripting.pri 2009-11-08 12:45:03.000000000 +0800
+@@ -80,7 +80,9 @@
+ $${SIP_DIR}/sipqtiPythonScript.cpp\
+ $${SIP_DIR}/sipqtiPythonScripting.cpp\
+ $${SIP_DIR}/sipqtiFolder.cpp\
+- $${SIP_DIR}/sipqtiQList.cpp\
++ $${SIP_DIR}/sipqtiQList0101Folder.cpp \
++ $${SIP_DIR}/sipqtiQList0101Graph.cpp \
++ $${SIP_DIR}/sipqtiQList0101MdiSubWindow.cpp \
+ $${SIP_DIR}/sipqtiFit.cpp \
+ $${SIP_DIR}/sipqtiExponentialFit.cpp \
+ $${SIP_DIR}/sipqtiTwoExpFit.cpp \