mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-libs/hdf5: add 2.2.0
Bug: https://bugs.gentoo.org/982104 Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# David Seifert <soap@gentoo.org> (2026-09-07)
|
||||
# sci-libs/libaec is not keyworded here, and >=sci-libs/hdf5-2.2.0
|
||||
# requires it directly instead of via virtual/szip
|
||||
>=sci-libs/hdf5-2.2.0 szip
|
||||
|
||||
# Sam James <sam@gentoo.org> (2026-09-04)
|
||||
# sys-apps/xdg-desktop-portal not keyworded here
|
||||
x11-base/xwayland libei
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
# NOTE: When masking a USE flag due to missing keywords, please file a keyword
|
||||
# request bug for the hppa arch.
|
||||
|
||||
# David Seifert <soap@gentoo.org> (2026-09-07)
|
||||
# sci-libs/libaec is not keyworded here, and >=sci-libs/hdf5-2.2.0
|
||||
# requires it directly instead of via virtual/szip
|
||||
>=sci-libs/hdf5-2.2.0 szip
|
||||
|
||||
# Sam James <sam@gentoo.org> (2026-09-04)
|
||||
# sys-apps/xdg-desktop-portal not keyworded here
|
||||
x11-base/xwayland libei
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
# Copyright 2023-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# David Seifert <soap@gentoo.org> (2026-09-07)
|
||||
# sci-libs/libaec is not keyworded here (bug #966099), and >=sci-libs/hdf5-2.2.0
|
||||
# requires it directly instead of via virtual/szip
|
||||
>=sci-libs/hdf5-2.2.0 szip
|
||||
|
||||
# Nicolas PARLANT <nicolas.parlant@parhuet.fr> (2026-07-30)
|
||||
# dev-python/qtpy is not keyworded here
|
||||
media-libs/libffado gui
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# David Seifert <soap@gentoo.org> (2026-09-07)
|
||||
# sci-libs/libaec is not keyworded here, and >=sci-libs/hdf5-2.2.0
|
||||
# requires it directly instead of via virtual/szip
|
||||
>=sci-libs/hdf5-2.2.0 szip
|
||||
|
||||
# James Le Cuirot <chewi@gentoo.org> (2026-09-05)
|
||||
# VIS is a sparc-specific SIMD optimisation.
|
||||
media-libs/libggi -vis
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
DIST hdf5-1.14.6.tar.gz 39289609 BLAKE2B c604384c0d98ce092ac59a67ec5baf3d593548d37defa0fd29b676dd0837e321fff937368edb50591ac8841116648e41ed8505611518a2c914a380191a7c0388 SHA512 d93194ad8f48acf110aae317f4c37104b9042f89ef72919aac887817e4c2713449c4cb2ab6a163c61ab1c12811170d7611cdf69322b0e0f96420fcc7f99fdd67
|
||||
DIST hdf5-2.2.0.tar.gz 42131403 BLAKE2B 4c964d812e086034d42c3577e8b543d2e05f2a65c838b9d63ac6b28fe639763ddcb04a514ecb2e4f619513ccb83575ffc7fb90c13f7c5f4189359452a3881baf SHA512 597052c7cf4ec40c5655216956fe6a32c3ea1fdc69ddd7f9c39cddd42fd035efbc03fa5837a9378b5c4cd3f88c6b7b5ee054e9db5a739850505149749ed3fefa
|
||||
|
||||
116
sci-libs/hdf5/hdf5-2.2.0.ebuild
Normal file
116
sci-libs/hdf5/hdf5-2.2.0.ebuild
Normal file
@@ -0,0 +1,116 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
FORTRAN_NEEDED=fortran
|
||||
|
||||
inherit cmake fortran-2 flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="General purpose library and file format for storing scientific data"
|
||||
HOMEPAGE="https://github.com/HDFGroup/hdf5/"
|
||||
SRC_URI="https://github.com/HDFGroup/hdf5/releases/download/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="NCSA-HDF"
|
||||
SLOT="0/320-cmake"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
|
||||
IUSE="cxx debug fortran +hl mpi szip test threads unsupported zlib"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="
|
||||
!unsupported? (
|
||||
?? ( cxx mpi )
|
||||
threads? ( !cxx !mpi !fortran !hl )
|
||||
)
|
||||
"
|
||||
|
||||
# HDF5 2.x requires libaec's libsz compatibility library, so virtual/szip
|
||||
# (which also allows sci-libs/szip) is not sufficient here.
|
||||
DEPEND="
|
||||
mpi? ( virtual/mpi[romio,fortran?] )
|
||||
szip? ( sci-libs/libaec:=[szip] )
|
||||
zlib? ( virtual/zlib:= )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
dev-lang/perl
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
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_configure() {
|
||||
# bug #686620
|
||||
use sparc && tc-is-gcc && append-flags -fno-tree-ccp
|
||||
|
||||
local mycmakeargs=(
|
||||
# lib/cmake dirs follow CMAKE_INSTALL_LIBDIR from the eclass
|
||||
-DHDF5_USE_GNU_DIRS=ON
|
||||
# just LICENSE
|
||||
-DHDF5_INSTALL_DATA_DIR=tmp
|
||||
# redundant to include?
|
||||
-DHDF5_INSTALL_MODULE_DIR=tmp
|
||||
-DHDF5_INSTALL_DOC_DIR=share/doc/${PF}
|
||||
-DH5_DEFAULT_PLUGINDIR="${EPREFIX}/usr/$(get_libdir)/${PN}/plugin"
|
||||
|
||||
-DHDF5_ALLOW_UNSUPPORTED=$(usex unsupported)
|
||||
-DHDF5_ONLY_SHARED_LIBS=ON
|
||||
-DHDF5_ENABLE_TRACE=$(usex debug)
|
||||
-DHDF5_ENABLE_HDFS=OFF
|
||||
# the direct VFD needs O_DIRECT, which is Linux-only here;
|
||||
# requesting it elsewhere is a hard configure error
|
||||
-DHDF5_ENABLE_DIRECT_VFD=$(usex kernel_linux)
|
||||
-DHDF5_ENABLE_PARALLEL=$(usex mpi)
|
||||
-DHDF5_ENABLE_SUBFILING_VFD=OFF
|
||||
-DHDF5_ENABLE_SZIP_SUPPORT=$(usex szip)
|
||||
-DHDF5_ENABLE_ZLIB_SUPPORT=$(usex zlib)
|
||||
-DHDF5_USE_ZLIB_NG=OFF
|
||||
-DHDF5_ENABLE_THREADSAFE=$(usex threads)
|
||||
-DHDF5_ENABLE_CONCURRENCY=OFF
|
||||
-DHDF5_ENABLE_MAP_API=OFF
|
||||
-DHDF5_BUILD_DOC=OFF
|
||||
-DBUILD_TESTING=$(usex test)
|
||||
-DHDF5_BUILD_PARALLEL_TOOLS=OFF
|
||||
-DHDF5_BUILD_TOOLS=ON
|
||||
-DHDF5_ENABLE_PLUGIN_SUPPORT=OFF
|
||||
-DHDF5_BUILD_HL_LIB=$(usex hl)
|
||||
-DHDF5_BUILD_FORTRAN=$(usex fortran)
|
||||
-DHDF5_BUILD_CPP_LIB=$(usex cxx)
|
||||
-DHDF5_BUILD_JAVA=OFF
|
||||
-DHDF5_BUILD_EXAMPLES=OFF
|
||||
)
|
||||
|
||||
# do not force the compiler used for build
|
||||
if use mpi; then
|
||||
mycmakeargs+=( -DHDF5_H5CC_C_COMPILER=mpicc )
|
||||
use cxx && mycmakeargs+=( -DHDF5_H5CC_CXX_COMPILER=mpic++ )
|
||||
use fortran && mycmakeargs+=( -DHDF5_H5CC_Fortran_COMPILER=mpif90 )
|
||||
else
|
||||
mycmakeargs+=( -DHDF5_H5CC_C_COMPILER='${CC:-cc}' )
|
||||
use cxx && mycmakeargs+=( -DHDF5_H5CC_CXX_COMPILER='${CXX:-c++}' )
|
||||
use fortran &&
|
||||
mycmakeargs+=( -DHDF5_H5CC_Fortran_COMPILER='${FC:-gfortran}' )
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
rm -r "${ED}/usr/tmp" || die
|
||||
}
|
||||
Reference in New Issue
Block a user