public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jon Ciesla <limburgher@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/kst] pr1: Fix gsl 2.1 build.
Date: Tue, 06 Oct 2026 19:29:58 GMT [thread overview]
Message-ID: <179131499856.1.4997716424937191657.rpms-kst-f8624f65025c@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/kst
Branch : pr1
Commit : f8624f65025c75acdee8211eac745dedd9828b0b
Author : Jon Ciesla <limburgher@gmail.com>
Date : 2016-03-03T14:14:03-05:00
Stats : +162/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/kst/c/f8624f65025c75acdee8211eac745dedd9828b0b?branch=pr1
Log:
Fix gsl 2.1 build.
---
diff --git a/kst-gsl21.patch b/kst-gsl21.patch
new file mode 100644
index 0000000..7264cc6
--- /dev/null
+++ b/kst-gsl21.patch
@@ -0,0 +1,156 @@
+diff -ur src/plugins/fits/non_linear.h src/plugins/fits/non_linear.h
+--- src/plugins/fits/non_linear.h 2014-02-13 18:41:44.000000000 +0900
++++ src/plugins/fits/non_linear.h 2016-03-04 00:34:31.000000000 +0900
+@@ -177,37 +177,45 @@
+ }
+ iIterations++;
+ } while( iStatus == GSL_CONTINUE && iIterations < MAX_NUM_ITERATIONS );
+- gsl_multifit_covar( pSolver->J, 0.0, pMatrixCovariance );
+-
+- //
+- // determine the fitted values...
+- //
+- for( i=0; i<NUM_PARAMS; i++ ) {
+- dXInitial[i] = gsl_vector_get( pSolver->x, i );
+- }
+-
+- for( i=0; i<iLength; i++ ) {
+- vectorOutYFitted->value()[i] = function_calculate( pInputX[i], dXInitial );
+- vectorOutYResiduals->value()[i] = pInputY[i] - vectorOutYFitted->value()[i];
++
++
++ gsl_matrix *J = gsl_matrix_alloc(pSolver->fdf->n, pSolver->fdf->p);
++ if (J != NULL) {
++ gsl_multifit_fdfsolver_jac(pSolver, J);
++
++ gsl_multifit_covar( J, 0.0, pMatrixCovariance );
++
++ //
++ // determine the fitted values...
++ //
++ for( i=0; i<NUM_PARAMS; i++ ) {
++ dXInitial[i] = gsl_vector_get( pSolver->x, i );
++ }
++
++ for( i=0; i<iLength; i++ ) {
++ vectorOutYFitted->value()[i] = function_calculate( pInputX[i], dXInitial );
++ vectorOutYResiduals->value()[i] = pInputY[i] - vectorOutYFitted->value()[i];
++ }
++
++ //
++ // fill in the parameter values and covariance matrix...
++ //
++ for( i=0; i<NUM_PARAMS; i++ ) {
++ vectorOutYParameters->value()[i] = gsl_vector_get( pSolver->x, i );
++ for( j=0; j<NUM_PARAMS; j++ ) {
++ vectorOutYCovariance->value()[(i*NUM_PARAMS)+j] = gsl_matrix_get( pMatrixCovariance, i, j );
++ }
++ }
++
++ //
++ // determine the value of chi^2/nu
++ //
++ scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
++
++ bReturn = true;
++
++ gsl_matrix_free( J );
+ }
+-
+- //
+- // fill in the parameter values and covariance matrix...
+- //
+- for( i=0; i<NUM_PARAMS; i++ ) {
+- vectorOutYParameters->value()[i] = gsl_vector_get( pSolver->x, i );
+- for( j=0; j<NUM_PARAMS; j++ ) {
+- vectorOutYCovariance->value()[(i*NUM_PARAMS)+j] = gsl_matrix_get( pMatrixCovariance, i, j );
+- }
+- }
+-
+- //
+- // determine the value of chi^2/nu
+- //
+- scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
+-
+- bReturn = true;
+-
+ gsl_matrix_free( pMatrixCovariance );
+ }
+ gsl_multifit_fdfsolver_free( pSolver );
+diff -ur src/plugins/fits/non_linear_weighted.h src/plugins/fits/non_linear_weighted.h
+--- src/plugins/fits/non_linear_weighted.h 2014-02-13 18:41:44.000000000 +0900
++++ src/plugins/fits/non_linear_weighted.h 2016-03-04 00:37:41.000000000 +0900
+@@ -193,37 +193,43 @@
+ }
+ while( iStatus == GSL_CONTINUE && iIterations < MAX_NUM_ITERATIONS );
+
+- gsl_multifit_covar( pSolver->J, 0.0, pMatrixCovariance );
+-
+- //
+- // determine the fitted values...
+- //
+- for( i=0; i<NUM_PARAMS; i++ ) {
+- dXInitial[i] = gsl_vector_get( pSolver->x, i );
+- }
+-
+- for( i=0; i<iLength; i++ ) {
+- vectorOutYFitted->value()[i] = function_calculate( pInputs[XVALUES][i], dXInitial );
+- vectorOutYResiduals->value()[i] = pInputs[YVALUES][i] - vectorOutYFitted->value()[i];
+- }
+-
+- //
+- // fill in the parameter values and covariance matrix...
+- //
+- for( i=0; i<NUM_PARAMS; i++ ) {
+- vectorOutYParameters->value()[i] = gsl_vector_get( pSolver->x, i );
+- for( j=0; j<NUM_PARAMS; j++ ) {
+- vectorOutYCovariance->value()[(i*NUM_PARAMS)+j] = gsl_matrix_get( pMatrixCovariance, i, j );
+- }
++ gsl_matrix *J = gsl_matrix_alloc(pSolver->fdf->n, pSolver->fdf->p);
++ if (J != NULL) {
++ gsl_multifit_fdfsolver_jac(pSolver, J);
++
++ gsl_multifit_covar( J, 0.0, pMatrixCovariance );
++
++ //
++ // determine the fitted values...
++ //
++ for( i=0; i<NUM_PARAMS; i++ ) {
++ dXInitial[i] = gsl_vector_get( pSolver->x, i );
++ }
++
++ for( i=0; i<iLength; i++ ) {
++ vectorOutYFitted->value()[i] = function_calculate( pInputs[XVALUES][i], dXInitial );
++ vectorOutYResiduals->value()[i] = pInputs[YVALUES][i] - vectorOutYFitted->value()[i];
++ }
++
++ //
++ // fill in the parameter values and covariance matrix...
++ //
++ for( i=0; i<NUM_PARAMS; i++ ) {
++ vectorOutYParameters->value()[i] = gsl_vector_get( pSolver->x, i );
++ for( j=0; j<NUM_PARAMS; j++ ) {
++ vectorOutYCovariance->value()[(i*NUM_PARAMS)+j] = gsl_matrix_get( pMatrixCovariance, i, j );
++ }
++ }
++
++ //
++ // determine the value of chi^2/nu
++ //
++ scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
++
++ bReturn = true;
++
++ gsl_matrix_free( J );
+ }
+-
+- //
+- // determine the value of chi^2/nu
+- //
+- scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
+-
+- bReturn = true;
+-
+ gsl_matrix_free( pMatrixCovariance );
+ }
+ gsl_multifit_fdfsolver_free( pSolver );
diff --git a/kst.spec b/kst.spec
index cd4b858..cfdfbd2 100644
--- a/kst.spec
+++ b/kst.spec
@@ -1,6 +1,6 @@
Name: kst
Version: 2.0.8
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: A data viewing program
Group: Applications/Engineering
@@ -14,6 +14,7 @@ Patch0: kst-properties.patch
# https://bugs.kde.org/show_bug.cgi?id=342642
# https://bugzilla.redhat.com/show_bug.cgi?id=1180348
Patch1: kst-qreal.patch
+Patch2: kst-gsl21.patch
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@ -100,6 +101,7 @@ A plugin allowing kst to open and read data in getdata (dirfile) format.
%setup -q -n Kst-%{version}
%patch0 -p1 -b .properties
%patch1 -p1 -b .qreal
+%patch2 -p0 -b .gsl21
%build
# -Dkst_merge_files=1 is failing for now
@@ -194,6 +196,9 @@ fi
#%{_datadir}/services/kst/kstdata_dirfilesource.desktop
%changelog
+* Thu Mar 03 2016 Jon Ciesla <limburgher@gmail.com> - 2.0.8-9
+- Fix gsl 2.1 build, BZ 1310817.
+
* Mon Feb 22 2016 Orion Poplawski <orion@cora.nwra.com> - 2.0.8-8
- Rebuild for gsl 2.1
reply other threads:[~2026-10-06 19:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179131499856.1.4997716424937191657.rpms-kst-f8624f65025c@fedoraproject.org \
--to=limburgher@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox