SHA256
1
0
forked from pool/kst

Compare commits

...

5 Commits

Author SHA256 Message Date
Ana Guerrero
4e13972b9a Accepting request 1226959 from KDE:Extra
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1226959
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kst?expand=0&rev=55
2024-11-27 21:16:07 +00:00
Christophe Marin
6e2b22fb4c OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kst?expand=0&rev=35 2024-11-20 17:11:15 +00:00
Dominique Leuenberger
f2e5c23450 Accepting request 1219029 from KDE:Extra
Update to 2.1.0

OBS-URL: https://build.opensuse.org/request/show/1219029
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kst?expand=0&rev=54
2024-10-30 16:33:57 +00:00
Christophe Marin
4e1bcd276c Spec cleanup
OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kst?expand=0&rev=33
2024-10-29 13:04:24 +00:00
Christophe Marin
a5960a5d9c - Update to kst 2.1.0
This release includes all updates since 2.0.8 released in 2014:
  * Too many bug fixes to list
  * Many feature improvements
  Some of the changes can be seen at:
  https://invent.kde.org/graphics/kst-plot/-/compare/v2.0.8...v2.1-2024-10-20
- Remove patches that are already included in 2.1.0:
  * gsl2-support.patch
  * Fix-build-with-Qt-511.patch
  * 0001-Fix-build-with-CMake-3.20.patch
- Add patch to fix a hdf5 include path that we install in
  another directory:
  * fix-hdf5-include-path.patch

OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kst?expand=0&rev=32
2024-10-29 13:02:15 +00:00
10 changed files with 87 additions and 300 deletions

View File

@ -1,29 +0,0 @@
From c1b7769c37c70d189d09d8dc104d0541433b58b6 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr>
Date: Wed, 12 May 2021 07:27:48 +0200
Subject: [PATCH] Fix build with CMake 3.20
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dfb3bf8..b7c75f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,10 +112,10 @@ elseif(kst_3rdparty_download)
elseif(GCC_VERSION VERSION_EQUAL 4.7 OR GCC_VERSION VERSION_GREATER 4.7)
set(ver 4.7)
set(md5 de6e8dbab1bb17eee6057941fddc93e3)
- else(GCC_VERSION VERSION_EQUAL 4.6 OR GCC_VERSION VERSION_GREATER 4.6)
+ elseif(GCC_VERSION VERSION_EQUAL 4.6 OR GCC_VERSION VERSION_GREATER 4.6)
set(ver 4.6)
set(md5 70d8670af9c21eb8fb466654c95d8e4d)
- else(GCC_VERSION VERSION_GREATER 4.4)
+ elseif(GCC_VERSION VERSION_GREATER 4.4)
set(ver 4.4)
set(md5 999248fb40a44543af4dd4cd1be0ceeb)
else()
--
2.31.1

View File

@ -1,33 +0,0 @@
commit b438fb0d1c831cb8c024eb4dc644aeb5114074e6
Author: Christophe Giboudeaux <christophe@krop.fr>
Date: Sun Jun 3 19:43:34 2018 +0200
Fix build with Qt 5.11
qt5_use_modules was removed in Qt 5.11. use target_link_libraries instead.
diff --git a/cmake/modules/KstMacros.cmake b/cmake/modules/KstMacros.cmake
index 4ff9c151..bc3d8a6c 100644
--- a/cmake/modules/KstMacros.cmake
+++ b/cmake/modules/KstMacros.cmake
@@ -240,7 +240,7 @@ endmacro()
macro(kst_link)
target_link_libraries(${kst_name} ${ARGV})
if(kst_qt5)
- qt5_use_modules(${kst_name} Widgets Xml Network PrintSupport)
+ target_link_libraries(${kst_name} Qt5::Widgets Qt5::Xml Qt5::Network Qt5::PrintSupport)
else()
target_link_libraries(${kst_name}
${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTSVG_LIBRARY} ${QT_QTNETWORK_LIBRARY})
diff --git a/src/libkstapp/view.h b/src/libkstapp/view.h
index 95c8c6a5..2af53938 100644
--- a/src/libkstapp/view.h
+++ b/src/libkstapp/view.h
@@ -14,6 +14,7 @@
#define VIEW_H
#include <QGraphicsView>
+#include <QMenu>
#include "kst_export.h"

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cefbfd3e3710771985e08f02a397ef8ab407168fa8415d2c3c5740c031af18c6
size 14527129

16
_service Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://invent.kde.org/graphics/kst-plot.git</param>
<param name="revision">v2.1-2024-10-20</param>
<param name="versionformat">2.1.0</param>
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">zst</param>
</service>
<service name="set_version" mode="manual" />
</services>

View File

@ -0,0 +1,18 @@
Subject: Fix a header path
From: Antonio Larrosa <alarrosa@suse.com>
We install H5Cpp.h in /usr/include so we need to fix the include line.
Index: kst-plot/src/datasources/hdf5/hdf5.h
===================================================================
--- kst-plot.orig/src/datasources/hdf5/hdf5.h
+++ kst-plot/src/datasources/hdf5/hdf5.h
@@ -18,7 +18,7 @@
#include <dataplugin.h>
#include <QFileInfo>
-#include <hdf5/serial/H5Cpp.h>
+#include <H5Cpp.h>
#include <exception>
#include "debug.h"

View File

@ -1,204 +0,0 @@
From a9d24f91057441bbd2e3ed9e7536b071121526cb Mon Sep 17 00:00:00 2001
From: "D. V. Wiebe" <dvw@ketiltrout.net>
Date: Thu, 10 Mar 2016 14:09:26 -0800
Subject: [PATCH] GSL-2.x support.
---
src/plugins/fits/non_linear.h | 67 +++++++++++++++++++++-------------
src/plugins/fits/non_linear_weighted.h | 66 ++++++++++++++++++++-------------
2 files changed, 82 insertions(+), 51 deletions(-)
diff --git a/src/plugins/fits/non_linear.h b/src/plugins/fits/non_linear.h
index 4506704..74e82e7 100644
--- a/src/plugins/fits/non_linear.h
+++ b/src/plugins/fits/non_linear.h
@@ -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 {
@@ -100,6 +101,7 @@ bool kstfit_nonlinear(
gsl_multifit_function_fdf function;
gsl_vector_view vectorViewInitial;
gsl_matrix* pMatrixCovariance;
+ gsl_matrix *pMatrixJacobian;
struct data d;
double dXInitial[NUM_PARAMS];
double* pInputX;
@@ -177,37 +179,50 @@ bool kstfit_nonlinear(
}
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];
- }
+#if GSL_MAJOR_VERSION >= 2
+ pMatrixJacobian = gsl_matrix_alloc( iLength, NUM_PARAMS );
+#else
+ pMatrixJacobian = pSolver->J;
+#endif
+ if ( pMatrixJacobian != NULL) {
+#if GSL_MAJOR_VERSION >= 2
+ gsl_multifit_fdfsolver_jac( pSolver, pMatrixJacobian );
+#endif
+ gsl_multifit_covar( pMatrixJacobian, 0.0, pMatrixCovariance );
+
+ //
+ // determine the fitted values...
+ //
+ for( i=0; i<NUM_PARAMS; i++ ) {
+ dXInitial[i] = gsl_vector_get( pSolver->x, 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 );
+ for( i=0; i<iLength; i++ ) {
+ vectorOutYFitted->value()[i] = function_calculate( pInputX[i], dXInitial );
+ vectorOutYResiduals->value()[i] = pInputY[i] - vectorOutYFitted->value()[i];
}
- }
- //
- // determine the value of chi^2/nu
- //
- scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
+ //
+ // 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 );
+ }
+ }
- bReturn = true;
+ //
+ // determine the value of chi^2/nu
+ //
+ scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
+ bReturn = true;
+
+#if GSL_MAJOR_VERSION >= 2
+ gsl_matrix_free( pMatrixJacobian );
+#endif
+ }
gsl_matrix_free( pMatrixCovariance );
}
gsl_multifit_fdfsolver_free( pSolver );
diff --git a/src/plugins/fits/non_linear_weighted.h b/src/plugins/fits/non_linear_weighted.h
index 6ca7d6f..347ae9d 100644
--- a/src/plugins/fits/non_linear_weighted.h
+++ b/src/plugins/fits/non_linear_weighted.h
@@ -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 {
@@ -101,6 +102,7 @@ bool kstfit_nonlinear_weighted(
gsl_multifit_function_fdf function;
gsl_vector_view vectorViewInitial;
gsl_matrix* pMatrixCovariance;
+ gsl_matrix *pMatrixJacobian;
struct data d;
double dXInitial[NUM_PARAMS];
double* pInputs[3];
@@ -193,37 +195,51 @@ bool kstfit_nonlinear_weighted(
}
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 );
- }
+#if GSL_MAJOR_VERSION >= 2
+ pMatrixJacobian = gsl_matrix_alloc( iLength, NUM_PARAMS );
+#else
+ pMatrixJacobian = pSolver->J;
+#endif
+
+ if ( pMatrixJacobian != NULL) {
+#if GSL_MAJOR_VERSION >= 2
+ gsl_multifit_fdfsolver_jac( pSolver, pMatrixJacobian );
+#endif
+ gsl_multifit_covar( pMatrixJacobian, 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];
- }
+ 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 );
+ //
+ // 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 ));
+ //
+ // determine the value of chi^2/nu
+ //
+ scalarOutChi->setValue(gsl_blas_dnrm2( pSolver->f ));
- bReturn = true;
+ bReturn = true;
+#if GSL_MAJOR_VERSION >= 2
+ gsl_matrix_free( pMatrixJacobian );
+#endif
+ }
gsl_matrix_free( pMatrixCovariance );
}
gsl_multifit_fdfsolver_free( pSolver );

3
kst-plot-2.1.0.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:934ac7d1f966650468128db7cf73d5f70f01bee36b5d1e24cd364fe1ebb1ea2c
size 29413389

4
kst-plot.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: kst-plot
version: 2.1.0
mtime: 1729390534
commit: 07d15fac34c718b9433bd9480b78079031032e4e

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed Nov 20 17:11:06 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Stop using the %suse_update_desktop_file macro
-------------------------------------------------------------------
Mon Oct 28 15:20:57 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Update to kst 2.1.0
This release includes all updates since 2.0.8 released in 2014:
* Too many bug fixes to list
* Many feature improvements
Some of the changes can be seen at:
https://invent.kde.org/graphics/kst-plot/-/compare/v2.0.8...v2.1-2024-10-20
- Remove patches that are already included in 2.1.0:
* gsl2-support.patch
* Fix-build-with-Qt-511.patch
* 0001-Fix-build-with-CMake-3.20.patch
- Add patch to fix a hdf5 include path that we install in
another directory:
* fix-hdf5-include-path.patch
-------------------------------------------------------------------
Fri Jan 6 16:35:08 UTC 2023 - Christophe Marin <christophe@krop.fr>

View File

@ -1,7 +1,7 @@
#
# spec file for package kst
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2011 Christian Trippe ctrippe@opensuse.org
#
# All modifications and additions to the file contributed by third parties
@ -18,33 +18,30 @@
Name: kst
Version: 2.0.8
Version: 2.1.0
Release: 0
Summary: Real-Time Data Viewing and Plotting Tool with Basic Data Analysis Functionality
License: GPL-2.0-or-later
Group: Productivity/Graphics/Visualization/Graph
URL: https://kst-plot.kde.org/
Source: Kst-%{version}.tar.gz
# PATCH-FIX-UPSTREAM gsl2-support.patch -- fixes build with GSL-2.0
Patch0: gsl2-support.patch
# PATCH-FIX-UPSTREAM -- Fix-build-with-Qt-511.patch -- Fixes build with Qt 5.11
Patch1: Fix-build-with-Qt-511.patch
# PATCH-FIX-UPSTREAM
Patch2: 0001-Fix-build-with-CMake-3.20.patch
Source: kst-plot-%{version}.tar.zst
# PATCH-FIX-OPENSUSE
Patch0: fix-hdf5-include-path.patch
BuildRequires: Mesa-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gsl-devel
BuildRequires: hdf5-devel
BuildRequires: libmatio-devel
BuildRequires: libnetcdf_c++-devel
BuildRequires: libqt5-linguist
BuildRequires: netcdf-devel
BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: update-desktop-files
BuildRequires: cmake(Qt5Concurrent)
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Network)
BuildRequires: cmake(Qt5PrintSupport)
BuildRequires: cmake(Qt5Svg)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5Xml)
BuildRequires: pkgconfig(cfitsio)
@ -65,9 +62,8 @@ Kst is a data plotting and viewing program. Some of the features include:
- Powerful graphical user interface
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
Summary: Development files for kst
Requires: kst = %{version}
Requires: cmake(Qt5Concurrent)
Requires: cmake(Qt5Core)
Requires: cmake(Qt5Network)
@ -77,10 +73,10 @@ Requires: cmake(Qt5Xml)
%description devel
Development libraries and headers needed to build software
making use of %{name}
making use of kst
%prep
%autosetup -p1 -n Kst-2.0.8
%autosetup -p1 -n kst-plot-%{version}
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
@ -93,15 +89,15 @@ EXTRA_FLAGS="-Dkst_install_prefix=%{_prefix} \
-Dkst_qt5=1"
%cmake $EXTRA_FLAGS
%cmake_build
%install
%cmake_install
%suse_update_desktop_file -r %{name}2 Qt KDE Science Math
%fdupes %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%ldconfig_scriptlets
%files
%license COPYING*
@ -109,21 +105,18 @@ EXTRA_FLAGS="-Dkst_install_prefix=%{_prefix} \
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps
%dir %{_datadir}/kst
%dir %{_datadir}/kst/locale
%{_bindir}/%{name}2
%{_datadir}/applications/%{name}2.desktop
%{_datadir}/applnk/
%{_datadir}/icons/hicolor/*/apps/*%{name}.*
%{_datadir}/kst/locale/kst_common_*.qm
%{_datadir}/mimelink/
%{_libdir}/%{name}2/
%{_libdir}/lib%{name}*.so.*
%{_mandir}/man1/%{name}2.1%{?ext_man}
%dir %{_datadir}/icons/hicolor/*/mimetypes
%{_bindir}/kst2
%{_datadir}/applications/kst2.desktop
%{_datadir}/icons/hicolor/*/*/*kst.*
%{_libdir}/kst2/
%{_libdir}/libkst*.so.*
%{_mandir}/man1/kst2.1%{?ext_man}
%{_datadir}/mime/packages/x-kst.xml
%files devel
%license COPYING*
%{_libdir}/*.so
%{_libdir}/lib%{name}2app.a
%{_libdir}/libkst2app.a
%changelog