mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-libs/hypre: add 2.33.0
Upstream fixed build with C23 Closes: https://bugs.gentoo.org/958036 Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/411 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST hypre-2.32.0.tar.gz 7512442 BLAKE2B da31dfaa3ccfb263c8d81932d34dc906e1821c1ec61d9c70109bd2a3dfeb79bc3561669fd438262c574db7e01039f7eee9afc8c45f2193903f142b42becb87e6 SHA512 c1b09a31781ce4e1a411c486424cf7a4df1275d53445ed83d0e4e210dcc87e9c09e17e26cc5ee736aebbd70618674cd3b7dba6736f8e725ba1c3d981869ada24
|
||||
DIST hypre-2.33.0.tar.gz 7514919 BLAKE2B abb73c2a3c1f47224f5692f8fa29b050e5e58fc899f184a771bff11118f9a417c214dfaf6669b4cb95cce26c2395baf535cd20f8bd461a177c11718862094ce1 SHA512 ecbb5f5c62f920a472ca58d1b64dcc3bd86be9347153f778e6f8578b10e22047c1a3d998c5a311fa4740bdebeab04bffbfae4a3a5ae94e931f65830c11a0cb24
|
||||
|
||||
109
sci-libs/hypre/hypre-2.33.0.ebuild
Normal file
109
sci-libs/hypre/hypre-2.33.0.ebuild
Normal file
@@ -0,0 +1,109 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
FORTRAN_NEEDED=fortran
|
||||
|
||||
inherit fortran-2 toolchain-funcs flag-o-matic
|
||||
|
||||
DESCRIPTION="Parallel matrix preconditioners library"
|
||||
HOMEPAGE="https://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods"
|
||||
SRC_URI="https://github.com/hypre-space/hypre/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
|
||||
IUSE="debug examples fortran int64 openmp mpi"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
RDEPEND="
|
||||
sci-libs/superlu:=
|
||||
virtual/blas
|
||||
virtual/lapack
|
||||
mpi? ( virtual/mpi )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
DOCS=( CHANGELOG COPYRIGHT README )
|
||||
|
||||
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() {
|
||||
default
|
||||
|
||||
# link with system superlu and propagate LDFLAGS
|
||||
sed -e "s:@LIBS@:@LIBS@ $($(tc-getPKG_CONFIG) --libs superlu):" \
|
||||
-e 's:_SHARED@:_SHARED@ $(LDFLAGS):g' \
|
||||
-i src/config/Makefile.config.in || die
|
||||
|
||||
sed -e '/HYPRE_ARCH/s: = :=:g' \
|
||||
-i src/configure || die
|
||||
|
||||
# link with system blas and lapack
|
||||
sed -e '/^BLASFILES/d' \
|
||||
-e '/^LAPACKFILES/d' \
|
||||
-i src/lib/Makefile || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC CXX
|
||||
append-flags -Dhypre_dgesvd=dgesvd_
|
||||
|
||||
if use openmp ; then
|
||||
append-flags -fopenmp
|
||||
append-ldflags -fopenmp
|
||||
fi
|
||||
|
||||
if use mpi ; then
|
||||
CC=mpicc
|
||||
FC=mpif77
|
||||
CXX=mpicxx
|
||||
fi
|
||||
|
||||
cd src || die
|
||||
|
||||
# without-superlu: means do not use bundled one
|
||||
econf \
|
||||
--enable-shared \
|
||||
--with-blas-libs="$($(tc-getPKG_CONFIG) --libs-only-l blas | sed -e 's/-l//g')" \
|
||||
--with-blas-lib-dirs="$($(tc-getPKG_CONFIG) --libs-only-L blas | sed -e 's/-L//g')" \
|
||||
--with-lapack-libs="$($(tc-getPKG_CONFIG) --libs-only-l lapack | sed -e 's/-l//g')" \
|
||||
--with-lapack-lib-dirs="$($(tc-getPKG_CONFIG) --libs-only-L lapack | sed -e 's/-L//g')" \
|
||||
--with-timing \
|
||||
--without-superlu \
|
||||
$(use_enable debug) \
|
||||
$(use_enable openmp hopscotch) \
|
||||
$(use_enable int64 bigint) \
|
||||
$(use_enable fortran) \
|
||||
$(use_with openmp) \
|
||||
$(use_with mpi MPI)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -C src
|
||||
}
|
||||
|
||||
src_test() {
|
||||
LD_LIBRARY_PATH="${S}/src/lib:${LD_LIBRARY_PATH}" \
|
||||
PATH="${S}/src/test:${PATH}" \
|
||||
emake -C src check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -C src install \
|
||||
HYPRE_INSTALL_DIR="${ED}" \
|
||||
HYPRE_LIB_INSTALL="${ED}/usr/$(get_libdir)" \
|
||||
HYPRE_INC_INSTALL="${ED}/usr/include/hypre"
|
||||
|
||||
if use examples; then
|
||||
dodoc -r src/examples
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user