From 85d85f3873ad9487d907f46bc7bb7815fc952e42 Mon Sep 17 00:00:00 2001 From: Max Khon Date: Sat, 26 Mar 2022 04:47:40 +0700 Subject: [PATCH] [libmesh] (#22775) - build only opt flavor for release build - build only dbg flavor for debug build - install libmesh examples under tools/libmesh/ --- ports/libmesh/portfile.cmake | 22 +++++++++------------- ports/libmesh/vcpkg.json | 5 +++-- versions/baseline.json | 2 +- versions/l-/libmesh.json | 5 +++++ 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ports/libmesh/portfile.cmake b/ports/libmesh/portfile.cmake index 9a16dbf98b..b9384dd284 100644 --- a/ports/libmesh/portfile.cmake +++ b/ports/libmesh/portfile.cmake @@ -18,27 +18,23 @@ endif() vcpkg_configure_make( SOURCE_PATH ${SOURCE_PATH} OPTIONS ${OPTIONS} + OPTIONS_DEBUG --with-methods=dbg + OPTIONS_RELEASE --with-methods=opt ) vcpkg_install_make() if (EXISTS ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool) - file(COPY ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(COPY ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) file(REMOVE ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/contrib ${CURRENT_PACKAGES_DIR}/debug/contrib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/contrib) -file(GLOB ${CURRENT_PACKAGES_DIR}/bin LIBMESH_TOOLS) -foreach (LIBMESH_TOOL ${LIBMESH_TOOLS}) - file(COPY ${LIBMESH_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) - file(REMOVE ${LIBMESH_TOOL}) -endforeach() - -file(GLOB LIBMESH_TOOLS ${CURRENT_PACKAGES_DIR}/examples/*) -foreach (LIBMESH_TOOL ${LIBMESH_TOOLS}) - file(COPY ${LIBMESH_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) - file(REMOVE ${LIBMESH_TOOL}) +file(GLOB LIBMESH_EXAMPLES ${CURRENT_PACKAGES_DIR}/examples/*) +foreach (LIBMESH_EXAMPLE ${LIBMESH_EXAMPLES}) + file(COPY ${LIBMESH_EXAMPLE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) endforeach() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/examples) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) @@ -47,7 +43,7 @@ endif() # Remove tools and debug include directories file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/contrib ${CURRENT_PACKAGES_DIR}/debug/etc ${CURRENT_PACKAGES_DIR}/debug/examples ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/tools/libmesh/debug ${CURRENT_PACKAGES_DIR}/Make.common ${CURRENT_PACKAGES_DIR}/debug/Make.common) vcpkg_copy_pdbs() diff --git a/ports/libmesh/vcpkg.json b/ports/libmesh/vcpkg.json index 7c4b273f1c..20ec6ce663 100644 --- a/ports/libmesh/vcpkg.json +++ b/ports/libmesh/vcpkg.json @@ -1,7 +1,8 @@ { "name": "libmesh", "version-string": "1.5.0", - "port-version": 2, + "port-version": 3, "description": "The libMesh library provides a framework for the numerical simulation of partial differential equations using arbitrary unstructured discretizations on serial and parallel platforms. A major goal of the library is to provide support for adaptive mesh refinement (AMR) computations in parallel while allowing a research scientist to focus on the physics they are modeling.", - "homepage": "https://github.com/libMesh/libmesh" + "homepage": "https://github.com/libMesh/libmesh", + "license": "LGPL-2.1-only" } diff --git a/versions/baseline.json b/versions/baseline.json index d59cf643f7..8249070f42 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3726,7 +3726,7 @@ }, "libmesh": { "baseline": "1.5.0", - "port-version": 2 + "port-version": 3 }, "libmicrohttpd": { "baseline": "0.9.75", diff --git a/versions/l-/libmesh.json b/versions/l-/libmesh.json index a8ebbf98af..e648680eff 100644 --- a/versions/l-/libmesh.json +++ b/versions/l-/libmesh.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8583d8a15a7b694bb7a8346580c5f8a3f7478f28", + "version-string": "1.5.0", + "port-version": 3 + }, { "git-tree": "99d2914d8591e790d8d9e16eeb572b2dfa6776d7", "version-string": "1.5.0",