SUMMARY="Suite of nonlinear solvers"
DESCRIPTION="SUNDIALS is a family of software packages 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 \
various packages share many subordinate modules and are organized as a \
family with a directory structure that exploits sharing common functionality."
HOMEPAGE="https://computation.llnl.gov/projects/sundials"
COPYRIGHT="2002-2019, Lawrence Livermore National Security and Southern Methodist University"
LICENSE="BSD (3-clause)"
REVISION="3"
SOURCE_URI="https://computing.llnl.gov/projects/sundials/download/sundials-$portVersion.tar.gz"
CHECKSUM_SHA256="fb22d14fad42203809dc46d046b001149ec4e901b23882bd4a80619157fd9b21"

ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"

libsundials_arkodeVersion="4.1.0"
libsundials_arkodeVersionCompat="$libsundials_arkodeVersion compat >= ${libsundials_arkodeVersion%%.*}"
libsundials_cvodesVersion="5.1.0"
libsundials_cvodesVersionCompat="$libsundials_cvodesVersion compat >= ${libsundials_cvodesVersion%%.*}"
libsundials_cvodeVersion="5.1.0"
libsundials_cvodeVersionCompat="$libsundials_cvodeVersion compat >= ${libsundials_cvodeVersion%%.*}"
libsundials_fnvecpthreadsVersion="5.1.0"
libsundials_fnvecpthreadsVersionCompat="$libsundials_fnvecpthreadsVersion compat >= ${libsundials_fnvecpthreadsVersion%%.*}"
libsundials_fnvecserialVersion="5.1.0"
libsundials_fnvecserialVersionCompat="$libsundials_fnvecserialVersion compat >= ${libsundials_fnvecserialVersion%%.*}"
libsundials_fsunlinsolbandVersion="3.1.0"
libsundials_fsunlinsolbandVersionCompat="$libsundials_fsunlinsolbandVersion compat >= ${libsundials_fsunlinsolbandVersion%%.*}"
libsundials_fsunlinsoldenseVersion="3.1.0"
libsundials_fsunlinsoldenseVersionCompat="$libsundials_fsunlinsoldenseVersion compat >= ${libsundials_fsunlinsoldenseVersion%%.*}"
libsundials_fsunlinsollapackbandVersion="3.1.0"
libsundials_fsunlinsollapackbandVersionCompat="$libsundials_fsunlinsollapackbandVersion compat >= ${libsundials_fsunlinsollapackbandVersion%%.*}"
libsundials_fsunlinsollapackdenseVersion="3.1.0"
libsundials_fsunlinsollapackdenseVersionCompat="$libsundials_fsunlinsollapackdenseVersion compat >= ${libsundials_fsunlinsollapackdenseVersion%%.*}"
libsundials_fsunlinsolpcgVersion="3.1.0"
libsundials_fsunlinsolpcgVersionCompat="$libsundials_fsunlinsolpcgVersion compat >= ${libsundials_fsunlinsolpcgVersion%%.*}"
libsundials_fsunlinsolspbcgsVersion="3.1.0"
libsundials_fsunlinsolspbcgsVersionCompat="$libsundials_fsunlinsolspbcgsVersion compat >= ${libsundials_fsunlinsolspbcgsVersion%%.*}"
libsundials_fsunlinsolspfgmrVersion="3.1.0"
libsundials_fsunlinsolspfgmrVersionCompat="$libsundials_fsunlinsolspfgmrVersion compat >= ${libsundials_fsunlinsolspfgmrVersion%%.*}"
libsundials_fsunlinsolspgmrVersion="3.1.0"
libsundials_fsunlinsolspgmrVersionCompat="$libsundials_fsunlinsolspgmrVersion compat >= ${libsundials_fsunlinsolspgmrVersion%%.*}"
libsundials_fsunlinsolsptfqmrVersion="3.1.0"
libsundials_fsunlinsolsptfqmrVersionCompat="$libsundials_fsunlinsolsptfqmrVersion compat >= ${libsundials_fsunlinsolsptfqmrVersion%%.*}"
libsundials_fsunmatrixbandVersion="3.1.0"
libsundials_fsunmatrixbandVersionCompat="$libsundials_fsunmatrixbandVersion compat >= ${libsundials_fsunmatrixbandVersion%%.*}"
libsundials_fsunmatrixdenseVersion="3.1.0"
libsundials_fsunmatrixdenseVersionCompat="$libsundials_fsunmatrixdenseVersion compat >= ${libsundials_fsunmatrixdenseVersion%%.*}"
libsundials_fsunmatrixsparseVersion="3.1.0"
libsundials_fsunmatrixsparseVersionCompat="$libsundials_fsunmatrixsparseVersion compat >= ${libsundials_fsunmatrixsparseVersion%%.*}"
libsundials_fsunnonlinsolfixedpointVersion="2.1.0"
libsundials_fsunnonlinsolfixedpointVersionCompat="$libsundials_fsunnonlinsolfixedpointVersion compat >= ${libsundials_fsunnonlinsolfixedpointVersion%%.*}"
libsundials_fsunnonlinsolnewtonVersion="2.1.0"
libsundials_fsunnonlinsolnewtonVersionCompat="$libsundials_fsunnonlinsolnewtonVersion compat >= ${libsundials_fsunnonlinsolnewtonVersion%%.*}"
libsundials_idasVersion="4.1.0"
libsundials_idasVersionCompat="$libsundials_idasVersion compat >= ${libsundials_idasVersion%%.*}"
libsundials_idaVersion="5.1.0"
libsundials_idaVersionCompat="$libsundials_idaVersion compat >= ${libsundials_idaVersion%%.*}"
libsundials_kinsolVersion="5.1.0"
libsundials_kinsolVersionCompat="$libsundials_kinsolVersion compat >= ${libsundials_kinsolVersion%%.*}"
libsundials_nvecmanyvectorVersion="5.1.0"
libsundials_nvecmanyvectorVersionCompat="$libsundials_nvecmanyvectorVersion compat >= ${libsundials_nvecmanyvectorVersion%%.*}"
libsundials_nvecpthreadsVersion="5.1.0"
libsundials_nvecpthreadsVersionCompat="$libsundials_nvecpthreadsVersion compat >= ${libsundials_nvecpthreadsVersion%%.*}"
libsundials_nvecserialVersion="5.1.0"
libsundials_nvecserialVersionCompat="$libsundials_nvecserialVersion compat >= ${libsundials_nvecserialVersion%%.*}"
libsundials_sunlinsolbandVersion="3.1.0"
libsundials_sunlinsolbandVersionCompat="$libsundials_sunlinsolbandVersion compat >= ${libsundials_sunlinsolbandVersion%%.*}"
libsundials_sunlinsoldenseVersion="3.1.0"
libsundials_sunlinsoldenseVersionCompat="$libsundials_sunlinsoldenseVersion compat >= ${libsundials_sunlinsoldenseVersion%%.*}"
libsundials_sunlinsollapackbandVersion="3.1.0"
libsundials_sunlinsollapackbandVersionCompat="$libsundials_sunlinsollapackbandVersion compat >= ${libsundials_sunlinsollapackbandVersion%%.*}"
libsundials_sunlinsollapackdenseVersion="3.1.0"
libsundials_sunlinsollapackdenseVersionCompat="$libsundials_sunlinsollapackdenseVersion compat >= ${libsundials_sunlinsollapackdenseVersion%%.*}"
libsundials_sunlinsolpcgVersion="3.1.0"
libsundials_sunlinsolpcgVersionCompat="$libsundials_sunlinsolpcgVersion compat >= ${libsundials_sunlinsolpcgVersion%%.*}"
libsundials_sunlinsolspbcgsVersion="3.1.0"
libsundials_sunlinsolspbcgsVersionCompat="$libsundials_sunlinsolspbcgsVersion compat >= ${libsundials_sunlinsolspbcgsVersion%%.*}"
libsundials_sunlinsolspfgmrVersion="3.1.0"
libsundials_sunlinsolspfgmrVersionCompat="$libsundials_sunlinsolspfgmrVersion compat >= ${libsundials_sunlinsolspfgmrVersion%%.*}"
libsundials_sunlinsolspgmrVersion="3.1.0"
libsundials_sunlinsolspgmrVersionCompat="$libsundials_sunlinsolspgmrVersion compat >= ${libsundials_sunlinsolspgmrVersion%%.*}"
libsundials_sunlinsolsptfqmrVersion="3.1.0"
libsundials_sunlinsolsptfqmrVersionCompat="$libsundials_sunlinsolsptfqmrVersion compat >= ${libsundials_sunlinsolsptfqmrVersion%%.*}"
libsundials_sunmatrixbandVersion="3.1.0"
libsundials_sunmatrixbandVersionCompat="$libsundials_sunmatrixbandVersion compat >= ${libsundials_sunmatrixbandVersion%%.*}"
libsundials_sunmatrixdenseVersion="3.1.0"
libsundials_sunmatrixdenseVersionCompat="$libsundials_sunmatrixdenseVersion compat >= ${libsundials_sunmatrixdenseVersion%%.*}"
libsundials_sunmatrixsparseVersion="3.1.0"
libsundials_sunmatrixsparseVersionCompat="$libsundials_sunmatrixsparseVersion compat >= ${libsundials_sunmatrixsparseVersion%%.*}"
libsundials_sunnonlinsolfixedpointVersion="2.1.0"
libsundials_sunnonlinsolfixedpointVersionCompat="$libsundials_sunnonlinsolfixedpointVersion compat >= ${libsundials_sunnonlinsolfixedpointVersion%%.*}"
libsundials_sunnonlinsolnewtonVersion="2.1.0"
libsundials_sunnonlinsolnewtonVersionCompat="$libsundials_sunnonlinsolnewtonVersion compat >= ${libsundials_sunnonlinsolnewtonVersion%%.*}"

PROVIDES="
	sundials$secondaryArchSuffix = $portVersion
	lib:libsundials_arkode$secondaryArchSuffix = $libsundials_arkodeVersionCompat
	lib:libsundials_cvode$secondaryArchSuffix = $libsundials_cvodeVersionCompat
	lib:libsundials_cvodes$secondaryArchSuffix = $libsundials_cvodesVersionCompat
	lib:libsundials_fnvecpthreads$secondaryArchSuffix = $libsundials_fnvecpthreadsVersionCompat
	lib:libsundials_fnvecserial$secondaryArchSuffix = $libsundials_fnvecserialVersionCompat
	lib:libsundials_fsunlinsolband$secondaryArchSuffix = $libsundials_fsunlinsolbandVersionCompat
	lib:libsundials_fsunlinsoldense$secondaryArchSuffix = $libsundials_fsunlinsoldenseVersionCompat
	lib:libsundials_fsunlinsollapackband$secondaryArchSuffix = $libsundials_fsunlinsollapackbandVersionCompat
	lib:libsundials_fsunlinsollapackdense$secondaryArchSuffix = $libsundials_fsunlinsollapackdenseVersionCompat
	lib:libsundials_fsunlinsolpcg$secondaryArchSuffix = $libsundials_fsunlinsolpcgVersionCompat
	lib:libsundials_fsunlinsolspbcgs$secondaryArchSuffix = $libsundials_fsunlinsolspbcgsVersionCompat
	lib:libsundials_fsunlinsolspfgmr$secondaryArchSuffix = $libsundials_fsunlinsolspfgmrVersionCompat
	lib:libsundials_fsunlinsolspgmr$secondaryArchSuffix = $libsundials_fsunlinsolspgmrVersionCompat
	lib:libsundials_fsunlinsolsptfqmr$secondaryArchSuffix = $libsundials_fsunlinsolsptfqmrVersionCompat
	lib:libsundials_fsunmatrixband$secondaryArchSuffix = $libsundials_fsunmatrixbandVersionCompat
	lib:libsundials_fsunmatrixdense$secondaryArchSuffix = $libsundials_fsunmatrixdenseVersionCompat
	lib:libsundials_fsunmatrixsparse$secondaryArchSuffix = $libsundials_fsunmatrixsparseVersionCompat
	lib:libsundials_fsunnonlinsolfixedpoint$secondaryArchSuffix = $libsundials_fsunnonlinsolfixedpointVersionCompat
	lib:libsundials_fsunnonlinsolnewton$secondaryArchSuffix = $libsundials_fsunnonlinsolnewtonVersionCompat
	lib:libsundials_ida$secondaryArchSuffix = $libsundials_idaVersionCompat
	lib:libsundials_idas$secondaryArchSuffix = $libsundials_idasVersionCompat
	lib:libsundials_kinsol$secondaryArchSuffix = $libsundials_kinsolVersionCompat
	lib:libsundials_nvecmanyvector$secondaryArchSuffix = $libsundials_nvecmanyvectorVersionCompat
	lib:libsundials_nvecpthreads$secondaryArchSuffix = $libsundials_nvecpthreadsVersionCompat
	lib:libsundials_nvecserial$secondaryArchSuffix = $libsundials_nvecserialVersionCompat
	lib:libsundials_sunlinsolband$secondaryArchSuffix = $libsundials_sunlinsolbandVersionCompat
	lib:libsundials_sunlinsoldense$secondaryArchSuffix = $libsundials_sunlinsoldenseVersionCompat
	lib:libsundials_sunlinsollapackband$secondaryArchSuffix = $libsundials_sunlinsollapackbandVersionCompat
	lib:libsundials_sunlinsollapackdense$secondaryArchSuffix = $libsundials_sunlinsollapackdenseVersionCompat
	lib:libsundials_sunlinsolpcg$secondaryArchSuffix = $libsundials_sunlinsolpcgVersionCompat
	lib:libsundials_sunlinsolspbcgs$secondaryArchSuffix = $libsundials_sunlinsolspbcgsVersionCompat
	lib:libsundials_sunlinsolspfgmr$secondaryArchSuffix = $libsundials_sunlinsolspfgmrVersionCompat
	lib:libsundials_sunlinsolspgmr$secondaryArchSuffix = $libsundials_sunlinsolspgmrVersionCompat
	lib:libsundials_sunlinsolsptfqmr$secondaryArchSuffix = $libsundials_sunlinsolsptfqmrVersionCompat
	lib:libsundials_sunmatrixband$secondaryArchSuffix = $libsundials_sunmatrixbandVersionCompat
	lib:libsundials_sunmatrixdense$secondaryArchSuffix = $libsundials_sunmatrixdenseVersionCompat
	lib:libsundials_sunmatrixsparse$secondaryArchSuffix = $libsundials_sunmatrixsparseVersionCompat
	lib:libsundials_sunnonlinsolfixedpoint$secondaryArchSuffix = $libsundials_sunnonlinsolfixedpointVersionCompat
	lib:libsundials_sunnonlinsolnewton$secondaryArchSuffix = $libsundials_sunnonlinsolnewtonVersionCompat
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libgfortran$secondaryArchSuffix
	lib:liblapack$secondaryArchSuffix
	lib:libopenblas$secondaryArchSuffix
	"

PROVIDES_devel="
	sundials${secondaryArchSuffix}_devel = $portVersion
	devel:libsundials_arkode$secondaryArchSuffix = $libsundials_arkodeVersionCompat
	devel:libsundials_cvode$secondaryArchSuffix = $libsundials_cvodeVersionCompat
	devel:libsundials_cvodes$secondaryArchSuffix = $libsundials_cvodesVersionCompat
	devel:libsundials_farkode$secondaryArchSuffix = $portVersion
	devel:libsundials_fcvode$secondaryArchSuffix = $portVersion
	devel:libsundials_fida$secondaryArchSuffix = $portVersion
	devel:libsundials_fkinsol$secondaryArchSuffix = $portVersion
	devel:libsundials_fnvecpthreads$secondaryArchSuffix = $libsundials_fnvecpthreadsVersionCompat
	devel:libsundials_fnvecserial$secondaryArchSuffix = $libsundials_fnvecserialVersionCompat
	devel:libsundials_fsunlinsolband$secondaryArchSuffix = $libsundials_fsunlinsolbandVersionCompat
	devel:libsundials_fsunlinsoldense$secondaryArchSuffix = $libsundials_fsunlinsoldenseVersionCompat
	devel:libsundials_fsunlinsollapackband$secondaryArchSuffix = $libsundials_fsunlinsollapackbandVersionCompat
	devel:libsundials_fsunlinsollapackdense$secondaryArchSuffix = $libsundials_fsunlinsollapackdenseVersionCompat
	devel:libsundials_fsunlinsolpcg$secondaryArchSuffix = $libsundials_fsunlinsolpcgVersionCompat
	devel:libsundials_fsunlinsolspbcgs$secondaryArchSuffix = $libsundials_fsunlinsolspbcgsVersionCompat
	devel:libsundials_fsunlinsolspfgmr$secondaryArchSuffix = $libsundials_fsunlinsolspfgmrVersionCompat
	devel:libsundials_fsunlinsolspgmr$secondaryArchSuffix = $libsundials_fsunlinsolspgmrVersionCompat
	devel:libsundials_fsunlinsolsptfqmr$secondaryArchSuffix = $libsundials_fsunlinsolsptfqmrVersionCompat
	devel:libsundials_fsunmatrixband$secondaryArchSuffix = $libsundials_fsunmatrixbandVersionCompat
	devel:libsundials_fsunmatrixdense$secondaryArchSuffix = $libsundials_fsunmatrixdenseVersionCompat
	devel:libsundials_fsunmatrixsparse$secondaryArchSuffix = $libsundials_fsunmatrixsparseVersionCompat
	devel:libsundials_fsunnonlinsolfixedpoint$secondaryArchSuffix = $libsundials_fsunnonlinsolfixedpointVersionCompat
	devel:libsundials_fsunnonlinsolnewton$secondaryArchSuffix = $libsundials_fsunnonlinsolnewtonVersionCompat
	devel:libsundials_ida$secondaryArchSuffix = $libsundials_idaVersionCompat
	devel:libsundials_idas$secondaryArchSuffix = $libsundials_idasVersionCompat
	devel:libsundials_kinsol$secondaryArchSuffix = $libsundials_kinsolVersionCompat
	devel:libsundials_nvecmanyvector$secondaryArchSuffix = $libsundials_nvecmanyvectorVersionCompat
	devel:libsundials_nvecpthreads$secondaryArchSuffix = $libsundials_nvecpthreadsVersionCompat
	devel:libsundials_nvecserial$secondaryArchSuffix = $libsundials_nvecserialVersionCompat
	devel:libsundials_sunlinsolband$secondaryArchSuffix = $libsundials_sunlinsolbandVersionCompat
	devel:libsundials_sunlinsoldense$secondaryArchSuffix = $libsundials_sunlinsoldenseVersionCompat
	devel:libsundials_sunlinsollapackband$secondaryArchSuffix = $libsundials_sunlinsollapackbandVersionCompat
	devel:libsundials_sunlinsollapackdense$secondaryArchSuffix = $libsundials_sunlinsollapackdenseVersionCompat
	devel:libsundials_sunlinsolpcg$secondaryArchSuffix = $libsundials_sunlinsolpcgVersionCompat
	devel:libsundials_sunlinsolspbcgs$secondaryArchSuffix = $libsundials_sunlinsolspbcgsVersionCompat
	devel:libsundials_sunlinsolspfgmr$secondaryArchSuffix = $libsundials_sunlinsolspfgmrVersionCompat
	devel:libsundials_sunlinsolspgmr$secondaryArchSuffix = $libsundials_sunlinsolspgmrVersionCompat
	devel:libsundials_sunlinsolsptfqmr$secondaryArchSuffix = $libsundials_sunlinsolsptfqmrVersionCompat
	devel:libsundials_sunmatrixband$secondaryArchSuffix = $libsundials_sunmatrixbandVersionCompat
	devel:libsundials_sunmatrixdense$secondaryArchSuffix = $libsundials_sunmatrixdenseVersionCompat
	devel:libsundials_sunmatrixsparse$secondaryArchSuffix = $libsundials_sunmatrixsparseVersionCompat
	devel:libsundials_sunnonlinsolfixedpoint$secondaryArchSuffix = $libsundials_sunnonlinsolfixedpointVersionCompat
	devel:libsundials_sunnonlinsolnewton$secondaryArchSuffix = $libsundials_sunnonlinsolnewtonVersionCompat
	"
REQUIRES_devel="
	sundials$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libgfortran$secondaryArchSuffix
	devel:liblapack$secondaryArchSuffix
	devel:libopenblas$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:gfortran$secondaryArchSuffix
	cmd:g++$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

defineDebugInfoPackage sundials$secondaryArchSuffix \
	"$libDir"/libsundials_arkode.so.$libsundials_arkodeVersion \
	"$libDir"/libsundials_cvode.so.$libsundials_cvodeVersion \
	"$libDir"/libsundials_cvodes.so.$libsundials_cvodesVersion \
	"$libDir"/libsundials_fnvecpthreads.so.$libsundials_fnvecpthreadsVersion \
	"$libDir"/libsundials_fnvecserial.so.$libsundials_fnvecserialVersion \
	"$libDir"/libsundials_fsunlinsolband.so.$libsundials_fsunlinsolbandVersion \
	"$libDir"/libsundials_fsunlinsoldense.so.$libsundials_fsunlinsoldenseVersion \
	"$libDir"/libsundials_fsunlinsollapackband.so.$libsundials_fsunlinsollapackbandVersion \
	"$libDir"/libsundials_fsunlinsollapackdense.so.$libsundials_fsunlinsollapackdenseVersion \
	"$libDir"/libsundials_fsunlinsolpcg.so.$libsundials_fsunlinsolpcgVersion \
	"$libDir"/libsundials_fsunlinsolspbcgs.so.$libsundials_fsunlinsolspbcgsVersion \
	"$libDir"/libsundials_fsunlinsolspfgmr.so.$libsundials_fsunlinsolspfgmrVersion \
	"$libDir"/libsundials_fsunlinsolspgmr.so.$libsundials_fsunlinsolspgmrVersion \
	"$libDir"/libsundials_fsunlinsolsptfqmr.so.$libsundials_fsunlinsolsptfqmrVersion \
	"$libDir"/libsundials_fsunmatrixband.so.$libsundials_fsunmatrixbandVersion \
	"$libDir"/libsundials_fsunmatrixdense.so.$libsundials_fsunmatrixdenseVersion \
	"$libDir"/libsundials_fsunmatrixsparse.so.$libsundials_fsunmatrixsparseVersion \
	"$libDir"/libsundials_fsunnonlinsolfixedpoint.so.$libsundials_fsunnonlinsolfixedpointVersion \
	"$libDir"/libsundials_fsunnonlinsolnewton.so.$libsundials_fsunnonlinsolnewtonVersion \
	"$libDir"/libsundials_ida.so.$libsundials_idaVersion \
	"$libDir"/libsundials_idas.so.$libsundials_idasVersion \
	"$libDir"/libsundials_kinsol.so.$libsundials_kinsolVersion \
	"$libDir"/libsundials_nvecmanyvector.so.$libsundials_nvecmanyvectorVersion \
	"$libDir"/libsundials_nvecpthreads.so.$libsundials_nvecpthreadsVersion \
	"$libDir"/libsundials_nvecserial.so.$libsundials_nvecserialVersion \
	"$libDir"/libsundials_sunlinsolband.so.$libsundials_sunlinsolbandVersion \
	"$libDir"/libsundials_sunlinsoldense.so.$libsundials_sunlinsoldenseVersion \
	"$libDir"/libsundials_sunlinsollapackband.so.$libsundials_sunlinsollapackbandVersion \
	"$libDir"/libsundials_sunlinsollapackdense.so.$libsundials_sunlinsollapackdenseVersion \
	"$libDir"/libsundials_sunlinsolpcg.so.$libsundials_sunlinsolpcgVersion \
	"$libDir"/libsundials_sunlinsolspbcgs.so.$libsundials_sunlinsolspbcgsVersion \
	"$libDir"/libsundials_sunlinsolspfgmr.so.$libsundials_sunlinsolspfgmrVersion \
	"$libDir"/libsundials_sunlinsolspgmr.so.$libsundials_sunlinsolspgmrVersion \
	"$libDir"/libsundials_sunlinsolsptfqmr.so.$libsundials_sunlinsolsptfqmrVersion \
	"$libDir"/libsundials_sunmatrixband.so.$libsundials_sunmatrixbandVersion \
	"$libDir"/libsundials_sunmatrixdense.so.$libsundials_sunmatrixdenseVersion \
	"$libDir"/libsundials_sunmatrixsparse.so.$libsundials_sunmatrixsparseVersion \
	"$libDir"/libsundials_sunnonlinsolfixedpoint.so.$libsundials_sunnonlinsolfixedpointVersion \
	"$libDir"/libsundials_sunnonlinsolnewton.so.$libsundials_sunnonlinsolnewtonVersion

BUILD()
{
	mkdir -p build && cd build

	cmake .. \
		-DEXAMPLES_ENABLED=OFF \
		-DF77_INTERFACE_ENABLE=ON \
		-DPTHREAD_ENABLE=ON \
		-DLAPACK_ENABLE=ON \
		$cmakeDirArgs

	make $jobArgs
}

INSTALL()
{
	cd build
	make install

	mkdir -p $includeDir
	mv $prefix/include/* $includeDir
	rmdir $prefix/include/

	mkdir -p $developDocDir
	mv $prefix/examples/* $developDocDir
	rmdir $prefix/examples/

	prepareInstalledDevelLibs libsundials_arkode \
		libsundials_cvode \
		libsundials_cvodes \
		libsundials_farkode \
		libsundials_fcvode \
		libsundials_fida \
		libsundials_fkinsol \
		libsundials_fnvecpthreads \
		libsundials_fnvecserial \
		libsundials_fsunlinsolband \
		libsundials_fsunlinsoldense \
		libsundials_fsunlinsollapackband \
		libsundials_fsunlinsollapackdense \
		libsundials_fsunlinsolpcg \
		libsundials_fsunlinsolspbcgs \
		libsundials_fsunlinsolspfgmr \
		libsundials_fsunlinsolspgmr \
		libsundials_fsunlinsolsptfqmr \
		libsundials_fsunmatrixband \
		libsundials_fsunmatrixdense \
		libsundials_fsunmatrixsparse \
		libsundials_fsunnonlinsolfixedpoint \
		libsundials_fsunnonlinsolnewton \
		libsundials_ida \
		libsundials_idas \
		libsundials_kinsol \
		libsundials_nvecmanyvector \
		libsundials_nvecpthreads \
		libsundials_nvecserial \
		libsundials_sunlinsolband \
		libsundials_sunlinsoldense \
		libsundials_sunlinsollapackband \
		libsundials_sunlinsollapackdense \
		libsundials_sunlinsolpcg \
		libsundials_sunlinsolspbcgs \
		libsundials_sunlinsolspfgmr \
		libsundials_sunlinsolspgmr \
		libsundials_sunlinsolsptfqmr \
		libsundials_sunmatrixband \
		libsundials_sunmatrixdense \
		libsundials_sunmatrixsparse \
		libsundials_sunnonlinsolfixedpoint \
		libsundials_sunnonlinsolnewton

	packageEntries devel \
		$developDir
}

TEST()
{
	cd build
	make test
}
