[hdf5] Update HDF5 to 1.12 (#11747)

* [hdf5] Update HDF5 to 1.12 and use github live-clones instead of binary download

* [hdf5] bump control

* [hdf5] fix szip and typo about linkage

* [hdf5] add missing package namespace.... they somehow missed to set it?

* [hdf5] retry without "

* [field3d] fix regression and update. Remove windows as unsupported since the cmakelists tries to support windows

* fix typo

* remove ws

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* linebreak first patch

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* ws change

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* [field3d] update copying installation

* [hdf5] use official github repo

* clean baseline

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
Alexander Neumann 2020-06-23 21:58:50 +02:00 committed by GitHub
parent 6f33316686
commit 23eadeaedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 85 additions and 1856 deletions

View File

@ -1,6 +1,6 @@
Source: field3d
Version: 1.7.2
Version: 1.7.3
Homepage: https://github.com/imageworks/Field3D
Description: An open source library for storing voxel data. It provides C++ classes that handle in-memory storage and a file format based on HDF5 that allows the C++ objects to be written to and read from disk.
Build-Depends: hdf5, boost-regex, boost-thread, boost-program-options, boost-system, openexr, boost-foreach, boost-test, boost-timer, boost-format
Build-Depends: hdf5[core], boost-regex, boost-thread, boost-program-options, boost-system, openexr, boost-foreach, boost-test, boost-timer, boost-format
Supports: !(windows|arm|uwp)

View File

@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e608b3ec..5ff2c3c31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,8 @@
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
PROJECT ( field3d )
-
+add_definitions(-UH5_USE_112_API_DEFAULT)
+add_definitions(-DH5_USE_110_API_DEFAULT)
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake )
FIND_PACKAGE (Doxygen)

View File

@ -1,8 +1,5 @@
include(vcpkg_common_functions)
if (VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "Windows is currently not supported.")
elseif (TRIPLET_SYSTEM_ARCH MATCHES "arm")
if (TRIPLET_SYSTEM_ARCH MATCHES "arm")
message(FATAL_ERROR "ARM is currently not supported.")
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
@ -11,16 +8,19 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO imageworks/Field3D
REF v1.7.2
SHA512 e4ea51310105980f759dce48830db8ae3592ce32a02b246214d8aed9df7a7f5c500314f2daf92196b7a76d648f2909b18112df4c5c3c8949c0676d710dfbf1f2
REF v1.7.3
SHA512 de3f10ff120420925de67064b2169f2a30c9180e308acc9090d70567b45be5423f4b1f7eb32bb376c887cea1364803cf7b2db66c2bc49f8a39a1037bbf0e5f39
HEAD_REF master
PATCHES
fix-build_error.patch
hdf5.api.patch # Switches the HDF5 default API for this port to 1.10
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
"-DINSTALL_DOCS:BOOL=OFF"
)
vcpkg_install_cmake()
@ -31,5 +31,5 @@ endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/field3d)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/field3d/COPYING ${CURRENT_PACKAGES_DIR}/share/field3d/copyright)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${SOURCE_PATH}/README" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

View File

@ -1,5 +1,5 @@
Source: hdf5
Version: 1.10.5-12
Version: 1.12.0
Homepage: https://www.hdfgroup.org/downloads/hdf5/
Description: HDF5 is a data model, library, and file format for storing and managing data
Default-Features: szip, zlib

View File

@ -1,15 +0,0 @@
diff --git a/hdf5-1.10.5/hl/src/H5LDprivate.h b/hdf5-1.10.5/hl/src/H5LDprivate.h
index b52928b53..5f02ea781 100644
--- a/hdf5-1.10.5/hl/src/H5LDprivate.h
+++ b/hdf5-1.10.5/hl/src/H5LDprivate.h
@@ -40,8 +40,8 @@ typedef struct H5LD_memb_t {
* #2: these two routines are too specific to be made as public routines
* Decide to do #3 at this point of time after some discussion.
*/
-void H5LD_clean_vector(H5LD_memb_t *listv[]);
-int H5LD_construct_vector(char *fields, H5LD_memb_t *listv[], hid_t par_tid);
+H5_HLDLL void H5LD_clean_vector(H5LD_memb_t *listv[]);
+H5_HLDLL int H5LD_construct_vector(char *fields, H5LD_memb_t *listv[], hid_t par_tid);
#endif /* end _H5LDprivate_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,31 @@
diff --git a/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in b/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in
index 3bd9e1d..7f6699c 100644
--- a/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in
+++ b/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in
@@ -108,11 +108,15 @@ set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index b5a12a650..a8cbacb1c 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -54,7 +54,10 @@ set (${HDF5_PACKAGE_NAME}_PARALLEL_FILTERED_WRITES "@PARALLEL_FILTERED_WRITES@")
#-----------------------------------------------------------------------------
# Dependencies
#-----------------------------------------------------------------------------
+include(CMakeFindDependencyMacro)
+
if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL)
+ find_dependency(MPI)
set (${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_DIRS@")
set (${HDF5_PACKAGE_NAME}_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN)
@@ -110,11 +113,11 @@ set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@)
# project which has already built hdf5 as a subproject
#-----------------------------------------------------------------------------
if (NOT TARGET "@HDF5_PACKAGE@")
- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
- include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND NOT TARGET ZLIB::ZLIB)
+ find_package(ZLIB REQUIRED)
+ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT)
+ find_dependency(ZLIB)
endif ()
- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
- include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND NOT TARGET "szip")
+ if(${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
+ include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ else()
+ find_package(@SZIP_PACKAGE_NAME@ REQUIRED)
+ endif()
+ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT)
+ find_dependency(szip)
endif ()
include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
endif ()

View File

@ -1,20 +1,14 @@
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_download_distfile(ARCHIVE
URLS "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/CMake-hdf5-1.10.5.tar.gz"
FILENAME "CMake-hdf5-1.10.5.tar.gz"
SHA512 a25ea28d7a511f9184d97b5b8cd4c6d52dcdcad2bffd670e24a1c9a6f98b03108014a853553fa2b00d4be7523128b5fd6a4454545e3b17ff8c66fea16a09e962
)
vcpkg_extract_source_archive_ex(
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF hdf5
REPO HDFGroup/hdf5
REF hdf5-1_12_0
SHA512 d84df1ea72dc6fa038440a370e1b1ff523364474e7f214b967edc26d3191b2ef4fe1d9273c4a086a5945f1ad1ab6aa8dbcda495898e7967b2b73fd93dd5071e0
HEAD_REF develop
PATCHES
hdf5_config.patch
fix-generate.patch # removes the build of static targets in shared builds
static-targets.patch # maps the internal static tagets to the shared targets if building as a dynamic library
export-private.patch # exports two additional functions in shared builds to make hl/tools/h5watch build in shared builds.
hdf5_config.patch
szip.patch
)
if ("parallel" IN_LIST FEATURES AND "cpp" IN_LIST FEATURES)
@ -42,11 +36,17 @@ if(FEATURES MATCHES "tools" AND VCPKG_CRT_LINKAGE STREQUAL "static")
list(APPEND FEATURE_OPTIONS -DBUILD_STATIC_EXECS=ON)
endif()
if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static")
list(APPEND FEATURE_OPTIONS
-DBUILD_STATIC_LIBS=OFF
-DONLY_SHARED_LIBS=ON)
endif()
find_library(SZIP_RELEASE NAMES libsz libszip szip sz PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(SZIP_DEBUG NAMES libsz libszip szip sz libsz_D libszip_D szip_D sz_D szip_debug PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/hdf5-1.10.5
SOURCE_PATH ${SOURCE_PATH}
DISABLE_PARALLEL_CONFIGURE
PREFER_NINJA
OPTIONS
@ -55,8 +55,7 @@ vcpkg_configure_cmake(
-DHDF5_BUILD_EXAMPLES=OFF
-DHDF5_INSTALL_DATA_DIR=share/hdf5/data
-DHDF5_INSTALL_CMAKE_DIR=share
"-DSZIP_LIBRARY_DEBUG:PATH=${SZIP_DEBUG}"
"-DSZIP_LIBRARY_RELEASE:PATH=${SZIP_RELEASE}"
-DHDF_PACKAGE_NAMESPACE:STRING=hdf5::
)
vcpkg_install_cmake()

View File

@ -1,37 +0,0 @@
diff --git a/hdf5-1.10.5/CMakeLists.txt b/hdf5-1.10.5/CMakeLists.txt
index 6ca2f5c54..f7a4db9e5 100644
--- a/hdf5-1.10.5/CMakeLists.txt
+++ b/hdf5-1.10.5/CMakeLists.txt
@@ -150,6 +150,7 @@ set (HDF5_JAVA_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_TEST_LIB
#-----------------------------------------------------------------------------
# Set the target names of all the libraries
#-----------------------------------------------------------------------------
+if(NOT BUILD_SHARED_LIBS)
set (HDF5_LIB_TARGET "${HDF5_LIB_CORENAME}-static")
set (HDF5_TEST_LIB_TARGET "${HDF5_TEST_LIB_CORENAME}-static")
set (HDF5_CPP_LIB_TARGET "${HDF5_CPP_LIB_CORENAME}-static")
@@ -162,9 +163,24 @@ set (HDF5_F90_TEST_LIB_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-static")
set (HDF5_F90_C_TEST_LIB_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-static")
set (HDF5_HL_F90_LIB_TARGET "${HDF5_HL_F90_LIB_CORENAME}-static")
set (HDF5_HL_F90_C_LIB_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-static")
+else()
+set (HDF5_LIB_TARGET "${HDF5_LIB_CORENAME}-shared")
+set (HDF5_TEST_LIB_TARGET "${HDF5_TEST_LIB_CORENAME}-shared")
+set (HDF5_CPP_LIB_TARGET "${HDF5_CPP_LIB_CORENAME}-shared")
+set (HDF5_HL_LIB_TARGET "${HDF5_HL_LIB_CORENAME}-shared")
+set (HDF5_HL_CPP_LIB_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-shared")
+set (HDF5_TOOLS_LIB_TARGET "${HDF5_TOOLS_LIB_CORENAME}-shared")
+set (HDF5_F90_LIB_TARGET "${HDF5_F90_LIB_CORENAME}-shared")
+set (HDF5_F90_C_LIB_TARGET "${HDF5_F90_C_LIB_CORENAME}-shared")
+set (HDF5_F90_TEST_LIB_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-shared")
+set (HDF5_F90_C_TEST_LIB_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-shared")
+set (HDF5_HL_F90_LIB_TARGET "${HDF5_HL_F90_LIB_CORENAME}-shared")
+set (HDF5_HL_F90_C_LIB_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared")
+endif()
set (HDF5_JAVA_JNI_LIB_TARGET "${HDF5_JAVA_JNI_LIB_CORENAME}")
set (HDF5_JAVA_HDF5_LIB_TARGET "${HDF5_JAVA_HDF5_LIB_CORENAME}")
set (HDF5_JAVA_TEST_LIB_TARGET "${HDF5_JAVA_TEST_LIB_CORENAME}")
+
set (HDF5_LIBSH_TARGET "${HDF5_LIB_CORENAME}-shared")
set (HDF5_TEST_LIBSH_TARGET "${HDF5_TEST_LIB_CORENAME}-shared")
set (HDF5_CPP_LIBSH_TARGET "${HDF5_CPP_LIB_CORENAME}-shared")

13
ports/hdf5/szip.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index 5a8956456..997bb8e81 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -100,7 +100,7 @@ option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
if (NOT SZIP_USE_EXTERNAL)
- find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
+ find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
if (SZIP_FOUND)

View File

@ -445,9 +445,6 @@ fdlibm:arm-uwp=fail
fdlibm:x64-uwp=fail
fftw3:arm-uwp=fail
fftw3:x64-uwp=fail
field3d:x64-windows=fail
field3d:x64-windows-static=fail
field3d:x86-windows=fail
flint:x64-linux=fail
flint:x64-osx=fail
fltk:arm-uwp=fail