[packages/sundials] - updated to 2.7.0 - fixed KLU detection

qboosh qboosh at pld-linux.org
Sat Jan 21 20:43:47 CET 2023


commit 838ad5e96566e24735a4c40951244457b426c249
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jan 21 20:45:00 2023 +0100

    - updated to 2.7.0
    - fixed KLU detection

 sundials-cmake.patch | 24 ++++++++++++------------
 sundials.spec        | 36 ++++++++++++++++++++++--------------
 2 files changed, 34 insertions(+), 26 deletions(-)
---
diff --git a/sundials.spec b/sundials.spec
index 73a4eb4..5fb0285 100644
--- a/sundials.spec
+++ b/sundials.spec
@@ -1,4 +1,7 @@
 # TODO: MPI support
+# Hypre http://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods
+# PETSc http://www.mcs.anl.gov/petsc
+# SUPERLUMT http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu_mt
 #
 # Conditional build:
 %bcond_without	openmp	# OpenMP support
@@ -6,14 +9,16 @@
 Summary:	SUite of Nonlinear and DIfferential/ALgebraic equation Solvers
 Summary(pl.UTF-8):	Zbiór procedur do rozwiązywania równań nieliniowych i różniczkowych/algebraicznych
 Name:		sundials
-Version:	2.6.2
+Version:	2.7.0
 Release:	1
 License:	BSD
 Group:		Libraries
-Source0:	https://computing.llnl.gov/sites/default/files/inline-files/%{name}-%{version}.tar.gz
-# Source0-md5:	3deeb0ede9f514184c6bd83ecab77d95
+#Source0Download: https://computing.llnl.gov/projects/sundials/sundials-software
+Source0:	https://github.com/LLNL/sundials/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	b1724826fe7289164264750377e52664
 Patch0:		%{name}-cmake.patch
 URL:		https://computing.llnl.gov/projects/sundials
+BuildRequires:	SuiteSparse-KLU-devel
 BuildRequires:	cmake >= 2.8.1
 BuildRequires:	gcc-fortran
 BuildRequires:	lapack-devel
@@ -106,6 +111,9 @@ Dokumentacja API bibliotek SUNDIALS.
 %setup -q
 %patch0 -p1
 
+# duplicate of cvodes/ckpng.pdf
+%{__rm} doc/idas/ckpnt.pdf
+
 %build
 install -d build
 cd build
@@ -113,12 +121,12 @@ cd build
 	-DEXAMPLES_INSTALL_PATH=%{_examplesdir}/%{name}-%{version} \
 	-DFCMIX_ENABLE=ON \
 	-DKLU_ENABLE=ON \
+	-DKLU_INCLUDE_DIR=%{_includedir}/suitesparse \
+	-DKLU_LIBRARY_DIR=%{_libdir} \
 	-DLAPACK_ENABLE=ON \
 	%{?with_openmp:-DOPENMP_ENABLE=ON} \
 	-DPTHREAD_ENABLE=ON
 
-# SUPERLUMT_ENABLE?
-
 %{__make}
 
 %install
@@ -139,32 +147,32 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libsundials_arkode.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libsundials_arkode.so.1
 %attr(755,root,root) %{_libdir}/libsundials_cvode.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsundials_cvode.so.1
+%attr(755,root,root) %ghost %{_libdir}/libsundials_cvode.so.2
 %attr(755,root,root) %{_libdir}/libsundials_cvodes.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libsundials_cvodes.so.2
 %attr(755,root,root) %{_libdir}/libsundials_ida.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libsundials_ida.so.2
 %attr(755,root,root) %{_libdir}/libsundials_idas.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsundials_idas.so.0
+%attr(755,root,root) %ghost %{_libdir}/libsundials_idas.so.1
 %attr(755,root,root) %{_libdir}/libsundials_kinsol.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsundials_kinsol.so.1
+%attr(755,root,root) %ghost %{_libdir}/libsundials_kinsol.so.2
 %if %{with openmp}
 %attr(755,root,root) %{_libdir}/libsundials_nvecopenmp.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsundials_nvecopenmp.so.0
+%attr(755,root,root) %ghost %{_libdir}/libsundials_nvecopenmp.so.2
 %endif
 %attr(755,root,root) %{_libdir}/libsundials_nvecpthreads.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsundials_nvecpthreads.so.0
+%attr(755,root,root) %ghost %{_libdir}/libsundials_nvecpthreads.so.2
 %attr(755,root,root) %{_libdir}/libsundials_nvecserial.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsundials_nvecserial.so.0
+%attr(755,root,root) %ghost %{_libdir}/libsundials_nvecserial.so.2
 # Fortran - shared
 %if %{with openmp}
 %attr(755,root,root) %{_libdir}/libsundials_fnvecopenmp.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsundials_fnvecopenmp.so.0
+%attr(755,root,root) %ghost %{_libdir}/libsundials_fnvecopenmp.so.2
 %endif
 %attr(755,root,root) %{_libdir}/libsundials_fnvecpthreads.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsundials_fnvecpthreads.so.0
+%attr(755,root,root) %ghost %{_libdir}/libsundials_fnvecpthreads.so.2
 %attr(755,root,root) %{_libdir}/libsundials_fnvecserial.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsundials_fnvecserial.so.0
+%attr(755,root,root) %ghost %{_libdir}/libsundials_fnvecserial.so.2
 
 %files devel
 %defattr(644,root,root,755)
diff --git a/sundials-cmake.patch b/sundials-cmake.patch
index ef68040..436b283 100644
--- a/sundials-cmake.patch
+++ b/sundials-cmake.patch
@@ -13,7 +13,7 @@
    ADD_LIBRARY(sundials_arkode_shared SHARED 
      ${arkode_SOURCES}  ${arkode_BL_SOURCES}  ${shared_SOURCES})
  
-+  TARGET_LINK_LIBRARIES(sundials_arkode_shared lapack m)
++  TARGET_LINK_LIBRARIES(sundials_arkode_shared klu lapack m)
 +
    # Set the library name and make sure it is not deleted
    SET_TARGET_PROPERTIES(sundials_arkode_shared
@@ -42,7 +42,7 @@
    ADD_LIBRARY(sundials_cvode_shared SHARED 
      ${cvode_SOURCES}  ${cvode_BL_SOURCES}  ${shared_SOURCES})
  
-+  TARGET_LINK_LIBRARIES(sundials_cvode_shared lapack m)
++  TARGET_LINK_LIBRARIES(sundials_cvode_shared klu lapack m)
 +
    # Set the library name and make sure it is not deleted
    SET_TARGET_PROPERTIES(sundials_cvode_shared
@@ -203,7 +203,7 @@
    ADD_LIBRARY(sundials_cvodes_shared SHARED 
      ${cvodes_SOURCES}  ${cvodes_BL_SOURCES}  ${shared_SOURCES})
  
-+  TARGET_LINK_LIBRARIES(sundials_cvodes_shared lapack m)
++  TARGET_LINK_LIBRARIES(sundials_cvodes_shared klu lapack m)
 +
    # Set the library name and make sure it is not deleted
    SET_TARGET_PROPERTIES(sundials_cvodes_shared
@@ -232,7 +232,7 @@
    ADD_LIBRARY(sundials_ida_shared SHARED
      ${ida_SOURCES}  ${ida_BL_SOURCES} ${shared_SOURCES})
  
-+  TARGET_LINK_LIBRARIES(sundials_ida_shared lapack m)
++  TARGET_LINK_LIBRARIES(sundials_ida_shared klu lapack m)
 +
    # Set the library name and make sure it is not deleted
    SET_TARGET_PROPERTIES(sundials_ida_shared
@@ -261,7 +261,7 @@
    ADD_LIBRARY(sundials_idas_shared SHARED 
      ${idas_SOURCES}  ${idas_BL_SOURCES} ${idas_SLU_SOURCES} ${shared_SOURCES})
  
-+  TARGET_LINK_LIBRARIES(sundials_idas_shared lapack m)
++  TARGET_LINK_LIBRARIES(sundials_idas_shared klu lapack m)
 +
    # Set the library name and make sure it is not deleted
    SET_TARGET_PROPERTIES(sundials_idas_shared
@@ -275,9 +275,9 @@
  
  ENDIF(BUILD_SHARED_LIBS)
  
---- sundials-2.6.2/src/kinsol/CMakeLists.txt.orig	2015-07-31 02:09:13.000000000 +0200
-+++ sundials-2.6.2/src/kinsol/CMakeLists.txt	2023-01-20 06:16:20.537336832 +0100
-@@ -127,7 +127,7 @@ IF(BUILD_STATIC_LIBS)
+--- sundials-2.7.0/src/kinsol/CMakeLists.txt.orig	2016-09-27 19:27:29.000000000 +0200
++++ sundials-2.7.0/src/kinsol/CMakeLists.txt	2023-01-21 07:57:43.080383525 +0100
+@@ -134,7 +134,7 @@ IF(BUILD_STATIC_LIBS)
      PROPERTIES OUTPUT_NAME sundials_kinsol CLEAN_DIRECT_OUTPUT 1)
  
    # Install the KINSOL library
@@ -286,16 +286,16 @@
  
  ENDIF(BUILD_STATIC_LIBS)
  
-@@ -138,6 +138,8 @@ IF(BUILD_SHARED_LIBS)
+@@ -145,6 +145,8 @@ IF(BUILD_SHARED_LIBS)
    ADD_LIBRARY(sundials_kinsol_shared SHARED
-     ${kinsol_SOURCES} ${kinsol_BL_SOURCES} ${kinsol_SLU_SOURCES} ${shared_SOURCES})
+     ${kinsol_SOURCES} ${kinsol_BL_SOURCES} ${kinsol_SLU_SOURCES} ${kinsol_KLU_SOURCES} ${shared_SOURCES})
  
-+  TARGET_LINK_LIBRARIES(sundials_kinsol_shared lapack m)
++  TARGET_LINK_LIBRARIES(sundials_kinsol_shared klu lapack m)
 +
    # Set the library name and make sure it is not deleted
    SET_TARGET_PROPERTIES(sundials_kinsol_shared
      PROPERTIES OUTPUT_NAME sundials_kinsol CLEAN_DIRECT_OUTPUT 1)
-@@ -147,7 +149,7 @@ IF(BUILD_SHARED_LIBS)
+@@ -154,7 +156,7 @@ IF(BUILD_SHARED_LIBS)
      PROPERTIES VERSION ${kinsollib_VERSION} SOVERSION ${kinsollib_SOVERSION})
  
    # Install the KINSOL library
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sundials.git/commitdiff/838ad5e96566e24735a4c40951244457b426c249



More information about the pld-cvs-commit mailing list