mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[libarchive] update (#36677)
* update libarchive * v db * fix post build and only install one kind of lib type * v db * deactivate mbedtls * v db
This commit is contained in:
parent
4ab4974293
commit
b69c440c1e
@ -38,15 +38,6 @@ index b2634da6..0d846877 100644
|
||||
IF(ZLIB_WINAPI)
|
||||
ADD_DEFINITIONS(-DZLIB_WINAPI)
|
||||
ELSE(ZLIB_WINAPI)
|
||||
@@ -487,8 +474,6 @@ IF(LIBLZMA_FOUND)
|
||||
SET(HAVE_LIBLZMA 1)
|
||||
SET(HAVE_LZMA_H 1)
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR})
|
||||
- SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS})
|
||||
LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES})
|
||||
# Test if a macro is needed for the library.
|
||||
@@ -1356,7 +1341,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES)
|
||||
@ -56,7 +47,7 @@ index b2634da6..0d846877 100644
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD)
|
||||
@@ -1388,11 +1373,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME)
|
||||
@@ -1388,10 +1373,10 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK)
|
||||
@ -70,7 +61,6 @@ index b2634da6..0d846877 100644
|
||||
+set(HAVE_WCSCPY 1)
|
||||
+set(HAVE_WCSLEN 1)
|
||||
+set(HAVE_WCTOMB 1)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE)
|
||||
@@ -1405,10 +1390,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH)
|
||||
@ -88,24 +78,6 @@ index b2634da6..0d846877 100644
|
||||
|
||||
CMAKE_POP_CHECK_STATE() # Restore the state of the variables
|
||||
|
||||
@@ -1449,6 +1434,9 @@ CHECK_C_SOURCE_COMPILES(
|
||||
"#include <sys/sysmacros.h>\nint main() { return major(256); }"
|
||||
MAJOR_IN_SYSMACROS)
|
||||
|
||||
+CMAKE_PUSH_CHECK_STATE()
|
||||
+SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR})
|
||||
+SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
IF(ENABLE_LZMA)
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"#include <lzma.h>\n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}"
|
||||
@@ -1456,6 +1444,7 @@ CHECK_C_SOURCE_COMPILES(
|
||||
ELSE()
|
||||
SET(HAVE_LZMA_STREAM_ENCODER_MT 0)
|
||||
ENDIF(ENABLE_LZMA)
|
||||
+CMAKE_POP_CHECK_STATE()
|
||||
|
||||
IF(HAVE_STRERROR_R)
|
||||
SET(HAVE_DECL_STRERROR_R 1)
|
||||
@@ -2018,7 +2007,7 @@ INCLUDE(CreatePkgConfigFile)
|
||||
#
|
||||
# Register installation of PDF documents.
|
||||
@ -116,42 +88,23 @@ index b2634da6..0d846877 100644
|
||||
# On Windows platform, It's better that we install PDF documents
|
||||
# on one's computer.
|
||||
diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt
|
||||
index 9389bbc9..c34a42b2 100644
|
||||
index f7fdfb68a..98d287e8c 100644
|
||||
--- a/libarchive/CMakeLists.txt
|
||||
+++ b/libarchive/CMakeLists.txt
|
||||
@@ -236,28 +236,22 @@ ELSEIF(ARCHIVE_ACL_SUNOS)
|
||||
ENDIF()
|
||||
|
||||
# Libarchive is a shared library
|
||||
-ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS})
|
||||
+ADD_LIBRARY(archive ${libarchive_SOURCES} ${include_HEADERS})
|
||||
TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .)
|
||||
TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS})
|
||||
-SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION})
|
||||
-
|
||||
-# archive_static is a static library
|
||||
-ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS})
|
||||
-TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS})
|
||||
-SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS
|
||||
+IF(BUILD_SHARED_LIBS)
|
||||
+ SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION})
|
||||
+ELSE()
|
||||
+ SET_TARGET_PROPERTIES(archive PROPERTIES COMPILE_DEFINITIONS
|
||||
LIBARCHIVE_STATIC)
|
||||
-# On Posix systems, libarchive.so and libarchive.a can co-exist.
|
||||
-IF(NOT WIN32 OR CYGWIN)
|
||||
- SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive)
|
||||
-ENDIF(NOT WIN32 OR CYGWIN)
|
||||
+ENDIF()
|
||||
|
||||
IF(ENABLE_INSTALL)
|
||||
# How to install the libraries
|
||||
- INSTALL(TARGETS archive archive_static
|
||||
+ INSTALL(TARGETS archive
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
- INSTALL_MAN(${libarchive_MANS})
|
||||
@@ -267,11 +267,12 @@ IF(ENABLE_INSTALL)
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
+ ELSE()
|
||||
+ INSTALL(TARGETS archive_static
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib)
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
- INSTALL(TARGETS archive_static
|
||||
- RUNTIME DESTINATION bin
|
||||
- LIBRARY DESTINATION lib
|
||||
- ARCHIVE DESTINATION lib)
|
||||
INSTALL_MAN(${libarchive_MANS})
|
||||
INSTALL(FILES ${include_HEADERS} DESTINATION include)
|
||||
ENDIF()
|
||||
|
||||
|
@ -27,16 +27,15 @@ index 3539519..95b44ba 100644
|
||||
# Test if a macro is needed for the library.
|
||||
TRY_MACRO_FOR_LIBRARY(
|
||||
"${BZIP2_INCLUDE_DIR}" "${BZIP2_LIBRARIES}"
|
||||
@@ -480,6 +484,9 @@ ENDIF()
|
||||
@@ -480,6 +484,8 @@ ENDIF()
|
||||
IF(LIBLZMA_FOUND)
|
||||
SET(HAVE_LIBLZMA 1)
|
||||
SET(HAVE_LZMA_H 1)
|
||||
+ LIST(APPEND ADDITIONAL_LIBS LibLZMA::LibLZMA)
|
||||
+ STRING(APPEND LIBSREQUIRED " liblzma")
|
||||
+elseif(0)
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS})
|
||||
LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES})
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR})
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
@@ -521,6 +528,7 @@ IF(LZO2_FOUND)
|
||||
SET(HAVE_LZO_LZO1X_H 1)
|
||||
INCLUDE_DIRECTORIES(${LZO2_INCLUDE_DIR})
|
||||
@ -45,10 +44,11 @@ index 3539519..95b44ba 100644
|
||||
#
|
||||
# TODO: test for static library.
|
||||
#
|
||||
@@ -548,6 +556,7 @@ IF(LIBB2_FOUND)
|
||||
@@ -548,7 +556,8 @@ IF(LIBB2_FOUND)
|
||||
SET(HAVE_BLAKE2_H 1)
|
||||
SET(ARCHIVE_BLAKE2 FALSE)
|
||||
LIST(APPEND ADDITIONAL_LIBS ${LIBB2_LIBRARY})
|
||||
INCLUDE_DIRECTORIES(${LIBB2_INCLUDE_DIR})
|
||||
+ LIST(APPEND LIBARCHIVE_LIBS_PRIVATE ${LIBB2_LIBRARY})
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${LIBB2_LIBRARY})
|
||||
@ -99,10 +99,10 @@ index 3539519..95b44ba 100644
|
||||
LIST(APPEND ADDITIONAL_LIBS ${ZSTD_LIBRARY})
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
@@ -718,6 +744,7 @@ IF(ENABLE_CNG)
|
||||
LA_CHECK_INCLUDE_FILE("Bcrypt.h" HAVE_BCRYPT_H)
|
||||
LA_CHECK_INCLUDE_FILE("bcrypt.h" HAVE_BCRYPT_H)
|
||||
IF(HAVE_BCRYPT_H)
|
||||
LIST(APPEND ADDITIONAL_LIBS "Bcrypt")
|
||||
+ LIST(APPEND LIBARCHIVE_LIBS_PRIVATE "Bcrypt")
|
||||
LIST(APPEND ADDITIONAL_LIBS "bcrypt")
|
||||
+ LIST(APPEND LIBARCHIVE_LIBS_PRIVATE "bcrypt")
|
||||
ENDIF(HAVE_BCRYPT_H)
|
||||
ELSE(ENABLE_CNG)
|
||||
UNSET(HAVE_BCRYPT_H CACHE)
|
||||
@ -130,9 +130,9 @@ index 3539519..95b44ba 100644
|
||||
- LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_CRYPTO_LIBRARY})
|
||||
+ LIST(APPEND ADDITIONAL_LIBS OpenSSL::Crypto)
|
||||
+ STRING(APPEND LIBSREQUIRED " libcrypto")
|
||||
ENDIF(OPENSSL_FOUND)
|
||||
ELSE()
|
||||
SET(OPENSSL_FOUND FALSE) # Override cached value
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
||||
LA_CHECK_INCLUDE_FILE("openssl/evp.h" HAVE_OPENSSL_EVP_H)
|
||||
@@ -807,6 +836,7 @@ IF(NOT OPENSSL_FOUND)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "md")
|
||||
FIND_LIBRARY(LIBMD_LIBRARY NAMES md)
|
||||
|
@ -2,7 +2,7 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libarchive/libarchive
|
||||
REF "v${VERSION}"
|
||||
SHA512 07339d54e8e82c0a13c69590e1653a5734fcd06ca3d01b2087a09c3d55e29e5ed4e16c5ef7ca44258f049c7b2de6245315be2c8b043f8db68515750649daafbe
|
||||
SHA512 86a4e325879cde826df068d1154ccf031bbca7a0afa3f2afc57fa41322af245ec477db9fb38fff298c9e269261de1a2ece7849ae1a3512e0ebeb8414167372c0
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
disable-warnings.patch
|
||||
@ -51,6 +51,7 @@ vcpkg_cmake_configure(
|
||||
-DENABLE_ZLIB=ON
|
||||
-DENABLE_PCREPOSIX=OFF
|
||||
-DPOSIX_REGEX_LIB=NONE
|
||||
-DENABLE_MBEDTLS=OFF
|
||||
-DENABLE_NETTLE=OFF
|
||||
-DENABLE_EXPAT=OFF
|
||||
-DENABLE_LibGCC=OFF
|
||||
@ -80,7 +81,11 @@ 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")
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
"${CURRENT_PACKAGES_DIR}/share/man"
|
||||
)
|
||||
|
||||
foreach(header "include/archive.h" "include/archive_entry.h")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/${header}" "(!defined LIBARCHIVE_STATIC)" "0")
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "libarchive",
|
||||
"version": "3.6.2",
|
||||
"version": "3.7.2",
|
||||
"description": "Library for reading and writing streaming archives",
|
||||
"homepage": "https://www.libarchive.org",
|
||||
"license": null,
|
||||
|
@ -4125,7 +4125,7 @@
|
||||
"port-version": 5
|
||||
},
|
||||
"libarchive": {
|
||||
"baseline": "3.6.2",
|
||||
"baseline": "3.7.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"libass": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "72eaf4987dd61116706a4279e7789f2a386a05cf",
|
||||
"version": "3.7.2",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "693a99004af1e09acaf76026eaf23218b00c6661",
|
||||
"version": "3.6.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user