early-access version 2853
This commit is contained in:
6
externals/vcpkg/ports/cgns/cgnsconfig.h
vendored
Executable file
6
externals/vcpkg/ports/cgns/cgnsconfig.h
vendored
Executable file
@@ -0,0 +1,6 @@
|
||||
#ifndef CGNSCONFIG_H
|
||||
#define CGNSCONFIG_H
|
||||
|
||||
#include "cgnstypes.h"
|
||||
|
||||
#endif
|
||||
61
externals/vcpkg/ports/cgns/hdf5.patch
vendored
Executable file
61
externals/vcpkg/ports/cgns/hdf5.patch
vendored
Executable file
@@ -0,0 +1,61 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 60f9de4..e980ef7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -261,51 +261,12 @@ if (CGNS_ENABLE_HDF5)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
|
||||
- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS})
|
||||
- message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}")
|
||||
- if (HDF5_FOUND)
|
||||
- if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND)
|
||||
- if (CG_HDF5_LINK_TYPE STREQUAL "shared")
|
||||
- set(CG_HDF5_LINK_TYPE "static")
|
||||
- set(CG_HDF5_LINK_TYPE_UPPER "STATIC")
|
||||
- else()
|
||||
- set(CG_HDF5_LINK_TYPE "shared")
|
||||
- set(CG_HDF5_LINK_TYPE_UPPER "SHARED")
|
||||
- endif()
|
||||
-
|
||||
- set (FIND_HDF_COMPONENTS C ${CG_HDF5_LINK_TYPE})
|
||||
-
|
||||
- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS} REQUIRED)
|
||||
- message (STATUS "HDF5 libs:${HDF5_FOUND} C:${HDF5_C_${CG_HDF5_LINK_TYPE_UPPER}_LIBRARY}")
|
||||
- endif()
|
||||
-
|
||||
- set(LINK_LIBS ${HDF5_C_${CG_HDF5_LINK_TYPE_UPPER}_LIBRARY})
|
||||
- else ()
|
||||
- find_package (HDF5) # Legacy find
|
||||
-
|
||||
- #Legacy find_package does not set HDF5_TOOLS_DIR, so we set it here
|
||||
- set(HDF5_TOOLS_DIR ${HDF5_LIBRARY}/../bin)
|
||||
-
|
||||
- #Legacy find_package does not set HDF5_BUILD_SHARED_LIBS, so we set it here
|
||||
- set(GUESS_SHARED "${HDF5_LIBRARY}/libhdf5${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
- foreach (ITEM ${HDF5_LIBRARIES})
|
||||
- if (ITEM MATCHES "(.*)hdf5${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
- set(GUESS_SHARED "${ITEM}")
|
||||
- break()
|
||||
- endif()
|
||||
- endforeach()
|
||||
- if (CGNS_BUILD_SHARED AND EXISTS "${GUESS_SHARED}")
|
||||
- set (HDF5_BUILD_SHARED_LIBS 1)
|
||||
- set (CG_HDF5_LINK_TYPE "shared")
|
||||
- set (CG_HDF5_LINK_TYPE_UPPER "SHARED")
|
||||
- else ()
|
||||
- set (HDF5_BUILD_SHARED_LIBS 0)
|
||||
- set (CG_HDF5_LINK_TYPE "static")
|
||||
- set (CG_HDF5_LINK_TYPE_UPPER "STATIC")
|
||||
- endif ()
|
||||
- set (LINK_LIBS ${HDF5_LIBRARIES})
|
||||
+ find_package (HDF5 CONFIG REQUIRED)
|
||||
+ if (TARGET hdf5::hdf5-shared)
|
||||
+ set (LINK_LIBS ${LINK_LIBS} hdf5::hdf5-shared)
|
||||
+ else ()
|
||||
+ set (LINK_LIBS ${LINK_LIBS} hdf5::hdf5-static)
|
||||
endif ()
|
||||
- set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME})
|
||||
|
||||
if (HDF5_FOUND)
|
||||
if (NOT DEFINED HDF5_INCLUDE_DIRS)
|
||||
12
externals/vcpkg/ports/cgns/linux_lfs.patch
vendored
Executable file
12
externals/vcpkg/ports/cgns/linux_lfs.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 46446da8a..a3d8cd98f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -116,6 +116,7 @@ if (CGNS_ENABLE_LFS)
|
||||
else ()
|
||||
check_symbol_exists(open64 "sys/types.h;sys/stat.h;unistd.h" HAVE_OPEN64)
|
||||
check_symbol_exists(lseek64 "sys/types.h;unistd.h" HAVE_LSEEK64)
|
||||
+ add_definitions(-D_FILE_OFFSET_BITS=64 -D__LARGEFILE64_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
|
||||
endif ()
|
||||
if (HAVE_OPEN64)
|
||||
add_compile_definitions(HAVE_OPEN64)
|
||||
83
externals/vcpkg/ports/cgns/portfile.cmake
vendored
Executable file
83
externals/vcpkg/ports/cgns/portfile.cmake
vendored
Executable file
@@ -0,0 +1,83 @@
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO CGNS/CGNS
|
||||
REF ec538ac11dbaff510464a831ef094b0d6bf7216c # v4.3.0
|
||||
SHA512 3c04829ff99c0f4f1cd705f0807fda0a65f970c7eecd23ec624cf09fb6fa2a566c63fc94d46c1d0754910bbff8f98c3723e4f32ef66c3e7e41930313454fa10b
|
||||
HEAD_REF develop
|
||||
PATCHES
|
||||
hdf5.patch
|
||||
linux_lfs.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
"fortran" CGNS_ENABLE_FORTRAN
|
||||
"tests" CGNS_ENABLE_TESTS
|
||||
"hdf5" CGNS_ENABLE_HDF5
|
||||
"lfs" CGNS_ENABLE_LFS
|
||||
"legacy" CGNS_ENABLE_LEGACY
|
||||
)
|
||||
|
||||
set(CGNS_BUILD_OPTS "")
|
||||
if(VCPKG_TARGET_ARCHITECTURE MATCHES "64")
|
||||
list(APPEND CGNS_BUILD_OPTS "-DCGNS_ENABLE_64BIT=ON")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=ON;-DCGNS_USE_SHARED=ON")
|
||||
else()
|
||||
list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=OFF;-DCGNS_USE_SHARED=OFF")
|
||||
endif()
|
||||
|
||||
# By default, when possible, vcpkg_cmake_configure uses ninja-build as its build system
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
${CGNS_BUILD_OPTS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Moves all *.cmake files from /debug/lib/cmake/cgns/ to /share/cgns/
|
||||
# See /docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md for more details
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/cgns")
|
||||
|
||||
vcpkg_copy_tools(
|
||||
TOOL_NAMES
|
||||
cgnscheck
|
||||
cgnscompress
|
||||
cgnsconvert
|
||||
cgnsdiff
|
||||
cgnslist
|
||||
cgnsnames
|
||||
AUTO_CLEAN
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(TOOLS "adf2hdf.bat" "hdf2adf.bat" "cgnsupdate.bat")
|
||||
elseif(VCPKG_TARGET_IS_LINUX)
|
||||
set(TOOLS "adf2hdf" "hdf2adf" "cgnsupdate")
|
||||
endif()
|
||||
|
||||
foreach(TOOL ${TOOLS})
|
||||
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${TOOL}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${TOOL}")
|
||||
endforeach()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin")
|
||||
endif()
|
||||
|
||||
if (EXISTS "${CURRENT_PACKAGES_DIR}/debug")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
endif()
|
||||
|
||||
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)
|
||||
72
externals/vcpkg/ports/cgns/vcpkg.json
vendored
Executable file
72
externals/vcpkg/ports/cgns/vcpkg.json
vendored
Executable file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"name": "cgns",
|
||||
"version-semver": "4.3.0",
|
||||
"description": "The CFD General Notation System (CGNS) provides a standard for recording and recovering computer data associated with the numerical solution of fluid dynamics equations.",
|
||||
"homepage": "http://cgns.org/",
|
||||
"default-features": [
|
||||
"hdf5",
|
||||
"lfsselector"
|
||||
],
|
||||
"features": {
|
||||
"fortran": {
|
||||
"description": "Enable fortran support (not yet implemented)"
|
||||
},
|
||||
"hdf5": {
|
||||
"description": "Enable hdf5 support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "hdf5",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"tools"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"legacy": {
|
||||
"description": "Enable legacy support"
|
||||
},
|
||||
"lfs": {
|
||||
"description": "Enable LFS support"
|
||||
},
|
||||
"lfsselector": {
|
||||
"description": "Selector for LFS",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "cgns",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"lfs"
|
||||
],
|
||||
"platform": "!osx"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mpi": {
|
||||
"description": "Enable MPI support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "hdf5",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"parallel"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"description": "Build tests"
|
||||
},
|
||||
"tools": {
|
||||
"description": "No effects, preserved for upgrade compatibility"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user