# workaround gcc 10 build errors %global _legacy_common_support 1 %global sum Nonlinear, differential and algebraic equation solvers %define majornum 6 %define libname %mklibname %{name} %{majornum} %define develname %mklibname %{name} -d %define arkmajor 5 %define cvmajor 6 %define cvsmajor 6 %define idasmajor 5 %define idamajor 6 %define kinmajor 6 %define nvecmajor 6 %define sunmatmajor 4 %define sunlinmajor 4 %define sunnonlinmajor 3 %define gccinstalldir %(LC_ALL=C gcc --print-search-dirs | grep install | awk '{print $2}') %define fincludedir %{gccinstalldir}finclude %ifarch x86_64 aarch64 %bcond_without fortran %else %bcond_with fortran %endif Name: sundials Version: 6.5.1 Release: %mkrel 1 Summary: %{sum} License: BSD Group: Sciences/Computer science URL: https://computing.llnl.gov/projects/sundials Source0: https://github.com/LLNL/sundials/releases/download/v%{version}/sundials-%{version}.tar.gz BuildRequires: cmake %if %{with fortran} BuildRequires: gcc-gfortran %endif %ifarch %{ix86} x86_64 BuildRequires: quadmath-devel %endif BuildRequires: libgomp-devel BuildRequires: openmpi-devel BuildRequires: lapack-devel BuildRequires: blas-devel BuildRequires: suitesparse-devel Requires: %{libname} = %{version}-%{release} %description SUNDIALS is a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers implemented with the goal of providing robust time integrators and nonlinear solvers that can easily be incorporated into existing simulation codes. The primary design goals are to require minimal information from the user, allow users to easily supply their own data structures underneath the packages, and allow for easy incorporation of user-supplied linear solvers and preconditioners. The main numerical operations performed in these codes are operations on data vectors, and the codes have been written in terms of interfaces to these vector operations. The result of this design is that users can relatively easily provide their own data structures to the solvers by telling the solver about their structures and providing the required operations on them. The codes also come with default vector structures with pre-defined operation implementations for serial, shared-memory parallel (openMP and PThreads), and distributed memory parallel (MPI) environments in case a user prefers not to supply their own structures. In addition, all parallelism is contained within specific vector operations (norms, dot products, etc.). No other operations within the solvers require knowledge of parallelism. Thus, using a solver in parallel consists of using a parallel vector implementation, either one provided with SUNDIALS or the userâs own parallel vector structure, underneath the solver. %package -n %{libname} Summary: The SUNDIALS libraries Group: System/Libraries %description -n %{libname} %{sum}. %package -n %{develname} Summary: Development files for the SUNDIALS libraries Group: Development/Other Requires: %{libname} = %{version}-%{release} Provides: sundials-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} %description -n %{develname} %{sum}. %prep %setup -q %autopatch -p1 %build %cmake \ -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_INSTALL_LIBSUFFIX="%{_lib}" \ -DCMAKE_INSTALL_LIBDIR="%{_libdir}" \ %if %{with fortran} -DBUILD_FORTRAN77_INTERFACE:BOOL=OFF \ -DBUILD_FORTRAN_MODULE_INTERFACE:BOOL=ON \ -DFortran_INSTALL_MODDIR:PATH=%{fincludedir} \ %endif -DENABLE_LAPACK:BOOL=ON \ -DENABLE_BLAS:BOOL=ON \ -DENABLE_KLU:BOOL=ON \ -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ -DKLU_LIBRARY_DIR:PATH=%{_libdir} \ -DENABLE_MPI:BOOL=ON \ -DENABLE_OPENMP:BOOL=ON \ -DENABLE_PTHREADS:BOOL=ON \ -DEXAMPLES_INSTALL_PATH=%{_datadir}/%{name}/examples \ -DCMAKE_SKIP_RPATH:BOOL=YES \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES %cmake_build %install %cmake_install # remove static files find %{buildroot} -name "*.a" -delete %__rm %{buildroot}%{_includedir}/sundials/LICENSE %files %doc LICENSE README.md %{_datadir}/sundials %files -n %{libname} %{_libdir}/libsundials_generic.so.%{majornum}{,.*} %{_libdir}/libsundials_arkode.so.%{arkmajor}{,.*} %{_libdir}/libsundials_cvode.so.%{cvmajor}{,.*} %{_libdir}/libsundials_cvodes.so.%{cvsmajor}{,.*} %if %{with fortran} %{_libdir}/libsundials_farkode_mod.so.%{arkmajor}{,.*} %{_libdir}/libsundials_fcvode_mod.so.%{cvmajor}{,.*} %{_libdir}/libsundials_fcvodes_mod.so.%{cvsmajor}{,.*} %{_libdir}/libsundials_fida_mod.so.%{idamajor}{,.*} %{_libdir}/libsundials_fidas_mod.so.%{idasmajor}{,.*} %{_libdir}/libsundials_fkinsol_mod.so.%{kinmajor}{,.*} %{_libdir}/libsundials_fnvec*.so.%{nvecmajor}{,.*} %{_libdir}/libsundials_fsunlin*.so.%{sunlinmajor}{,.*} %{_libdir}/libsundials_fsunmat*.so.%{sunmatmajor}{,.*} %{_libdir}/libsundials_fsunnonlin*.so.%{sunnonlinmajor}{,.*} %endif %{_libdir}/libsundials_ida.so.%{idamajor}{,.*} %{_libdir}/libsundials_idas.so.%{idasmajor}{,.*} %{_libdir}/libsundials_kinsol.so.%{kinmajor}{,.*} %{_libdir}/libsundials_nvec*.so.%{nvecmajor}{,.*} %{_libdir}/libsundials_sunlin*.so.%{sunlinmajor}{,.*} %{_libdir}/libsundials_sunmat*.so.%{sunmatmajor}{,.*} %{_libdir}/libsundials_sunnonlin*.so.%{sunnonlinmajor}{,.*} %files -n %{develname} %{_includedir}/*/*.h %{_includedir}/*/*.hpp %{_includedir}/sundials/NOTICE %{_libdir}/libsundials_*.so %{_libdir}/cmake/sundials/*.cmake %if %{with fortran} %{fincludedir}/*.mod %endif %changelog * Tue May 30 2023 eatdirt <eatdirt> 6.5.1-1.mga9 + Revision: 1959821 - Update to version 6.5.1 * Sun Dec 04 2022 eatdirt <eatdirt> 6.4.1-1.mga9 + Revision: 1917695 - Update to version 6.4.1 * Fri Aug 26 2022 eatdirt <eatdirt> 6.3.0-1.mga9 + Revision: 1880485 - Update to version 6.3.0 * Sat Apr 30 2022 joequant <joequant> 6.2.0-1.mga9 + Revision: 1855197 - update to 6.2.0 + umeabot <umeabot> - Mageia 9 Mass Rebuild * Fri Aug 27 2021 eatdirt <eatdirt> 5.7.0-1.mga9 + Revision: 1742891 - Update to version 5.7.0 * Sun Dec 06 2020 eatdirt <eatdirt> 5.5.0-1.mga8 + Revision: 1653768 - Upgrade to version 5.5.0 * Fri Oct 09 2020 eatdirt <eatdirt> 5.4.0-1.mga8 + Revision: 1633010 - Upgrade to version 5.4.0 * Sat May 23 2020 wally <wally> 5.3.0-1.mga8 + Revision: 1587056 - new version 5.3.0 - enable fortran support only in 64bit arches - build with -fcommon - drop python2 BR + pterjan <pterjan> - Remove usage of obsolete macros (https://github.com/rpm-software-management/rpm/issues/1211) * Thu Mar 12 2020 tmb <tmb> 4.1.0-5.mga8 + Revision: 1555906 - rebuild for gcc 9.3.0 final with major-only version in file paths * Sun Mar 08 2020 tmb <tmb> 4.1.0-4.mga8 + Revision: 1554881 - rebuild for gcc 9.3.0 * Tue Feb 18 2020 umeabot <umeabot> 4.1.0-3.mga8 + Revision: 1541406 - Mageia 8 Mass Rebuild * Fri Dec 27 2019 wally <wally> 4.1.0-2.mga8 + Revision: 1470230 - build with new cmake macros - use our %%ldflags * Mon Mar 04 2019 eatdirt <eatdirt> 4.1.0-1.mga7 + Revision: 1371545 - Update to version 4.1.0 * Wed Dec 19 2018 eatdirt <eatdirt> 4.0.0-1.mga7 + Revision: 1342943 - Upgrade to version 4.0.0 * Sun Sep 23 2018 umeabot <umeabot> 3.1.2-2.mga7 + Revision: 1301238 - Mageia 7 Mass Rebuild * Wed Aug 08 2018 eatdirt <eatdirt> 3.1.2-1.mga7 + Revision: 1249861 - Upgrade to version 3.1.2 * Fri May 18 2018 eatdirt <eatdirt> 3.1.1-2.mga7 + Revision: 1230326 - Rebuild for new openmpi * Sat May 12 2018 eatdirt <eatdirt> 3.1.1-1.mga7 + Revision: 1228639 - Upgrade to version 3.1.1 * Sun Oct 08 2017 eatdirt <eatdirt> 2.7.0-2.mga7 + Revision: 1170284 - Rebuild for new openmpi * Sun Apr 23 2017 eatdirt <eatdirt> 2.7.0-1.mga6 + Revision: 1097145 - imported package sundials