hdf5: update to 1.14.5

This commit is contained in:
Markus Mützel 2024-10-29 17:19:45 +01:00
parent 584ad20c93
commit 76862ed1df
3 changed files with 52 additions and 32 deletions

View File

@ -1,26 +1,14 @@
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1344,17 +1345,19 @@
set (PKGCONFIG_LIBNAME "${PKGCONFIG_LIBNAME}${CMAKE_DEBUG_POSTFIX}")
endif ()
-foreach (libs ${LINK_LIBS})
- set (_PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE} -l${libs}")
-endforeach ()
-
# The settings for the compression libs depends on if they have pkconfig support
# Assuming they don't
foreach (libs ${LINK_COMP_LIBS})
# set (_PKG_CONFIG_REQUIRES_PRIVATE "${_PKG_CONFIG_REQUIRES_PRIVATE} -l${libs}")
+ get_filename_component(libs ${libs} NAME_WE)
+ string(REPLACE "lib" "" libs ${libs})
set (_PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE} -l${libs}")
diff -urN hdf5-1.14.5/src/CMakeLists.txt.orig hdf5-1.14.5/src/CMakeLists.txt
--- hdf5-1.14.5/src/CMakeLists.txt.orig 2024-10-29 16:41:23.892667200 +0100
+++ hdf5-1.14.5/src/CMakeLists.txt 2024-10-29 16:44:35.705941000 +0100
@@ -1206,6 +1206,10 @@
set (_PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE} -l${libname}")
endforeach ()
+if (${CURL_FOUND} AND ${OPENSSL_FOUND})
+ set (_PKG_CONFIG_REQUIRES_PRIVATE "${_PKG_CONFIG_REQUIRES_PRIVATE} libcrypto libssl libcurl")
+endif()
+
if (BUILD_STATIC_LIBS)
set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${PKGCONFIG_LIBNAME}")
endif ()
#if (BUILD_STATIC_LIBS)
# set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${PKGCONFIG_LIBNAME}")
#endif ()

View File

@ -0,0 +1,17 @@
To enable Dynamic Allocation Functions, features from ISO/IEC TR 24731-2:2010,
the macro __STDC_WANT_LIB_EXT2__ hs to be defined to 1 before to the stdio.h
header is included.
diff -urN hdf5-1.14.5/src/H5private.h.orig hdf5-1.14.5/src/H5private.h
--- hdf5-1.14.5/src/H5private.h.orig 2024-09-30 18:07:53.000000000 +0200
+++ hdf5-1.14.5/src/H5private.h 2024-10-29 17:09:55.936592100 +0100
@@ -20,6 +20,9 @@
#ifndef H5private_H
#define H5private_H
+#define __STDC_WANT_LIB_EXT2__ 1 // define for TR 24731-2:2010 extensions (e.g., vasprintf)
+#define _GNU_SOURCE
+
#include "H5public.h" /* Include Public Definitions */
#include <assert.h>

View File

@ -4,14 +4,15 @@
_realname=hdf5
pkgbase="mingw-w64-${_realname}"
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
_ver=1.14.3
patch=
pkgver=${_ver}${patch//-/.}
pkgrel=2
_ver=1.14.5
__patch=
pkgver=${_ver}${_patch//-/.}
pkgrel=1
pkgdesc="General purpose library and file format for storing scientific data (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64' 'mingw32')
url="https://www.hdfgroup.org/HDF5/"
license=('spdx:BSD-3-Clause')
msys2_repository_url="https://github.com/HDFGroup/hdf5"
msys2_references=(
"cpe: cpe:/a:hdfgroup:hdf5"
@ -28,16 +29,19 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-fc"
)
source=("https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${_ver%.*}/hdf5-${_ver}/src/hdf5-${_ver}${patch}.tar.bz2"
_filever=${_ver//./_}
source=("https://support.hdfgroup.org/releases/hdf5/v${_filever%_*}/v${_filever}/downloads/hdf5-${_ver}${__patch}.tar.gz"
"hdf5-proper-library-names-mingw.patch"
"hdf5-fix-static-lib.patch"
"hdf5-fix-fortran-module-directory-leak.patch"
"0001-hdf5-pkgconfig-use-requires-private.patch")
sha256sums=('9425f224ed75d1280bb46d6f26923dd938f9040e7eaebf57e66ec7357c08f917'
"0001-hdf5-pkgconfig-use-requires-private.patch"
"0002-dynamic-allocation-functions.patch")
sha256sums=('ec2e13c52e60f9a01491bb3158cb3778c985697131fc6a342262d32a26e58e44'
'e236f5805152b25065c206922d7ec1bab05b233adac51bbd0fb1e546326162f6'
'9d172a7f6b8f54fdbf840e032708acade4ab88c81262b45bfa85d203810962a9'
'02b5d7335a9db628ed03b29c62d8f0e5f5618fa39de8e453aa02b530d28317a8'
'49ad101c839055cab22d3a557a12163b750b5fc9edcef4e84b957c3c5adef19f')
'101b6b41bd2e3fad9be2b3a72d5a9235fa90d4a900879b687e26521ee1a2fd8c'
'4119aebc5d8afab3594c58821a104f252fb8c1bcc5bc12292deb53ac48778577')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
@ -49,14 +53,15 @@ apply_patch_with_msg() {
}
prepare() {
cd "${srcdir}/${_realname}-${_ver}${patch}"
cd "${srcdir}/${_realname}-${_ver}${__patch}"
# 0001: curl and openssl in Requires.private, zlib, libaec in Libs.private
apply_patch_with_msg \
hdf5-proper-library-names-mingw.patch \
hdf5-fix-static-lib.patch \
hdf5-fix-fortran-module-directory-leak.patch \
0001-hdf5-pkgconfig-use-requires-private.patch
0001-hdf5-pkgconfig-use-requires-private.patch \
0002-dynamic-allocation-functions.patch
}
build() {
@ -69,6 +74,16 @@ build() {
_extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
# It might be possible to build the Fortran interface with Flang once it is
# updated to version 19. See:
# https://github.com/HDFGroup/hdf5/issues/4419
# https://github.com/llvm/llvm-project/pull/95388
if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then
_extra_config+=("-DHDF5_BUILD_FORTRAN=OFF")
else
_extra_config+=("-DHDF5_BUILD_FORTRAN=ON")
fi
CFLAGS+=" -Wno-implicit-function-declaration" \
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
@ -76,12 +91,12 @@ build() {
-GNinja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_DLL_NAME_WITH_SOVERSION=ON \
-DCMAKE_C_FLAGS="-Wno-error=incompatible-pointer-types" \
-DBUILD_TESTING=OFF \
"${_extra_config[@]}" \
-DCMAKE_SKIP_RPATH=ON \
-DHDF5_BUILD_HL_LIB=ON \
-DHDF5_BUILD_CPP_LIB=ON \
-DHDF5_BUILD_FORTRAN=ON \
-DHDF5_BUILD_TOOLS=ON \
-DHDF5_ENABLE_DEPRECATED_SYMBOLS=ON \
-DHDF5_ENABLE_SZIP_SUPPORT=ON \
@ -93,7 +108,7 @@ build() {
-DHDF5_INSTALL_DATA_DIR="share/doc/hdf5" \
-DHDF5_INSTALL_MODULE_DIR="include" \
-DHDF5_MSVC_NAMING_CONVENTION=OFF \
../${_realname}-${_ver}${patch}
../${_realname}-${_ver}${__patch}
${MINGW_PREFIX}/bin/cmake --build .
}