diff --git a/srcpkgs/octave/patches/aaffac4fbe30.patch b/srcpkgs/octave/patches/aaffac4fbe30.patch new file mode 100644 index 00000000000..e4c0e5cd72b --- /dev/null +++ b/srcpkgs/octave/patches/aaffac4fbe30.patch @@ -0,0 +1,52 @@ +Source: https://hg.octave.org/octave/raw-rev/aaffac4fbe30 +See: https://savannah.gnu.org/bugs/index.php?63684 + +# HG changeset patch +# User Markus Mützel +# Date 1674223637 -3600 +# Node ID aaffac4fbe30833c07ac7e267da19c2ff569085f +# Parent 084bbdabb969d502c964b046129b82adec2caeba +Adapt for API changes in SuiteSparse 7.0.0 or newer (bug #63684). + +* liboctave/util/oct-sparse.h (SUITESPARSE_ASSIGN_FPTR, +SUITESPARSE_ASSIGN_FPTR2): Adapt macro for changes in API of SuiteSparse 7.0.0 +or newer. + +diff -r 084bbdabb969 -r aaffac4fbe30 liboctave/util/oct-sparse.h +--- a/liboctave/util/oct-sparse.h Sun Jan 08 15:12:27 2023 +0100 ++++ b/liboctave/util/oct-sparse.h Fri Jan 20 15:07:17 2023 +0100 +@@ -89,16 +89,27 @@ + # include + #endif + +-// Cope with new SuiteSparse versions ++// Cope with API differences between SuiteSparse versions + + #if defined (SUITESPARSE_VERSION) +-# if (SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE (4, 3)) ++# if (SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE (7, 0)) ++# define SUITESPARSE_NAME(name) SuiteSparse_ ## name ++# define SUITESPARSE_SET_FCN(name) SuiteSparse_config_ ## name ## _set ++# define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) \ ++ SUITESPARSE_SET_FCN(f_name) (f_assign) ++# define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) \ ++ SUITESPARSE_SET_FCN(f_name) (SUITESPARSE_NAME (f_assign)) ++# elif (SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE (4, 3)) + # define SUITESPARSE_NAME(name) SuiteSparse_ ## name +-# define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (SuiteSparse_config.f_name = f_assign) +-# define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) (SuiteSparse_config.f_name = SUITESPARSE_NAME (f_assign)) ++# define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) \ ++ (SuiteSparse_config.f_name = f_assign) ++# define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) \ ++ (SuiteSparse_config.f_name = SUITESPARSE_NAME (f_assign)) + # else +-# define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (f_var = f_assign) +-# define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) (f_var = CHOLMOD_NAME (f_assign)) ++# define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) \ ++ (f_var = f_assign) ++# define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) \ ++ (f_var = CHOLMOD_NAME (f_assign)) + # endif + #endif + + diff --git a/srcpkgs/octave/template b/srcpkgs/octave/template index 164c9309347..471190a8fcb 100644 --- a/srcpkgs/octave/template +++ b/srcpkgs/octave/template @@ -1,7 +1,7 @@ # Template file for 'octave' pkgname=octave version=7.3.0 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-docs" hostmakedepends="perl gcc-fortran pkg-config"