From ca9f57ba4f61a12988ed0109d99f415ddb3e7090 Mon Sep 17 00:00:00 2001 From: Mengna-Li <543250287@qq.com> Date: Wed, 4 Dec 2024 00:27:59 +0000 Subject: [PATCH] [scotch] Add ptscotch support (#42465) --- ports/scotch/portfile.cmake | 12 ++++++++++-- ports/scotch/vcpkg.json | 11 ++++++++++- versions/baseline.json | 2 +- versions/s-/scotch.json | 5 +++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ports/scotch/portfile.cmake b/ports/scotch/portfile.cmake index fa6bba6355..42cf393f6b 100644 --- a/ports/scotch/portfile.cmake +++ b/ports/scotch/portfile.cmake @@ -25,10 +25,14 @@ if(VCPKG_TARGET_IS_WINDOWS) string(APPEND VCPKG_CXX_FLAGS " -DGRAPHMATCHNOTHREAD") endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + ptscotch BUILD_PTSCOTCH +) + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" - OPTIONS - -DBUILD_PTSCOTCH=OFF # Requires MPI + OPTIONS ${FEATURE_OPTIONS} -DBUILD_LIBESMUMPS=OFF -DBUILD_LIBSCOTCHMETIS=OFF -DTHREADS=ON @@ -45,6 +49,10 @@ vcpkg_copy_tools(TOOL_NAMES AUTO_CLEAN ) +if ("ptscotch" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES dggath dgmap dgord dgscat dgtst AUTO_CLEAN) +endif() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/doc/CeCILL-C_V1-en.txt") diff --git a/ports/scotch/vcpkg.json b/ports/scotch/vcpkg.json index 16229cdfdb..37933268ad 100644 --- a/ports/scotch/vcpkg.json +++ b/ports/scotch/vcpkg.json @@ -1,6 +1,7 @@ { "name": "scotch", "version": "7.0.5", + "port-version": 1, "description": "Scotch: a software package for graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering", "homepage": "https://gitlab.inria.fr/scotch/scotch", "license": null, @@ -18,5 +19,13 @@ "host": true }, "zlib" - ] + ], + "features": { + "ptscotch": { + "description": "Build PT-Scotch", + "dependencies": [ + "mpi" + ] + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index bf5c4389a8..d4bd087bf8 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8174,7 +8174,7 @@ }, "scotch": { "baseline": "7.0.5", - "port-version": 0 + "port-version": 1 }, "scottt-debugbreak": { "baseline": "1.0", diff --git a/versions/s-/scotch.json b/versions/s-/scotch.json index 78c0a49304..30f5b9b39b 100644 --- a/versions/s-/scotch.json +++ b/versions/s-/scotch.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ac6bd42f55d0f52fc7dd0ab144ea4c058e663b92", + "version": "7.0.5", + "port-version": 1 + }, { "git-tree": "6894afdfdbdbe1e142bb42d4d0894ecc37bca0ab", "version": "7.0.5",