diff options
author | Brad King <brad.king@kitware.com> | 2013-07-26 20:08:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-07-31 12:19:13 (GMT) |
commit | 102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6 (patch) | |
tree | db05ed527f04506957049a7b087be6c038d98435 /Utilities/cmlibarchive/build | |
parent | 87402c995ed2460deb2f39e02acf77a0bb57f263 (diff) | |
parent | 35df7c8ba8854e97bd6994c4d1143f57535ed6f2 (diff) | |
download | CMake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.zip CMake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.tar.gz CMake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.tar.bz2 |
Merge branch 'libarchive-upstream' into update-libarchive
Conflicts:
Utilities/cmlibarchive/CMakeLists.txt
Utilities/cmlibarchive/libarchive/archive.h
Utilities/cmlibarchive/libarchive/archive_entry.h
Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c
Utilities/cmlibarchive/libarchive/archive_windows.h
Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c
Diffstat (limited to 'Utilities/cmlibarchive/build')
-rw-r--r-- | Utilities/cmlibarchive/build/cmake/FindLibGCC.cmake | 22 | ||||
-rw-r--r-- | Utilities/cmlibarchive/build/cmake/FindNettle.cmake | 23 | ||||
-rw-r--r-- | Utilities/cmlibarchive/build/cmake/FindPCREPOSIX.cmake | 34 | ||||
-rw-r--r-- | Utilities/cmlibarchive/build/cmake/LibarchiveCheckCSourceCompiles.cmake | 106 | ||||
-rw-r--r-- | Utilities/cmlibarchive/build/cmake/LibarchiveCheckCSourceRuns.cmake | 102 | ||||
-rw-r--r-- | Utilities/cmlibarchive/build/cmake/config.h.in | 51 | ||||
-rwxr-xr-x[-rw-r--r--] | Utilities/cmlibarchive/build/utils/gen_archive_string_composition_h.sh | 47 | ||||
-rw-r--r-- | Utilities/cmlibarchive/build/version | 2 |
8 files changed, 375 insertions, 12 deletions
diff --git a/Utilities/cmlibarchive/build/cmake/FindLibGCC.cmake b/Utilities/cmlibarchive/build/cmake/FindLibGCC.cmake new file mode 100644 index 0000000..7985f2b --- /dev/null +++ b/Utilities/cmlibarchive/build/cmake/FindLibGCC.cmake @@ -0,0 +1,22 @@ +# - Find libgcc +# Find the libgcc library. +# +# LIBGCC_LIBRARIES - List of libraries when using libgcc +# LIBGCC_FOUND - True if libgcc found. + +IF (LIBGCC_LIBRARY) + # Already in cache, be silent + SET(LIBGCC_FIND_QUIETLY TRUE) +ENDIF (LIBGCC_LIBRARY) + +FIND_LIBRARY(LIBGCC_LIBRARY NAMES gcc libgcc) + +# handle the QUIETLY and REQUIRED arguments and set LIBGCC_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBGCC DEFAULT_MSG LIBGCC_LIBRARY) + +IF(LIBGCC_FOUND) + SET(LIBGCC_LIBRARIES ${LIBGCC_LIBRARY}) + SET(HAVE_LIBGCC 1) +ENDIF(LIBGCC_FOUND) diff --git a/Utilities/cmlibarchive/build/cmake/FindNettle.cmake b/Utilities/cmlibarchive/build/cmake/FindNettle.cmake new file mode 100644 index 0000000..1f66610 --- /dev/null +++ b/Utilities/cmlibarchive/build/cmake/FindNettle.cmake @@ -0,0 +1,23 @@ +# - Find Nettle +# Find the Nettle include directory and library +# +# NETTLE_INCLUDE_DIR - where to find <nettle/sha.h>, etc. +# NETTLE_LIBRARIES - List of libraries when using libnettle. +# NETTLE_FOUND - True if libnettle found. + +IF (NETTLE_INCLUDE_DIR) + # Already in cache, be silent + SET(NETTLE_FIND_QUIETLY TRUE) +ENDIF (NETTLE_INCLUDE_DIR) + +FIND_PATH(NETTLE_INCLUDE_DIR nettle/md5.h nettle/ripemd160.h nettle/sha.h) +FIND_LIBRARY(NETTLE_LIBRARY NAMES nettle libnettle) + +# handle the QUIETLY and REQUIRED arguments and set NETTLE_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETTLE DEFAULT_MSG NETTLE_LIBRARY NETTLE_INCLUDE_DIR) + +IF(NETTLE_FOUND) + SET(NETTLE_LIBRARIES ${NETTLE_LIBRARY}) +ENDIF(NETTLE_FOUND) diff --git a/Utilities/cmlibarchive/build/cmake/FindPCREPOSIX.cmake b/Utilities/cmlibarchive/build/cmake/FindPCREPOSIX.cmake new file mode 100644 index 0000000..7cc40ec --- /dev/null +++ b/Utilities/cmlibarchive/build/cmake/FindPCREPOSIX.cmake @@ -0,0 +1,34 @@ +# - Find pcreposix +# Find the native PCRE and PCREPOSIX include and libraries +# +# PCRE_INCLUDE_DIR - where to find pcreposix.h, etc. +# PCREPOSIX_LIBRARIES - List of libraries when using libpcreposix. +# PCRE_LIBRARIES - List of libraries when using libpcre. +# PCREPOSIX_FOUND - True if libpcreposix found. +# PCRE_FOUND - True if libpcre found. + +IF (PCRE_INCLUDE_DIR) + # Already in cache, be silent + SET(PCRE_FIND_QUIETLY TRUE) +ENDIF (PCRE_INCLUDE_DIR) + +FIND_PATH(PCRE_INCLUDE_DIR pcreposix.h) +FIND_LIBRARY(PCREPOSIX_LIBRARY NAMES pcreposix libpcreposix) +FIND_LIBRARY(PCRE_LIBRARY NAMES pcre libpcre) + +# handle the QUIETLY and REQUIRED arguments and set PCREPOSIX_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCREPOSIX DEFAULT_MSG PCREPOSIX_LIBRARY PCRE_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY) + +IF(PCREPOSIX_FOUND) + SET(PCREPOSIX_LIBRARIES ${PCREPOSIX_LIBRARY}) + SET(HAVE_LIBPCREPOSIX 1) + SET(HAVE_PCREPOSIX_H 1) +ENDIF(PCREPOSIX_FOUND) + +IF(PCRE_FOUND) + SET(PCRE_LIBRARIES ${PCRE_LIBRARY}) + SET(HAVE_LIBPCRE 1) +ENDIF(PCRE_FOUND) diff --git a/Utilities/cmlibarchive/build/cmake/LibarchiveCheckCSourceCompiles.cmake b/Utilities/cmlibarchive/build/cmake/LibarchiveCheckCSourceCompiles.cmake new file mode 100644 index 0000000..6b6f593 --- /dev/null +++ b/Utilities/cmlibarchive/build/cmake/LibarchiveCheckCSourceCompiles.cmake @@ -0,0 +1,106 @@ +# - Check if given C source compiles and links into an executable +# CHECK_C_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>]) +# <code> - source code to try to compile, must define 'main' +# <var> - variable to store whether the source code compiled +# <fail-regex> - fail if test output matches this regex +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +#============================================================================= +# Copyright 2005-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# +# Extra arguments added by libarchive +# CMAKE_REQUIRED_LINKER_FLAGS = string of linker command line flags +# + +include(CMakeExpandImportedTargets) + + +macro(LIBARCHIVE_CHECK_C_SOURCE_COMPILES SOURCE VAR) + if("${VAR}" MATCHES "^${VAR}$") + set(_FAIL_REGEX) + set(_key) + foreach(arg ${ARGN}) + if("${arg}" MATCHES "^(FAIL_REGEX)$") + set(_key "${arg}") + elseif(_key) + list(APPEND _${_key} "${arg}") + else() + message(FATAL_ERROR "Unknown argument:\n ${arg}\n") + endif() + endforeach() + set(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + if(CMAKE_REQUIRED_LIBRARIES) + # this one translates potentially used imported library targets to their files on disk + CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}") + set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}") + else() + set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) + endif() + if(CMAKE_REQUIRED_INCLUDES) + set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + else() + set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES) + endif() + if(CMAKE_REQUIRED_LINKER_FLAGS) + set(CHECK_C_SOURCE_COMPILES_ADD_LINKER_FLAGS + "-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_REQUIRED_LINKER_FLAGS} -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_REQUIRED_LINKER_FLAGS} -DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_REQUIRED_LINKER_FLAGS}") + else() + set(CHECK_C_SOURCE_COMPILES_ADD_LINKER_FLAGS) + endif() + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c" + "${SOURCE}\n") + + message(STATUS "Performing Test ${VAR}") + try_compile(${VAR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} ${CHECK_C_SOURCE_COMPILES_ADD_LINKER_FLAGS} + "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + + foreach(_regex ${_FAIL_REGEX}) + if("${OUTPUT}" MATCHES "${_regex}") + set(${VAR} 0) + endif() + endforeach() + + if(${VAR}) + set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") + message(STATUS "Performing Test ${VAR} - Success") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + else() + message(STATUS "Performing Test ${VAR} - Failed") + set(${VAR} "" CACHE INTERNAL "Test ${VAR}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C SOURCE FILE Test ${VAR} failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + endif() + endif() +endmacro() + diff --git a/Utilities/cmlibarchive/build/cmake/LibarchiveCheckCSourceRuns.cmake b/Utilities/cmlibarchive/build/cmake/LibarchiveCheckCSourceRuns.cmake new file mode 100644 index 0000000..498f522 --- /dev/null +++ b/Utilities/cmlibarchive/build/cmake/LibarchiveCheckCSourceRuns.cmake @@ -0,0 +1,102 @@ +# - Check if the given C source code compiles and runs. +# CHECK_C_SOURCE_RUNS(<code> <var>) +# <code> - source code to try to compile +# <var> - variable to store the result +# (1 for success, empty for failure) +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +#============================================================================= +# Copyright 2006-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# +# Extra arguments added by libarchive +# CMAKE_REQUIRED_LINKER_FLAGS = string of linker command line flags +# + +include(CMakeExpandImportedTargets) + + +macro(LIBARCHIVE_CHECK_C_SOURCE_RUNS SOURCE VAR) + if("${VAR}" MATCHES "^${VAR}$") + set(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + if(CMAKE_REQUIRED_LIBRARIES) + # this one translates potentially used imported library targets to their files on disk + CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}") + set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}") + else() + set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) + endif() + if(CMAKE_REQUIRED_INCLUDES) + set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + else() + set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES) + endif() + if(CMAKE_REQUIRED_LINKER_FLAGS) + set(CHECK_C_SOURCE_COMPILES_ADD_LINKER_FLAGS + "-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_REQUIRED_LINKER_FLAGS} -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_REQUIRED_LINKER_FLAGS} -DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_REQUIRED_LINKER_FLAGS}") + else() + set(CHECK_C_SOURCE_COMPILES_ADD_LINKER_FLAGS) + endif() + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c" + "${SOURCE}\n") + + message(STATUS "Performing Test ${VAR}") + try_run(${VAR}_EXITCODE ${VAR}_COMPILED + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} ${CHECK_C_SOURCE_COMPILES_ADD_LINKER_FLAGS} + -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH} + "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}" + COMPILE_OUTPUT_VARIABLE OUTPUT) + # if it did not compile make the return value fail code of 1 + if(NOT ${VAR}_COMPILED) + set(${VAR}_EXITCODE 1) + endif() + # if the return value was 0 then it worked + if("${${VAR}_EXITCODE}" EQUAL 0) + set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") + message(STATUS "Performing Test ${VAR} - Success") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n" + "${OUTPUT}\n" + "Return value: ${${VAR}}\n" + "Source file was:\n${SOURCE}\n") + else() + if(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + set(${VAR} "${${VAR}_EXITCODE}") + else() + set(${VAR} "" CACHE INTERNAL "Test ${VAR}") + endif() + + message(STATUS "Performing Test ${VAR} - Failed") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C SOURCE FILE Test ${VAR} failed with the following output:\n" + "${OUTPUT}\n" + "Return value: ${${VAR}_EXITCODE}\n" + "Source file was:\n${SOURCE}\n") + + endif() + endif() +endmacro() + diff --git a/Utilities/cmlibarchive/build/cmake/config.h.in b/Utilities/cmlibarchive/build/cmake/config.h.in index ff97cbd..750ae66 100644 --- a/Utilities/cmlibarchive/build/cmake/config.h.in +++ b/Utilities/cmlibarchive/build/cmake/config.h.in @@ -393,6 +393,9 @@ typedef uint64_t uintmax_t; */ #cmakedefine HAVE_DIRENT_H 1 +/* Define to 1 if you have the `dirfd' function. */ +#cmakedefine HAVE_DIRFD 1 + /* Define to 1 if you have the <dlfcn.h> header file. */ #cmakedefine HAVE_DLFCN_H 1 @@ -579,12 +582,27 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `expat' library (-lexpat). */ #cmakedefine HAVE_LIBEXPAT 1 +/* Define to 1 if you have the `gcc' library (-lgcc). */ +#cmakedefine HAVE_LIBGCC 1 + /* Define to 1 if you have the `lzma' library (-llzma). */ #cmakedefine HAVE_LIBLZMA 1 /* Define to 1 if you have the `lzmadec' library (-llzmadec). */ #cmakedefine HAVE_LIBLZMADEC 1 +/* Define to 1 if you have the `lzo2' library (-llzo2). */ +#cmakedefine HAVE_LIBLZO2 1 + +/* Define to 1 if you have the `nettle' library (-lnettle). */ +#cmakedefine HAVE_LIBNETTLE 1 + +/* Define to 1 if you have the `pcre' library (-lpcre). */ +#cmakedefine HAVE_LIBPCRE 1 + +/* Define to 1 if you have the `pcreposix' library (-lpcreposix). */ +#cmakedefine HAVE_LIBPCREPOSIX 1 + /* Define to 1 if you have the `xml2' library (-lxml2). */ #cmakedefine HAVE_LIBXML2 1 @@ -615,6 +633,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 @@ -664,12 +685,15 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the <lzma.h> header file. */ #cmakedefine HAVE_LZMA_H 1 +/* Define to 1 if you have the <lzo/lzo1x.h> header file. */ +#cmakedefine HAVE_LZO_LZO1X_H 1 + +/* Define to 1 if you have the <lzo/lzoconf.h> header file. */ +#cmakedefine HAVE_LZO_LZOCONF_H 1 + /* 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 @@ -691,6 +715,15 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ #cmakedefine HAVE_NDIR_H 1 +/* Define to 1 if you have the <nettle/md5.h> header file. */ +#cmakedefine HAVE_NETTLE_MD5_H 1 + +/* Define to 1 if you have the <nettle/ripemd160.h> header file. */ +#cmakedefine HAVE_NETTLE_RIPEMD160_H 1 + +/* Define to 1 if you have the <nettle/sha.h> header file. */ +#cmakedefine HAVE_NETTLE_SHA_H 1 + /* Define to 1 if you have the `nl_langinfo' function. */ #cmakedefine HAVE_NL_LANGINFO 1 @@ -700,6 +733,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the <paths.h> header file. */ #cmakedefine HAVE_PATHS_H 1 +/* Define to 1 if you have the <pcreposix.h> header file. */ +#cmakedefine HAVE_PCREPOSIX_H 1 + /* Define to 1 if you have the `pipe' function. */ #cmakedefine HAVE_PIPE 1 @@ -709,6 +745,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the <poll.h> header file. */ #cmakedefine HAVE_POLL_H 1 +/* Define to 1 if you have the `posix_spawnp' function. */ +#cmakedefine HAVE_POSIX_SPAWNP 1 + /* Define to 1 if you have the <process.h> header file. */ #cmakedefine HAVE_PROCESS_H 1 @@ -742,6 +781,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the <signal.h> header file. */ #cmakedefine HAVE_SIGNAL_H 1 +/* Define to 1 if you have the <spawn.h> header file. */ +#cmakedefine HAVE_SPAWN_H 1 + /* Define to 1 if you have the `statfs' function. */ #cmakedefine HAVE_STATFS 1 @@ -952,9 +994,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 diff --git a/Utilities/cmlibarchive/build/utils/gen_archive_string_composition_h.sh b/Utilities/cmlibarchive/build/utils/gen_archive_string_composition_h.sh index 95dbe16..925de5c 100644..100755 --- a/Utilities/cmlibarchive/build/utils/gen_archive_string_composition_h.sh +++ b/Utilities/cmlibarchive/build/utils/gen_archive_string_composition_h.sh @@ -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} diff --git a/Utilities/cmlibarchive/build/version b/Utilities/cmlibarchive/build/version index ee575c8..937b126 100644 --- a/Utilities/cmlibarchive/build/version +++ b/Utilities/cmlibarchive/build/version @@ -1 +1 @@ -3000002 +3001002 |