summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-03 03:27:07 +0100
committerSam James <sam@gentoo.org>2022-05-03 03:27:28 +0100
commit9acdbbd4c8debd771ac4a6e39c1073551f7ce43f (patch)
tree6783bdba78645f9dd76314937d911568350a4d15 /sci-libs
parentsci-libs/hdf5: Stabilize 1.10.5-r1 sparc, #733578 (diff)
downloadgentoo-9acdbbd4c8debd771ac4a6e39c1073551f7ce43f.tar.gz
gentoo-9acdbbd4c8debd771ac4a6e39c1073551f7ce43f.tar.bz2
gentoo-9acdbbd4c8debd771ac4a6e39c1073551f7ce43f.zip
sci-libs/hdf5: add 1.12.2
Lots of correctness and sanitizer fixes in .2 so possibly helps with the sparc bug (although we've applied a workaround now anyway). Bug: https://bugs.gentoo.org/686620 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/hdf5/Manifest1
-rw-r--r--sci-libs/hdf5/files/hdf5-1.12.2-cmake_installdirs.patch163
-rw-r--r--sci-libs/hdf5/hdf5-1.12.2.ebuild119
3 files changed, 283 insertions, 0 deletions
diff --git a/sci-libs/hdf5/Manifest b/sci-libs/hdf5/Manifest
index bd0243d24944..54270f9e0c89 100644
--- a/sci-libs/hdf5/Manifest
+++ b/sci-libs/hdf5/Manifest
@@ -1,2 +1,3 @@
DIST hdf5-1.10.5.tar.bz2 8706317 BLAKE2B ac326be8fe4ccc4b0153f15bc7d65aa8f1adc2ae279d3980f57ed46722b754d3f36ecf1d6273c75e80ed1afd4bbf10c6b1c5d9408e1f83a4b2e397e7902a7d3c SHA512 769e43b8672e26fe24ed68da0228c010d3d9bc950ca09f0bc60707911a2f26f2f8415c8abc8ec06e07667148d8cdb3b0c7b3e7860d9b19739629c5dfd5ce73d4
DIST hdf5-1.12.1.tar.bz2 9724309 BLAKE2B cc75ba497188b33972218d02a7601acad1a0443bdb934ecd1641ef5996076fe120e3b72dba3a99d99f919fb4e478d1e531414448de9a7b97a0afde58a4c7c23f SHA512 158a067ee284ccb9e2c4db12e9d37cf187d90d9ef1bed7a6303e2c3a2fd216d7b13a46c5f46018b097511281c4246156b6f917633ca88872f10f0ad04be285fd
+DIST hdf5-1.12.2.tar.bz2 10494264 BLAKE2B 99ca5b57f6f54fa044c909f0773de62b218c1f0ec3c011f88f3c227536dd719e77ddbe42d562b1214e8843e41d8fc56db499d7f122876fdd36ef31b235229cb7 SHA512 cbb4663570de76b11adb6bf62cfdb754371d31eeab04691479a5764a45207a9c1309665ab80f51c63a4b9b87354f9cbe6835cef506a9fd554d142c6d2bec21e5
diff --git a/sci-libs/hdf5/files/hdf5-1.12.2-cmake_installdirs.patch b/sci-libs/hdf5/files/hdf5-1.12.2-cmake_installdirs.patch
new file mode 100644
index 000000000000..8218f31aea66
--- /dev/null
+++ b/sci-libs/hdf5/files/hdf5-1.12.2-cmake_installdirs.patch
@@ -0,0 +1,163 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,6 +46,13 @@ if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ endif()
+ endif ()
+
++include (GNUInstallDirs)
++set (HDF5_INSTALL_BIN_DIR "${CMAKE_INSTALL_FULL_BINDIR}")
++set (HDF5_INSTALL_DATA_DIR "${CMAKE_INSTALL_FULL_DATADIR}")
++set (HDF5_INSTALL_DOC_DIR "${CMAKE_INSTALL_FULL_DOCDIR}")
++set (HDF5_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
++set (HDF5_INSTALL_LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
++
+ #-----------------------------------------------------------------------------
+ # Instructions for use : Sub-Project Build
+ #
+--- a/c++/src/CMakeLists.txt
++++ b/c++/src/CMakeLists.txt
+@@ -173,8 +173,8 @@ endif ()
+ #-----------------------------------------------------------------------------
+ set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+ set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+-set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+-set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
++set (_PKG_CONFIG_LIBDIR \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
++set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
+ set (_PKG_CONFIG_LIBNAME "${HDF5_CPP_LIB_CORENAME}")
+ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+--- a/doxygen/CMakeLists.txt
++++ b/doxygen/CMakeLists.txt
+@@ -36,7 +36,7 @@ if (DOXYGEN_FOUND)
+
+ install (
+ DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs/html
+- DESTINATION ${HDF5_INSTALL_DATA_DIR}
++ DESTINATION ${HDF5_INSTALL_DOC_DIR}
+ COMPONENT Documents
+ )
+
+--- a/fortran/src/CMakeLists.txt
++++ b/fortran/src/CMakeLists.txt
+@@ -537,8 +537,8 @@ endif ()
+ #-----------------------------------------------------------------------------
+ set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+ set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+-set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+-set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
++set (_PKG_CONFIG_LIBDIR \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
++set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
+ set (_PKG_CONFIG_LIBNAME "${HDF5_F90_LIB_CORENAME}")
+ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+--- a/hl/c++/src/CMakeLists.txt
++++ b/hl/c++/src/CMakeLists.txt
+@@ -91,8 +91,8 @@ endif ()
+ #-----------------------------------------------------------------------------
+ set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+ set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+-set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+-set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
++set (_PKG_CONFIG_LIBDIR \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
++set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
+ set (_PKG_CONFIG_LIBNAME "${HDF5_HL_CPP_LIB_CORENAME}")
+ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+--- a/hl/fortran/src/CMakeLists.txt
++++ b/hl/fortran/src/CMakeLists.txt
+@@ -324,8 +324,8 @@ endif ()
+ #-----------------------------------------------------------------------------
+ set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+ set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+-set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+-set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
++set (_PKG_CONFIG_LIBDIR \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
++set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
+ set (_PKG_CONFIG_LIBNAME "${HDF5_HL_F90_LIB_CORENAME}")
+ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+--- a/hl/src/CMakeLists.txt
++++ b/hl/src/CMakeLists.txt
+@@ -123,8 +123,8 @@ endif ()
+ #-----------------------------------------------------------------------------
+ set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+ set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+-set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+-set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
++set (_PKG_CONFIG_LIBDIR \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
++set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
+ set (_PKG_CONFIG_LIBNAME "${HDF5_HL_LIB_CORENAME}")
+ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1288,8 +1288,8 @@ endif ()
+ #-----------------------------------------------------------------------------
+ set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+ set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+-set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+-set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
++set (_PKG_CONFIG_LIBDIR \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
++set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
+ set (_PKG_CONFIG_LIBNAME "${HDF5_LIB_CORENAME}")
+ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+--- a/CMakeInstallation.cmake
++++ b/CMakeInstallation.cmake
+@@ -31,7 +31,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ if (HDF5_EXPORTED_TARGETS)
+ install (
+ EXPORT ${HDF5_EXPORTED_TARGETS}
+- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
++ DESTINATION ${HDF5_INSTALL_LIB_DIR}/cmake
+ FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${HDF_PACKAGE_NAMESPACE}
+ COMPONENT configinstall
+@@ -67,12 +67,12 @@ set (HDF5_VERSION_MINOR ${HDF5_PACKAGE_VERSION_MINOR})
+ # Configure the hdf5-config.cmake file for the build directory
+ #-----------------------------------------------------------------------------
+ set (INCLUDE_INSTALL_DIR ${HDF5_INSTALL_INCLUDE_DIR})
+-set (SHARE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_INSTALL_CMAKE_DIR}" )
++set (SHARE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_INSTALL_LIB_DIR}/cmake" )
+ set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
+ configure_package_config_file (
+ ${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
+ "${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
+- INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
++ INSTALL_DESTINATION "${HDF5_INSTALL_LIB_DIR}/cmake"
+ PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
+ INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
+ )
+@@ -81,19 +81,19 @@ configure_package_config_file (
+ # Configure the hdf5-config.cmake file for the install directory
+ #-----------------------------------------------------------------------------
+ set (INCLUDE_INSTALL_DIR ${HDF5_INSTALL_INCLUDE_DIR})
+-set (SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${HDF5_INSTALL_CMAKE_DIR}" )
++set (SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${HDF5_INSTALL_LIB_DIR}/cmake" )
+ set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" )
+ configure_package_config_file (
+ ${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
+ "${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
+- INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
++ INSTALL_DESTINATION "${HDF5_INSTALL_LIB_DIR}/cmake"
+ PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
+ )
+
+ if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ install (
+ FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
+- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
++ DESTINATION ${HDF5_INSTALL_LIB_DIR}/cmake
+ COMPONENT configinstall
+ )
+ endif ()
+@@ -109,7 +109,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
+- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
++ DESTINATION ${HDF5_INSTALL_LIB_DIR}/cmake
+ COMPONENT configinstall
+ )
+ endif ()
diff --git a/sci-libs/hdf5/hdf5-1.12.2.ebuild b/sci-libs/hdf5/hdf5-1.12.2.ebuild
new file mode 100644
index 000000000000..76d54a46d435
--- /dev/null
+++ b/sci-libs/hdf5/hdf5-1.12.2.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+FORTRAN_NEEDED="fortran"
+
+inherit cmake flag-o-matic fortran-2 toolchain-funcs
+
+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"
+
+LICENSE="NCSA-HDF"
+SLOT="0/${PV%%_p*}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="cxx debug doc examples fortran +hl mpi szip test threads unsupported zlib"
+
+REQUIRED_USE="
+ !unsupported? (
+ mpi? ( !cxx !threads )
+ threads? ( !cxx !fortran !hl )
+ )"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ mpi? ( virtual/mpi[romio] )
+ szip? ( virtual/szip )
+ zlib? ( sys-libs/zlib:0= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? (
+ app-doc/doxygen
+ virtual/latex-base
+)"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.12.2-cmake_installdirs.patch
+)
+
+S="${WORKDIR}/${MY_P}"
+
+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"
+ append-libs -lmpi
+ 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() {
+ use sparc && tc-is-gcc && append-flags -fno-tree-ccp # bug 686620
+ local mycmakeargs=(
+ -DBUILD_STATIC_LIBS=OFF
+ -DFETCHCONTENT_FULLY_DISCONNECTED=ON
+ -DHDF5_BUILD_EXAMPLES=OFF
+ -DALLOW_UNSUPPORTED=$(usex unsupported)
+ -DBUILD_TESTING=$(usex test)
+ -DHDF5_BUILD_CPP_LIB=$(usex cxx)
+ -DHDF5_BUILD_DOC=$(usex doc)
+ -DHDF5_BUILD_FORTRAN=$(usex fortran)
+ -DHDF5_BUILD_HL_LIB=$(usex hl)
+ -DHDF5_ENABLE_CODESTACK=$(usex debug)
+ -DHDF5_ENABLE_PARALLEL=$(usex mpi)
+ -DHDF5_ENABLE_SZIP_ENCODING=$(usex szip)
+ -DHDF5_ENABLE_SZIP_SUPPORT=$(usex szip)
+ -DHDF5_ENABLE_THREADSAFE=$(usex threads)
+ -DHDF5_ENABLE_Z_LIB_SUPPORT=$(usex zlib)
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ # TODO: generate functioning example runners from their respective
+ # .in files - as of version 1.12.1 upstream only has it implemented
+ # for autoconf.
+ if use examples; then
+ # These are all useless outside the source tree
+ rm -f {examples,c++/examples,fortran/examples}/{Makefile*,CMake*}
+ rm -f hl/{examples,c++/examples,fortran/examples}/{Makefile*,CMake*}
+
+ dodoc -r examples
+ if use cxx; then
+ docinto c++
+ dodoc -r c++/examples
+ fi
+ if use fortran; then
+ docinto fortran
+ dodoc -r fortran/examples
+ fi
+ if use hl; then
+ docinto hl
+ dodoc -r hl/examples
+ if use cxx; then
+ docinto hl/c++
+ dodoc -r hl/c++/examples
+ fi
+ if use fortran; then
+ docinto hl/fortran
+ dodoc -r hl/fortran/examples
+ fi
+ fi
+ fi
+}