aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetar Petrov <ppetrov@paju.oulu.fi>2012-09-11 22:42:39 +0300
committerRobby Workman <rworkman@slackbuilds.org>2012-09-11 23:53:42 -0500
commit4be8b0406fe27b22b7fd2725009bf6bcb495f65a (patch)
tree1b68630c229d88d856cda718b72a78b30efbe50c
parent5786bc0b80daa23e195f5f56d54632f083d98563 (diff)
academic/QtiPlot: Build fixes and enhancements
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rwxr-xr-x[-rw-r--r--]academic/QtiPlot/QtiPlot.SlackBuild108
-rw-r--r--academic/QtiPlot/QtiPlot.info6
-rw-r--r--academic/QtiPlot/README4
-rw-r--r--academic/QtiPlot/build.conf.slack4
-rw-r--r--academic/QtiPlot/importOPJ.patch18
-rw-r--r--academic/QtiPlot/slack-desc2
6 files changed, 100 insertions, 42 deletions
diff --git a/academic/QtiPlot/QtiPlot.SlackBuild b/academic/QtiPlot/QtiPlot.SlackBuild
index 1a331d82381f..8436f71e7a2b 100644..100755
--- a/academic/QtiPlot/QtiPlot.SlackBuild
+++ b/academic/QtiPlot/QtiPlot.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for QtiPlot
-# Copyright 2011 Petar Petrov, ppetrov@paju.oulu.fi
+# Copyright 2011-2012 Petar Petrov, ppetrov@paju.oulu.fi
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,11 +24,14 @@
PRGNAM=QtiPlot
VERSION=${VERSION:-0.9.8.9}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SRCNAM=$(echo $PRGNAM | tr A-Z a-z)
+QTEXENGINE=QTeXEngine-0.3-opensource
+UNOFPLUGIN=importOPJ-20111106
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) export ARCH=i486 ;;
@@ -56,49 +59,50 @@ else
LIBDIRSUFFIX=""
fi
+# Define these here, as numbers change between Slackware releases. The
+# folder names are used for some documentation path fixes, needed to
+# generate the html manual later on.
+DOCBOOK=dsssl-stylesheets-1.79
+CHUNK=xsl-stylesheets-1.76.1
+DOCBOOKX=xml-dtd-4.5
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$VERSION
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
-cd $TMP/$SRCNAM-$VERSION
+unzip $CWD/$QTEXENGINE.zip
+tar xvf $CWD/$UNOFPLUGIN.tar.gz
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-
-# Build QtiPlot's qwt
-cd $TMP/$SRCNAM-$VERSION/3rdparty/qwt
-qmake
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-make
-# Build QtiPlot's qwtplot3d
-cd $TMP/$SRCNAM-$VERSION/3rdparty/qwtplot3d
-qmake
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-make
-
-# Build QTeXEngine
-cd $TMP/$SRCNAM-$VERSION/3rdparty
-unzip $CWD/QTeXEngine-0.3-opensource.zip
-cd QTeXEngine
-qmake
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-make
+# Copy QTeXEngine and importOPJ to their locations to be built later
+cp -a QTeXEngine $SRCNAM-$VERSION/3rdparty
+cp -a $UNOFPLUGIN/qtiplot/src/plugins $SRCNAM-$VERSION/qtiplot/src
+cp -a $UNOFPLUGIN/qtiplot/importOPJ.pro $SRCNAM-$VERSION/qtiplot
+cd $SRCNAM-$VERSION
# Use the custom build.conf
-cd $TMP/$SRCNAM-$VERSION
cp $CWD/build.conf.slack build.conf
-# A few path fixes to qtiplot.pro
+# Make qtiplot.pro aware of the unofficial importOPJ plugin. Thanks to
+# the author of the plugin, Stephan Zevenhuizen. For more info visit
+# this site: http://www.staff.science.uu.nl/~zeven101/qtiplot.html
+patch -p1 -i $CWD/importOPJ.patch
+sed -i "143 a Q_IMPORT_PLUGIN(FreeSoftwareQtiPlotImportOPJ);" qtiplot/src/core/main.cpp
+
+# Fix qwtplot3d
+sed -i "10 a #include <GL/glu.h>" 3rdparty/qwtplot3d/include/qwt3d_openglhelper.h
+
+# Make a few path fixes to qtiplot.pro
sed -i "s:/usr/local:/usr/share:" qtiplot/qtiplot.pro
sed -i "s:/share/man:/man:" qtiplot/qtiplot.pro
sed -i "s:/share/doc/qtiplot:/doc/$PRGNAM-$VERSION:" qtiplot/qtiplot.pro
@@ -112,18 +116,46 @@ sed -i "s:/usr/bin/java:/usr/lib${LIBDIRSUFFIX}/java/bin/java:" qtiplot/src/core
sed -i "s:/index.html:/html/index.html:" qtiplot/src/core/ApplicationWindow.cpp
sed -i "s:/local/qtiplot/fitPlugins:/lib${LIBDIRSUFFIX}/qtiplot/plugins:" qtiplot/src/core/ApplicationWindow.cpp
-# A few path fixes, needed to generate the html manual
-sed -i "s:/stylesheet/dsssl/modular:/dsssl-stylesheets-1.79:" manual/qtiplot.dsl
-sed -i "s:/stylesheet/nwalsh:/xsl-stylesheets-1.75.2:" manual/qtiplot_html.xsl
-sed -i "s:/schema/dtd/4.4:/xml-dtd-4.5:" manual/docbook-en/index.docbook
+# Path fixes, needed to generate the html manual
+sed -i "s:stylesheet/dsssl/modular:${DOCBOOK}:" manual/qtiplot.dsl
+sed -i "s:stylesheet/nwalsh:${CHUNK}:" manual/qtiplot_html.xsl
+sed -i "s:schema/dtd/4.4:${DOCBOOKX}:" manual/docbook-en/index.docbook
+
+# Build QtiPlot's qwt
+cd 3rdparty/qwt
+qmake
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+make
+
+# Build QtiPlot's qwtplot3d
+cd ../qwtplot3d
+qmake
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+make
+
+# Build QTeXEngine
+cd ../QTeXEngine
+qmake
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+make
+
+# Build importOPJ
+cd ../../qtiplot
+qmake importOPJ.pro
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+make
# Make the html manual. If you want to generate the handbook as a PDF,
-# change "web" to "en" below and make sure you have installed dblatex
-cd $TMP/$SRCNAM-$VERSION/manual
+# change "web" to "en" below and make sure you have installed dblatex.
+cd ../manual
make web
# Build QtiPlot
-cd $TMP/$SRCNAM-$VERSION/qtiplot
+cd ../qtiplot
qmake qtiplot.pro
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -140,7 +172,7 @@ mkdir -p $PKG/usr/share/qtiplot/python-examples
cp examples/python/* $PKG/usr/share/qtiplot/python-examples
# Build fitPlugins
-cd $TMP/$SRCNAM-$VERSION/fitPlugins
+cd ../fitPlugins
qmake
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -154,9 +186,9 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-# Menu item, icon and mime types. The .xml is from Arch. Thank you!
+# Menu item, icon and mime types. The .xml is from Arch
mkdir -p $PKG/usr/share/{pixmaps,applications,mime/packages}
-cp $CWD/qtiplot.png $PKG/usr/share/pixmaps
+cp qtiplot_logo.png $PKG/usr/share/pixmaps/qtiplot.png
cp $CWD/qtiplot.desktop $PKG/usr/share/applications
cp $CWD/qtiplot.xml $PKG/usr/share/mime/packages
diff --git a/academic/QtiPlot/QtiPlot.info b/academic/QtiPlot/QtiPlot.info
index f240b8a6613a..6b6cd6f5506b 100644
--- a/academic/QtiPlot/QtiPlot.info
+++ b/academic/QtiPlot/QtiPlot.info
@@ -2,9 +2,11 @@ PRGNAM="QtiPlot"
VERSION="0.9.8.9"
HOMEPAGE="http://soft.proindependent.com/qtiplot.html"
DOWNLOAD="http://download.berlios.de/qtiplot/qtiplot-0.9.8.9.tar.bz2 \
- http://download.berlios.de/qtiplot/QTeXEngine-0.3-opensource.zip"
+ http://download.berlios.de/qtiplot/QTeXEngine-0.3-opensource.zip \
+ http://www.student.oulu.fi/~ppetrov/source/importOPJ-20111106.tar.gz"
MD5SUM="652096a365851da3b5f6fefdcbe2aaec \
- d1b234623770ec6209b14d1b5137f2f1"
+ d1b234623770ec6209b14d1b5137f2f1 \
+ 6f6925beb9e27f2ea0fbd01f23da548a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="alglib muParser qt-assistant-compat tamu_anova"
diff --git a/academic/QtiPlot/README b/academic/QtiPlot/README
index 92b7155f4550..950c7a7f05d1 100644
--- a/academic/QtiPlot/README
+++ b/academic/QtiPlot/README
@@ -26,3 +26,7 @@ Features:
be saved and restored later on for a fast editing process
- Project files based on folders, a powerful project explorer with
built-in drag and drop and searching facilities
+
+QtiPlot comes with its own, slightly modified versions of qwt and
+qwtplot3d, while the script additionally builds in QTeXEngine and the
+unofficial importOPJ plugin.
diff --git a/academic/QtiPlot/build.conf.slack b/academic/QtiPlot/build.conf.slack
index b4238b5535ff..22ac622871b3 100644
--- a/academic/QtiPlot/build.conf.slack
+++ b/academic/QtiPlot/build.conf.slack
@@ -4,11 +4,13 @@ isEmpty( QTI_ROOT ) {
# System specific configuration
SYS_INCLUDEPATH = /usr/include
-SYS_LIBS = -L/usr/lib${LIBDIRSUFFIX}
+SYS_LIBS = -L/usr/lib${LIBDIRSUFFIX} -lz -lGLU
# zlib (http://www.zlib.net/)
+#ZLIB_INCLUDEPATH = $$QTI_ROOT/3rdparty/zlib/
ZLIB_INCLUDEPATH =
+
# muParser (http://muparser.sourceforge.net/)
MUPARSER_INCLUDEPATH =
MUPARSER_LIBS = -lmuparser
diff --git a/academic/QtiPlot/importOPJ.patch b/academic/QtiPlot/importOPJ.patch
new file mode 100644
index 000000000000..12a0d2073bd9
--- /dev/null
+++ b/academic/QtiPlot/importOPJ.patch
@@ -0,0 +1,18 @@
+diff -pruN qtiplot-0.9.8.9.orig/qtiplot/qtiplot.pro qtiplot-0.9.8.9/qtiplot/qtiplot.pro
+--- qtiplot-0.9.8.9.orig/qtiplot/qtiplot.pro 2011-11-02 18:55:25.000000000 +0200
++++ qtiplot-0.9.8.9/qtiplot/qtiplot.pro 2012-08-03 01:27:29.649544418 +0300
+@@ -232,3 +232,14 @@ contains(CONFIG, BrowserPlugin){
+ RC_FILE = qtiplot.rc
+ include(../3rdparty/QtSolutions/qtbrowserplugin/src/qtbrowserplugin.pri)
+ }
++
++###############################################################
++##################### OriginPlugin ############################
++###############################################################
++
++TARGET = qtiplot
++DESTDIR =
++LIBS += ../tmp/qtiplot/libFreeSoftwareQtiPlotImportOPJ.a
++
++
++include(src/plugins/OriginPlugin/OriginPlugin.pri)
diff --git a/academic/QtiPlot/slack-desc b/academic/QtiPlot/slack-desc
index 9a2b18f09120..373d01c35c29 100644
--- a/academic/QtiPlot/slack-desc
+++ b/academic/QtiPlot/slack-desc
@@ -13,7 +13,7 @@ QtiPlot: presentation of data sets and for data analysis. Plots can be
QtiPlot: produced from data sets stored in tables or from analytical
QtiPlot: functions.
QtiPlot:
+QtiPlot: Home: http://soft.proindependent.com/
QtiPlot:
QtiPlot:
QtiPlot:
-QtiPlot: Home: http://soft.proindependent.com/qtiplot.html