summaryrefslogtreecommitdiffstats
path: root/academic/QtiPlot/QtiPlot.SlackBuild
diff options
context:
space:
mode:
author Petar Petrov <ppetrov@paju.oulu.fi>2011-12-11 09:26:15 -0200
committer Niels Horn <niels.horn@slackbuilds.org>2011-12-11 09:26:15 -0200
commit276b94249452019ed2e9d49932b90930d6ac0ed6 (patch)
tree99721f5b67561b9a0bf56932e5c46d874f5200a4 /academic/QtiPlot/QtiPlot.SlackBuild
parent81be65bc403d581ea31247e4c3e21e4c6a771d4d (diff)
downloadslackbuilds-276b94249452019ed2e9d49932b90930d6ac0ed6.tar.gz
slackbuilds-276b94249452019ed2e9d49932b90930d6ac0ed6.tar.xz
academic/QtiPlot: Updated for version 0.9.8.9.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'academic/QtiPlot/QtiPlot.SlackBuild')
-rw-r--r--academic/QtiPlot/QtiPlot.SlackBuild50
1 files changed, 37 insertions, 13 deletions
diff --git a/academic/QtiPlot/QtiPlot.SlackBuild b/academic/QtiPlot/QtiPlot.SlackBuild
index 77ea874e3d..7ea89104c0 100644
--- a/academic/QtiPlot/QtiPlot.SlackBuild
+++ b/academic/QtiPlot/QtiPlot.SlackBuild
@@ -1,19 +1,15 @@
#!/bin/sh
# Slackware build script for QtiPlot
-# Written by Petar Petrov, <ppetrov@paju.oulu.fi> and
+# Written by Petar Petrov, <ppetrov@paju.oulu.fi> and
# hereby submitted to the public domain
-# Based on the QtiPlot package PKGBUILD from Arch Extra.
-# Maintainer and packager is Ronald van Haren. Thank you!
-# http://www.archlinux.org/packages/extra/i686/qtiplot
-
-# THIS SLACKBUILD IS DISTRIBUTETD IN THE HOPE OF BEING
-# USEFUL BUT WITHOUT ANY WARRANTY. THE AUTHOR IS _NOT_
+# THIS SLACKBUILD IS DISTRIBUTED IN THE HOPE OF BEING
+# USEFUL BUT WITHOUT ANY WARRANTY. THE AUTHOR IS _NOT_
# RESPONSIBLE FOR ANY DAMAGE OR DATA LOSS CAUSED BY IT.
PRGNAM=QtiPlot
-VERSION=${VERSION:-0.9.8.8}
+VERSION=${VERSION:-0.9.8.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -93,13 +89,24 @@ 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
-# Point to the right places of qt-assistant-compat, libreoffice
-# (when installed), latex, java and python configuration files.
+# Point to the right places of qt-assistant-compat, libreoffice (when
+# installed), latex, java, the QtiPlot html manual and fitPlugins
sed -i "s:<QAssistantClient>:<QtAssistant/qassistantclient.h>:" qtiplot/src/core/ApplicationWindow.cpp
sed -i "s:/usr/bin/soffice:/usr/bin/libreoffice:" qtiplot/src/core/ApplicationWindow.cpp
sed -i "s:/usr/bin/latex:/usr/share/texmf/bin/latex:" qtiplot/src/core/ApplicationWindow.cpp
sed -i "s:/usr/bin/java:/usr/lib${LIBDIRSUFFIX}/java/bin/java:" qtiplot/src/core/ApplicationWindow.cpp
-sed -i 's#d_python_config_folder + "#"/usr/share/qtiplot#' qtiplot/src/core/ApplicationWindow.cpp
+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
+
+# 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
+make web
# Build QtiPlot
cd $TMP/$SRCNAM-$VERSION/qtiplot
@@ -108,7 +115,24 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
make
make install INSTALL_ROOT=$PKG
-cd -
+
+# Generate translations and copy them to their proper place
+lrelease qtiplot.pro
+mkdir -p $PKG/usr/share/qtiplot/translations
+cp translations/*.qm $PKG/usr/share/qtiplot/translations
+
+# Copy some python examples
+mkdir -p $PKG/usr/share/qtiplot/python-examples
+cp examples/python/* $PKG/usr/share/qtiplot/python-examples
+
+# Build fitPlugins
+cd $TMP/$SRCNAM-$VERSION/fitPlugins
+qmake
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+make
+make install INSTALL_ROOT=$PKG
+cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -116,7 +140,7 @@ 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
+# Menu item, icon and mime types. The .xml is from Arch. Thank you!
mkdir -p $PKG/usr/share/{pixmaps,applications,mime/packages}
cp $CWD/qtiplot.png $PKG/usr/share/pixmaps
cp $CWD/qtiplot.desktop $PKG/usr/share/applications