From e1dfb369fc1c6e58d5850cf67c224caa955309e5 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Mon, 1 Jun 2026 21:16:09 -0700 Subject: [PATCH] [salome-med-fichier] fix cross-compilation failure on arm64-linux (#52132) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ports/salome-med-fichier/portfile.cmake | 6 ++++++ ports/salome-med-fichier/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/s-/salome-med-fichier.json | 5 +++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ports/salome-med-fichier/portfile.cmake b/ports/salome-med-fichier/portfile.cmake index 949ffb43bf..2419757765 100644 --- a/ports/salome-med-fichier/portfile.cmake +++ b/ports/salome-med-fichier/portfile.cmake @@ -35,6 +35,11 @@ endforeach() string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MEDFILE_BUILD_STATIC_LIBS) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MEDFILE_BUILD_SHARED_LIBS) +# Ensure a host-compatible pkg-config is used. During cross-compilation, the target +# triplet's pkgconf (e.g. arm64) cannot execute on the host. Without this, CMake may +# cache the wrong PKG_CONFIG_EXECUTABLE, breaking find_dependency(MPI) from hdf5-config. +vcpkg_find_acquire_program(PKGCONFIG) + # If there are problems with the cmake build try switching to autotools for !windows vcpkg_cmake_configure( DISABLE_PARALLEL_CONFIGURE # Writes into the source dir @@ -45,6 +50,7 @@ vcpkg_cmake_configure( -DMEDFILE_INSTALL_DOC=OFF -DMEDFILE_BUILD_TESTS=OFF -DCMAKE_Fortran_COMPILER=NOTFOUND # Disable Fortran + "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" ) vcpkg_cmake_install() diff --git a/ports/salome-med-fichier/vcpkg.json b/ports/salome-med-fichier/vcpkg.json index 9b82c2002e..bcaf5bf574 100644 --- a/ports/salome-med-fichier/vcpkg.json +++ b/ports/salome-med-fichier/vcpkg.json @@ -1,7 +1,7 @@ { "name": "salome-med-fichier", "version": "4.1.1", - "port-version": 4, + "port-version": 5, "description": "med-fichier provides a low level C API for fine-grained access to the structure of MED files (.med)", "homepage": "https://www.salome-platform.org", "license": "LGPL-3.0-or-later", diff --git a/versions/baseline.json b/versions/baseline.json index bd4794577a..fc78d23c93 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9010,7 +9010,7 @@ }, "salome-med-fichier": { "baseline": "4.1.1", - "port-version": 4 + "port-version": 5 }, "salome-medcoupling": { "baseline": "9.10.0", diff --git a/versions/s-/salome-med-fichier.json b/versions/s-/salome-med-fichier.json index 140543ce24..cd81bdc6b1 100644 --- a/versions/s-/salome-med-fichier.json +++ b/versions/s-/salome-med-fichier.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5931d9d100aa4c7103471af4e461790883266cd0", + "version": "4.1.1", + "port-version": 5 + }, { "git-tree": "17749288e0218249b7dca4398828532a16853ed3", "version": "4.1.1",