Changeset View
Changeset View
Standalone View
Standalone View
head/graphics/amide/files/patch-gsl_2x
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
Obtained from: | |||||
https://sourceforge.net/p/amide/mailman/message/34638848/ | |||||
Description: Fix compilation against GSL >= 2.0 | |||||
Author: Gert Wollny <gw.fossdev@gmail.com> | |||||
Last-Update: Sun, 22 Nov 2015 14:21:00 +0000 | |||||
Bug-Debian: http://bugs.debian.org/805748 | |||||
--- src/tb_profile.c 2015-11-22 14:00:16.361526795 +0100 | |||||
+++ src/tb_profile.c 2015-11-22 14:14:58.993881660 +0100 | |||||
@@ -32,6 +32,7 @@ | |||||
#include "ui_common.h" | |||||
#ifdef AMIDE_LIBGSL_SUPPORT | |||||
#include <gsl/gsl_multifit_nlin.h> | |||||
+#include <gsl/gsl_version.h> | |||||
#endif | |||||
@@ -605,6 +606,7 @@ | |||||
result_t * result; | |||||
gsl_multifit_fdfsolver * solver; | |||||
gsl_matrix *covar; | |||||
+ gsl_matrix *J; | |||||
gsl_multifit_function_fdf fdf; | |||||
gsl_vector * init_p; | |||||
gint iter; | |||||
@@ -668,8 +670,16 @@ | |||||
} | |||||
while ((status == GSL_CONTINUE) && (iter < 100)); | |||||
+#if GSL_MAJOR_VERSION > 1 | |||||
+ { | |||||
+ gsl_matrix *J = gsl_matrix_alloc (result->line->len, num_p);; | |||||
+ gsl_multifit_fdfsolver_jac(solver, J); | |||||
+ gsl_multifit_covar (J, 0.0, covar); | |||||
+ gsl_matrix_free(J); | |||||
+ } | |||||
+#else | |||||
gsl_multifit_covar (solver->J, 0.0, covar); | |||||
- | |||||
+#endif | |||||
j=0; | |||||
result->s_fit = gsl_vector_get(solver->x, j++); | |||||
result->p_fit = gsl_vector_get(solver->x, j++); |