svn commit: r238825 - in vendor/libarchive/dist: . build
build/cmake build/utils cpio cpio/test doc libarchive
libarchive/test libarchive_fe tar tar/test
Martin Matuska
mm at FreeBSD.org
Fri Jul 27 08:24:13 UTC 2012
Author: mm
Date: Fri Jul 27 08:24:12 2012
New Revision: 238825
URL: http://svn.freebsd.org/changeset/base/238825
Log:
Update libarchive's vendor dist to version 3.0.4 from release branch.
Git branch: release
Git commit: 8076b31490c90aaf0edccecf760004c30bd95edc
Obtained from: https://github.com/libarchive/libarchive.git
Added:
vendor/libarchive/dist/libarchive/archive_getdate.c
vendor/libarchive/dist/libarchive/archive_match.c
vendor/libarchive/dist/libarchive/archive_pathmatch.c
vendor/libarchive/dist/libarchive/archive_pathmatch.h
vendor/libarchive/dist/libarchive/archive_write_add_filter.c
vendor/libarchive/dist/libarchive/test/test_archive_getdate.c
vendor/libarchive/dist/libarchive/test/test_archive_match_owner.c
vendor/libarchive/dist/libarchive/test/test_archive_match_path.c
vendor/libarchive/dist/libarchive/test/test_archive_match_time.c
vendor/libarchive/dist/libarchive/test/test_archive_pathmatch.c
vendor/libarchive/dist/tar/test/test_format_newc.c
vendor/libarchive/dist/tar/test/test_option_nodump.c
Deleted:
vendor/libarchive/dist/cpio/test/test_pathmatch.c
vendor/libarchive/dist/libarchive_fe/matching.c
vendor/libarchive/dist/libarchive_fe/matching.h
vendor/libarchive/dist/libarchive_fe/pathmatch.c
vendor/libarchive/dist/libarchive_fe/pathmatch.h
vendor/libarchive/dist/tar/getdate.c
vendor/libarchive/dist/tar/test/test_getdate.c
vendor/libarchive/dist/tar/tree.c
vendor/libarchive/dist/tar/tree.h
Modified:
vendor/libarchive/dist/CMakeLists.txt
vendor/libarchive/dist/Makefile.am
vendor/libarchive/dist/NEWS
vendor/libarchive/dist/README
vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake
vendor/libarchive/dist/build/cmake/config.h.in
vendor/libarchive/dist/build/utils/gen_archive_string_composition_h.sh
vendor/libarchive/dist/build/version
vendor/libarchive/dist/configure.ac
vendor/libarchive/dist/cpio/CMakeLists.txt
vendor/libarchive/dist/cpio/bsdcpio.1
vendor/libarchive/dist/cpio/cmdline.c
vendor/libarchive/dist/cpio/cpio.c
vendor/libarchive/dist/cpio/cpio.h
vendor/libarchive/dist/cpio/cpio_windows.c
vendor/libarchive/dist/cpio/test/CMakeLists.txt
vendor/libarchive/dist/cpio/test/main.c
vendor/libarchive/dist/cpio/test/test.h
vendor/libarchive/dist/doc/mdoc2man.awk
vendor/libarchive/dist/doc/mdoc2wiki.awk
vendor/libarchive/dist/doc/update.sh
vendor/libarchive/dist/libarchive/CMakeLists.txt
vendor/libarchive/dist/libarchive/archive.h
vendor/libarchive/dist/libarchive/archive_acl.c
vendor/libarchive/dist/libarchive/archive_check_magic.c
vendor/libarchive/dist/libarchive/archive_endian.h
vendor/libarchive/dist/libarchive/archive_entry.3
vendor/libarchive/dist/libarchive/archive_entry.c
vendor/libarchive/dist/libarchive/archive_entry.h
vendor/libarchive/dist/libarchive/archive_entry_acl.3
vendor/libarchive/dist/libarchive/archive_entry_copy_bhfi.c
vendor/libarchive/dist/libarchive/archive_entry_link_resolver.c
vendor/libarchive/dist/libarchive/archive_entry_linkify.3
vendor/libarchive/dist/libarchive/archive_entry_paths.3
vendor/libarchive/dist/libarchive/archive_entry_perms.3
vendor/libarchive/dist/libarchive/archive_entry_stat.3
vendor/libarchive/dist/libarchive/archive_entry_stat.c
vendor/libarchive/dist/libarchive/archive_entry_time.3
vendor/libarchive/dist/libarchive/archive_ppmd7.c
vendor/libarchive/dist/libarchive/archive_private.h
vendor/libarchive/dist/libarchive/archive_read.3
vendor/libarchive/dist/libarchive/archive_read.c
vendor/libarchive/dist/libarchive/archive_read_data.3
vendor/libarchive/dist/libarchive/archive_read_disk.3
vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c
vendor/libarchive/dist/libarchive/archive_read_disk_posix.c
vendor/libarchive/dist/libarchive/archive_read_disk_private.h
vendor/libarchive/dist/libarchive/archive_read_disk_windows.c
vendor/libarchive/dist/libarchive/archive_read_extract.3
vendor/libarchive/dist/libarchive/archive_read_filter.3
vendor/libarchive/dist/libarchive/archive_read_format.3
vendor/libarchive/dist/libarchive/archive_read_free.3
vendor/libarchive/dist/libarchive/archive_read_header.3
vendor/libarchive/dist/libarchive/archive_read_new.3
vendor/libarchive/dist/libarchive/archive_read_open.3
vendor/libarchive/dist/libarchive/archive_read_open_fd.c
vendor/libarchive/dist/libarchive/archive_read_open_filename.c
vendor/libarchive/dist/libarchive/archive_read_private.h
vendor/libarchive/dist/libarchive/archive_read_set_options.3
vendor/libarchive/dist/libarchive/archive_read_support_filter_rpm.c
vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c
vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c
vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c
vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c
vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c
vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c
vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c
vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c
vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c
vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c
vendor/libarchive/dist/libarchive/archive_string.c
vendor/libarchive/dist/libarchive/archive_string.h
vendor/libarchive/dist/libarchive/archive_string_composition.h
vendor/libarchive/dist/libarchive/archive_string_sprintf.c
vendor/libarchive/dist/libarchive/archive_util.3
vendor/libarchive/dist/libarchive/archive_util.c
vendor/libarchive/dist/libarchive/archive_windows.c
vendor/libarchive/dist/libarchive/archive_windows.h
vendor/libarchive/dist/libarchive/archive_write.3
vendor/libarchive/dist/libarchive/archive_write.c
vendor/libarchive/dist/libarchive/archive_write_add_filter_bzip2.c
vendor/libarchive/dist/libarchive/archive_write_add_filter_compress.c
vendor/libarchive/dist/libarchive/archive_write_add_filter_gzip.c
vendor/libarchive/dist/libarchive/archive_write_add_filter_program.c
vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c
vendor/libarchive/dist/libarchive/archive_write_blocksize.3
vendor/libarchive/dist/libarchive/archive_write_data.3
vendor/libarchive/dist/libarchive/archive_write_disk.3
vendor/libarchive/dist/libarchive/archive_write_disk_posix.c
vendor/libarchive/dist/libarchive/archive_write_disk_set_standard_lookup.c
vendor/libarchive/dist/libarchive/archive_write_disk_windows.c
vendor/libarchive/dist/libarchive/archive_write_filter.3
vendor/libarchive/dist/libarchive/archive_write_finish_entry.3
vendor/libarchive/dist/libarchive/archive_write_format.3
vendor/libarchive/dist/libarchive/archive_write_free.3
vendor/libarchive/dist/libarchive/archive_write_header.3
vendor/libarchive/dist/libarchive/archive_write_new.3
vendor/libarchive/dist/libarchive/archive_write_open.3
vendor/libarchive/dist/libarchive/archive_write_open_filename.c
vendor/libarchive/dist/libarchive/archive_write_private.h
vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c
vendor/libarchive/dist/libarchive/archive_write_set_format_ar.c
vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c
vendor/libarchive/dist/libarchive/archive_write_set_format_cpio_newc.c
vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c
vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c
vendor/libarchive/dist/libarchive/archive_write_set_format_mtree.c
vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c
vendor/libarchive/dist/libarchive/archive_write_set_format_ustar.c
vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c
vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c
vendor/libarchive/dist/libarchive/archive_write_set_options.3
vendor/libarchive/dist/libarchive/cpio.5
vendor/libarchive/dist/libarchive/libarchive-formats.5
vendor/libarchive/dist/libarchive/libarchive.3
vendor/libarchive/dist/libarchive/libarchive_changes.3
vendor/libarchive/dist/libarchive/libarchive_internals.3
vendor/libarchive/dist/libarchive/mtree.5
vendor/libarchive/dist/libarchive/tar.5
vendor/libarchive/dist/libarchive/test/CMakeLists.txt
vendor/libarchive/dist/libarchive/test/main.c
vendor/libarchive/dist/libarchive/test/read_open_memory.c
vendor/libarchive/dist/libarchive/test/test.h
vendor/libarchive/dist/libarchive/test/test_archive_string_conversion.c
vendor/libarchive/dist/libarchive/test/test_compat_zip.c
vendor/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c
vendor/libarchive/dist/libarchive/test/test_read_format_7zip.c
vendor/libarchive/dist/libarchive/test/test_read_format_cab.c
vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c
vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c
vendor/libarchive/dist/libarchive/test/test_read_format_rar.c
vendor/libarchive/dist/libarchive/test/test_read_format_rar_unicode.rar.uu
vendor/libarchive/dist/libarchive/test/test_read_format_tar_filename.c
vendor/libarchive/dist/libarchive/test/test_read_pax_truncated.c
vendor/libarchive/dist/libarchive/test/test_read_position.c
vendor/libarchive/dist/libarchive/test/test_sparse_basic.c
vendor/libarchive/dist/libarchive/test/test_write_format_zip.c
vendor/libarchive/dist/libarchive_fe/err.c
vendor/libarchive/dist/libarchive_fe/err.h
vendor/libarchive/dist/tar/CMakeLists.txt
vendor/libarchive/dist/tar/bsdtar.1
vendor/libarchive/dist/tar/bsdtar.c
vendor/libarchive/dist/tar/bsdtar.h
vendor/libarchive/dist/tar/bsdtar_windows.c
vendor/libarchive/dist/tar/read.c
vendor/libarchive/dist/tar/test/CMakeLists.txt
vendor/libarchive/dist/tar/test/main.c
vendor/libarchive/dist/tar/test/test.h
vendor/libarchive/dist/tar/write.c
Modified: vendor/libarchive/dist/CMakeLists.txt
==============================================================================
--- vendor/libarchive/dist/CMakeLists.txt Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/CMakeLists.txt Fri Jul 27 08:24:12 2012 (r238825)
@@ -1,13 +1,36 @@
#
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6 FATAL_ERROR)
#
PROJECT(libarchive C)
#
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake")
if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin)
endif()
-SET(CMAKE_BUILD_TYPE "Release")
+#
+# Set the Build type for make based generators.
+# You can choose following types:
+# Debug : Debug build
+# Release : Release build
+# RelWithDebInfo : Release build with Debug Info
+# MinSizeRel : Release Min Size build
+IF(NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
+ENDIF(NOT CMAKE_BUILD_TYPE)
+# Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the
+# value type is "UNINITIALIZED".
+GET_PROPERTY(cached_type CACHE CMAKE_BUILD_TYPE PROPERTY TYPE)
+IF("${cached_type}" STREQUAL "UNINITIALIZED")
+ SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build Type" FORCE)
+ENDIF("${cached_type}" STREQUAL "UNINITIALIZED")
+# Check the Build Type.
+IF(NOT "${CMAKE_BUILD_TYPE}"
+ MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$")
+ MESSAGE(FATAL_ERROR
+ "Unknown keyword for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n"
+ "Acceptable keywords: Debug,Release,RelWithDebInfo,MinSizeRel")
+ENDIF(NOT "${CMAKE_BUILD_TYPE}"
+ MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$")
# On MacOS, prefer MacPorts libraries to system libraries.
# I haven't come up with a compelling argument for this to be conditional.
@@ -47,13 +70,73 @@ math(EXPR INTERFACE_VERSION "12 + ${_mi
# ?? Should there be more here ??
SET(SOVERSION "${INTERFACE_VERSION}")
+# Enalbe CMAKE_PUSH_CHECK_STATE() and CMAKE_POP_CHECK_STATE() macros
+# saving and restoring the state of the variables.
+INCLUDE(CMakePushCheckState)
+
+# Initialize the state of the variables. This initialization is not
+# necessary but this shows you what value the variables initially have.
+SET(CMAKE_REQUIRED_DEFINITIONS)
+SET(CMAKE_REQUIRED_INCLUDES)
+SET(CMAKE_REQUIRED_LIBRARIES)
+SET(CMAKE_REQUIRED_FLAGS)
+
# Especially for early development, we want to be a little
# aggressive about diagnosing build problems; this can get
# relaxed somewhat in final shipping versions.
IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
- ADD_DEFINITIONS(-Wall)
- SET(CMAKE_REQUIRED_FLAGS "-Wall")
+ SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security")
+ #################################################################
+ # Set compile flags for all build types.
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat -Wformat-security")
+ #################################################################
+ # Set compile flags for debug build.
+ # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug"
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror -Wextra -Wunused")
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow")
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wmissing-prototypes")
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wcast-qual")
ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+IF (MSVC)
+ #################################################################
+ # Set compile flags for debug build.
+ # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug"
+ # Enable level 4 C4061: The enumerate has no associated handler in a switch
+ # statement.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4061")
+ # Enable level 4 C4254: A larger bit field was assigned to a smaller bit
+ # field.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4254")
+ # Enable level 4 C4295: An array was initialized but the last character in
+ # the array is not a null; accessing the array may
+ # produce unexpected results.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4295")
+ # Enable level 4 C4296: An unsigned variable was used in a comparison
+ # operation with zero.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4296")
+ # Enable level 4 C4389: An operation involved signed and unsigned variables.
+ # This could result in a loss of data.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4389")
+ # Enable level 4 C4505: The given function is local and not referenced in
+ # the body of the module; therefore, the function is
+ # dead code.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4505")
+ # Enable level 4 C4514: The optimizer removed an inline function that is not
+ # called.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4514")
+ # Enable level 4 C4702: Unreachable code.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4702")
+ # Enable level 4 C4706: The test value in a conditional expression was the
+ # result of an assignment.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4706")
+ # /WX option is the same as gcc's -Werror option.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX")
+ # /Oi option enables built-in functions.
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Oi")
+ #################################################################
+ # Set compile flags for release build.
+ SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi")
+ENDIF (MSVC)
# Enable CTest/CDash support
include(CTest)
@@ -74,10 +157,18 @@ IF(ENABLE_TEST)
ENDIF(ENABLE_TEST)
IF(WIN32)
- SET(_WIN32_WINNT 0x0500 CACHE INTERNAL "Setting _WIN32_WINNT to 0x0500 for Windows 2000 APIs")
- SET(WINVER 0x0500 CACHE INTERNAL "Setting WINVER to 0x0500 for Windows 2000 APIs")
+ IF(MSVC60)
+ SET(WINVER 0x0400)
+ ELSE()
+ SET(WINVER 0x0500)
+ ENDIF()
+ SET(_WIN32_WINNT ${WINVER})
ENDIF(WIN32)
+IF("${CMAKE_C_PLATFORM_ID}" MATCHES "^(HP-UX)$")
+ ADD_DEFINITIONS(-D_XOPEN_SOURCE=500) # Ask wchar.h for mbstate_t
+ENDIF()
+
#
INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckCSourceRuns)
@@ -125,7 +216,38 @@ MACRO (INSTALL_MAN __mans)
INSTALL(FILES ${_man} DESTINATION "share/man/man${_mansect}")
ENDFOREACH (_man)
ENDMACRO (INSTALL_MAN __mans)
-
+#
+# Find out what macro is needed to use libraries on Windows.
+#
+MACRO (TRY_MACRO_FOR_LIBRARY INCLUDES LIBRARIES
+ TRY_TYPE SAMPLE_SOURCE MACRO_LIST)
+ IF(WIN32 AND NOT CYGWIN)
+ CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
+ SET(CMAKE_REQUIRED_INCLUDES ${INCLUDES})
+ SET(CMAKE_REQUIRED_LIBRARIES ${LIBRARIES})
+ FOREACH(VAR ${MACRO_LIST})
+ # Clear ${VAR} from CACHE If the libraries which ${VAR} was
+ # checked with are changed.
+ SET(VAR_WITH_LIB "${VAR}_WITH_LIB")
+ GET_PROPERTY(PREV_VAR_WITH_LIB VARIABLE PROPERTY ${VAR_WITH_LIB})
+ IF(NOT "${PREV_VAR_WITH_LIB}" STREQUAL "${LIBRARIES}")
+ UNSET(${VAR} CACHE)
+ ENDIF(NOT "${PREV_VAR_WITH_LIB}" STREQUAL "${LIBRARIES}")
+ # Check if the library can be used with the macro.
+ IF("${TRY_TYPE}" MATCHES "COMPILES")
+ CHECK_C_SOURCE_COMPILES("${SAMPLE_SOURCE}" ${VAR})
+ ELSEIF("${TRY_TYPE}" MATCHES "RUNS")
+ CHECK_C_SOURCE_RUNS("${SAMPLE_SOURCE}" ${VAR})
+ ELSE("${TRY_TYPE}" MATCHES "COMPILES")
+ MESSAGE(FATAL_ERROR "UNKNOWN KEYWORD \"${TRY_TYPE}\" FOR TRY_TYPE")
+ ENDIF("${TRY_TYPE}" MATCHES "COMPILES")
+ # Save the libraries which ${VAR} is checked with.
+ SET(${VAR_WITH_LIB} "${LIBRARIES}" CACHE INTERNAL
+ "Macro ${VAR} is checked with")
+ ENDFOREACH(VAR)
+ CMAKE_POP_CHECK_STATE() # Restore the state of the variables
+ ENDIF(WIN32 AND NOT CYGWIN)
+ENDMACRO (TRY_MACRO_FOR_LIBRARY)
#
# Check compress/decompress libraries
#
@@ -172,11 +294,27 @@ IF(ZLIB_FOUND)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES})
IF(WIN32 AND NOT CYGWIN)
- SET(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
- SET(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES})
- CHECK_C_SOURCE_Runs(
- "#ifndef ZLIB_WINAPI\n#define ZLIB_WINAPI\n#endif\n#include <zlib.h>\nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }"
+ #
+ # Test if ZLIB_WINAPI macro is needed to use.
+ #
+ TRY_MACRO_FOR_LIBRARY(
+ "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}"
+ RUNS
+ "#include <zlib.h>\nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }"
ZLIB_WINAPI)
+ IF(ZLIB_WINAPI)
+ ADD_DEFINITIONS(-DZLIB_WINAPI)
+ ELSE(ZLIB_WINAPI)
+ # Test if a macro is needed for the library.
+ TRY_MACRO_FOR_LIBRARY(
+ "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}"
+ COMPILES
+ "#include <zlib.h>\nint main() {return zlibVersion()?1:0; }"
+ "ZLIB_DLL;WITHOUT_ZLIB_DLL")
+ IF(ZLIB_DLL)
+ ADD_DEFINITIONS(-DZLIB_DLL)
+ ENDIF(ZLIB_DLL)
+ ENDIF(ZLIB_WINAPI)
ENDIF(WIN32 AND NOT CYGWIN)
ENDIF(ZLIB_FOUND)
MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR)
@@ -190,9 +328,20 @@ IF(BZIP2_FOUND)
SET(HAVE_BZLIB_H 1)
INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${BZIP2_LIBRARIES})
+ # Test if a macro is needed for the library.
+ TRY_MACRO_FOR_LIBRARY(
+ "${BZIP2_INCLUDE_DIR}" "${BZIP2_LIBRARIES}"
+ COMPILES
+ "#include <bzlib.h>\nint main() {return BZ2_bzlibVersion()?1:0; }"
+ "USE_BZIP2_DLL;USE_BZIP2_STATIC")
+ IF(USE_BZIP2_DLL)
+ ADD_DEFINITIONS(-DUSE_BZIP2_DLL)
+ ELSEIF(USE_BZIP2_STATIC)
+ ADD_DEFINITIONS(-DUSE_BZIP2_STATIC)
+ ENDIF(USE_BZIP2_DLL)
ENDIF(BZIP2_FOUND)
MARK_AS_ADVANCED(CLEAR BZIP2_INCLUDE_DIR)
-MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARY)
+MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARIES)
#
# Find LZMA
#
@@ -202,6 +351,15 @@ IF(LZMA_FOUND)
SET(HAVE_LZMA_H 1)
INCLUDE_DIRECTORIES(${LZMA_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${LZMA_LIBRARIES})
+ # Test if a macro is needed for the library.
+ TRY_MACRO_FOR_LIBRARY(
+ "${LZMA_INCLUDE_DIR}" "${LZMA_LIBRARIES}"
+ COMPILES
+ "#include <lzma.h>\nint main() {return (int)lzma_version_number(); }"
+ "WITHOUT_LZMA_API_STATIC;LZMA_API_STATIC")
+ IF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC)
+ ADD_DEFINITIONS(-DLZMA_API_STATIC)
+ ENDIF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC)
ELSEIF(LZMADEC_FOUND)
SET(HAVE_LIBLZMADEC 1)
SET(HAVE_LZMADEC_H 1)
@@ -244,6 +402,7 @@ LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_
LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H)
LA_CHECK_INCLUDE_FILE("langinfo.h" HAVE_LANGINFO_H)
LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H)
+LA_CHECK_INCLUDE_FILE("linux/types.h" HAVE_LINUX_TYPES_H)
LA_CHECK_INCLUDE_FILE("linux/fiemap.h" HAVE_LINUX_FIEMAP_H)
LA_CHECK_INCLUDE_FILE("linux/fs.h" HAVE_LINUX_FS_H)
LA_CHECK_INCLUDE_FILE("linux/magic.h" HAVE_LINUX_MAGIC_H)
@@ -307,9 +466,11 @@ CHECK_C_SOURCE_COMPILES(
IF(ENABLE_NETTLE)
CHECK_LIBRARY_EXISTS(nettle "nettle_sha1_digest" "" NETTLE_FOUND)
IF(NETTLE_FOUND)
+ CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
SET(CMAKE_REQUIRED_LIBRARIES "nettle")
FIND_LIBRARY(NETTLE_LIBRARY NAMES nettle)
LIST(APPEND ADDITIONAL_LIBS ${NETTLE_LIBRARY})
+ CMAKE_POP_CHECK_STATE() # Restore the state of the variables
ELSE(NETTLE_FOUND)
SET(ENABLE_NETTLE OFF)
ENDIF(NETTLE_FOUND)
@@ -328,9 +489,11 @@ ENDIF()
# FreeBSD libmd
CHECK_LIBRARY_EXISTS(md "MD5Init" "" LIBMD_FOUND)
IF(LIBMD_FOUND)
+ CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
SET(CMAKE_REQUIRED_LIBRARIES "md")
FIND_LIBRARY(LIBMD_LIBRARY NAMES md)
LIST(APPEND ADDITIONAL_LIBS ${LIBMD_LIBRARY})
+ CMAKE_POP_CHECK_STATE() # Restore the state of the variables
ENDIF(LIBMD_FOUND)
#
@@ -386,10 +549,10 @@ ${ARCHIVE_CRYPTO_C}
int
main(int argc, char **argv)
{
- archive_${lower_crypto}_ctx ctx;
- archive_${lower_crypto}_init(&ctx);
- archive_${lower_crypto}_update(&ctx, *argv, argc);
- archive_${lower_crypto}_final(&ctx, NULL);
+ archive_${lower_algorithm}_ctx ctx;
+ archive_${lower_algorithm}_init(&ctx);
+ archive_${lower_algorithm}_update(&ctx, *argv, argc);
+ archive_${lower_algorithm}_final(&ctx, NULL);
return 0;
}
")
@@ -511,6 +674,20 @@ ENDMACRO(CHECK_CRYPTO_WIN CRYPTO_LIST)
#
MACRO(CHECK_ICONV LIB TRY_ICONV_CONST)
IF(NOT HAVE_ICONV)
+ CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
+ IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+ #
+ # During checking iconv proto type, we should use -Werror to avoid the
+ # success of iconv detection with a warnig which success is a miss
+ # detection. So this needs for all build mode(even it's a release mode).
+ #
+ SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
+ ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+ IF (MSVC)
+ # NOTE: /WX option is the same as gcc's -Werror option.
+ SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} /WX")
+ ENDIF (MSVC)
+ #
CHECK_C_SOURCE_COMPILES(
"#include <stdlib.h>
#include <iconv.h>
@@ -526,10 +703,12 @@ MACRO(CHECK_ICONV LIB TRY_ICONV_CONST)
SET(HAVE_ICONV true)
SET(ICONV_CONST ${TRY_ICONV_CONST})
ENDIF(HAVE_ICONV_${LIB}_${TRY_ICONV_CONST})
+ CMAKE_POP_CHECK_STATE() # Restore the state of the variables
ENDIF(NOT HAVE_ICONV)
ENDMACRO(CHECK_ICONV TRY_ICONV_CONST)
IF(ENABLE_ICONV)
+ CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
IF(ICONV_INCLUDE_DIR)
#SET(INCLUDES ${INCLUDES} "iconv.h")
@@ -540,9 +719,30 @@ IF(ENABLE_ICONV)
CHECK_ICONV("libc" "")
# If iconv isn't in libc and we have a libiconv, try that.
- FIND_LIBRARY(LIBICONV_PATH iconv)
+ FIND_LIBRARY(LIBICONV_PATH NAMES iconv libiconv)
IF(NOT HAVE_ICONV AND LIBICONV_PATH)
LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBICONV_PATH})
+ # Test if a macro is needed for the library.
+ TRY_MACRO_FOR_LIBRARY(
+ "${ICONV_INCLUDE_DIR}" "${LIBICONV_PATH}"
+ COMPILES
+ "#include <iconv.h>\nint main() {return iconv_close((iconv_t)0);}"
+ "WITHOUT_LIBICONV_STATIC;LIBICONV_STATIC")
+ IF(NOT WITHOUT_LIBICONV_STATIC AND LIBICONV_STATIC)
+ ADD_DEFINITIONS(-DLIBICONV_STATIC)
+ ENDIF(NOT WITHOUT_LIBICONV_STATIC AND LIBICONV_STATIC)
+ #
+ # Set up CMAKE_REQUIRED_* for CHECK_ICONV
+ #
+ SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
+ SET(CMAKE_REQUIRED_LIBRARIES ${LIBICONV_PATH})
+ IF(LIBICONV_STATIC)
+ # LIBICONV_STATIC is necessary for the success of CHECK_ICONV
+ # on Windows.
+ SET(CMAKE_REQUIRED_DEFINITIONS "-DLIBICONV_STATIC")
+ ELSE(LIBICONV_STATIC)
+ SET(CMAKE_REQUIRED_DEFINITIONS)
+ ENDIF(LIBICONV_STATIC)
CHECK_ICONV("libiconv" "const")
CHECK_ICONV("libiconv" "")
IF (HAVE_ICONV)
@@ -554,19 +754,36 @@ IF(ENABLE_ICONV)
# Find locale_charset() for libiconv.
#
IF(LIBICONV_PATH)
+ SET(CMAKE_REQUIRED_DEFINITIONS)
+ SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
+ SET(CMAKE_REQUIRED_LIBRARIES)
CHECK_INCLUDE_FILES("localcharset.h" HAVE_LOCALCHARSET_H)
- CHECK_FUNCTION_EXISTS_GLIBC(locale_charset HAVE_LOCALE_CHARSET)
- IF(NOT HAVE_LOCALE_CHARSET)
- FIND_LIBRARY(LIBCHARSET_PATH charset)
- IF(LIBCHARSET_PATH)
- SET(CMAKE_REQUIRED_LIBRARIES ${LIBCHARSET_PATH})
+ FIND_LIBRARY(LIBCHARSET_PATH NAMES charset libcharset)
+ IF(LIBCHARSET_PATH)
+ SET(CMAKE_REQUIRED_LIBRARIES ${LIBCHARSET_PATH})
+ IF(WIN32 AND NOT CYGWIN)
+ # Test if a macro is needed for the library.
+ TRY_MACRO_FOR_LIBRARY(
+ "${ICONV_INCLUDE_DIR}" "${LIBCHARSET_PATH}"
+ COMPILES
+ "#include <localcharset.h>\nint main() {return locale_charset()?1:0;}"
+ "WITHOUT_LIBCHARSET_STATIC;LIBCHARSET_STATIC")
+ IF(NOT WITHOUT_LIBCHARSET_STATIC AND LIBCHARSET_STATIC)
+ ADD_DEFINITIONS(-DLIBCHARSET_STATIC)
+ ENDIF(NOT WITHOUT_LIBCHARSET_STATIC AND LIBCHARSET_STATIC)
+ IF(WITHOUT_LIBCHARSET_STATIC OR LIBCHARSET_STATIC)
+ SET(HAVE_LOCALE_CHARSET ON CACHE INTERNAL
+ "Have function locale_charset")
+ ENDIF(WITHOUT_LIBCHARSET_STATIC OR LIBCHARSET_STATIC)
+ ELSE(WIN32 AND NOT CYGWIN)
CHECK_FUNCTION_EXISTS_GLIBC(locale_charset HAVE_LOCALE_CHARSET)
- IF(HAVE_LOCALE_CHARSET)
- LIST(APPEND ADDITIONAL_LIBS ${LIBCHARSET_PATH})
- ENDIF(HAVE_LOCALE_CHARSET)
- ENDIF(LIBCHARSET_PATH)
- ENDIF(NOT HAVE_LOCALE_CHARSET)
+ ENDIF(WIN32 AND NOT CYGWIN)
+ IF(HAVE_LOCALE_CHARSET)
+ LIST(APPEND ADDITIONAL_LIBS ${LIBCHARSET_PATH})
+ ENDIF(HAVE_LOCALE_CHARSET)
+ ENDIF(LIBCHARSET_PATH)
ENDIF(LIBICONV_PATH)
+ CMAKE_POP_CHECK_STATE() # Restore the state of the variables
ELSE(ENABLE_ICONV)
# Make sure ICONV variables are not in CACHE after ENABLE_ICONV disabled
# (once enabled).
@@ -578,6 +795,10 @@ ELSE(ENABLE_ICONV)
UNSET(HAVE_ICONV_libiconv_const CACHE)
UNSET(ICONV_INCLUDE_DIR CACHE)
UNSET(LIBICONV_PATH CACHE)
+ UNSET(LIBICONV_DLL CACHE)
+ UNSET(LIBICONV_STATIC CACHE)
+ UNSET(LIBCHARSET_DLL CACHE)
+ UNSET(LIBCHARSET_STATIC CACHE)
ENDIF(ENABLE_ICONV)
#
@@ -585,6 +806,7 @@ ENDIF(ENABLE_ICONV)
#
FIND_PACKAGE(LibXml2)
IF(LIBXML2_FOUND)
+ CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${LIBXML2_LIBRARIES})
SET(HAVE_LIBXML2 1)
@@ -592,20 +814,33 @@ IF(LIBXML2_FOUND)
SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR})
CHECK_INCLUDE_FILES("libxml/xmlreader.h" HAVE_LIBXML_XMLREADER_H)
CHECK_INCLUDE_FILES("libxml/xmlwriter.h" HAVE_LIBXML_XMLWRITER_H)
- SET(CMAKE_REQUIRED_INCLUDES "")
+ # Test if a macro is needed for the library.
+ TRY_MACRO_FOR_LIBRARY(
+ "${ICONV_INCLUDE_DIR};${LIBXML2_INCLUDE_DIR}"
+ "ws2_32.lib;${ZLIB_LIBRARIES};${LIBICONV_PATH};${LIBXML2_LIBRARIES}"
+ COMPILES
+ "#include <stddef.h>\n#include <libxml/xmlreader.h>\nint main() {return xmlTextReaderRead((xmlTextReaderPtr)(void *)0);}"
+ "WITHOUT_LIBXML_STATIC;LIBXML_STATIC")
+ IF(NOT WITHOUT_LIBXML_STATIC AND LIBXML_STATIC)
+ ADD_DEFINITIONS(-DLIBXML_STATIC)
+ ENDIF(NOT WITHOUT_LIBXML_STATIC AND LIBXML_STATIC)
+ CMAKE_POP_CHECK_STATE() # Restore the state of the variables
ELSE(LIBXML2_FOUND)
#
# Find Expat
#
FIND_PACKAGE(EXPAT)
IF(EXPAT_FOUND)
+ CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${EXPAT_LIBRARIES})
SET(HAVE_LIBEXPAT 1)
LA_CHECK_INCLUDE_FILE("expat.h" HAVE_EXPAT_H)
+ CMAKE_POP_CHECK_STATE() # Restore the state of the variables
ENDIF(EXPAT_FOUND)
ENDIF(LIBXML2_FOUND)
-
+MARK_AS_ADVANCED(CLEAR LIBXML2_INCLUDE_DIR)
+MARK_AS_ADVANCED(CLEAR LIBXML2_LIBRARIES)
#
# Find Libregex
#
@@ -616,6 +851,7 @@ IF(REGEX_INCLUDE_DIR)
# If libc does not provide regex, find libregex.
#
IF(NOT HAVE_REGCOMP_LIBC)
+ CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
FIND_LIBRARY(REGEX_LIBRARY regex)
IF(REGEX_LIBRARY)
SET(CMAKE_REQUIRED_LIBRARIES ${REGEX_LIBRARY})
@@ -632,21 +868,33 @@ IF(REGEX_INCLUDE_DIR)
SET(CMAKE_REQUIRED_INCLUDES ${REGEX_INCLUDE_DIR})
LA_CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H)
ENDIF(NOT HAVE_REGEX_H)
+ # Test if a macro is needed for the library.
+ TRY_MACRO_FOR_LIBRARY(
+ "${REGEX_INCLUDE_DIR}" "${REGEX_LIBRARY}"
+ COMPILES
+ "#include <stddef.h>\n#include <regex.h>\nint main() {regex_t r;return regcomp(&r, \"\", 0);}"
+ "USE_REGEX_DLL;USE_REGEX_STATIC")
+ IF(USE_REGEX_DLL)
+ ADD_DEFINITIONS(-DUSE_REGEX_DLL)
+ ELSEIF(USE_REGEX_STATIC)
+ ADD_DEFINITIONS(-DUSE_REGEX_STATIC)
+ ENDIF(USE_REGEX_DLL)
ENDIF(HAVE_REGCOMP_LIBREGEX)
ENDIF(REGEX_LIBRARY)
+ CMAKE_POP_CHECK_STATE() # Restore the state of the variables
ENDIF(NOT HAVE_REGCOMP_LIBC)
ENDIF(REGEX_INCLUDE_DIR)
#
# Check functions
#
+CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
#
# During checking functions, we should use -fno-builtin to avoid the
# failure of function detection which failure is an error "conflicting
# types for built-in function" caused by using -Werror option.
#
- SET(SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-builtin")
ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
CHECK_SYMBOL_EXISTS(_CrtSetReportMode "crtdbg.h" HAVE__CrtSetReportMode)
@@ -685,7 +933,6 @@ CHECK_FUNCTION_EXISTS_GLIBC(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(mbsnrtowcs HAVE_MBSNRTOWCS)
CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE)
CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR)
CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO)
@@ -719,7 +966,6 @@ CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE
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(wcsnrtombs HAVE_WCSNRTOMBS)
CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB)
CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S)
CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64)
@@ -736,10 +982,7 @@ CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRIN
CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP)
CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY)
-# Restore CMAKE_REQUIRED_FLAGS
-IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
- SET(CMAKE_REQUIRED_FLAGS ${SAVE_CMAKE_REQUIRED_FLAGS})
-ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+CMAKE_POP_CHECK_STATE() # Restore the state of the variables
# Make sure we have the POSIX version of readdir_r, not the
# older 2-argument version.
@@ -826,6 +1069,12 @@ CHECK_STRUCT_MEMBER("struct stat" st_blk
# Check for st_flags in struct stat (BSD fflags)
CHECK_STRUCT_MEMBER("struct stat" st_flags
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_FLAGS)
+
+IF(HAVE_SYS_STATVFS_H)
+ CHECK_STRUCT_MEMBER("struct statvfs" f_iosize
+ "sys/types.h;sys/statvfs.h" HAVE_STRUCT_STATVFS_F_IOSIZE)
+ENDIF()
+
#
#
CHECK_STRUCT_MEMBER("struct tm" tm_sec
@@ -1120,11 +1369,6 @@ IF(MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
ENDIF(MSVC)
-# We need CoreServices on Mac OS.
-IF(APPLE)
- LIST(APPEND ADDITIONAL_LIBS "-framework CoreServices")
-ENDIF(APPLE)
-
IF(ENABLE_TEST)
ADD_CUSTOM_TARGET(run_all_tests)
ENDIF(ENABLE_TEST)
Modified: vendor/libarchive/dist/Makefile.am
==============================================================================
--- vendor/libarchive/dist/Makefile.am Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/Makefile.am Fri Jul 27 08:24:12 2012 (r238825)
@@ -21,7 +21,11 @@ TESTS= libarchive_test $(bsdtar_test_pro
TESTS_ENVIRONMENT= $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $(bsdcpio_TESTS_ENVIRONMENT)
# Always build and test both bsdtar and bsdcpio as part of 'distcheck'
DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio
-AM_CFLAGS=-Wall
+COMMON_CFLAGS=-Wall -Wformat -Wformat-security
+# The next line is commented out by default in shipping libarchive releases.
+# It is uncommented by default in trunk.
+# DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual
+AM_CFLAGS=$(COMMON_CFLAGS) $(DEV_CFLAGS)
PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@
AM_CPPFLAGS=$(PLATFORMCPPFLAGS)
@@ -100,8 +104,12 @@ libarchive_la_SOURCES= \
libarchive/archive_entry_stat.c \
libarchive/archive_entry_strmode.c \
libarchive/archive_entry_xattr.c \
+ libarchive/archive_getdate.c \
+ libarchive/archive_match.c \
libarchive/archive_options.c \
libarchive/archive_options_private.h \
+ libarchive/archive_pathmatch.c \
+ libarchive/archive_pathmatch.h \
libarchive/archive_platform.h \
libarchive/archive_ppmd_private.h \
libarchive/archive_ppmd7.c \
@@ -161,6 +169,7 @@ libarchive_la_SOURCES= \
libarchive/archive_write_open_filename.c \
libarchive/archive_write_open_memory.c \
libarchive/archive_write_private.h \
+ libarchive/archive_write_add_filter.c \
libarchive/archive_write_add_filter_bzip2.c \
libarchive/archive_write_add_filter_compress.c \
libarchive/archive_write_add_filter_gzip.c \
@@ -253,6 +262,11 @@ libarchive_test_SOURCES= \
libarchive/test/test_archive_api_feature.c \
libarchive/test/test_archive_clear_error.c \
libarchive/test/test_archive_crypto.c \
+ libarchive/test/test_archive_getdate.c \
+ libarchive/test/test_archive_match_owner.c \
+ libarchive/test/test_archive_match_path.c \
+ libarchive/test/test_archive_match_time.c \
+ libarchive/test/test_archive_pathmatch.c \
libarchive/test/test_archive_read_close_twice.c \
libarchive/test/test_archive_read_close_twice_open_fd.c \
libarchive/test/test_archive_read_close_twice_open_filename.c \
@@ -572,12 +586,9 @@ libarchive_fe_la_SOURCES= \
libarchive_fe/err.h \
libarchive_fe/lafe_platform.h \
libarchive_fe/line_reader.c \
- libarchive_fe/line_reader.h \
- libarchive_fe/matching.c \
- libarchive_fe/matching.h \
- libarchive_fe/pathmatch.c \
- libarchive_fe/pathmatch.h
+ libarchive_fe/line_reader.h
+libarchive_fe_la_CPPFLAGS= -I$(top_srcdir)/libarchive
#
#
# bsdtar source, docs, etc.
@@ -589,11 +600,8 @@ bsdtar_SOURCES= \
tar/bsdtar.h \
tar/bsdtar_platform.h \
tar/cmdline.c \
- tar/getdate.c \
tar/read.c \
tar/subst.c \
- tar/tree.c \
- tar/tree.h \
tar/util.c \
tar/write.c
@@ -638,14 +646,13 @@ endif
#
bsdtar_test_SOURCES= \
- tar/getdate.c \
tar/test/main.c \
tar/test/test.h \
tar/test/test_0.c \
tar/test/test_basic.c \
tar/test/test_copy.c \
tar/test/test_empty_mtree.c \
- tar/test/test_getdate.c \
+ tar/test/test_format_newc.c \
tar/test/test_help.c \
tar/test/test_option_C_upper.c \
tar/test/test_option_H_upper.c \
@@ -661,6 +668,7 @@ bsdtar_test_SOURCES= \
tar/test/test_option_keep_newer_files.c \
tar/test/test_option_n.c \
tar/test/test_option_newer_than.c \
+ tar/test/test_option_nodump.c \
tar/test/test_option_q.c \
tar/test/test_option_r.c \
tar/test/test_option_s.c \
@@ -784,8 +792,7 @@ bsdcpio_test_SOURCES= \
cpio/test/test_option_z.c \
cpio/test/test_owner_parse.c \
cpio/test/test_passthrough_dotdot.c \
- cpio/test/test_passthrough_reverse.c \
- cpio/test/test_pathmatch.c
+ cpio/test/test_passthrough_reverse.c
bsdcpio_test_CPPFLAGS= \
-I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \
Modified: vendor/libarchive/dist/NEWS
==============================================================================
--- vendor/libarchive/dist/NEWS Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/NEWS Fri Jul 27 08:24:12 2012 (r238825)
@@ -1,14 +1,10 @@
-Jan 10, 2012: Issue 223: Skip atime tests if atime not supported
-Jan 09, 2012: Issue 222: Errors saving sparse files to pax archives
-Jan 09, 2012: Issue 221: allow archive_*_free(NULL)
-Dec 31, 2011: Issue 212: configure script on Solaris
-Dec 30, 2011: Issue 218: empty contents extracting Zip files with bsdcpio
-Dec 30, 2011: Issue 217: fix compile warning
-Dec 30, 2011: Issue 216: truncated filenames in listings
-Dec 28, 2011: Issue 210: memory leak on Windows
-Dec 28, 2011: Issue 206: fix hardlink tests on Windows 2000
-Dec 27, 2011: Issue 208: Don't hang when using external compression
- program on Windows
+Mar 27, 2012: libarchive 3.0.4 released
+
+Feb 05, 2012: libarchive development now hosted at GitHub.
+ http://libarchive.github.com/
+Feb 05, 2012: libarchive's issue tracker remains at Google Code.
+ http://code.google.com/p/libarchive/issues/list
+Feb 05, 2012: libarchive's mailing lists remain at Google Groups.
Dec 24, 2011: libarchive 3.0.2 released
Dec 23, 2011: Various fixes merged from FreeBSD
Modified: vendor/libarchive/dist/README
==============================================================================
--- vendor/libarchive/dist/README Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/README Fri Jul 27 08:24:12 2012 (r238825)
@@ -1,9 +1,14 @@
README for libarchive bundle.
Questions? Issues?
- * http://libarchive.googlecode.com/ is the home for ongoing
- libarchive development, including issue tracker, additional
- documentation, and links to the libarchive mailing lists.
+ * http://libarchive.github.com/ is the home for ongoing
+ libarchive development, including documentation, and
+ links to the libarchive mailing lists.
+ * To report an issue, use the issue tracker at
+ http://code.google.com/p/libarchive/issues/list
+ * To submit an enhancement to libarchive, please submit
+ a pull request via GitHub.
+ https://github.com/libarchive/libarchive/pulls
This distribution bundle includes the following components:
* libarchive: a library for reading and writing streaming archives
@@ -66,6 +71,7 @@ Currently, the library automatically det
* ZIP archives (with uncompressed or "deflate" compressed entries)
* GNU and BSD 'ar' archives
* 'mtree' format
+ * 7-Zip archives
* Microsoft CAB format
* LHA and LZH archives
* RAR archives
@@ -92,6 +98,7 @@ The library can create archives in any o
* GNU and BSD 'ar' archives
* 'mtree' format
* ISO9660 format
+ * 7-Zip archives
* XAR archives
When creating archives, the result can be filtered with any of the following:
Modified: vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake
==============================================================================
--- vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake Fri Jul 27 08:24:12 2012 (r238825)
@@ -19,7 +19,7 @@ GET_FILENAME_COMPONENT(_selfdir_CheckFil
MACRO (CHECK_FILE_OFFSET_BITS)
IF(NOT DEFINED _FILE_OFFSET_BITS)
- MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files")
+ MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files")
TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64
${CMAKE_CURRENT_BINARY_DIR}
${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
@@ -33,10 +33,10 @@ MACRO (CHECK_FILE_OFFSET_BITS)
IF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
SET(_FILE_OFFSET_BITS 64 CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
- MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - needed")
+ MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - needed")
ELSE(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
SET(_FILE_OFFSET_BITS "" CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
- MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - not needed")
+ MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - not needed")
ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
ENDIF(NOT DEFINED _FILE_OFFSET_BITS)
Modified: vendor/libarchive/dist/build/cmake/config.h.in
==============================================================================
--- vendor/libarchive/dist/build/cmake/config.h.in Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/build/cmake/config.h.in Fri Jul 27 08:24:12 2012 (r238825)
@@ -609,6 +609,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the <linux/magic.h> header file. */
#cmakedefine HAVE_LINUX_MAGIC_H 1
+/* Define to 1 if you have the <linux/types.h> header file. */
+#cmakedefine HAVE_LINUX_TYPES_H 1
+
/* Define to 1 if you have the `listea' function. */
#cmakedefine HAVE_LISTEA 1
@@ -661,9 +664,6 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `mbrtowc' function. */
#cmakedefine HAVE_MBRTOWC 1
-/* Define to 1 if you have the `mbsnrtowcs' function. */
-#cmakedefine HAVE_MBSNRTOWCS 1
-
/* Define to 1 if you have the `memmove' function. */
#cmakedefine HAVE_MEMMOVE 1
@@ -782,6 +782,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if `f_namemax' is a member of `struct statfs'. */
#cmakedefine HAVE_STRUCT_STATFS_F_NAMEMAX 1
+/* Define to 1 if `f_iosize' is a member of `struct statvfs'. */
+#cmakedefine HAVE_STRUCT_STATVFS_F_IOSIZE 1
+
/* Define to 1 if `st_birthtime' is a member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_BIRTHTIME 1
@@ -943,9 +946,6 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `wcslen' function. */
#cmakedefine HAVE_WCSLEN 1
-/* Define to 1 if you have the `wcsnrtombs' function. */
-#cmakedefine HAVE_WCSNRTOMBS 1
-
/* Define to 1 if you have the `wctomb' function. */
#cmakedefine HAVE_WCTOMB 1
Modified: vendor/libarchive/dist/build/utils/gen_archive_string_composition_h.sh
==============================================================================
--- vendor/libarchive/dist/build/utils/gen_archive_string_composition_h.sh Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/build/utils/gen_archive_string_composition_h.sh Fri Jul 27 08:24:12 2012 (r238825)
@@ -1,10 +1,13 @@
#!/bin/sh
#
-# This needs http://unicode.org/Public/UNIDATA/UnicodeData.txt
+# This needs http://unicode.org/Public/6.0.0/ucd/UnicodeData.txt
#
inputfile="$1" # Expect UnicodeData.txt
outfile=archive_string_composition.h
pickout=/tmp/mk_unicode_composition_tbl$$.awk
+pickout2=/tmp/mk_unicode_composition_tbl2$$.awk
+#nfdtmp=/tmp/mk_unicode_decomposition_tmp$$.txt
+nfdtmp="nfdtmpx"
#################################################################################
#
# Append the file header of "archive_string_composition.h"
@@ -14,7 +17,7 @@ append_copyright()
{
cat > ${outfile} <<CR_END
/*-
- * Copyright (c) 2011 libarchive Project
+ * Copyright (c) 2011-2012 libarchive Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -44,7 +47,7 @@ cat > ${outfile} <<CR_END
/*
* ATTENTION!
* This file is generated by build/utils/gen_archive_string_composition_h.sh
- * from http://unicode.org/Public/UNIDATA/UnicodeData.txt
+ * from http://unicode.org/Public/6.0.0/ucd/UnicodeData.txt
*
* See also http://unicode.org/report/tr15/
*/
@@ -76,6 +79,7 @@ BEGIN {
min = "";
max = "";
cmd="sort | awk -F ' ' '{printf \"\\\\t{ 0x%s , 0x%s , 0x%s },\\\\n\",\$1,\$2,\$3}'"
+ nfdtbl="${nfdtmp}"
print "static const struct unicode_composition_table u_composition_table[] = {"
}
END {
@@ -178,7 +182,6 @@ END {
}
print "};"
print ""
- print "#endif /* ARCHIVE_STRING_COMPOSITION_H_INCLUDED */"
}
#
#
@@ -241,7 +244,7 @@ function hextoi(hex)
#}
#
# Exclusion code points specified by
-# http://unicode.org/Public/UNIDATA/CompositionExclusions.txt
+# http://unicode.org/Public/6.0.0/ucd/CompositionExclusions.txt
##
# 1. Script Specifices
##
@@ -404,6 +407,35 @@ function hextoi(hex)
print "0"cp[1], "0"cp[2], "0"\$1 | cmd
else
print cp[1], cp[2], \$1 | cmd
+ # NFC ==> NFD table.
+ if (length(\$1) == 4)
+ print "0"\$1, "0"cp[1], "0"cp[2] >>nfdtbl
+ else
+ print \$1, cp[1], cp[2] >>nfdtbl
+}
+AWK_END
+#################################################################################
+# awk script
+#
+#################################################################################
+cat > ${pickout2} <<AWK_END
+#
+BEGIN {
+ FS = " "
+ print "struct unicode_decomposition_table {"
+ print "\tuint32_t nfc;"
+ print "\tuint32_t cp1;"
+ print "\tuint32_t cp2;"
+ print "};"
+ print ""
+ print "static const struct unicode_decomposition_table u_decomposition_table[] = {"
+}
+END {
+ print "};"
+ print ""
+}
+{
+printf "\t{ 0x%s , 0x%s , 0x%s },\n", \$1, \$2, \$3;
}
AWK_END
#################################################################################
@@ -413,6 +445,11 @@ AWK_END
#################################################################################
append_copyright
awk -f ${pickout} ${inputfile} >> ${outfile}
+awk -f ${pickout2} ${nfdtmp} >> ${outfile}
+echo "#endif /* ARCHIVE_STRING_COMPOSITION_H_INCLUDED */" >> ${outfile}
+echo "" >> ${outfile}
#
# Remove awk the script.
rm ${pickout}
+rm ${pickout2}
+rm ${nfdtmp}
Modified: vendor/libarchive/dist/build/version
==============================================================================
--- vendor/libarchive/dist/build/version Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/build/version Fri Jul 27 08:24:12 2012 (r238825)
@@ -1 +1 @@
-3000003
+3000004
Modified: vendor/libarchive/dist/configure.ac
==============================================================================
--- vendor/libarchive/dist/configure.ac Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/configure.ac Fri Jul 27 08:24:12 2012 (r238825)
@@ -4,8 +4,8 @@ dnl First, define all of the version num
dnl In particular, this allows the version macro to be used in AC_INIT
dnl These first two version numbers are updated automatically on each release.
-m4_define([LIBARCHIVE_VERSION_S],[3.0.3])
-m4_define([LIBARCHIVE_VERSION_N],[3000003])
+m4_define([LIBARCHIVE_VERSION_S],[3.0.4])
+m4_define([LIBARCHIVE_VERSION_N],[3000004])
dnl bsdtar and bsdcpio versioning tracks libarchive
m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
@@ -17,7 +17,7 @@ AC_PREREQ(2.65)
# Now starts the "real" configure script.
#
-AC_INIT([libarchive],LIBARCHIVE_VERSION_S(),[kientzle at FreeBSD.org])
+AC_INIT([libarchive],LIBARCHIVE_VERSION_S(),[libarchive-discuss at googlegroups.com])
# Make sure the srcdir contains "libarchive" directory
AC_CONFIG_SRCDIR([libarchive])
# Use auxiliary subscripts from this subdirectory (cleans up root)
@@ -197,13 +197,6 @@ case $host in
;;
esac
-# We need CoreServices on Mac OS.
-case $host in
- *darwin* )
- LIBS="${LIBS} -framework CoreServices"
- ;;
-esac
-
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
@@ -223,7 +216,7 @@ AS_VAR_IF([ac_cv_have_decl_EXT2_IOC_GETF
[Define to 1 if you have a working EXT2_IOC_GETFLAGS])])
AC_CHECK_HEADERS([inttypes.h io.h langinfo.h limits.h])
-AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h linux/magic.h])
+AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h linux/magic.h linux/types.h])
AC_CHECK_HEADERS([locale.h paths.h poll.h pwd.h regex.h signal.h stdarg.h])
AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/extattr.h sys/ioctl.h])
@@ -268,8 +261,8 @@ AC_ARG_WITH([iconv],
AS_HELP_STRING([--without-iconv], [Don't try to link against iconv]))
if test "x$with_iconv" != "xno"; then
- AC_CHECK_HEADERS([iconv.h],[],[],[#include <stdlib.h>])
AM_ICONV
+ AC_CHECK_HEADERS([iconv.h],[],[],[#include <stdlib.h>])
if test "x$am_cv_func_iconv" = "xyes"; then
AC_CHECK_HEADERS([localcharset.h])
am_save_LIBS="$LIBS"
@@ -364,6 +357,12 @@ AC_CHECK_MEMBERS([struct statfs.f_namema
#include <sys/mount.h>
])
+# Check for f_iosize in struct statvfs
+AC_CHECK_MEMBERS([struct statvfs.f_iosize],,,
+[
+#include <sys/statvfs.h>
+])
+
# Check for birthtime in struct stat
AC_CHECK_MEMBERS([struct stat.st_birthtime])
@@ -440,13 +439,13 @@ AC_CHECK_FUNCS([futimens futimes futimes
AC_CHECK_FUNCS([geteuid getpid getgrgid_r getgrnam_r])
AC_CHECK_FUNCS([getpwnam_r getpwuid_r getvfsbyname gmtime_r])
AC_CHECK_FUNCS([lchflags lchmod lchown link localtime_r lstat lutimes])
-AC_CHECK_FUNCS([mbrtowc mbsnrtowcs memmove memset])
+AC_CHECK_FUNCS([mbrtowc memmove memset])
AC_CHECK_FUNCS([mkdir mkfifo mknod mkstemp])
AC_CHECK_FUNCS([nl_langinfo openat pipe poll readlink readlinkat])
AC_CHECK_FUNCS([select setenv setlocale sigaction statfs statvfs])
AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strrchr symlink timegm])
AC_CHECK_FUNCS([tzset unsetenv utime utimensat utimes vfork])
-AC_CHECK_FUNCS([wcrtomb wcscmp wcscpy wcslen wcsnrtombs wctomb wmemcmp wmemcpy])
+AC_CHECK_FUNCS([wcrtomb wcscmp wcscpy wcslen wctomb wmemcmp wmemcpy])
AC_CHECK_FUNCS([_ctime64_s _fseeki64])
AC_CHECK_FUNCS([_get_timezone _localtime64_s _mkgmtime64])
# detects cygwin-1.7, as opposed to older versions
Modified: vendor/libarchive/dist/cpio/CMakeLists.txt
==============================================================================
--- vendor/libarchive/dist/cpio/CMakeLists.txt Fri Jul 27 05:48:42 2012 (r238824)
+++ vendor/libarchive/dist/cpio/CMakeLists.txt Fri Jul 27 08:24:12 2012 (r238825)
@@ -15,10 +15,6 @@ IF(ENABLE_CPIO)
../libarchive_fe/lafe_platform.h
../libarchive_fe/line_reader.c
../libarchive_fe/line_reader.h
- ../libarchive_fe/matching.c
- ../libarchive_fe/matching.h
- ../libarchive_fe/pathmatch.c
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-vendor
mailing list