Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build HDF5 1.14.0 for mingw-w64 #15033

Merged
merged 3 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mingw-w64-adios2/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=ADIOS2
pkgbase=mingw-w64-${_realname,,}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname,,}")
pkgver=2.8.3
pkgrel=4
pkgrel=5
pkgdesc="The Adaptable Input/Output System version 2 (mingw-w64)"
arch=(any)
mingw_arch=('mingw64' 'mingw32' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-alembic/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=alembic
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.8.4
pkgrel=1
pkgrel=2
pkgdesc="A open framework for storing and sharing scene data (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-armadillo/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=armadillo
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=11.4.3
pkgrel=1
pkgrel=2
pkgdesc="C++ linear algebra library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-blender/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ _realname=blender
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.93.14
pkgrel=1
pkgrel=2
pkgdesc="A fully integrated 3D graphics creation suite (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-cgns/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=cgns
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=4.3.0
pkgrel=1
pkgrel=2
pkgdesc="CFD General Notation System library and tools (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-gdal/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _realname=gdal
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.6.2
pkgrel=2
pkgrel=3
pkgdesc="A translator library for raster geospatial data formats (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down
37 changes: 17 additions & 20 deletions mingw-w64-hdf5/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
_realname=hdf5
pkgbase="mingw-w64-${_realname}"
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
_ver=1.12.2
_ver=1.14.0
patch=
pkgver=${_ver}${patch//-/.}
pkgrel=2
pkgrel=1
pkgdesc="General purpose library and file format for storing scientific data (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand All @@ -16,6 +16,8 @@ url="https://www.hdfgroup.org/HDF5/"
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-libaec"
"${MINGW_PACKAGE_PREFIX}-zlib"
"${MINGW_PACKAGE_PREFIX}-openssl"
"${MINGW_PACKAGE_PREFIX}-curl"
$([[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || echo "${MINGW_PACKAGE_PREFIX}-gcc-libgfortran")
)
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
Expand All @@ -25,13 +27,15 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
)
options=('staticlibs' 'strip')
source=("https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${_ver%.*}/hdf5-${_ver}${patch}/src/hdf5-${_ver}${patch}.tar.bz2"
"hdf5-fix-pkgconfig.patch"
"hdf5-proper-library-names-mingw.patch"
"hdf5-fix-find-szip.patch")
sha256sums=('1a88bbe36213a2cea0c8397201a459643e7155c9dc91e062675b3fb07ee38afe'
'f2047b06abba6ec5568878a75c45c7c85cf08ec8e8437439bd23902c1e665bec'
'7b5595ee9903e14f147f7b4615648cad6a0f5a76f8299461ebe91d739e750476'
'48bdc4ab0d107bdec11aa3d3a2765cd29eaac5e304c3892365ed2ea352731cbe')
"hdf5-fix-find-szip.patch"
"hdf5-fix-strstria-shlwapi.patch::https://github.com/HDFGroup/hdf5/commit/d300febacda44b5f81d7d882c6f45b56c0424c97.patch"
"hdf5-fix-fortran-module-directory-leak.patch")
sha256sums=('e4e79433450edae2865a4c6328188bb45391b29d74f8c538ee699f0b116c2ba0'
'32312f5cdcc192e819d4b5c30fbef8ce97707425f6727b65728d93a33bdbc0f4'
'96175626455a36b970f9f50a06246f7c65a30057d8feed48172b7bd06a8e4bc0'
'3fab248ac5f9c60da09988ba7c6825248f3072c5599cdcc18eb614baebc2c52e'
'02b5d7335a9db628ed03b29c62d8f0e5f5618fa39de8e453aa02b530d28317a8')

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
Expand All @@ -45,13 +49,11 @@ apply_patch_with_msg() {
prepare() {
cd "${srcdir}/${_realname}-${_ver}${patch}"

# https://github.com/HDFGroup/hdf5/commit/dcccc355261e305a1d877a798d7fd46556b3cbce.patch
apply_patch_with_msg \
hdf5-fix-pkgconfig.patch

apply_patch_with_msg \
hdf5-proper-library-names-mingw.patch \
hdf5-fix-find-szip.patch
hdf5-fix-find-szip.patch \
hdf5-fix-strstria-shlwapi.patch \
hdf5-fix-fortran-module-directory-leak.patch
}

build() {
Expand Down Expand Up @@ -85,6 +87,8 @@ build() {
-DHDF5_INSTALL_CMAKE_DIR="lib/cmake" \
-DHDF5_INSTALL_DATA_DIR="share/doc/hdf5" \
-DHDF5_MSVC_NAMING_CONVENTION=OFF \
-DHDF5_INSTALL_MODULE_DIR="include" \
-DHDF5_ENABLE_ROS3_VFD=ON \
../${_realname}-${_ver}${patch}

cmake --build .
Expand All @@ -93,13 +97,6 @@ build() {
package() {
cd "${srcdir}/build-${MSYSTEM}"

if [[ "${MINGW_PACKAGE_PREFIX}" != *-clang-* ]]; then
mkdir -p ${srcdir}/build-${MSYSTEM}/bin/static/Release/
mkdir -p ${srcdir}/build-${MSYSTEM}/bin/shared/Release/
cp ${srcdir}/build-${MSYSTEM}/bin/static/*.mod ${srcdir}/build-${MSYSTEM}/bin/static/Release
cp ${srcdir}/build-${MSYSTEM}/bin/shared/*.mod ${srcdir}/build-${MSYSTEM}/bin/shared/Release
fi

DESTDIR="${pkgdir}" cmake --install .

local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
Expand Down
4 changes: 2 additions & 2 deletions mingw-w64-hdf5/hdf5-fix-find-szip.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -63,9 +63,9 @@
@@ -59,9 +59,9 @@
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT ZLIB_FOUND)
find_package (ZLIB) # Legacy find
Expand All @@ -13,7 +13,7 @@
endif ()
endif ()
if (ZLIB_FOUND)
@@ -124,9 +124,9 @@
@@ -116,9 +116,9 @@
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
Expand Down
10 changes: 10 additions & 0 deletions mingw-w64-hdf5/hdf5-fix-fortran-module-directory-leak.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/CMakeInstallation.cmake 2023-01-20 00:04:12.334144200 -0500
+++ b/CMakeInstallation.cmake 2023-01-20 00:03:49.497097700 -0500
@@ -126,6 +126,7 @@
else ()
set (BYTESEX little-endian)
endif ()
+set (CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${HDF5_INSTALL_MODULE_DIR})
configure_file (
${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
${HDF5_SRC_BINARY_DIR}/libhdf5.settings ESCAPE_QUOTES @ONLY
65 changes: 0 additions & 65 deletions mingw-w64-hdf5/hdf5-fix-pkgconfig.patch

This file was deleted.

12 changes: 4 additions & 8 deletions mingw-w64-hdf5/hdf5-proper-library-names-mingw.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
--- hdf5-1.12.0/config/cmake_ext_mod/HDFMacros.cmake.orig 2020-04-26 10:08:44.715403300 +0300
+++ hdf5-1.12.0/config/cmake_ext_mod/HDFMacros.cmake 2020-04-26 10:34:09.889478600 +0300
@@ -125,6 +130,8 @@
--- a/config/cmake/HDFMacros.cmake 2023-01-13 04:34:01.443034400 -0500
+++ b/config/cmake/HDFMacros.cmake 2023-01-13 04:36:14.419475400 -0500
@@ -126,10 +126,12 @@
OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME}
OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
+ RUNTIME_OUTPUT_NAME ${LIB_RELEASE_NAME}-0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines can probably be removed: RUNTIME_OUTPUT_NAME can be replaced w/ -DCMAKE_SHARED_LIBRARY_NAME_WITH_VERSION=ON in PKGBUILD, and default ARCHIVE_OUTPUT_NAME should be correct already?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so basically remove the patch and just add the option in PKGBUILD?

Copy link
Contributor

@kmilos kmilos Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a bit weird... So either we bite the bullet, use the same SOVERSION as other platforms and rebuild, or leave things as is...

Edit: Perhaps it makes sense to leave as is for now, and actually try to address that unnecessary WIN32/MINGW/CYGWIN complexity/misunderstandings upstream first.

Copy link
Contributor

@kmilos kmilos Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, the SOVERSION did change between 1.12.2 and 1.14.0, so keeping this artificially at -0 makes no sense at all. A rebuild is needed anyway.

https://github.com/HDFGroup/hdf5/blob/3e847e003632bdd5fdc189ccbffe25ad2661e16f/config/lt_vers.am#L19-L21

https://github.com/HDFGroup/hdf5/blob/0553fb7ac7f03a919c91cdbbd5648b8aadbe05af/config/lt_vers.am#L18-L20

Or don't bump to 1.14 now and wait for 1.12.3 instead...

Copy link
Contributor Author

@mkitti mkitti Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we make both 1.14.0 and 1.12.3 available? Are they mutually exclusive?

1.12.3 is the end of the road for 1.12.x by the way, so I think we would want to move to 1.14 immediately.

image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, the SOVERSION did change between 1.12.2 and 1.14.0, so keeping this artificially at -0 makes no sense at all. A rebuild is needed anyway.

The package grokker only pointed out that mingw-w64-python-h5py would need to be rebuilt. (Maybe, that is the only package that uses a function for which the SOVERSION was bumped upstream?)

+ ARCHIVE_OUTPUT_NAME ${LIB_RELEASE_NAME}
)
#get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME)
#get_property (target_name_debug TARGET ${libtarget} PROPERTY OUTPUT_NAME_DEBUG)
@@ -132,7 +139,7 @@
#message (STATUS "${target_name} : ${target_name_debug} : ${target_name_rwdi}")

if (${libtype} MATCHES "STATIC")
- if (WIN32)
+ if (MSVC)
set_target_properties (${libtarget} PROPERTIES
COMPILE_PDB_NAME_DEBUG ${LIB_DEBUG_NAME}
COMPILE_PDB_NAME_RELEASE ${LIB_RELEASE_NAME}
COMPILE_PDB_NAME_DEVELOPER ${LIB_DEBUG_NAME}
2 changes: 1 addition & 1 deletion mingw-w64-highfive/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=highfive
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.6.2
pkgrel=1
pkgrel=2
pkgdesc='Modern header-only C++11 friendly interface for libhdf5 (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-itk/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=itk
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=5.3.0
pkgrel=2
pkgrel=3
pkgdesc='An open-source C++ toolkit for medical image processing (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-mathgl/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=mathgl
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=8.0.1
pkgrel=1
pkgrel=2
pkgdesc="Library for high-quality scientific graphics (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-matio/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=matio
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.5.23
pkgrel=1
pkgrel=2
pkgdesc="matio is a C library for reading and writing MATLAB MAT files (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-med/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _realname=med
pkgbase=mingw-w64-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
pkgver=4.1.1
pkgrel=4
pkgrel=5
pkgdesc="Generic pre- and post-processing platform for numerical simulation (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-netcdf/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=netcdf
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=4.9.0
pkgrel=4
pkgrel=5
pkgdesc="Interface for scientific data access to large binary data (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-octave/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ _realname=octave
pkgbase=mingw-w64-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
pkgver=7.3.0
pkgrel=7
pkgrel=8
pkgdesc="GNU Octave: Interactive programming environment for numerical computations (mingw-w64)"
url="https://www.octave.org"
license=('spdx:GPL-3.0-or-later')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-opencv/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=4.7.0
pkgrel=2
pkgrel=3
pkgdesc="Open Source Computer Vision Library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-openturns/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=openturns
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.20
pkgrel=2
pkgrel=3
pkgdesc="Uncertainty treatment library (mingw-w64)"
license=('LGPL')
arch=(any)
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-pdal/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=pdal
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.4.3
pkgrel=4
pkgrel=5
pkgdesc="A C++ library for translating and manipulating point cloud data (mingw-w64)"
arch=(any)
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down
17 changes: 0 additions & 17 deletions mingw-w64-python-h5py/001-mingw-python.patch

This file was deleted.

Loading