mirror of
https://git.freebsd.org/ports.git
synced 2025-07-15 16:29:15 -04:00
This release introduces some new features and fixes several bugs: http://savannah.gnu.org/forum/forum.php?forum_id=8751 * update to 2.3 and take maintainership * update math/py-gsl to 2.2.0 for gsl2 support * update math/rubygem-rb-gsl to 2.1.0.2 for gsl2 support PR: 218952 Exp-run by: antoine Reviewed by: mat, rakuco Approved by: rakuco (mentor) Differential Revision: https://reviews.freebsd.org/D10522
44 lines
1.2 KiB
Text
44 lines
1.2 KiB
Text
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++);
|