2017-07-12 18:26:28 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libarchive/libarchive
|
2023-01-25 01:40:21 +01:00
|
|
|
REF "v${VERSION}"
|
2024-02-12 23:53:06 +01:00
|
|
|
SHA512 86a4e325879cde826df068d1154ccf031bbca7a0afa3f2afc57fa41322af245ec477db9fb38fff298c9e269261de1a2ece7849ae1a3512e0ebeb8414167372c0
|
2018-06-30 21:05:51 -07:00
|
|
|
HEAD_REF master
|
2022-01-25 10:31:15 -08:00
|
|
|
PATCHES
|
2021-09-13 17:39:54 -04:00
|
|
|
disable-warnings.patch
|
2019-08-24 13:43:57 -07:00
|
|
|
fix-buildsystem.patch
|
2019-12-21 11:34:24 -08:00
|
|
|
fix-cpu-set.patch
|
2022-05-18 08:57:24 +02:00
|
|
|
fix-deps.patch
|
2018-06-30 21:05:51 -07:00
|
|
|
)
|
2017-01-05 21:22:32 +01:00
|
|
|
|
2020-01-17 19:13:12 -05:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-08-10 09:57:48 +02:00
|
|
|
FEATURES
|
|
|
|
bzip2 ENABLE_BZip2
|
2022-05-18 08:57:24 +02:00
|
|
|
bzip2 CMAKE_REQUIRE_FIND_PACKAGE_BZip2
|
2021-08-10 09:57:48 +02:00
|
|
|
libxml2 ENABLE_LIBXML2
|
2022-05-18 08:57:24 +02:00
|
|
|
libxml2 CMAKE_REQUIRE_FIND_PACKAGE_LibXml2
|
2021-08-10 09:57:48 +02:00
|
|
|
lz4 ENABLE_LZ4
|
2022-05-18 08:57:24 +02:00
|
|
|
lz4 CMAKE_REQUIRE_FIND_PACKAGE_lz4
|
2021-08-10 09:57:48 +02:00
|
|
|
lzma ENABLE_LZMA
|
2022-05-18 08:57:24 +02:00
|
|
|
lzma CMAKE_REQUIRE_FIND_PACKAGE_LibLZMA
|
2021-08-10 09:57:48 +02:00
|
|
|
lzo ENABLE_LZO
|
|
|
|
zstd ENABLE_ZSTD
|
2020-01-17 19:13:12 -05:00
|
|
|
)
|
2023-01-25 01:40:21 +01:00
|
|
|
# Default crypto backend is OpenSSL, but it is ignored for DARWIN
|
|
|
|
set(WRAPPER_ENABLE_OPENSSL OFF)
|
|
|
|
if(NOT "crypto" IN_LIST FEATURES)
|
|
|
|
list(APPEND FEATURE_OPTIONS
|
|
|
|
-DLIBMD_FOUND=FALSE
|
|
|
|
-DENABLE_OPENSSL=OFF
|
|
|
|
)
|
|
|
|
elseif(VCPKG_TARGET_IS_OSX)
|
|
|
|
list(APPEND FEATURE_OPTIONS
|
|
|
|
-DENABLE_MBEDTLS=ON
|
|
|
|
-DENABLE_OPENSSL=OFF
|
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_MbedTLS=ON
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
set(WRAPPER_ENABLE_OPENSSL ON)
|
|
|
|
list(APPEND FEATURE_OPTIONS
|
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_OpenSSL=ON
|
|
|
|
)
|
|
|
|
endif()
|
2018-10-08 23:30:12 -04:00
|
|
|
|
2021-09-24 21:06:17 +02:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-01-05 21:22:32 +01:00
|
|
|
OPTIONS
|
2020-01-17 19:13:12 -05:00
|
|
|
${FEATURE_OPTIONS}
|
2021-09-24 21:06:17 +02:00
|
|
|
-DENABLE_ZLIB=ON
|
2018-10-08 23:30:12 -04:00
|
|
|
-DENABLE_PCREPOSIX=OFF
|
2021-09-24 21:06:17 +02:00
|
|
|
-DPOSIX_REGEX_LIB=NONE
|
2024-02-12 23:53:06 +01:00
|
|
|
-DENABLE_MBEDTLS=OFF
|
2017-01-05 21:22:32 +01:00
|
|
|
-DENABLE_NETTLE=OFF
|
|
|
|
-DENABLE_EXPAT=OFF
|
|
|
|
-DENABLE_LibGCC=OFF
|
|
|
|
-DENABLE_CNG=OFF
|
|
|
|
-DENABLE_TAR=OFF
|
|
|
|
-DENABLE_CPIO=OFF
|
|
|
|
-DENABLE_CAT=OFF
|
|
|
|
-DENABLE_XATTR=OFF
|
|
|
|
-DENABLE_ACL=OFF
|
2017-01-25 21:14:57 -08:00
|
|
|
-DENABLE_ICONV=OFF
|
2021-05-11 19:37:52 +02:00
|
|
|
-DENABLE_LIBB2=OFF
|
2020-04-17 23:13:24 +02:00
|
|
|
-DENABLE_TEST=OFF
|
2019-08-24 13:43:57 -07:00
|
|
|
-DENABLE_WERROR=OFF
|
2023-01-25 01:40:21 +01:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
CMAKE_REQUIRE_FIND_PACKAGE_BZip2
|
|
|
|
CMAKE_REQUIRE_FIND_PACKAGE_LibLZMA
|
|
|
|
CMAKE_REQUIRE_FIND_PACKAGE_LibXml2
|
|
|
|
CMAKE_REQUIRE_FIND_PACKAGE_lz4
|
|
|
|
ENABLE_LibGCC
|
2019-08-24 13:43:57 -07:00
|
|
|
)
|
2017-01-05 21:22:32 +01:00
|
|
|
|
2021-09-24 21:06:17 +02:00
|
|
|
vcpkg_cmake_install()
|
2021-01-17 04:26:38 +01:00
|
|
|
|
2021-08-10 09:57:48 +02:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2017-01-05 21:22:32 +01:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-01-17 04:26:38 +01:00
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
|
|
|
|
2024-02-12 23:53:06 +01:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/man"
|
|
|
|
)
|
2021-01-17 04:26:38 +01:00
|
|
|
|
2023-01-25 01:40:21 +01:00
|
|
|
foreach(header "include/archive.h" "include/archive_entry.h")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/${header}" "(!defined LIBARCHIVE_STATIC)" "0")
|
2017-04-05 16:06:42 +02:00
|
|
|
endforeach()
|
2017-01-05 21:22:32 +01:00
|
|
|
|
2021-09-24 21:06:17 +02:00
|
|
|
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|