From 9434f258ee05b0951f5690cb20726c55a2e73e40 Mon Sep 17 00:00:00 2001 From: David Spencer Date: Wed, 28 Oct 2015 19:31:10 +0000 Subject: academic/QtiPlot: Patched for building with sip-4.16. Also fixed library plugin location. Signed-off-by: David Spencer --- academic/QtiPlot/QtiPlot.SlackBuild | 22 ++++++++++------- academic/QtiPlot/pyqt-4.11.patch | 33 ++++++++++++++++++++++++++ academic/QtiPlot/qtiplot-0.9.8.9-private.patch | 16 +++++++++++++ academic/QtiPlot/sip-4.15.patch | 32 +++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 9 deletions(-) create mode 100644 academic/QtiPlot/pyqt-4.11.patch create mode 100644 academic/QtiPlot/qtiplot-0.9.8.9-private.patch create mode 100644 academic/QtiPlot/sip-4.15.patch diff --git a/academic/QtiPlot/QtiPlot.SlackBuild b/academic/QtiPlot/QtiPlot.SlackBuild index 2b43518e93..c5f8a4acf9 100644 --- a/academic/QtiPlot/QtiPlot.SlackBuild +++ b/academic/QtiPlot/QtiPlot.SlackBuild @@ -47,16 +47,16 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" + QMAKESPEC="linux-g++" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" + QMAKESPEC="linux-g++" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" + QMAKESPEC="linux-g++-64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" + QMAKESPEC="linux-g++" fi # Define these here, as numbers change between Slackware releases. The @@ -90,8 +90,12 @@ cp -a $UNOFPLUGIN/qtiplot/src/plugins $SRCNAM-$VERSION/qtiplot/src cp -a $UNOFPLUGIN/qtiplot/importOPJ.pro $SRCNAM-$VERSION/qtiplot cd $SRCNAM-$VERSION -# Patch for recent libpng (thanks to slack_jack, ponce and Arch) +# Patches for recent libpng, sip etc +# thanks to slack_jack, Raveriux, ponce, Arch and Gentoo patch -p0 -d 3rdparty/qwtplot3d < $CWD/qwtplot3d-libpng15.patch +patch -p1 < $CWD/sip-4.15.patch +patch -p1 < $CWD/qtiplot-0.9.8.9-private.patch +patch -p1 < $CWD/pyqt-4.11.patch # Use the custom build.conf cp $CWD/build.conf.slack build.conf @@ -159,10 +163,10 @@ make -j1 web # Build QtiPlot cd ../qtiplot -qmake qtiplot.pro +qmake qtiplot.pro "QMAKESPEC=$QMAKESPEC" CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -make -j1 +make -j1 "QMAKESPEC=$QMAKESPEC" make -j1 install INSTALL_ROOT=$PKG # Generate translations and copy them to their proper place @@ -176,10 +180,10 @@ cp examples/python/* $PKG/usr/share/qtiplot/python-examples # Build fitPlugins cd ../fitPlugins -qmake +qmake "QMAKESPEC=$QMAKESPEC" CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -make -j1 +make -j1 "QMAKESPEC=$QMAKESPEC" make -j1 install INSTALL_ROOT=$PKG cd .. diff --git a/academic/QtiPlot/pyqt-4.11.patch b/academic/QtiPlot/pyqt-4.11.patch new file mode 100644 index 0000000000..dc7d56f3e3 --- /dev/null +++ b/academic/QtiPlot/pyqt-4.11.patch @@ -0,0 +1,33 @@ + qtiplot/python-sipcmd.py | 21 ++++++++++++++++++--- + 1 file changed, 18 insertions(+), 3 deletions(-) + +diff --git a/qtiplot/python-sipcmd.py b/qtiplot/python-sipcmd.py +index f643194..d8d1ef2 100755 +--- a/qtiplot/python-sipcmd.py ++++ b/qtiplot/python-sipcmd.py +@@ -27,6 +27,21 @@ + # # + ############################################################################ + +-from PyQt4 import pyqtconfig +-config = pyqtconfig.Configuration() +-print " ".join([config.sip_bin, "-I", config.pyqt_sip_dir, config.pyqt_sip_flags]) ++from __future__ import print_function ++ ++import os ++import sipconfig ++import PyQt4.QtCore ++ ++try: ++ # >= 4.10 ++ SIP_FLAGS = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags'] ++except: ++ import PyQt4.pyqtconfig ++ SIP_FLAGS = PyQt4.pyqtconfig.Configuration().pyqt_sip_flags ++ ++PYQT_SIP_DIR = os.path.join(sipconfig.Configuration().default_sip_dir, 'PyQt4') ++SIP_BIN = sipconfig.Configuration().sip_bin ++SIP_INC_DIR = sipconfig.Configuration().sip_inc_dir ++ ++print(" ".join([SIP_BIN, "-I", PYQT_SIP_DIR, SIP_FLAGS])) + diff --git a/academic/QtiPlot/qtiplot-0.9.8.9-private.patch b/academic/QtiPlot/qtiplot-0.9.8.9-private.patch new file mode 100644 index 0000000000..1dd92fd1a3 --- /dev/null +++ b/academic/QtiPlot/qtiplot-0.9.8.9-private.patch @@ -0,0 +1,16 @@ +diff -ruN qtiplot-0.9.8.9.orig/qtiplot/src/plot2D/ImageWidget.h qtiplot-0.9.8.9/qtiplot/src/plot2D/ImageWidget.h +--- qtiplot-0.9.8.9.orig/qtiplot/src/plot2D/ImageWidget.h 2010-10-17 09:04:05.000000000 +0200 ++++ qtiplot-0.9.8.9/qtiplot/src/plot2D/ImageWidget.h 2013-11-01 12:11:36.559973891 +0100 +@@ -67,10 +67,10 @@ + void setWindowName(const QString& name){d_window_name = name;}; + + static QPixmap windowPixmap(ApplicationWindow *mw, const QString& name, const QSize& size); ++ void paintEvent(QPaintEvent *e); + + private: + void draw(QPainter *painter, const QRect& r); +- void paintEvent(QPaintEvent *e); + QPixmap d_pix; + //! The file from which the image was loaded. + QString d_file_name; + diff --git a/academic/QtiPlot/sip-4.15.patch b/academic/QtiPlot/sip-4.15.patch new file mode 100644 index 0000000000..504223190a --- /dev/null +++ b/academic/QtiPlot/sip-4.15.patch @@ -0,0 +1,32 @@ +--- ./qtiplot/src/analysis/FFT.cpp.orig 2011-07-06 11:51:08.000000000 +0000 ++++ ./qtiplot/src/analysis/FFT.cpp 2013-10-23 23:07:45.674925476 +0000 +@@ -353,7 +353,7 @@ + ml->arrangeLayers(false, false); + } + +-bool FFT::setDataFromTable(Table *t, const QString& realColName, const QString& imagColName, int from, int to) ++bool FFT::setDataFromTable(Table *t, const QString& realColName, const QString& imagColName, int from, int to, bool unused) + { + d_init_err = true; + +--- ./qtiplot/src/analysis/FFT.h.orig 2011-07-05 22:05:03.000000000 +0000 ++++ ./qtiplot/src/analysis/FFT.h 2013-10-23 23:11:34.277924367 +0000 +@@ -52,6 +52,8 @@ + Matrix *realOutputMatrix(){return d_re_out_matrix;} + Matrix *imaginaryOutputMatrix(){return d_im_out_matrix;} + ++ bool setDataFromTable(Table *t, const QString& realColName, const QString& imagColName = QString(), int from = 0, int to = -1, bool unused = false); ++ + private: + void init(); + void output(); +@@ -60,8 +62,6 @@ + void fftTable(); + void fftMatrix(); + +- bool setDataFromTable(Table *t, const QString& realColName, const QString& imagColName = QString(), int from = 0, int to = -1); +- + double d_sampling; + //! Flag telling if an inverse FFT must be performed. + bool d_inverse; + -- cgit v1.2.3