Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cgns] Update to 4.3.0 #24531

Merged
merged 10 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions ports/cgns/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"cgnstools" CGNS_BUILD_CGNSTOOLS
)

set(CGNS_BUILD_OPTS "")
if(VCPKG_TARGET_ARCHITECTURE MATCHES "64")
list(APPEND CGNS_BUILD_OPTS "-DCGNS_ENABLE_64BIT=ON")
endif()
Expand All @@ -32,7 +33,7 @@ endif()

# By default, when possible, vcpkg_cmake_configure uses ninja-build as its build system
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
${CGNS_BUILD_OPTS}
Expand Down Expand Up @@ -98,19 +99,17 @@ if("cgnstools" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_WINDOWS)
# Copy tools from "bin" to "tools/cgns"
set(CGNSTOOLS "cgconfig.bat" "cgnscalc.bat" "unitconv.bat" "cgnsview.bat" "cgnsplot.bat" "cgnsnodes.bat")
foreach(CGNSTOOL ${CGNSTOOLS})
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${CGNSTOOL}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${CGNSTOOL}")
foreach(CGNSTOOL IN LISTS CGNSTOOLS)
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${CGNSTOOL}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${CGNSTOOL}")
endforeach()

# Adjust paths in batch file
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/cgconfig.bat" "${CURRENT_PACKAGES_DIR}\\bin" "${CURRENT_PACKAGES_DIR}\\tools\\cgns")
elseif(VCPKG_TARGET_IS_LINUX)
# Copy tools from "bin" to "tools/cgns"
set(CGNSTOOLS "cgconfig" "cgnscalc.sh" "unitconv.sh" "cgnsview.sh" "cgnsplot.sh" "cgnsnodes.sh")
foreach(CGNSTOOL ${CGNSTOOLS})
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${CGNSTOOL}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${CGNSTOOL}")
foreach(CGNSTOOL IN LIOSTS CGNSTOOLS)
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${CGNSTOOL}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${CGNSTOOL}")
endforeach()

# adjust paths in batch files
Expand All @@ -119,16 +118,16 @@ if("cgnstools" IN_LIST FEATURES)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin")
endif()

# Cleanup /debug/share
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
if (EXISTS "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
endif()

# Cleanup /debug/include and /include
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/include/cgnsconfig.h)
file(INSTALL ${CURRENT_PORT_DIR}/cgnsconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) # the include is all that is needed
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs" "${CURRENT_PACKAGES_DIR}/include/cgnsconfig.h")
file(INSTALL "${CURRENT_PORT_DIR}/cgnsconfig.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") # the include is all that is needed

# Handle copyright
configure_file("${SOURCE_PATH}/license.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
2 changes: 1 addition & 1 deletion versions/c-/cgns.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "6c184a6f66949bd2e77779a3d379bfe74eb9f9ff",
"git-tree": "a7a3ae05ee5762213844ecee9f048e5534d99ffc",
"version-semver": "4.3.0",
"port-version": 0
},
Expand Down