mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 11:37:20 -08:00
sci-libs/sundials: add 7.9.0
Building with LTO now works, and we don't appear to need static-libs with USE=fortran any more. I've built this every which way, and the build/tests always succeed. Drop the patch to install LICENSE in $docdir, because we shouldn't be installing it anyway. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
This commit is contained in:
@@ -7,3 +7,4 @@ DIST sundials-7.3.0.tar.gz 92369377 BLAKE2B ea29e29c1421adccc09d092a889b47eb097b
|
||||
DIST sundials-7.5.0.tar.gz 92920912 BLAKE2B 8bdf6b24860838b6d979faa736b04436835e8a9f90164c78d8e31713413241f6c7b7b24b090481bc3b35a953dfcbd867b5fd5b00f8ece0aae17919064436aeca SHA512 4ae4417552bbfa53fc49e82061e37c3aa9f2f17bf0d8dbf46e2d85d55a4fbe8fbcd10e4e573ae78b3c4fa25adfaa758e31adbb58a7300bee1174d67dbc2ef58f
|
||||
DIST sundials-7.7.0.tar.gz 25610795 BLAKE2B 72e3a5cc5b8df85eeadc8a917444eed7ee0849423633dabff43964875adea665f2cb3684006edca6d36acf9786619f4914c96e834866ac4f6c36838e82eb5f73 SHA512 390ad55789c7be3084474c9979bf9e0d7c0823844061e54ce5e3590981897c5b0d5488f63a5251ff489f4bed4e8d862279b0427654c272df67b84cf6ea04fcc8
|
||||
DIST sundials-7.8.0.tar.gz 26654455 BLAKE2B f93b40d2a92f7c17302e7545460f6ecb5ce96bd3e58a21d39d1e28cabeb3089fe129c500fc76ff22a5c8b70f1d23cb8fc3fa896e619c6ee338b8e551a2f482b1 SHA512 6b80c534c32f3450ea23d484c2e1eafbde754f7e7244647e20e022cebf79c4b221c0c97e486efcbee71f8798ae4c48eb68d3c3f29a34594a9a4b5bc02d302ef2
|
||||
DIST sundials-7.9.0.tar.gz 26894207 BLAKE2B ae51d12c0234b66e91c364325d292ebdf16a9e6317886eb95a3a12b501cf2560809ab9f974ce1d75f7b25ee3f3ace191fb1fd0113f6599b47ab3c728ee8e8575 SHA512 b331fc01e778b2e22d8766e98f840662c99a9771d816f6964f135b796e4fd78b5c606dec38798f31b6077bbc3f2ff82f7d6b217f54ad8dd1d983d1b5363ae4f3
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR="emake"
|
||||
FORTRAN_NEEDED=fortran
|
||||
FORTRAN_STANDARD="77 90 2003"
|
||||
# if FFLAGS and FCFLAGS are set then should be equal
|
||||
|
||||
inherit cmake flag-o-matic fortran-2 toolchain-funcs
|
||||
|
||||
DESCRIPTION="Suite of nonlinear solvers"
|
||||
HOMEPAGE="https://computing.llnl.gov/projects/sundials"
|
||||
SRC_URI="https://github.com/LLNL/${PN}/releases/download/v${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/$(ver_cut 1)"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
|
||||
IUSE="doc fortran hypre +int64 lapack mpi openmp sparse superlumt threads"
|
||||
REQUIRED_USE="
|
||||
hypre? ( mpi )
|
||||
"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
RDEPEND="
|
||||
lapack? ( virtual/lapack )
|
||||
mpi? (
|
||||
sci-libs/hypre:=[fortran?,mpi?]
|
||||
virtual/mpi[fortran?]
|
||||
)
|
||||
sparse? ( sci-libs/klu )
|
||||
superlumt? ( sci-libs/superlu_mt:=[int64=] )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
|
||||
|
||||
use fortran && fortran-2_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# bug #707240
|
||||
append-cflags -fcommon
|
||||
use threads && append-ldflags -pthread
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
mycmakeargs+=(
|
||||
-DBUILD_FORTRAN_MODULE_INTERFACE=$(usex fortran)
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_STATIC_LIBS=OFF
|
||||
-DENABLE_HYPRE=$(usex hypre)
|
||||
-DENABLE_KLU=$(usex sparse)
|
||||
-DENABLE_LAPACK=$(usex lapack)
|
||||
-DENABLE_MPI=$(usex mpi)
|
||||
-DENABLE_OPENMP=$(usex openmp)
|
||||
-DENABLE_PTHREAD=$(usex threads)
|
||||
-DENABLE_SUPERLUMT=$(usex superlumt)
|
||||
-DSUNDIALS_INDEX_SIZE="$(usex int64 64 32)"
|
||||
-DSUPERLUMT_INCLUDE_DIR="${EPREFIX}/usr/include/superlu_mt"
|
||||
-DSUPERLUMT_LIBRARY="-lsuperlu_mt"
|
||||
)
|
||||
|
||||
if use fortran; then
|
||||
mycmakeargs+=(
|
||||
-DFortran_INSTALL_MODDIR="${EPREFIX}/usr/$(get_libdir)/fortran"
|
||||
)
|
||||
fi
|
||||
|
||||
if use hypre; then
|
||||
mycmakeargs+=(
|
||||
-DHYPRE_INCLUDE_DIR="${EPREFIX}/usr/include/hypre"
|
||||
-DHYPRE_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libHYPRE.so"
|
||||
)
|
||||
fi
|
||||
|
||||
if use sparse; then
|
||||
mycmakeargs+=(
|
||||
-DKLU_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libklu.so"
|
||||
)
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
use doc && dodoc doc/*/*.pdf
|
||||
mv "${ED}"/usr/examples "${ED}"/usr/share/doc/"${PF}"/ || die
|
||||
rm "${ED}"/usr/include/sundials/LICENSE || die
|
||||
}
|
||||
Reference in New Issue
Block a user