vcpkg/ports/libarchive/portfile.cmake
Alexander Neumann 0fbc2d9633
[libarchive] Update to 3.6.1 ()
* update libarchive

* version db stuff
2022-05-17 23:57:24 -07:00

73 lines
2.3 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libarchive/libarchive
REF 6c3301111caa75c76e1b2acb1afb2d71341932ef #v3.6.1
SHA512 2fd56ac20e4249807174a2ae29de1cbca55c8f8f247500845f56fd1fd9ebf48c17b8a25a93156df71df9526c0061415ec7d72a6b46bbaca776047e381a2321a7
HEAD_REF master
PATCHES
disable-warnings.patch
fix-buildsystem.patch
fix-cpu-set.patch
fix-deps.patch
pkgconfig-modules.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
bzip2 ENABLE_BZip2
bzip2 CMAKE_REQUIRE_FIND_PACKAGE_BZip2
libxml2 ENABLE_LIBXML2
libxml2 CMAKE_REQUIRE_FIND_PACKAGE_LibXml2
lz4 ENABLE_LZ4
lz4 CMAKE_REQUIRE_FIND_PACKAGE_lz4
lzma ENABLE_LZMA
lzma CMAKE_REQUIRE_FIND_PACKAGE_LibLZMA
lzo ENABLE_LZO
openssl ENABLE_OPENSSL
openssl CMAKE_REQUIRE_FIND_PACKAGE_OpenSSL
zstd ENABLE_ZSTD
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DENABLE_ZLIB=ON
-DENABLE_PCREPOSIX=OFF
-DPOSIX_REGEX_LIB=NONE
-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_ICONV=OFF
-DENABLE_LIBB2=OFF
-DENABLE_TEST=OFF
-DENABLE_WERROR=OFF
)
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
foreach(header "${CURRENT_PACKAGES_DIR}/include/archive.h" "${CURRENT_PACKAGES_DIR}/include/archive_entry.h")
vcpkg_replace_string("${header}" "(!defined LIBARCHIVE_STATIC)" "0")
endforeach()
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)