Sync from SUSE:SLFO:Main gsl revision 6c6421122d49b454a3cbe45fd9f6ac18

This commit is contained in:
Adrian Schröter 2024-12-18 16:14:11 +01:00
parent d37d610431
commit 7a033f0370
8 changed files with 92 additions and 97 deletions

View File

@ -1,73 +0,0 @@
From 989a193268b963aa1047814f7f1402084fb7d859 Mon Sep 17 00:00:00 2001
From: Patrick Alken <alken@colorado.edu>
Date: Sat, 16 Apr 2022 11:56:10 -0600
Subject: fix for bug #59624
---
NEWS | 2 ++
statistics/quantiles.c | 1 +
statistics/quantiles_source.c | 35 +++++++++++++++++++++--------------
3 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/statistics/quantiles.c b/statistics/quantiles.c
index 96a3a25..50898d9 100644
--- a/statistics/quantiles.c
+++ b/statistics/quantiles.c
@@ -1,5 +1,6 @@
#include <config.h>
#include <gsl/gsl_statistics.h>
+#include <gsl/gsl_errno.h>
#define BASE_LONG_DOUBLE
#include "templates_on.h"
diff --git a/statistics/quantiles_source.c b/statistics/quantiles_source.c
index e2956d9..b2feba4 100644
--- a/statistics/quantiles_source.c
+++ b/statistics/quantiles_source.c
@@ -24,22 +24,29 @@ FUNCTION(gsl_stats,quantile_from_sorted_data) (const BASE sorted_data[],
const size_t n,
const double f)
{
- const double index = f * (n - 1) ;
- const size_t lhs = (int)index ;
- const double delta = index - lhs ;
- double result;
-
- if (n == 0)
- return 0.0 ;
-
- if (lhs == n - 1)
+ if ((f < 0.0) || (f > 1.0))
{
- result = sorted_data[lhs * stride] ;
+ GSL_ERROR_VAL ("invalid quantile fraction", GSL_EDOM, 0.0);
}
- else
+ else
{
- result = (1 - delta) * sorted_data[lhs * stride] + delta * sorted_data[(lhs + 1) * stride] ;
- }
+ const double index = f * (n - 1) ;
+ const size_t lhs = (int)index ;
+ const double delta = index - lhs ;
+ double result;
- return result ;
+ if (n == 0)
+ return 0.0 ;
+
+ if (lhs == n - 1)
+ {
+ result = sorted_data[lhs * stride] ;
+ }
+ else
+ {
+ result = (1 - delta) * sorted_data[lhs * stride] + delta * sorted_data[(lhs + 1) * stride] ;
+ }
+
+ return result ;
+ }
}
--
cgit v1.1

BIN
gsl-2.7.1.tar.gz (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
gsl-2.8.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
gsl-2.8.tar.gz.sig Normal file

Binary file not shown.

View File

@ -0,0 +1,17 @@
---
bspline/gsl_bspline.h | 2 ++
1 file changed, 2 insertions(+)
Index: gsl-2.8/bspline/gsl_bspline.h
===================================================================
--- gsl-2.8.orig/bspline/gsl_bspline.h
+++ gsl-2.8/bspline/gsl_bspline.h
@@ -191,6 +191,8 @@ size_t gsl_bspline_ncoeffs (gsl_bspline_
int gsl_bspline_knots (const gsl_vector * breakpts, gsl_bspline_workspace * w);
int gsl_bspline_knots_uniform (const double a, const double b, gsl_bspline_workspace * w);
int gsl_bspline_eval (const double x, gsl_vector * B, gsl_bspline_workspace * w);
+int gsl_bspline_eval_nonzero (const double x, gsl_vector * Bk, size_t * istart,
+ size_t * iend, gsl_bspline_workspace * w);
int gsl_bspline_deriv_eval (const double x, const size_t nderiv,
gsl_matrix * dB, gsl_bspline_workspace * w);
int gsl_bspline_knots_greville (const gsl_vector *abscissae,

View File

@ -1,3 +1,48 @@
-------------------------------------------------------------------
Tue Oct 8 09:14:06 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
- Ensure that %check do not modify build results (boo#1227364)
-------------------------------------------------------------------
Tue Jun 11 05:03:47 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
- Add gsl-bspline-missing-definition.patch: Add missing definition
for gsl_bspline_eval_nonzero (svg#65868).
-------------------------------------------------------------------
Wed May 29 12:44:56 UTC 2024 - Adam Majer <adam.majer@suse.de>
- update to gsl 2.8:
* updated multilarge TSQR method to store ||z_2|| and
provide it to the user
* add routines for Hermite B-spline interpolation
* add functions:
- gsl_matrix_complex_conjugate
- gsl_vector_complex_conj_memcpy
- gsl_vector_complex_div_real
- gsl_linalg_QR_lssolvem_r
- gsl_linalg_complex_QR_lssolvem_r
- gsl_linalg_complex_QR_QHmat_r
- gsl_linalg_QR_UR_lssolve
- gsl_linalg_QR_UR_lssvx
- gsl_linalg_QR_UR_QTvec
- gsl_linalg_QR_UU_lssvx
- gsl_linalg_QR_UD_lssvx
- gsl_linalg_QR_UD_QTvec
- gsl_linalg_complex_cholesky_{decomp2,svx2,solve2,scale,scale_apply}
- gsl_linalg_SV_{solve2,lssolve}
- gsl_rstat_norm
* add Lebedev quadrature (gsl_integration_lebedev)
* major overhaul to the B-spline module to add
new functionality
- 989a193268b963aa1047814f7f1402084fb7d859.patch: removed, upstreamed
-------------------------------------------------------------------
Tue Feb 27 11:13:36 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %patch -P N instead of deprecated %patchN.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 28 11:27:15 UTC 2023 - Adam Majer <adam.majer@suse.de> Mon Aug 28 11:27:15 UTC 2023 - Adam Majer <adam.majer@suse.de>

View File

@ -1,7 +1,7 @@
# #
# spec file # spec file for package gsl
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -19,9 +19,9 @@
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%define pname gsl %define pname gsl
%define vers 2.7.1 %define vers 2.8
%define _vers 2_7_1 %define _vers 2_8_0
%define lgsl_so_v 27 %define lgsl_so_v 28
%define lgslcblas_so_v 0 %define lgslcblas_so_v 0
%if "%{flavor}" == "" %if "%{flavor}" == ""
@ -122,7 +122,8 @@ Source1: https://ftp.gnu.org/pub/gnu/%{pname}/%{pname}-%{version}.tar.gz.
Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=gsl&download=1#/%{pname}.keyring Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=gsl&download=1#/%{pname}.keyring
Patch6: gsl-qawc-test-x86-precision.diff Patch6: gsl-qawc-test-x86-precision.diff
Patch7: gsl-disable-fma.patch Patch7: gsl-disable-fma.patch
Patch8: 989a193268b963aa1047814f7f1402084fb7d859.patch # PATCH-FIX-UPSTREAM gsl-bspline-missing-definition.patch svg#65868 badshah400@gmail.com -- Add missing definition for gsl_bspline_eval_nonzero
Patch8: gsl-bspline-missing-definition.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: libtool BuildRequires: libtool
@ -258,9 +259,9 @@ library packages.
%prep %prep
%setup -q -n %{pname}-%{version} %setup -q -n %{pname}-%{version}
%patch6 %patch -P 6
%patch7 -p1 %patch -P 7 -p1
%patch8 -p1 %patch -P 8 -p1
%build %build
@ -281,18 +282,6 @@ export CFLAGS="%{optflags}"
--with-gnu-ld --with-gnu-ld
make %{?_smp_mflags} make %{?_smp_mflags}
%check
# On i586 this still fails
%ifarch %{ix86}
make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 0 )
%else
make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 1 )
%endif
# Clean up to package directory
make -C doc/examples clean
chmod a-x doc/examples/*
rm doc/examples/Makefile*
%install %install
%{?with_hpc:%hpc_setup} %{?with_hpc:%hpc_setup}
@ -347,6 +336,23 @@ family "%pname"
EOF EOF
%endif %endif
# create a copy for testing without dirtying the installed files
cp -a `pwd` ../test.tmp
# Clean up to package directory
make -C doc/examples clean
rm doc/examples/Makefile*
chmod a-x doc/examples/*
%check
cd ../test.tmp
# On i586 this still fails
%ifarch %{ix86}
make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 0 )
%else
make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 1 )
%endif
cd .. ; rm -rf test.tmp
%if %{without hpc} %if %{without hpc}
%post -n %{libname} -p /sbin/ldconfig %post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig