2024-08-26 16:14:47 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
|
2019-10-30 14:20:30 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO OpenSCAP/openscap
|
2023-06-14 10:10:09 +08:00
|
|
|
REF ${VERSION}
|
2024-08-17 16:41:01 +08:00
|
|
|
SHA512 10f28593a6776d28020c26fc3ad3f3aa095fdc48fa6261c0b9677c559d3c822a23eb61c02e09a3c11654dc20d8374b5fcc3154bb9d2d34da5985fc737d252a9b
|
2019-10-30 14:20:30 +08:00
|
|
|
HEAD_REF dev
|
|
|
|
PATCHES
|
|
|
|
fix-build.patch
|
2023-06-14 10:10:09 +08:00
|
|
|
fix-buildflag-and-install.patch
|
2023-06-17 11:56:11 +08:00
|
|
|
fix-utils.patch
|
2024-08-26 16:14:47 +08:00
|
|
|
fix-dependencies.patch
|
2019-10-30 14:20:30 +08:00
|
|
|
)
|
2022-07-07 05:30:42 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake/FindThreads.cmake")
|
2019-10-30 14:20:30 +08:00
|
|
|
|
|
|
|
if ("python" IN_LIST FEATURES)
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2022-07-21 06:29:47 +08:00
|
|
|
FEATURES
|
2023-06-17 11:56:11 +08:00
|
|
|
util ENABLE_OSCAP_UTIL
|
2022-07-21 06:29:47 +08:00
|
|
|
python ENABLE_PYTHON3
|
2019-10-30 14:20:30 +08:00
|
|
|
)
|
|
|
|
|
2024-08-17 16:41:01 +08:00
|
|
|
if(VCPKG_TARGET_IS_LINUX AND ENABLE_OSCAP_UTIL)
|
|
|
|
message("openscap with util feature requires the following packages via the system package manager:
|
|
|
|
libgcrypt20-dev
|
|
|
|
On Ubuntu derivatives:
|
|
|
|
sudo apt install libgcrypt20-dev")
|
|
|
|
endif()
|
|
|
|
|
2022-07-21 06:29:47 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-10-30 14:20:30 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
|
|
|
-DPYTHON_EXECUTABLE=${PYTHON3}
|
|
|
|
-DENABLE_PERL=OFF
|
|
|
|
-DENABLE_MITRE=OFF
|
|
|
|
-DENABLE_VALGRIND=OFF
|
|
|
|
-DENABLE_OSCAP_UTIL_DOCKER=OFF
|
|
|
|
-DENABLE_OSCAP_UTIL_AS_RPM=OFF
|
|
|
|
-DENABLE_OSCAP_UTIL_SSH=OFF
|
|
|
|
-DENABLE_OSCAP_UTIL_VM=OFF
|
|
|
|
-DENABLE_OSCAP_UTIL_PODMAN=OFF
|
|
|
|
-DENABLE_OSCAP_UTIL_CHROOT=OFF
|
2022-07-07 05:30:42 +08:00
|
|
|
-DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON
|
2023-06-14 10:10:09 +08:00
|
|
|
-DENABLE_TESTS=OFF
|
|
|
|
-DENABLE_DOCS=OFF
|
2024-06-27 12:12:35 +08:00
|
|
|
-DWANT_BASE64=OFF
|
2019-10-30 14:20:30 +08:00
|
|
|
)
|
|
|
|
|
2022-07-21 06:29:47 +08:00
|
|
|
vcpkg_cmake_install()
|
2023-06-17 11:56:11 +08:00
|
|
|
if(ENABLE_OSCAP_UTIL)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES oscap AUTO_CLEAN)
|
|
|
|
endif()
|
2019-10-30 14:20:30 +08:00
|
|
|
|
2022-07-21 06:29:47 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
2019-10-30 14:20:30 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2022-07-21 06:29:47 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2019-10-30 14:20:30 +08:00
|
|
|
|
|
|
|
#Handle copyright
|
2023-06-14 10:10:09 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|