From 3d8f78171a2a37d461077bf8d063256b63e25a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 15 Jun 2022 21:09:36 +0000 Subject: [PATCH] [hdf5] Refix msmpi library path in pkgconfig (#25089) * [hdf5] Refix msmpi library path in pkgconfig * version * version * Apply suggestion * version * [hdf5] Use post-hoc string replacement * version Co-authored-by: Robert Schumacher --- ports/hdf5/portfile.cmake | 14 +++++++++----- ports/hdf5/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/h-/hdf5.json | 5 +++++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index c75cff7feac7a4..da9f53e78edf35 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -84,12 +84,16 @@ if(VCPKG_TARGET_IS_WINDOWS) endif() vcpkg_fixup_pkgconfig() -if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc") - foreach(file IN LISTS pc_files) + +file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc") +foreach(file IN LISTS pc_files) + if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_replace_string("${file}" " -lhdf5" " -llibhdf5") - endforeach() -endif() + endif() + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string("${file}" "/msmpi.lib\"" "/msmpi\"") + endif() +endforeach() file(READ "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" contents) string(REPLACE [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/bin"]] diff --git a/ports/hdf5/vcpkg.json b/ports/hdf5/vcpkg.json index 26c2caeb3f3b49..36371957146222 100644 --- a/ports/hdf5/vcpkg.json +++ b/ports/hdf5/vcpkg.json @@ -1,6 +1,7 @@ { "name": "hdf5", "version": "1.12.2", + "port-version": 1, "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", diff --git a/versions/baseline.json b/versions/baseline.json index 2fe623dd5da740..cfa3bcaa6040df 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2774,7 +2774,7 @@ }, "hdf5": { "baseline": "1.12.2", - "port-version": 0 + "port-version": 1 }, "healpix": { "baseline": "1.12.10", diff --git a/versions/h-/hdf5.json b/versions/h-/hdf5.json index 35a6434a9d6957..6360efbd8c23d5 100644 --- a/versions/h-/hdf5.json +++ b/versions/h-/hdf5.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f6647d7591d9b5a588d92e0fb4266d2028132ff9", + "version": "1.12.2", + "port-version": 1 + }, { "git-tree": "4abe78968a986c1793207ae653eb686926f3c141", "version": "1.12.2",