mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
academic/Kst: Patched for gsl-2.1.
Signed-off-by: David Spencer <baildon.research@googlemail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
25ccacc72f
commit
27a8de224c
2 changed files with 56 additions and 0 deletions
|
@ -45,6 +45,9 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# Fix build failure with gsl-2.1 (gsl API change)
|
||||
patch -p1 < $CWD/Kst_gsl2.patch
|
||||
|
||||
sed -i "s/find_package\(PythonLibs REQUIRED\)/SET \(PythonLibs \"\/usr\/lib${LIBDIRSUFFIX}\/libpython2.7.so\"\)/" \
|
||||
./cmake/pyKst/CMakeLists.txt
|
||||
sed -i "s/\${NUMPY_VERSION_PATCH}/0/" ./cmake/modules/FindNumPy.cmake
|
||||
|
|
53
academic/Kst/Kst_gsl2.patch
Normal file
53
academic/Kst/Kst_gsl2.patch
Normal file
|
@ -0,0 +1,53 @@
|
|||
diff -u -r Kst-2.0.8/src/plugins/fits/non_linear.h Kst-2.0.8-patched/src/plugins/fits/non_linear.h
|
||||
--- Kst-2.0.8/src/plugins/fits/non_linear.h 2014-02-13 09:41:44.000000000 +0000
|
||||
+++ Kst-2.0.8-patched/src/plugins/fits/non_linear.h 2015-11-18 22:28:40.761417846 +0000
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <gsl/gsl_blas.h>
|
||||
#include <gsl/gsl_multifit_nlin.h>
|
||||
#include <gsl/gsl_statistics.h>
|
||||
+#include <gsl/gsl_version.h>
|
||||
#include "common.h"
|
||||
|
||||
struct data {
|
||||
@@ -177,7 +178,15 @@
|
||||
}
|
||||
iIterations++;
|
||||
} while( iStatus == GSL_CONTINUE && iIterations < MAX_NUM_ITERATIONS );
|
||||
+
|
||||
+#if GSL_MAJOR_VERSION >=2
|
||||
+ gsl_matrix *J=gsl_matrix_alloc(pSolver->fdf->n, pSolver->fdf->p);
|
||||
+ gsl_multifit_fdfsolver_jac (pSolver, J);
|
||||
+ gsl_multifit_covar( J, 0.0, pMatrixCovariance );
|
||||
+ gsl_matrix_free(J);
|
||||
+#else
|
||||
gsl_multifit_covar( pSolver->J, 0.0, pMatrixCovariance );
|
||||
+#endif
|
||||
|
||||
//
|
||||
// determine the fitted values...
|
||||
diff -u -r Kst-2.0.8/src/plugins/fits/non_linear_weighted.h Kst-2.0.8-patched/src/plugins/fits/non_linear_weighted.h
|
||||
--- Kst-2.0.8/src/plugins/fits/non_linear_weighted.h 2014-02-13 09:41:44.000000000 +0000
|
||||
+++ Kst-2.0.8-patched/src/plugins/fits/non_linear_weighted.h 2015-11-18 22:28:44.004399807 +0000
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <gsl/gsl_blas.h>
|
||||
#include <gsl/gsl_multifit_nlin.h>
|
||||
#include <gsl/gsl_statistics.h>
|
||||
+#include <gsl/gsl_version.h>
|
||||
#include "common.h"
|
||||
|
||||
struct data {
|
||||
@@ -193,7 +194,14 @@
|
||||
}
|
||||
while( iStatus == GSL_CONTINUE && iIterations < MAX_NUM_ITERATIONS );
|
||||
|
||||
+#if GSL_MAJOR_VERSION >=2
|
||||
+ gsl_matrix *J=gsl_matrix_alloc(pSolver->fdf->n, pSolver->fdf->p);
|
||||
+ gsl_multifit_fdfsolver_jac (pSolver, J);
|
||||
+ gsl_multifit_covar( J, 0.0, pMatrixCovariance );
|
||||
+ gsl_matrix_free(J);
|
||||
+#else
|
||||
gsl_multifit_covar( pSolver->J, 0.0, pMatrixCovariance );
|
||||
+#endif
|
||||
|
||||
//
|
||||
// determine the fitted values...
|
Loading…
Reference in a new issue