2020-01-18 08:13:12 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "UWP")
|
2017-01-06 04:22:32 +08:00
|
|
|
|
2017-07-13 00:26:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libarchive/libarchive
|
2020-01-18 08:13:12 +08:00
|
|
|
REF cce09646b566c61c2debff58a70da780b8457883
|
|
|
|
SHA512 3eef6844269ecb9c3b7c848013539529e6ef2d298b6ca6c3c939a2a2e39da98db36bd66eea8893224bc4318edc073639136fbca71b2b0bec65216562e8188749
|
2018-07-01 12:05:51 +08:00
|
|
|
HEAD_REF master
|
2017-01-06 04:22:32 +08:00
|
|
|
PATCHES
|
2019-08-25 04:43:57 +08:00
|
|
|
fix-buildsystem.patch
|
|
|
|
fix-dependencies.patch
|
|
|
|
fix-lz4.patch
|
2019-10-11 22:55:50 +08:00
|
|
|
fix-zstd.patch
|
2019-12-22 03:34:24 +08:00
|
|
|
fix-cpu-set.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
|
|
|
|
bzip2 ENABLE_BZip2
|
|
|
|
libxml2 ENABLE_LIBXML2
|
|
|
|
lz4 ENABLE_LZ4
|
|
|
|
lzma ENABLE_LZMA
|
|
|
|
lzo ENABLE_LZO
|
|
|
|
openssl ENABLE_OPENSSL
|
|
|
|
)
|
2018-10-09 11:30:12 +08:00
|
|
|
|
2017-01-06 04:22:32 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-04-05 22:06:42 +08:00
|
|
|
PREFER_NINJA
|
2017-01-06 04:22:32 +08:00
|
|
|
OPTIONS
|
2020-01-18 08:13:12 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2018-10-09 11:30:12 +08:00
|
|
|
-DENABLE_PCREPOSIX=OFF
|
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
|
|
|
|
-DENABLE_TEST=OFF
|
2017-01-26 13:14:57 +08:00
|
|
|
-DENABLE_ICONV=OFF
|
2019-08-25 04:43:57 +08:00
|
|
|
-DPOSIX_REGEX_LIB=NONE
|
|
|
|
-DENABLE_WERROR=OFF
|
|
|
|
)
|
2017-01-06 04:22:32 +08:00
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2017-04-05 22:06:42 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
foreach(HEADER ${CURRENT_PACKAGES_DIR}/include/archive.h ${CURRENT_PACKAGES_DIR}/include/archive_entry.h)
|
|
|
|
file(READ ${HEADER} CONTENTS)
|
|
|
|
string(REPLACE "(!defined LIBARCHIVE_STATIC)" "0" CONTENTS "${CONTENTS}")
|
|
|
|
file(WRITE ${HEADER} "${CONTENTS}")
|
|
|
|
endforeach()
|
2017-01-06 04:22:32 +08:00
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libarchive)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libarchive/COPYING ${CURRENT_PACKAGES_DIR}/share/libarchive/copyright)
|