diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-04-23 23:59:27 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-04-23 23:59:27 +0100 |
commit | e3f21c8aff8a76afe3423721c437a088e9232840 (patch) | |
tree | fde2c1906a9787adec106c5d6b708cd60de02c60 /sci-libs/scalapack/scalapack-2.1.0-r1.ebuild | |
parent | 1f00990debeffd0052c194989d0a02baac23eb96 (diff) |
gentoo auto-resync : 23:04:2024 - 23:59:26
Diffstat (limited to 'sci-libs/scalapack/scalapack-2.1.0-r1.ebuild')
-rw-r--r-- | sci-libs/scalapack/scalapack-2.1.0-r1.ebuild | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/sci-libs/scalapack/scalapack-2.1.0-r1.ebuild b/sci-libs/scalapack/scalapack-2.1.0-r1.ebuild new file mode 100644 index 000000000000..192ee312b7ca --- /dev/null +++ b/sci-libs/scalapack/scalapack-2.1.0-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake flag-o-matic fortran-2 toolchain-funcs + +GCC10_PATCH_HASH="bc6cad585362aa58e05186bb85d4b619080c45a9" + +DESCRIPTION="Subset of LAPACK routines redesigned for heterogenous (MPI) computing" +HOMEPAGE="https://www.netlib.org/scalapack/" +SRC_URI=" + https://www.netlib.org/scalapack/${P}.tgz + https://github.com/Reference-ScaLAPACK/scalapack/commit/${GCC10_PATCH_HASH}.patch -> ${P}-gcc10.patch + " + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~riscv ~x86 ~amd64-linux ~x86-linux" +IUSE="static-libs test" +RESTRICT="!test? ( test )" + +BDEPEND="virtual/pkgconfig" +RDEPEND=" + virtual/lapack + virtual/mpi[fortran] +" +DEPEND="${RDEPEND}" + +PATCHES=( "${DISTDIR}/${P}-gcc10.patch" ) + +src_prepare() { + cmake_src_prepare + + if use static-libs; then + mkdir "${WORKDIR}/${PN}_static" || die + fi + # mpi does not have a pc file + sed -i -e 's/mpi//' scalapack.pc.in || die +} + +src_configure() { + # -Werror=strict-aliasing + # https://bugs.gentoo.org/862924 + # https://github.com/Reference-ScaLAPACK/scalapack/issues/95 + # + # Do not trust it for LTO either. + append-flags -fno-strict-aliasing + filter-lto + + scalapack_configure() { + local mycmakeargs=( + -DUSE_OPTIMIZED_LAPACK_BLAS=ON + -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)" + -DLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs lapack)" + -DBUILD_TESTING=$(usex test) + $@ + ) + cmake_src_configure + } + + scalapack_configure -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF + use static-libs && \ + CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" scalapack_configure \ + -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +} + +src_compile() { + cmake_src_compile + use static-libs && \ + CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" cmake_src_compile +} + +src_install() { + cmake_src_install + use static-libs && \ + CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" cmake_src_install + + insinto /usr/include/blacs + doins BLACS/SRC/*.h + + insinto /usr/include/scalapack + doins PBLAS/SRC/*.h +} |