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-09-01 08:11:35 +08:00
|
|
|
REF fc6563f5130d8a7ee1fc27c0e55baef35119f26c #v3.4.3
|
|
|
|
SHA512 54ca4f3cc3b38dcf6588b2369ce43109c4a57a04061348ab8bf046c5c13ace0c4f42c9f3961288542cb5fe12c05359d572b39fe7cec32a10151dbac78e8a3707
|
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
|
2019-12-22 03:34:24 +08:00
|
|
|
fix-cpu-set.patch
|
2020-09-01 08:11:35 +08:00
|
|
|
disable-warnings.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
|
2020-04-27 21:56:50 +08:00
|
|
|
zstd ENABLE_ZSTD
|
2020-04-18 05:13:24 +08:00
|
|
|
# The below features should be added to CONTROL
|
|
|
|
#pcre ENABLE_PCREPOSIX
|
|
|
|
#nettle ENABLE_NETTLE
|
|
|
|
#expat ENABLE_EXPAT
|
|
|
|
#libgcc ENABLE_LibGCC
|
|
|
|
#cng ENABLE_CNG
|
2020-04-27 21:56:50 +08:00
|
|
|
#tar ENABLE_TAR # Tool build option?
|
|
|
|
#cpio ENABLE_CPIO # Tool build option?
|
|
|
|
#cat ENABLE_CAT # Tool build option?
|
|
|
|
#xattr ENABLE_XATTR # Tool support option?
|
|
|
|
#acl ENABLE_ACL # Tool support option?
|
|
|
|
#iconv ENABLE_ICONV # iconv support option?
|
|
|
|
#libb2 ENABLE_LIBB2
|
2020-01-18 08:13:12 +08:00
|
|
|
)
|
2018-10-09 11:30:12 +08:00
|
|
|
|
2020-04-18 05:13:24 +08:00
|
|
|
if(FEATURES MATCHES "pcre")
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS -DPOSIX_REGEX_LIB=NONE)
|
|
|
|
endif()
|
|
|
|
|
2020-04-27 21:56:50 +08:00
|
|
|
list(APPEND FEATURE_OPTIONS -DENABLE_ZLIB=ON)
|
|
|
|
|
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
|
2017-01-26 13:14:57 +08:00
|
|
|
-DENABLE_ICONV=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
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2020-04-18 05:13:24 +08:00
|
|
|
foreach(_feature IN LISTS FEATURE_OPTIONS)
|
|
|
|
string(REPLACE "-D" "" _feature "${_feature}")
|
|
|
|
string(REPLACE "=" ";" _feature "${_feature}")
|
|
|
|
string(REPLACE "ON" "1" _feature "${_feature}")
|
|
|
|
string(REPLACE "OFF" "0" _feature "${_feature}")
|
|
|
|
list(GET _feature 0 _feature_name)
|
|
|
|
list(GET _feature 1 _feature_status)
|
|
|
|
set(${_feature_name} ${_feature_status})
|
|
|
|
endforeach()
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
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
|
|
|
|
2020-11-17 01:49:38 +08:00
|
|
|
file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
2020-05-27 12:01:32 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|