mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 02:41:47 +08:00
[salome-medcoupling] Add new port (#32916)
* [salome-configuration|medcoupling] new ports * format manifest * v db * remove trace * v db * fix dep * v db * Apply suggestions from code review Co-authored-by: jim wang <122244446+jimwang118@users.noreply.github.com> * v db * adjust SALOME_WITH_MPI depending on HDF5 * remove nuking of CMAKE_PREFIX_PATH from salome * v db * fix post build * v db * Fix med-fichier config on linux * add supports * format manifest * v db * don't want to investigate linux failure further --------- Co-authored-by: jim wang <122244446+jimwang118@users.noreply.github.com>
This commit is contained in:
parent
ec183f8ab6
commit
a109b7ccb2
20
ports/salome-configuration/portfile.cmake
Normal file
20
ports/salome-configuration/portfile.cmake
Normal file
@ -0,0 +1,20 @@
|
||||
vcpkg_from_git(
|
||||
OUT_SOURCE_PATH SOURCE_PATH_CONFIG
|
||||
URL "https://git.salome-platform.org/gitpub/tools/configuration.git"
|
||||
REF "25f724f7a6c0000330a40c3851dcd8bc2493e1fa"
|
||||
)
|
||||
|
||||
file(COPY "${SOURCE_PATH_CONFIG}/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH_CONFIG}/copyright/CEA_EDF.txt")
|
||||
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" [[set(SALOME_CONFIGURATION_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")]])
|
||||
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
||||
file(READ "${CURRENT_PACKAGES_DIR}/share/${PORT}/cmake/SalomeMacros.cmake" contents)
|
||||
if(HDF5_WITH_PARALLEL)
|
||||
string(PREPEND contents "set(SALOME_USE_MPI ON)\n")
|
||||
endif()
|
||||
string(REPLACE [[SET(CMAKE_PREFIX_PATH "${${_envvar}}")]] "" contents "${contents}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/cmake/SalomeMacros.cmake" "${contents}")
|
15
ports/salome-configuration/vcpkg.json
Normal file
15
ports/salome-configuration/vcpkg.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "salome-configuration",
|
||||
"version": "9.10.0",
|
||||
"description": "Configuration files and other utilities for SALOME platform",
|
||||
"homepage": "https://www.salome-platform.org",
|
||||
"license": "LGPL-2.1-or-later",
|
||||
"supports": "windows | linux",
|
||||
"dependencies": [
|
||||
{
|
||||
"$comment": "This is a dummy dependency to inject SALOME_USE_MPI depending on HDF5_WITH_PARALLEL",
|
||||
"name": "hdf5",
|
||||
"default-features": false
|
||||
}
|
||||
]
|
||||
}
|
@ -37,7 +37,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/MEDFile/MEDFileConfig.cmake" "/cmake/" "/share/MEDFile/")
|
||||
else()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME MEDFile CONFIG_PATH share/cmake/medfile-4.1.1)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/MEDFile/MEDFileConfig.cmake" "/cmake/medfile-4.1.1" "/share/MEDFile/")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/MEDFile/MEDFileConfig.cmake" "share/cmake/medfile-${VERSION}" "share/MEDFile")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "salome-med-fichier",
|
||||
"version": "4.1.1",
|
||||
"port-version": 1,
|
||||
"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",
|
||||
|
13
ports/salome-medcoupling/fix-missing-symbols.patch
Normal file
13
ports/salome-medcoupling/fix-missing-symbols.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/MEDCoupling/MEDCouplingMemArray.cxx b/src/MEDCoupling/MEDCouplingMemArray.cxx
|
||||
index 60d040806..8cb6748d2 100644
|
||||
--- a/src/MEDCoupling/MEDCouplingMemArray.cxx
|
||||
+++ b/src/MEDCoupling/MEDCouplingMemArray.cxx
|
||||
@@ -44,6 +44,8 @@ using namespace MEDCoupling;
|
||||
|
||||
template class MEDCOUPLING_EXPORT MEDCoupling::MemArray<mcIdType>;
|
||||
template class MEDCOUPLING_EXPORT MEDCoupling::MemArray<double>;
|
||||
+template class MEDCOUPLING_EXPORT MEDCoupling::MemArray<Int32>;
|
||||
+template class MEDCOUPLING_EXPORT MEDCoupling::MemArray<Int64>;
|
||||
template class MEDCOUPLING_EXPORT MEDCoupling::DataArrayTemplate<mcIdType>;
|
||||
template class MEDCOUPLING_EXPORT MEDCoupling::DataArrayTemplate<double>;
|
||||
template class MEDCOUPLING_EXPORT MEDCoupling::DataArrayTemplateClassic<Int32>;
|
71
ports/salome-medcoupling/portfile.cmake
Normal file
71
ports/salome-medcoupling/portfile.cmake
Normal file
@ -0,0 +1,71 @@
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
# Fixing static builds requires fixing/removing _declspec(dllexport|dllimport)
|
||||
# in the EXPORTS macros.
|
||||
endif()
|
||||
|
||||
vcpkg_from_git(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
URL "https://git.salome-platform.org/gitpub/tools/medcoupling.git"
|
||||
REF "fe2e38d301902c626f644907e00e499552bb2fa5"
|
||||
PATCHES
|
||||
win.patch
|
||||
fix-missing-symbols.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MEDCOUPLING_BUILD_STATIC)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
"-DCONFIGURATION_ROOT_DIR=${SALOME_CONFIGURATION_ROOT_DIR}"
|
||||
-DMEDCOUPLING_BUILD_TESTS=OFF
|
||||
-DMEDCOUPLING_BUILD_PY_TESTS=OFF
|
||||
-DMEDCOUPLING_BUILD_DOC=OFF
|
||||
-DMEDCOUPLING_BUILD_STATIC=${MEDCOUPLING_BUILD_STATIC}
|
||||
-DMEDCOUPLING_ENABLE_PYTHON=OFF
|
||||
-DMEDCOUPLING_ENABLE_RENUMBER=OFF
|
||||
-DMEDCOUPLING_METIS_V5=ON
|
||||
-DMETIS_LIBRARIES=metis # this is a target
|
||||
-DSCOTCH_LIBRARIES=SCOTCH::scotch
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(GLOB dll_files "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
|
||||
foreach(dll_file IN LISTS dll_files)
|
||||
string(REPLACE "/lib/" "/bin/" new_loc "${dll_file}")
|
||||
file(RENAME "${dll_file}" "${new_loc}")
|
||||
endforeach()
|
||||
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
file(GLOB dll_files "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
foreach(dll_file IN LISTS dll_files)
|
||||
string(REPLACE "/lib/" "/bin/" new_loc "${dll_file}")
|
||||
file(RENAME "${dll_file}" "${new_loc}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME MEDCoupling CONFIG_PATH "cmake_files")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(file "${CURRENT_PACKAGES_DIR}/share/MEDCoupling/MEDCouplingTargets-release.cmake")
|
||||
file(READ "${file}" contents)
|
||||
string(REGEX REPLACE "/lib/([^.]+)\\.dll" "/bin/\\1.dll" contents "${contents}")
|
||||
file(WRITE "${file}" "${contents}")
|
||||
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
set(file "${CURRENT_PACKAGES_DIR}/share/MEDCoupling/MEDCouplingTargets-debug.cmake")
|
||||
file(READ "${file}" contents)
|
||||
string(REGEX REPLACE "/lib/([^.]+)\\.dll" "/bin/\\1.dll" contents "${contents}")
|
||||
file(WRITE "${file}" "${contents}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/MEDCoupling/MEDCouplingConfig.cmake" "/cmake_files" "/share/MEDCoupling")
|
||||
vcpkg_copy_tools(TOOL_NAMES medpartitioner AUTO_CLEAN)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share")
|
30
ports/salome-medcoupling/vcpkg.json
Normal file
30
ports/salome-medcoupling/vcpkg.json
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "salome-medcoupling",
|
||||
"version": "9.10.0",
|
||||
"description": "salome-medcoupling is a part of SALOME platform to manipulate meshes and fields in memory, and use salome-med format for files.",
|
||||
"homepage": "https://www.salome-platform.org",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"supports": "!(windows & static)",
|
||||
"dependencies": [
|
||||
"boost-chrono",
|
||||
"boost-date-time",
|
||||
"boost-filesystem",
|
||||
"boost-regex",
|
||||
"boost-serialization",
|
||||
"boost-system",
|
||||
"boost-thread",
|
||||
"libxml2",
|
||||
"metis",
|
||||
"salome-configuration",
|
||||
"salome-med-fichier",
|
||||
"scotch",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
18
ports/salome-medcoupling/win.patch
Normal file
18
ports/salome-medcoupling/win.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/src/MEDPartitioner/CMakeLists.txt b/src/MEDPartitioner/CMakeLists.txt
|
||||
index e088a0ed4..048505267 100644
|
||||
--- a/src/MEDPartitioner/CMakeLists.txt
|
||||
+++ b/src/MEDPartitioner/CMakeLists.txt
|
||||
@@ -114,8 +114,12 @@ SET(medpartitionercpp_LDFLAGS
|
||||
interpkernel
|
||||
medcouplingcpp
|
||||
medloader
|
||||
- -lpthread
|
||||
)
|
||||
+
|
||||
+if(NOT WIN32)
|
||||
+ list(APPEND medpartitionercpp_LDFLAGS -lpthread)
|
||||
+endif()
|
||||
+
|
||||
IF(MEDCOUPLING_PARTITIONER_PARMETIS)
|
||||
SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_ParMetisGraph.hxx)
|
||||
SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ParMetisGraph.cxx MEDPARTITIONER_MetisGraph.cxx)
|
@ -1150,6 +1150,7 @@ rtlsdr:x64-uwp=fail
|
||||
rttr:arm-neon-android=fail
|
||||
rttr:arm64-android=fail
|
||||
rttr:x64-android=fail
|
||||
salome-medcoupling:x64-linux=fail
|
||||
scintilla:arm-neon-android=fail
|
||||
scintilla:arm64-android=fail
|
||||
scintilla:x64-android=fail
|
||||
|
@ -7352,8 +7352,16 @@
|
||||
"baseline": "2018-09-21",
|
||||
"port-version": 3
|
||||
},
|
||||
"salome-configuration": {
|
||||
"baseline": "9.10.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"salome-med-fichier": {
|
||||
"baseline": "4.1.1",
|
||||
"port-version": 1
|
||||
},
|
||||
"salome-medcoupling": {
|
||||
"baseline": "9.10.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"sassc": {
|
||||
|
9
versions/s-/salome-configuration.json
Normal file
9
versions/s-/salome-configuration.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2cbf34b9ab5a63d3b341c3a8c3e1b0cf48c1c6d9",
|
||||
"version": "9.10.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "26a3c208d3498e3c40c3f423f2493d1df53d49db",
|
||||
"version": "4.1.1",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "20cd7a3c38b2cef44fa45511e39c82488bb3aa0b",
|
||||
"version": "4.1.1",
|
||||
|
9
versions/s-/salome-medcoupling.json
Normal file
9
versions/s-/salome-medcoupling.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "5b007fe28cfb58ed83464e901ce70e8a1ef4bfa5",
|
||||
"version": "9.10.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user