2017-07-13 00:26:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libarchive/libarchive
|
2021-09-14 05:39:54 +08:00
|
|
|
REF 1b2c437b99b361c7692538fa373e99955e9b93ae #v3.5.2
|
|
|
|
SHA512 df527dd333b01ed85f07831ba0bd4b1d0b5384fe12cfa53474ad39c04509105a3c8574a2d21a430e3584a931c8f6ae923bca95df83945f0c593c1ffaed3f62da
|
2018-07-01 12:05:51 +08:00
|
|
|
HEAD_REF master
|
2022-01-26 02:31:15 +08:00
|
|
|
PATCHES
|
2021-09-14 05:39:54 +08:00
|
|
|
disable-warnings.patch
|
2019-08-25 04:43:57 +08:00
|
|
|
fix-buildsystem.patch
|
2019-12-22 03:34:24 +08:00
|
|
|
fix-cpu-set.patch
|
2021-09-14 05:39:54 +08:00
|
|
|
fix-dependencies.patch
|
2021-09-25 03:06:17 +08:00
|
|
|
pkgconfig-modules.patch
|
2018-07-01 12:05:51 +08:00
|
|
|
)
|
2017-01-06 04:22:32 +08:00
|
|
|
|
2020-01-18 08:13:12 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-08-10 15:57:48 +08:00
|
|
|
FEATURES
|
|
|
|
bzip2 ENABLE_BZip2
|
|
|
|
libxml2 ENABLE_LIBXML2
|
|
|
|
lz4 ENABLE_LZ4
|
|
|
|
lzma ENABLE_LZMA
|
|
|
|
lzo ENABLE_LZO
|
|
|
|
openssl ENABLE_OPENSSL
|
|
|
|
zstd ENABLE_ZSTD
|
2020-01-18 08:13:12 +08:00
|
|
|
)
|
2018-10-09 11:30:12 +08:00
|
|
|
|
2021-09-25 03:06:17 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-01-06 04:22:32 +08:00
|
|
|
OPTIONS
|
2020-01-18 08:13:12 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2021-09-25 03:06:17 +08:00
|
|
|
-DENABLE_ZLIB=ON
|
2018-10-09 11:30:12 +08:00
|
|
|
-DENABLE_PCREPOSIX=OFF
|
2021-09-25 03:06:17 +08:00
|
|
|
-DPOSIX_REGEX_LIB=NONE
|
2017-01-06 04:22:32 +08: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-26 13:14:57 +08:00
|
|
|
-DENABLE_ICONV=OFF
|
2021-05-12 01:37:52 +08:00
|
|
|
-DENABLE_LIBB2=OFF
|
2020-04-18 05:13:24 +08:00
|
|
|
-DENABLE_TEST=OFF
|
2019-08-25 04:43:57 +08:00
|
|
|
-DENABLE_WERROR=OFF
|
|
|
|
)
|
2017-01-06 04:22:32 +08:00
|
|
|
|
2021-09-25 03:06:17 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-01-17 11:26:38 +08:00
|
|
|
|
2021-08-10 15:57:48 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2017-01-06 04:22:32 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-01-17 11:26:38 +08:00
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
|
|
|
|
2021-09-25 03:06:17 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2021-01-17 11:26:38 +08:00
|
|
|
|
2021-09-14 05:39:54 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2021-09-25 03:06:17 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2021-09-14 05:39:54 +08:00
|
|
|
endif()
|
|
|
|
|
2021-09-25 03:06:17 +08:00
|
|
|
foreach(header "${CURRENT_PACKAGES_DIR}/include/archive.h" "${CURRENT_PACKAGES_DIR}/include/archive_entry.h")
|
|
|
|
vcpkg_replace_string("${header}" "(!defined LIBARCHIVE_STATIC)" "0")
|
2017-04-05 22:06:42 +08:00
|
|
|
endforeach()
|
2017-01-06 04:22:32 +08:00
|
|
|
|
2021-09-25 03:06:17 +08: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)
|