From 167b044285fe075aed0ab407b53f630ddeac4644 Mon Sep 17 00:00:00 2001 From: David Spencer Date: Wed, 18 Nov 2015 22:56:39 +0000 Subject: academic/QtiPlot: Patched for gsl-2.1. Signed-off-by: David Spencer --- academic/QtiPlot/QtiPlot.SlackBuild | 3 +- academic/QtiPlot/qtiplot-0.9.8.9_gsl-2.patch | 52 ++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 academic/QtiPlot/qtiplot-0.9.8.9_gsl-2.patch (limited to 'academic') diff --git a/academic/QtiPlot/QtiPlot.SlackBuild b/academic/QtiPlot/QtiPlot.SlackBuild index c5f8a4acf9..719db33181 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 0000000000..d6ff7d00b0 --- /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 + #include + #include ++#include + + #include + #include +@@ -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; -- cgit v1.2.3