diff options
Diffstat (limited to 'sci-libs/hdf5')
-rw-r--r-- | sci-libs/hdf5/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/hdf5/hdf5-1.12.2-r5.ebuild | 118 |
2 files changed, 119 insertions, 0 deletions
diff --git a/sci-libs/hdf5/Manifest b/sci-libs/hdf5/Manifest index bfc2184a9732..d8073cac1180 100644 --- a/sci-libs/hdf5/Manifest +++ b/sci-libs/hdf5/Manifest @@ -15,4 +15,5 @@ EBUILD hdf5-1.12.1.ebuild 3144 BLAKE2B 2bd023c0ade920fc795f4434260318095a34b200d EBUILD hdf5-1.12.2-r1.ebuild 3389 BLAKE2B 536c7a51533849c8b19f2a086b35352a9a845d89417ba10464ef53b0ee444fcab2fec0e369d5bdf9a1aa4746c0f004726200db1b60b67b3876eb425504d6d173 SHA512 1ccc6ce4ca8712bdd39d79e5acd82886a592d0578f14162ed374675e9bfcd2e8fe838354acea030298b340c9fac22f250913e205a9e943a4919237c0603766cc EBUILD hdf5-1.12.2-r2.ebuild 3456 BLAKE2B d59c684d4494e7f7f484dc87297ef1465998a8f9d75c2cf268e1d689353fd5e092c27dd0a61907ffe11cb35c424e2f9e972a7e3770f0938808bd704cdeca7961 SHA512 4e0b609458298ab12214aa68bb298063d35f64c12c4eff0cc656546b930dce5cc5891e9cdd6d030f7d616aa4ca13386dbbb020970cbea6d939bbe2356fb310ed EBUILD hdf5-1.12.2-r4.ebuild 3209 BLAKE2B eb7b30bee62cbad778b07f089026395d70046e3845b636bdb526e0960e4ae3789f2e5d1c9eac6fc213b755809c42946cf332446582d032d04900cfd80b57b06a SHA512 e6c2c24f9558c381b8ae5da8f0967635c64b02ad5f8288d5a08841c7637f8de7b72229f89d8be2cff5cd0c8c4482b404db3a7d41aeeaa927157c257f91fb62a3 +EBUILD hdf5-1.12.2-r5.ebuild 3289 BLAKE2B 9b8751188360a65c3175e3b902b8b34a650a4460e2b698cd56d9ab507a4e67d53ab46aecdb795adf0b24c8d02280d798ad807ceeef9e4fb743666466a85a96e9 SHA512 b3338097229fd8a788d50afb7e87002b5cbcd4fbc05b66addd0ebf7d8840f727c4dd2fd051b6ab6a2d27c2e87fadda0a8fd1fe15c21ce7d4ab997198bc1d68d4 MISC metadata.xml 985 BLAKE2B 989b487ac17b7cfc1920144207dbe101cb46d059e2f219d3da15094a7cd2da9979d0d11ef177f2c5542f010aefb4c1be10768d5c98a3e0b6235a4228b452f283 SHA512 e95daa26ad42f923ab113db8e62d2a37e4d8296e1cdc8e856a2f4ab5ffbcd0797c7be7365d3f3d55ab1e6cb45f17e6264bcf0df8d2ae013e972e28f679dfce61 diff --git a/sci-libs/hdf5/hdf5-1.12.2-r5.ebuild b/sci-libs/hdf5/hdf5-1.12.2-r5.ebuild new file mode 100644 index 000000000000..9e9c9c1af629 --- /dev/null +++ b/sci-libs/hdf5/hdf5-1.12.2-r5.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +FORTRAN_NEEDED=fortran + +# We've reverted *back* to autotools from CMake because of +# https://github.com/HDFGroup/hdf5/issues/1814. +inherit autotools fortran-2 flag-o-matic toolchain-funcs prefix + +MY_P=${PN}-${PV/_p/-patch} +MAJOR_P=${PN}-$(ver_cut 1-2) + +DESCRIPTION="General purpose library and file format for storing scientific data" +HOMEPAGE="https://www.hdfgroup.org/HDF5/" +SRC_URI="https://www.hdfgroup.org/ftp/HDF5/releases/${MAJOR_P}/${MY_P}/src/${MY_P}.tar.bz2" +S="${WORKDIR}/${MY_P}" + +LICENSE="NCSA-HDF" +SLOT="0/${PV%%_p*}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="cxx debug examples fortran +hl mpi szip threads unsupported zlib" +REQUIRED_USE=" + !unsupported? ( + cxx? ( !mpi ) mpi? ( !cxx ) + threads? ( !cxx !mpi !fortran !hl ) + ) +" + +RDEPEND=" + mpi? ( virtual/mpi[romio] ) + szip? ( virtual/szip ) + zlib? ( sys-libs/zlib:0= )" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.8.9-static_libgfortran.patch + "${FILESDIR}"/${PN}-1.12.2-no-messing-ldpath.patch + "${FILESDIR}"/${PN}-1.12.2-no-strip-symbols.patch +) + +pkg_setup() { + # Workaround for bug 285148 + tc-export CXX CC AR + + use fortran && fortran-2_pkg_setup + + if use mpi; then + if has_version 'sci-libs/hdf5[-mpi]'; then + ewarn "Installing hdf5 with mpi enabled with a previous hdf5 with mpi disabled may fail." + ewarn "Try to uninstall the current hdf5 prior to enabling mpi support." + fi + + export CC=mpicc + use fortran && export FC=mpif90 + elif has_version 'sci-libs/hdf5[mpi]'; then + ewarn "Installing hdf5 with mpi disabled while having hdf5 installed with mpi enabled may fail." + ewarn "Try to uninstall the current hdf5 prior to disabling mpi support." + fi +} + +src_prepare() { + default + + # Respect Gentoo examples directory + sed \ + -e "s:hdf5_examples:doc/${PF}/examples:g" \ + -i $(find . -name Makefile.am) $(find . -name "run*.sh.in") || die + sed \ + -e '/docdir/d' \ + -i config/commence.am || die + + if ! use examples; then + # bug #409091 + sed -e '/^install:/ s/install-examples//' \ + -i Makefile.am || die + fi + + # Enable shared libs by default for h5cc config utility + sed -i -e "s/SHLIB:-no/SHLIB:-yes/g" bin/h5cc.in || die + hprefixify m4/libtool.m4 + + eautoreconf +} + +src_configure() { + # bug #686620 + use sparc && tc-is-gcc && append-flags -fno-tree-ccp + + econf \ + --disable-static \ + --enable-deprecated-symbols \ + --enable-build-mode=$(usex debug debug production) \ + --with-default-plugindir="${EPREFIX}/usr/$(get_libdir)/${PN}/plugin" \ + $(use_enable cxx) \ + $(use_enable debug codestack) \ + $(use_enable fortran) \ + $(use_enable hl) \ + $(use_enable mpi parallel) \ + $(use_enable threads threadsafe) \ + $(use_enable unsupported) \ + $(use_with szip szlib) \ + $(use_with threads pthread) \ + $(use_with zlib) +} + +src_install() { + emake DESTDIR="${D}" EPREFIX="${EPREFIX}" install + + # No static archives + find "${ED}" -name '*.la' -delete || die + + # Remove "perf" executable due to file collisions with dev-util/perf. + # Previously with the CMake build system we only installed h5perf, so + # let's simply remove the file for now. + use mpi && { rm "${ED}"/usr/bin/perf || die "rm failed" ; } +} |