[qtiplot] 02/06: Fix compilation with GSL2. (Closes: #805841)

Anton Gladky gladk at moszumanska.debian.org
Sun Dec 6 06:31:55 UTC 2015


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository qtiplot.

commit 846688bd2695258a81fc8addc3b74b71a6098eb4
Author: Damir Islamov <damir at secretlaboratory.ru>
Date:   Sat Dec 5 22:49:19 2015 +0100

    Fix compilation with GSL2. (Closes: #805841)
---
 debian/patches/10_adopt_to_gsl2.diff | 42 ++++++++++++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 2 files changed, 43 insertions(+)

diff --git a/debian/patches/10_adopt_to_gsl2.diff b/debian/patches/10_adopt_to_gsl2.diff
new file mode 100644
index 0000000..bb6af7e
--- /dev/null
+++ b/debian/patches/10_adopt_to_gsl2.diff
@@ -0,0 +1,42 @@
+Description: adoptation to gsl2.
+Author: Damir Islamov <damir at secretlaboratory.ru>
+Last-Update: 2015-12-04
+
+Index: qtiplot/qtiplot/src/analysis/Fit.cpp
+===================================================================
+--- qtiplot.orig/qtiplot/src/analysis/Fit.cpp
++++ qtiplot/qtiplot/src/analysis/Fit.cpp
+@@ -126,10 +126,14 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl
+ 			break;
+ 		}
+ 	}
+-
+ 	if (status){
+-	    gsl_multifit_covar (s->J, 0.0, covar);
++	    // allocate memory and calculate covariance matrix based on residuals
++	    gsl_matrix *J = gsl_matrix_alloc(d_n, d_p);
++	    gsl_multifit_fdfsolver_jac(s, J);
++	    gsl_multifit_covar (J, 0.0, covar);
+ 	    iterations = 0;
++	    // free previousely allocated memory
++	    gsl_matrix_free (J);
+ 	    return s;
+ 	}
+ 
+@@ -154,10 +158,13 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl
+ 
+ 		status = gsl_multifit_test_delta (s->dx, s->x, d_tolerance, d_tolerance);
+ 	} while (inRange && status == GSL_CONTINUE && (int)iter < d_max_iterations);
+-
+-	gsl_multifit_covar (s->J, 0.0, covar);
+-
++	// allocate memory and calculate covariance matrix based on residuals
++	gsl_matrix *J = gsl_matrix_alloc(d_n, d_p);
++	gsl_multifit_fdfsolver_jac(s, J);
++	gsl_multifit_covar (J, 0.0, covar);
+ 	iterations = iter;
++	// free previousely allocated memory
++	gsl_matrix_free (J);
+ 	return s;
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 4077c47..e7557bf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ adopt_to_alglib3.patch
 set_col_values.patch
 sipFTBFS.patch
 disable_en_pdf.patch
+10_adopt_to_gsl2.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/qtiplot.git



More information about the debian-science-commits mailing list