mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 17:53:03 +08:00
Merge pull request #902 from codicodi/bump-libarchive
[libarchive] update to 3.3.1
This commit is contained in:
commit
cf44582b9f
@ -1,4 +1,4 @@
|
||||
Source: libarchive
|
||||
Version: 3.2.2-2
|
||||
Version: 3.3.1
|
||||
Description: Library for reading and writing streaming archives
|
||||
Build-Depends: zlib, bzip2, libxml2, lz4, liblzma, openssl
|
||||
|
@ -1,28 +0,0 @@
|
||||
diff --git a/archive.h b/archive.h
|
||||
index ff401e9..602717e 100644
|
||||
--- a/archive.h
|
||||
+++ b/archive.h
|
||||
@@ -106,6 +106,9 @@ typedef ssize_t la_ssize_t;
|
||||
* .lib. The default here assumes you're building a DLL. Only
|
||||
* libarchive source should ever define __LIBARCHIVE_BUILD.
|
||||
*/
|
||||
+
|
||||
+#define LIBARCHIVE_STATIC
|
||||
+
|
||||
#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC)
|
||||
# ifdef __LIBARCHIVE_BUILD
|
||||
# ifdef __GNUC__
|
||||
diff --git a/archive_entry.h b/archive_entry.h
|
||||
index 71b1e87..44246b9 100644
|
||||
--- a/archive_entry.h
|
||||
+++ b/archive_entry.h
|
||||
@@ -85,6 +85,9 @@ typedef int64_t la_int64_t;
|
||||
* .lib. The default here assumes you're building a DLL. Only
|
||||
* libarchive source should ever define __LIBARCHIVE_BUILD.
|
||||
*/
|
||||
+
|
||||
+#define LIBARCHIVE_STATIC
|
||||
+
|
||||
#if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC)
|
||||
# ifdef __LIBARCHIVE_BUILD
|
||||
# ifdef __GNUC__
|
@ -1,5 +1,5 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a376fce..2d035a1 100644
|
||||
index 1ca9d8f..61c3b2a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -166,7 +166,7 @@ IF (MSVC)
|
||||
@ -11,15 +11,7 @@ index a376fce..2d035a1 100644
|
||||
# /Oi option enables built-in functions.
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Oi")
|
||||
#################################################################
|
||||
@@ -177,6 +177,7 @@ ENDIF (MSVC)
|
||||
# Enable CTest/CDash support
|
||||
include(CTest)
|
||||
|
||||
+OPTION(ENABLE_LZO2 "Enable use of LZO2 library" ON)
|
||||
OPTION(ENABLE_NETTLE "Enable use of Nettle" ON)
|
||||
OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON)
|
||||
OPTION(ENABLE_LZMA "Enable the use of the system found LZMA library if found" ON)
|
||||
@@ -357,7 +358,7 @@ IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}")
|
||||
@@ -359,7 +359,7 @@ IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}")
|
||||
# The zlib and the bzip2 Setup program have installed programs and DLLs into
|
||||
# "C:/Program Files/GnuWin32" by default.
|
||||
# This is convenience setting for Windows.
|
||||
@ -28,7 +20,7 @@ index a376fce..2d035a1 100644
|
||||
#
|
||||
# If you didn't use Setup program or installed into nonstandard path,
|
||||
# cmake cannot find out your zlib or bzip2 libraries and include files,
|
||||
@@ -397,11 +398,12 @@ IF(ZLIB_FOUND)
|
||||
@@ -399,11 +399,12 @@ IF(ZLIB_FOUND)
|
||||
#
|
||||
# Test if ZLIB_WINAPI macro is needed to use.
|
||||
#
|
||||
@ -37,7 +29,7 @@ index a376fce..2d035a1 100644
|
||||
- RUNS
|
||||
- "#include <zlib.h>\nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }"
|
||||
- ZLIB_WINAPI)
|
||||
+ SET(ZLIB_WINAPI OFF) # skip following test, it crashes with weird message box
|
||||
+ SET(ZLIB_WINAPI OFF) # skip following test, it crashes with weird message box
|
||||
+ #TRY_MACRO_FOR_LIBRARY(
|
||||
+ # "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}"
|
||||
+ # RUNS
|
||||
@ -46,40 +38,73 @@ index a376fce..2d035a1 100644
|
||||
IF(ZLIB_WINAPI)
|
||||
ADD_DEFINITIONS(-DZLIB_WINAPI)
|
||||
ELSE(ZLIB_WINAPI)
|
||||
@@ -483,6 +485,7 @@ ENDIF(LZMA_FOUND)
|
||||
#
|
||||
# Find LZO2
|
||||
#
|
||||
+IF(ENABLE_LZO2)
|
||||
IF (LZO2_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
SET(LZO2_FIND_QUIETLY TRUE)
|
||||
@@ -504,6 +507,7 @@ IF(LZO2_FOUND)
|
||||
ENDIF(LZO2_FOUND)
|
||||
MARK_AS_ADVANCED(CLEAR LZO2_INCLUDE_DIR)
|
||||
MARK_AS_ADVANCED(CLEAR LZO2_LIBRARY)
|
||||
+ENDIF()
|
||||
#
|
||||
# Find LZ4
|
||||
#
|
||||
@@ -923,7 +927,9 @@ IF(ENABLE_ICONV)
|
||||
CHECK_ICONV("libc" "")
|
||||
@@ -462,8 +463,6 @@ ENDIF()
|
||||
IF(LIBLZMA_FOUND)
|
||||
SET(HAVE_LIBLZMA 1)
|
||||
SET(HAVE_LZMA_H 1)
|
||||
- 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.
|
||||
@@ -1227,7 +1226,8 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE)
|
||||
+set(HAVE_MEMMOVE 1)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD)
|
||||
@@ -1258,11 +1258,16 @@ 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)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB)
|
||||
+set(HAVE_WCRTOMB 1)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP)
|
||||
+set(HAVE_WCSCMP 1)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY)
|
||||
+set(HAVE_WCSCPY 1)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN)
|
||||
+set(HAVE_WCSLEN 1)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB)
|
||||
+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)
|
||||
@@ -1274,10 +1279,14 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH)
|
||||
CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO)
|
||||
CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R)
|
||||
CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME)
|
||||
-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF)
|
||||
-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP)
|
||||
-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY)
|
||||
-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE)
|
||||
+#CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF)
|
||||
+set(HAVE_VPRINTF 1)
|
||||
+#CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP)
|
||||
+set(HAVE_WMEMCMP 1)
|
||||
+#CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY)
|
||||
+set(HAVE_WMEMCPY 1)
|
||||
+#CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE)
|
||||
+set(HAVE_WMEMMOVE 1)
|
||||
|
||||
# If iconv isn't in libc and we have a libiconv, try that.
|
||||
- FIND_LIBRARY(LIBICONV_PATH NAMES iconv libiconv)
|
||||
+ FIND_LIBRARY(LIBICONV_PATH1 NAMES iconv libiconv)
|
||||
+ FIND_LIBRARY(LIBCHARSET_PATH NAMES charset libcharset)
|
||||
+ SET(LIBICONV_PATH ${LIBICONV_PATH1} ${LIBCHARSET_PATH})
|
||||
IF(NOT HAVE_ICONV AND LIBICONV_PATH)
|
||||
LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBICONV_PATH})
|
||||
# Test if a macro is needed for the library.
|
||||
@@ -1307,9 +1313,13 @@ CHECK_C_SOURCE_COMPILES(
|
||||
CMAKE_POP_CHECK_STATE() # Restore the state of the variables
|
||||
|
||||
@@ -1314,9 +1323,13 @@ CHECK_C_SOURCE_COMPILES(
|
||||
"#include <sys/sysmacros.h>\nint main() { return major(256); }"
|
||||
MAJOR_IN_SYSMACROS)
|
||||
|
||||
+CMAKE_PUSH_CHECK_STATE()
|
||||
+set(CMAKE_REQUIRED_INCLUDES ${LZMA_INCLUDE_DIR})
|
||||
+set(CMAKE_REQUIRED_LIBRARIES ${LZMA_LIBRARIES})
|
||||
+SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR})
|
||||
+SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
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;}"
|
||||
HAVE_LZMA_STREAM_ENCODER_MT)
|
||||
@ -87,7 +112,7 @@ index a376fce..2d035a1 100644
|
||||
|
||||
IF(HAVE_STRERROR_R)
|
||||
SET(HAVE_DECL_STRERROR_R 1)
|
||||
@@ -1655,12 +1665,12 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
@@ -1689,12 +1702,12 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||
|
||||
# Handle generation of the libarchive.pc file for pkg-config
|
||||
@ -103,30 +128,32 @@ index a376fce..2d035a1 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 4cc9a2c..ef304c5 100644
|
||||
index 1f85c01..11b2fb1 100644
|
||||
--- a/libarchive/CMakeLists.txt
|
||||
+++ b/libarchive/CMakeLists.txt
|
||||
@@ -191,28 +191,24 @@ IF(WIN32 AND NOT CYGWIN)
|
||||
@@ -210,28 +210,22 @@ IF(WIN32 AND NOT CYGWIN)
|
||||
LIST(APPEND libarchive_SOURCES filter_fork_windows.c)
|
||||
ENDIF(WIN32 AND NOT CYGWIN)
|
||||
|
||||
# Libarchive is a shared library
|
||||
-# Libarchive is a shared library
|
||||
-ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS})
|
||||
+ADD_LIBRARY(archive ${libarchive_SOURCES} ${include_HEADERS})
|
||||
TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS})
|
||||
+IF(BUILD_SHARED_LIBS)
|
||||
SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION})
|
||||
-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
|
||||
- LIBARCHIVE_STATIC)
|
||||
+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)
|
||||
+ELSE()
|
||||
+SET_TARGET_PROPERTIES(archive PROPERTIES COMPILE_DEFINITIONS LIBARCHIVE_STATIC)
|
||||
+ENDIF()
|
||||
|
||||
IF(ENABLE_INSTALL)
|
||||
@ -138,9 +165,6 @@ index 4cc9a2c..ef304c5 100644
|
||||
ARCHIVE DESTINATION lib)
|
||||
- INSTALL_MAN(${libarchive_MANS})
|
||||
+ #INSTALL_MAN(${libarchive_MANS})
|
||||
+ IF(NOT ARCHIVE_SKIP_HEADERS)
|
||||
INSTALL(FILES ${include_HEADERS} DESTINATION include)
|
||||
+ ENDIF()
|
||||
ENDIF()
|
||||
|
||||
add_subdirectory(test)
|
||||
|
@ -1,55 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2d035a1..1e32afd 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1226,7 +1226,8 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE)
|
||||
+set(HAVE_MEMMOVE 1)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD)
|
||||
@@ -1257,11 +1258,16 @@ 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)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN)
|
||||
-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB)
|
||||
+set(HAVE_WCRTOMB 1)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP)
|
||||
+set(HAVE_WCSCMP 1)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY)
|
||||
+set(HAVE_WCSCPY 1)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN)
|
||||
+set(HAVE_WCSLEN 1)
|
||||
+#CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB)
|
||||
+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)
|
||||
@@ -1273,10 +1279,14 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH)
|
||||
CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO)
|
||||
CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R)
|
||||
CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME)
|
||||
-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF)
|
||||
-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP)
|
||||
-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY)
|
||||
-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE)
|
||||
+#CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF)
|
||||
+set(HAVE_VPRINTF 1)
|
||||
+#CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP)
|
||||
+set(HAVE_WMEMCMP 1)
|
||||
+#CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY)
|
||||
+set(HAVE_WMEMCPY 1)
|
||||
+#CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE)
|
||||
+set(HAVE_WMEMMOVE 1)
|
||||
|
||||
CMAKE_POP_CHECK_STATE() # Restore the state of the variables
|
||||
|
@ -4,25 +4,24 @@ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libarchive-3.2.2)
|
||||
set(ARCHIVE_VERSION 3.3.1)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libarchive-${ARCHIVE_VERSION})
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/libarchive/libarchive/archive/v3.2.2.zip"
|
||||
FILENAME "libarchive-3.2.2.zip"
|
||||
SHA512 74abe8a66514aa344111f08e08015d2972545f6acf0923ff1ce7267bfc6c195ca562078a11d1c49ca36155c6b782b1f7ad08b71d93cb85fa892373479b0d1182)
|
||||
URLS "https://github.com/libarchive/libarchive/archive/v${ARCHIVE_VERSION}.zip"
|
||||
FILENAME "libarchive-${ARCHIVE_VERSION}.zip"
|
||||
SHA512 a54fe3c5c24c83df244f3f2346212a6aa8d8945cf4ddc407e54c891ebbf8c98b93492e5652c9813a6d5dc654a32479e08a40bb0d2af7400a29ac027028e986f5)
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/use-memset-not-bzero.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/override-broken-feature-checks.patch)
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DENABLE_LZO2=OFF
|
||||
-DENABLE_LZO=OFF
|
||||
-DENABLE_NETTLE=OFF
|
||||
-DENABLE_EXPAT=OFF
|
||||
-DENABLE_LibGCC=OFF
|
||||
@ -34,19 +33,17 @@ vcpkg_configure_cmake(
|
||||
-DENABLE_ACL=OFF
|
||||
-DENABLE_TEST=OFF
|
||||
-DENABLE_ICONV=OFF
|
||||
-DPOSIX_REGEX_LIB=NONE
|
||||
OPTIONS_DEBUG
|
||||
-DARCHIVE_SKIP_HEADERS=ON)
|
||||
-DPOSIX_REGEX_LIB=NONE)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/auto-define-libarchive-static.patch)
|
||||
endif()
|
||||
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()
|
||||
|
||||
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)
|
||||
|
@ -1,26 +0,0 @@
|
||||
diff --git a/libarchive/archive_write_add_filter_xz.c b/libarchive/archive_write_add_filter_xz.c
|
||||
index 46a6c38..b0f25a6 100644
|
||||
--- a/libarchive/archive_write_add_filter_xz.c
|
||||
+++ b/libarchive/archive_write_add_filter_xz.c
|
||||
@@ -233,7 +233,7 @@ archive_compressor_xz_init_stream(struct archive_write_filter *f,
|
||||
if (f->code == ARCHIVE_FILTER_XZ) {
|
||||
#ifdef HAVE_LZMA_STREAM_ENCODER_MT
|
||||
if (data->threads != 1) {
|
||||
- bzero(&mt_options, sizeof(mt_options));
|
||||
+ memset(&mt_options, 0, sizeof(mt_options));
|
||||
mt_options.threads = data->threads;
|
||||
mt_options.timeout = 300;
|
||||
mt_options.filters = data->lzmafilters;
|
||||
diff --git a/libarchive/archive_write_set_format_xar.c b/libarchive/archive_write_set_format_xar.c
|
||||
index a2dbc03..15a013c 100644
|
||||
--- a/libarchive/archive_write_set_format_xar.c
|
||||
+++ b/libarchive/archive_write_set_format_xar.c
|
||||
@@ -2913,7 +2913,7 @@ compression_init_encoder_xz(struct archive *a,
|
||||
*strm = lzma_init_data;
|
||||
#ifdef HAVE_LZMA_STREAM_ENCODER_MT
|
||||
if (threads > 1) {
|
||||
- bzero(&mt_options, sizeof(mt_options));
|
||||
+ memset(&mt_options, 0, sizeof(mt_options));
|
||||
mt_options.threads = threads;
|
||||
mt_options.timeout = 300;
|
||||
mt_options.filters = lzmafilters;
|
Loading…
Reference in New Issue
Block a user