diff --git a/sci-libs/hdf5/Manifest b/sci-libs/hdf5/Manifest new file mode 100644 index 0000000..8239bc1 --- /dev/null +++ b/sci-libs/hdf5/Manifest @@ -0,0 +1 @@ +DIST hdf5-1.10.5.tar.bz2 8706317 SHA256 68d6ea8843d2a106ec6a7828564c1689c7a85714a35d8efafa2fee20ca366f44 SHA512 769e43b8672e26fe24ed68da0228c010d3d9bc950ca09f0bc60707911a2f26f2f8415c8abc8ec06e07667148d8cdb3b0c7b3e7860d9b19739629c5dfd5ce73d4 WHIRLPOOL 29eb782010dc03310e623cacf3aa71b0b9bf3abc01170a870ed62f6a767784513f4757d447e8a9b1ab9d833f4a799a39551d9bd8a78873dd43da31b274435b4c diff --git a/sci-libs/hdf5/files/hdf5-1.8.13-no-messing-ldpath.patch b/sci-libs/hdf5/files/hdf5-1.8.13-no-messing-ldpath.patch new file mode 100644 index 0000000..82bc5d8 --- /dev/null +++ b/sci-libs/hdf5/files/hdf5-1.8.13-no-messing-ldpath.patch @@ -0,0 +1,21 @@ +Prevent build system with messing up LD_LIBRARY_PATH +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -125,8 +125,6 @@ settings_DATA=libhdf5.settings + # Remove the generated .c file if errors occur unless HDF5_Make_Ignore + # is set to ignore the error. + H5Tinit.c: H5detect$(EXEEXT) +- LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ +- sed -e 's/-L/:/g' -e 's/ //g'`" \ + $(RUNSERIAL) ./H5detect$(EXEEXT) > $@ || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + ($(RM) $@ ; exit 1) +@@ -137,8 +135,6 @@ H5Tinit.c: H5detect$(EXEEXT) + # Remove the generated .c file if errors occur unless HDF5_Make_Ignore + # is set to ignore the error. + H5lib_settings.c: H5make_libsettings$(EXEEXT) libhdf5.settings +- LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ +- sed -e 's/-L/:/g' -e 's/ //g'`" \ + $(RUNSERIAL) ./H5make_libsettings$(EXEEXT) > $@ || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + ($(RM) $@ ; exit 1) diff --git a/sci-libs/hdf5/files/hdf5-1.8.15-implicits.patch b/sci-libs/hdf5/files/hdf5-1.8.15-implicits.patch new file mode 100644 index 0000000..72e0961 --- /dev/null +++ b/sci-libs/hdf5/files/hdf5-1.8.15-implicits.patch @@ -0,0 +1,43 @@ +--- a/hl/src/H5LTanalyze.c ++++ b/hl/src/H5LTanalyze.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + /* end standard C headers. */ + +--- a/hl/src/H5LTanalyze.l ++++ b/hl/src/H5LTanalyze.l +@@ -16,6 +16,7 @@ + %{ + #include + #include ++#include + #include + #include "H5LTparse.h" + +--- a/test/cache_common.h ++++ b/test/cache_common.h +@@ -702,5 +702,8 @@ void validate_mdc_config(hid_t file_id, + hbool_t compare_init, + int test_num); + ++hbool_t resize_configs_are_equal(const H5C_auto_size_ctl_t *a, ++ const H5C_auto_size_ctl_t *b, ++ hbool_t compare_init); + #endif /* _CACHE_COMMON_H */ + +--- a/testpar/t_span_tree.c ++++ b/testpar/t_span_tree.c +@@ -37,6 +37,9 @@ + #include "hdf5.h" + #include "H5private.h" + #include "testphdf5.h" ++#define H5S_PACKAGE ++#define H5S_TESTING ++#include "H5Spkg.h" + + + static void coll_write_test(int chunk_factor); diff --git a/sci-libs/hdf5/files/hdf5-1.8.9-mpicxx.patch b/sci-libs/hdf5/files/hdf5-1.8.9-mpicxx.patch new file mode 100644 index 0000000..28f554c --- /dev/null +++ b/sci-libs/hdf5/files/hdf5-1.8.9-mpicxx.patch @@ -0,0 +1,16 @@ +Prevent accidental inclusion of mpi c++ headers +when hdf5.h is included third party library + +https://bugs.gentoo.org/show_bug.cgi?id=420777 + +--- a/src/H5public.h ++++ b/src/H5public.h +@@ -58,6 +58,8 @@ + # include + #endif + #ifdef H5_HAVE_PARALLEL ++# define OMPI_SKIP_MPICXX /* Make sure that cxx specific headers are not included */ ++# define MPICH_SKIP_MPICXX + # include + #ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */ + # include diff --git a/sci-libs/hdf5/files/hdf5-1.8.9-static_libgfortran.patch b/sci-libs/hdf5/files/hdf5-1.8.9-static_libgfortran.patch new file mode 100644 index 0000000..f87ccdd --- /dev/null +++ b/sci-libs/hdf5/files/hdf5-1.8.9-static_libgfortran.patch @@ -0,0 +1,15 @@ +Make sure that during runtime we'll use the same libgfortran as during linking + +https://bugs.gentoo.org/show_bug.cgi?id=419991 +https://bugs.gentoo.org/show_bug.cgi?id=419895 + +--- a/fortran/src/Makefile.am ++++ b/fortran/src/Makefile.am +@@ -181,6 +181,7 @@ + else + H5test_kind_SOURCES = $(srcdir)/H5test_kind.f90 + endif ++H5test_kind_LDFLAGS=-static-libgfortran + + # Mark this directory as part of the Fortran API + FORTRAN_API=yes diff --git a/sci-libs/hdf5/hdf5-1.10.5.ebuild b/sci-libs/hdf5/hdf5-1.10.5.ebuild new file mode 100644 index 0000000..6cf18a8 --- /dev/null +++ b/sci-libs/hdf5/hdf5-1.10.5.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +FORTRAN_NEEDED=fortran +AUTOTOOLS_AUTORECONF=1 + +inherit autotools-utils eutils fortran-2 flag-o-matic toolchain-funcs multilib versionator prefix + +MY_P=${PN}-${PV/_p/-patch} +MAJOR_P=${PN}-$(get_version_component_range 1-2 ${PV}) + +DESCRIPTION="General purpose library and file format for storing scientific data" +HOMEPAGE="http://www.hdfgroup.org/HDF5/" +SRC_URI="http://www.hdfgroup.org/ftp/HDF5/releases/${MAJOR_P}/${MY_P}/src/${MY_P}.tar.bz2" + +LICENSE="NCSA-HDF" +SLOT="0/${PV%%_p*}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" +IUSE="cxx debug examples fortran +hl mpi static-libs szip threads zlib" + +REQUIRED_USE=" + cxx? ( !mpi ) mpi? ( !cxx ) + threads? ( !cxx !mpi !fortran !hl )" + +RDEPEND=" + mpi? ( virtual/mpi[romio] ) + szip? ( virtual/szip ) + zlib? ( sys-libs/zlib:0= )" + +DEPEND="${RDEPEND} + sys-devel/libtool:2 + >=sys-devel/autoconf-2.69" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.8.9-static_libgfortran.patch + "${FILESDIR}"/${PN}-1.8.9-mpicxx.patch + "${FILESDIR}"/${PN}-1.8.13-no-messing-ldpath.patch +) + +pkg_setup() { + tc-export CXX CC AR # workaround for bug 285148 + 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() { + # 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 + sed -e '/^install:/ s/install-examples//' \ + -i Makefile.am || die #409091 + fi + # enable shared libs by default for h5cc config utility + sed -i -e "s/SHLIB:-no/SHLIB:-yes/g" tools/src/misc/h5cc.in || die + hprefixify m4/libtool.m4 + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + --docdir="${EPREFIX}"/usr/share/doc/${PF} + --enable-deprecated-symbols + $(use debug && echo --enable-build-mode=debug || echo --enable-build-mode=production) + $(use_enable debug codestack) + $(use_enable cxx) + $(use_enable fortran) + $(use_enable hl) + $(use_enable mpi parallel) + $(use_enable threads threadsafe) + $(use_with szip szlib) + $(use_with threads pthread) + $(use_with zlib) + ) + autotools-utils_src_configure +} diff --git a/sci-libs/hdf5/metadata.xml b/sci-libs/hdf5/metadata.xml new file mode 100644 index 0000000..9c9d507 --- /dev/null +++ b/sci-libs/hdf5/metadata.xml @@ -0,0 +1,20 @@ + + + + + sci@gentoo.org + Gentoo Science Project + + + HDF5 is a file format and library for storing scientific data. HDF5 + was designed and implemented to address the deficiencies of HDF4.x. It + has a more powerful and flexible data model, supports files larger + than 2 GB, and supports parallel I/O. + + + Enable new features that require Fortran 2003 + (http://www.hdfgroup.org/HDF5/doc/fortran/NewFeatures_F2003.pdf) + Enable high level API + (https://support.hdfgroup.org/HDF5/doc/HL/index.html) + +