[arch-commits] Commit in octave/trunk (PKGBUILD octave-sundials-6.0.patch)
Antonio Rojas
arojas at gemini.archlinux.org
Fri Dec 17 22:47:27 UTC 2021
Date: Friday, December 17, 2021 @ 22:47:26
Author: arojas
Revision: 1076636
sundials 6.0 rebuild
Added:
octave/trunk/octave-sundials-6.0.patch
Modified:
octave/trunk/PKGBUILD
---------------------------+
PKGBUILD | 12 ++++-
octave-sundials-6.0.patch | 98 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 107 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-12-17 22:35:40 UTC (rev 1076635)
+++ PKGBUILD 2021-12-17 22:47:26 UTC (rev 1076636)
@@ -4,7 +4,7 @@
pkgname=octave
pkgver=6.4.0
-pkgrel=1
+pkgrel=2
pkgdesc="A high-level language, primarily intended for numerical computations."
arch=('x86_64')
url="https://www.gnu.org/software/octave/"
@@ -18,12 +18,18 @@
'java-runtime: java support'
'fltk: FLTK GUI'
'texlive-bin: for the publish command')
-source=(https://ftp.gnu.org/gnu/octave/octave-$pkgver.tar.gz{,.sig})
+source=(https://ftp.gnu.org/gnu/octave/octave-$pkgver.tar.gz{,.sig}
+ octave-sundials-6.0.patch)
options=('!emptydirs')
validpgpkeys=('DBD9C84E39FE1AAE99F04446B05F05B75D36644B') # John W. Eaton
sha512sums=('91ff031f6dfff8506fa738fd4f1f07276501fdfe003f8ed992cccf91da14d9d33da6d08923322b0dae5f5b696b49856b0f5c5065e26b0701b0d1630173807435'
- 'SKIP')
+ 'SKIP'
+ '6c6f5e9589456fd360c81d117518642de6389783f7f4e58dcec4762c4ee3c9f8a1da3ce04999c66a52ae812cb523196c94bae9e78daaa49bbda3d20f763ec15e')
+prepare() {
+ patch -d $pkgname-$pkgver -p1 < octave-sundials-6.0.patch # Fix build with sundials 6
+}
+
build() {
cd ${pkgname}-${pkgver}
Added: octave-sundials-6.0.patch
===================================================================
--- octave-sundials-6.0.patch (rev 0)
+++ octave-sundials-6.0.patch 2021-12-17 22:47:26 UTC (rev 1076636)
@@ -0,0 +1,98 @@
+diff --git a/libinterp/dldfcn/__ode15__.cc b/libinterp/dldfcn/__ode15__.cc
+index f7ce85331d..700a31783a 100644
+--- a/libinterp/dldfcn/__ode15__.cc
++++ b/libinterp/dldfcn/__ode15__.cc
+@@ -105,11 +105,11 @@ namespace octave
+ # endif
+
+ # if defined (HAVE_SUNDIALS_SUNLINSOL_KLU)
+-# if ! defined (HAVE_SUNLINSOL_KLU) && defined (HAVE_SUNKLU)
++# if ! defined (HAVE_SUNLINSOL_KLU) && defined (HAVE_SUNLinSol_KLU)
+ static inline SUNLinearSolver
+ SUNLinSol_KLU (N_Vector y, SUNMatrix A)
+ {
+- return SUNKLU (y, A);
++ return SUNLinSol_KLU (y, A);
+ }
+ # endif
+ # endif
+@@ -417,11 +417,11 @@ namespace octave
+ else
+ {
+
+- m_sunJacMatrix = SUNDenseMatrix (m_num, m_num);
++ m_sunJacMatrix = SUNDenseMatrix (m_num, m_num, NULL);
+ if (! m_sunJacMatrix)
+ error ("Unable to create dense Jacobian for Sundials");
+
+- m_sunLinearSolver = SUNLinSol_Dense (yy, m_sunJacMatrix);
++ m_sunLinearSolver = SUNLinSol_Dense (yy, m_sunJacMatrix, NULL);
+ if (! m_sunLinearSolver)
+ error ("Unable to create dense linear solver");
+
+@@ -505,7 +505,7 @@ namespace octave
+ N_Vector
+ IDA::ColToNVec (const ColumnVector& data, long int n)
+ {
+- N_Vector v = N_VNew_Serial (n);
++ N_Vector v = N_VNew_Serial (n, NULL);
+
+ realtype *punt = nv_data_s (v);
+
+@@ -528,7 +528,7 @@ namespace octave
+ IDA::initialize (void)
+ {
+ m_num = m_y0.numel ();
+- m_mem = IDACreate ();
++ m_mem = IDACreate (NULL);
+
+ N_Vector yy = ColToNVec (m_y0, m_num);
+
+@@ -687,7 +687,7 @@ namespace octave
+ if (status == 0)
+ {
+ // Interpolate in tend
+- N_Vector dky = N_VNew_Serial (m_num);
++ N_Vector dky = N_VNew_Serial (m_num, NULL);
+
+ if (IDAGetDky (m_mem, tend, 0, dky) != 0)
+ error ("IDA failed to interpolate y");
+@@ -837,9 +837,9 @@ namespace octave
+ realtype h = 0, tcur = 0;
+ bool status = 0;
+
+- N_Vector dky = N_VNew_Serial (m_num);
++ N_Vector dky = N_VNew_Serial (m_num, NULL);
+
+- N_Vector dkyp = N_VNew_Serial (m_num);
++ N_Vector dkyp = N_VNew_Serial (m_num, NULL);
+
+ ColumnVector yout (m_num);
+ ColumnVector ypout (m_num);
+diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
+index 2c69748097..c6f1912a56 100644
+--- a/m4/acinclude.m4
++++ b/m4/acinclude.m4
+@@ -2747,10 +2747,10 @@ AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU], [
+ #endif
+ ])
+ OCTAVE_CHECK_LIB(sundials_sunlinsolklu, SUNLINSOL_KLU, [],
+- [], [SUNKLU], [],
++ [], [SUNLinSol_KLU], [],
+ [don't use SUNDIALS SUNLINSOL_KLU library, disable ode15i and ode15s sparse Jacobian],
+- [AC_CHECK_FUNCS([SUNLinSol_KLU SUNKLU])
+- AC_CACHE_CHECK([whether compiling a program that calls SUNKLU works],
++ [AC_CHECK_FUNCS([SUNLinSol_KLU SUNLinSol_KLU])
++ AC_CACHE_CHECK([whether compiling a program that calls SUNLinSol_KLU works],
+ [octave_cv_sundials_sunlinsol_klu],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #if defined (HAVE_IDA_IDA_H)
+@@ -2772,7 +2772,7 @@ AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU], [
+ #include <sunlinsol/sunlinsol_klu.h>
+ #endif
+ ]], [[
+- SUNKLU (0, 0);
++ SUNLinSol_KLU (0, 0);
+ ]])],
+ octave_cv_sundials_sunlinsol_klu=yes,
+ octave_cv_sundials_sunlinsol_klu=no)
More information about the arch-commits
mailing list