diff options
author | David Spencer <baildon.research@googlemail.com> | 2015-11-18 22:56:39 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-01-17 09:40:16 +0700 |
commit | 167b044285fe075aed0ab407b53f630ddeac4644 (patch) | |
tree | 528ee215edaf63bd76aa1c8b4775c92eb42894f0 /academic/QtiPlot | |
parent | 9434f258ee05b0951f5690cb20726c55a2e73e40 (diff) |
academic/QtiPlot: Patched for gsl-2.1.
Signed-off-by: David Spencer <baildon.research@googlemail.com>
Diffstat (limited to 'academic/QtiPlot')
-rw-r--r-- | academic/QtiPlot/QtiPlot.SlackBuild | 3 | ||||
-rw-r--r-- | academic/QtiPlot/qtiplot-0.9.8.9_gsl-2.patch | 52 |
2 files changed, 54 insertions, 1 deletions
diff --git a/academic/QtiPlot/QtiPlot.SlackBuild b/academic/QtiPlot/QtiPlot.SlackBuild index c5f8a4acf95a..719db3318187 100644 --- a/academic/QtiPlot/QtiPlot.SlackBuild +++ b/academic/QtiPlot/QtiPlot.SlackBuild @@ -90,12 +90,13 @@ cp -a $UNOFPLUGIN/qtiplot/src/plugins $SRCNAM-$VERSION/qtiplot/src cp -a $UNOFPLUGIN/qtiplot/importOPJ.pro $SRCNAM-$VERSION/qtiplot cd $SRCNAM-$VERSION -# Patches for recent libpng, sip etc +# Patches for recent libpng, sip, gsl, 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 +patch -p1 < $CWD/qtiplot-0.9.8.9_gsl-2.patch # Use the custom build.conf cp $CWD/build.conf.slack build.conf diff --git a/academic/QtiPlot/qtiplot-0.9.8.9_gsl-2.patch b/academic/QtiPlot/qtiplot-0.9.8.9_gsl-2.patch new file mode 100644 index 000000000000..d6ff7d00b04c --- /dev/null +++ b/academic/QtiPlot/qtiplot-0.9.8.9_gsl-2.patch @@ -0,0 +1,52 @@ +diff -u -r qtiplot-0.9.8.9/qtiplot/src/analysis/Fit.cpp qtiplot-0.9.8.9-patched/qtiplot/src/analysis/Fit.cpp +--- qtiplot-0.9.8.9/qtiplot/src/analysis/Fit.cpp 2011-10-17 11:06:00.000000000 +0100 ++++ qtiplot-0.9.8.9-patched/qtiplot/src/analysis/Fit.cpp 2015-11-18 22:26:22.535193469 +0000 +@@ -39,6 +39,7 @@ + #include <gsl/gsl_statistics.h> + #include <gsl/gsl_blas.h> + #include <gsl/gsl_cdf.h> ++#include <gsl/gsl_version.h> + + #include <QApplication> + #include <QMessageBox> +@@ -106,6 +107,10 @@ + gsl_multifit_fdfsolver * Fit::fitGSL(gsl_multifit_function_fdf f, int &iterations, int &status) + { + const gsl_multifit_fdfsolver_type *T; ++#if GSL_MAJOR_VERSION >=2 ++ gsl_matrix *J=0; ++#endif ++ + if (d_solver) + T = gsl_multifit_fdfsolver_lmder; + else +@@ -128,7 +133,14 @@ + } + + if (status){ ++#if GSL_MAJOR_VERSION >=2 ++ J=gsl_matrix_alloc(s->fdf->n, s->fdf->p); ++ gsl_multifit_fdfsolver_jac (s, J); ++ gsl_multifit_covar (J, 0.0, covar); ++ gsl_matrix_free(J); ++#else + gsl_multifit_covar (s->J, 0.0, covar); ++#endif + iterations = 0; + return s; + } +@@ -155,7 +167,14 @@ + status = gsl_multifit_test_delta (s->dx, s->x, d_tolerance, d_tolerance); + } while (inRange && status == GSL_CONTINUE && (int)iter < d_max_iterations); + ++#if GSL_MAJOR_VERSION >=2 ++ J=gsl_matrix_alloc(s->fdf->n, s->fdf->p); ++ gsl_multifit_fdfsolver_jac (s, J); ++ gsl_multifit_covar (J, 0.0, covar); ++ gsl_matrix_free(J); ++#else + gsl_multifit_covar (s->J, 0.0, covar); ++#endif + + iterations = iter; + return s; |