Skip to content

Commit

Permalink
[hdf5] Fix single config builds. (#27355)
Browse files Browse the repository at this point in the history
* [hdf5] fix tools getting deleted somehow

* v db

* fix tools on windows

* v db
  • Loading branch information
Neumann-A authored Oct 21, 2022
1 parent eb873d2 commit 580e378
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
35 changes: 19 additions & 16 deletions ports/hdf5/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,37 +102,40 @@ string(REPLACE [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/bin"]]
)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" ${contents})

set(HDF5_TOOLS "")
if("tools" IN_LIST FEATURES)
set(HDF5_TOOLS h5cc h5hlcc h5c++ h5hlc++ h5copy h5diff h5dump h5ls h5stat gif2h5 h52gif h5clear h5debug
h5format_convert h5jam h5unjam h5ls h5mkgrp h5repack h5repart h5watch ph5diff h5import
list(APPEND HDF5_TOOLS h5copy h5diff h5dump h5ls h5stat gif2h5 h52gif h5clear h5debug
h5format_convert h5jam h5unjam h5mkgrp h5repack h5repart h5watch h5import
)

if("parallel" IN_LIST FEATURES)
list(APPEND HDF5_TOOLS ph5diff)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(TRANSFORM HDF5_TOOLS REPLACE "^(.+)$" "\\1-shared")
else()
endif()

foreach(HDF5_TOOL IN LISTS HDF5_TOOLS)
if (NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${HDF5_TOOL}${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
OR NOT EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${HDF5_TOOL}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
list(REMOVE_ITEM HDF5_TOOLS "${HDF5_TOOL}")
endif()
endforeach()
if(NOT VCPKG_TARGET_IS_WINDOWS)
list(APPEND HDF5_TOOLS h5cc h5hlcc h5c++ h5hlc++)
endif()

if("parallel" IN_LIST FEATURES)
list(APPEND HDF5_TOOLS h5perf)
list(APPEND HDF5_TOOLS h5perf )
if(NOT VCPKG_TARGET_IS_WINDOWS)
list(APPEND HDF5_TOOLS h5pcc)
endif()
else()
list(APPEND HDF5_TOOLS h5perf_serial)
endif()

vcpkg_copy_tools(TOOL_NAMES ${HDF5_TOOLS} AUTO_CLEAN)
endif()

if ("utils" IN_LIST FEATURES)
vcpkg_copy_tools(
TOOL_NAMES mirror_server mirror_server_stop
AUTO_CLEAN
)
list(APPEND HDF5_TOOLS mirror_server mirror_server_stop)
endif()

if(HDF5_TOOLS)
vcpkg_copy_tools(TOOL_NAMES ${HDF5_TOOLS} AUTO_CLEAN)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
Expand Down
2 changes: 1 addition & 1 deletion ports/hdf5/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hdf5",
"version": "1.12.2",
"port-version": 1,
"port-version": 2,
"description": "HDF5 is a data model, library, and file format for storing and managing data",
"homepage": "https://www.hdfgroup.org/downloads/hdf5/",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2874,7 +2874,7 @@
},
"hdf5": {
"baseline": "1.12.2",
"port-version": 1
"port-version": 2
},
"healpix": {
"baseline": "1.12.10",
Expand Down
5 changes: 5 additions & 0 deletions versions/h-/hdf5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e780ea29b8b6a24227612b42673bc7f1d7a81766",
"version": "1.12.2",
"port-version": 2
},
{
"git-tree": "f6647d7591d9b5a588d92e0fb4266d2028132ff9",
"version": "1.12.2",
Expand Down

0 comments on commit 580e378

Please sign in to comment.