pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/libarchive/files Update for libarchive 3.2.1.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/610bef409f5c
branches:  trunk
changeset: 348936:610bef409f5c
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Jun 20 17:24:55 2016 +0000

description:
Update for libarchive 3.2.1.

diffstat:

 archivers/libarchive/files/CMakeLists.txt                                         |   274 +-
 archivers/libarchive/files/COPYING                                                |     5 +-
 archivers/libarchive/files/INSTALL                                                |     2 +-
 archivers/libarchive/files/Makefile.am                                            |  1716 +-
 archivers/libarchive/files/Makefile.in                                            |  4893 ++++++---
 archivers/libarchive/files/NEWS                                                   |    37 +
 archivers/libarchive/files/README                                                 |    24 +-
 archivers/libarchive/files/aclocal.m4                                             |   970 +-
 archivers/libarchive/files/build/autoconf/compile                                 |    10 +-
 archivers/libarchive/files/build/autoconf/config.guess                            |   459 +-
 archivers/libarchive/files/build/autoconf/config.sub                              |    92 +-
 archivers/libarchive/files/build/autoconf/depcomp                                 |   457 +-
 archivers/libarchive/files/build/autoconf/install-sh                              |   362 +-
 archivers/libarchive/files/build/autoconf/ltmain.sh                               |     4 +-
 archivers/libarchive/files/build/autoconf/missing                                 |   400 +-
 archivers/libarchive/files/build/autogen.sh                                       |     2 +-
 archivers/libarchive/files/build/clean.sh                                         |     2 +
 archivers/libarchive/files/build/cmake/LibarchiveCheckCSourceCompiles.cmake       |   106 -
 archivers/libarchive/files/build/cmake/LibarchiveCheckCSourceRuns.cmake           |   102 -
 archivers/libarchive/files/build/cmake/config.h.in                                |    83 +-
 archivers/libarchive/files/build/version                                          |     2 +-
 archivers/libarchive/files/config.h.in                                            |    76 +-
 archivers/libarchive/files/configure                                              |  1761 ++-
 archivers/libarchive/files/configure.ac                                           |   148 +-
 archivers/libarchive/files/contrib/libarchive.1aix53.spec                         |     7 +-
 archivers/libarchive/files/contrib/libarchive.spec                                |    96 +-
 archivers/libarchive/files/contrib/untar.c                                        |    10 +-
 archivers/libarchive/files/cpio/CMakeLists.txt                                    |     5 +-
 archivers/libarchive/files/cpio/bsdcpio.1                                         |    25 +-
 archivers/libarchive/files/cpio/cmdline.c                                         |     2 +
 archivers/libarchive/files/cpio/cpio.c                                            |    91 +-
 archivers/libarchive/files/cpio/cpio.h                                            |     4 +
 archivers/libarchive/files/cpio/cpio_platform.h                                   |     8 +-
 archivers/libarchive/files/cpio/test/CMakeLists.txt                               |     9 +-
 archivers/libarchive/files/cpio/test/list.h                                       |     4 +
 archivers/libarchive/files/cpio/test/main.c                                       |   230 +-
 archivers/libarchive/files/cpio/test/test.h                                       |    31 +-
 archivers/libarchive/files/cpio/test/test_basic.c                                 |     2 +-
 archivers/libarchive/files/cpio/test/test_option_c.c                              |    10 +-
 archivers/libarchive/files/cpio/test/test_option_version.c                        |     5 +
 archivers/libarchive/files/doc/html/Makefile                                      |     8 +-
 archivers/libarchive/files/doc/html/archive_entry.3.html                          |    13 +-
 archivers/libarchive/files/doc/html/archive_read.3.html                           |    11 +-
 archivers/libarchive/files/doc/html/archive_read_disk.3.html                      |     8 +-
 archivers/libarchive/files/doc/html/archive_util.3.html                           |     7 +-
 archivers/libarchive/files/doc/html/archive_write.3.html                          |    22 +-
 archivers/libarchive/files/doc/html/archive_write_disk.3.html                     |    22 +-
 archivers/libarchive/files/doc/html/bsdcpio.1.html                                |    34 +-
 archivers/libarchive/files/doc/html/bsdtar.1.html                                 |    91 +-
 archivers/libarchive/files/doc/html/cpio.5.html                                   |     4 +-
 archivers/libarchive/files/doc/html/libarchive-formats.5.html                     |   105 +-
 archivers/libarchive/files/doc/html/libarchive.3.html                             |    12 +-
 archivers/libarchive/files/doc/html/libarchive_internals.3.html                   |    12 +-
 archivers/libarchive/files/doc/html/mtree.5.html                                  |   100 +-
 archivers/libarchive/files/doc/html/tar.5.html                                    |    10 +-
 archivers/libarchive/files/doc/man/Makefile                                       |     8 +-
 archivers/libarchive/files/doc/man/archive_entry.3                                |     2 +-
 archivers/libarchive/files/doc/man/archive_read.3                                 |     4 +-
 archivers/libarchive/files/doc/man/archive_write.3                                |    15 +-
 archivers/libarchive/files/doc/man/archive_write_disk.3                           |    12 +-
 archivers/libarchive/files/doc/man/bsdcpio.1                                      |    27 +-
 archivers/libarchive/files/doc/man/bsdtar.1                                       |    79 +-
 archivers/libarchive/files/doc/man/libarchive-formats.5                           |    57 +-
 archivers/libarchive/files/doc/man/libarchive.3                                   |     4 +-
 archivers/libarchive/files/doc/man/libarchive_internals.3                         |     2 +-
 archivers/libarchive/files/doc/man/mtree.5                                        |   107 +-
 archivers/libarchive/files/doc/man/tar.5                                          |     2 +-
 archivers/libarchive/files/doc/mdoc2wiki.awk                                      |   193 +-
 archivers/libarchive/files/doc/pdf/Makefile                                       |     8 +-
 archivers/libarchive/files/doc/pdf/archive_entry.3.pdf                            |   Bin 
 archivers/libarchive/files/doc/pdf/archive_read.3.pdf                             |   Bin 
 archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf                        |   Bin 
 archivers/libarchive/files/doc/pdf/archive_util.3.pdf                             |   Bin 
 archivers/libarchive/files/doc/pdf/archive_write.3.pdf                            |   Bin 
 archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf                       |   Bin 
 archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf                                  |   Bin 
 archivers/libarchive/files/doc/pdf/bsdtar.1.pdf                                   |   Bin 
 archivers/libarchive/files/doc/pdf/cpio.5.pdf                                     |   Bin 
 archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf                       |   Bin 
 archivers/libarchive/files/doc/pdf/libarchive.3.pdf                               |   Bin 
 archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf                     |   Bin 
 archivers/libarchive/files/doc/pdf/mtree.5.pdf                                    |   Bin 
 archivers/libarchive/files/doc/pdf/tar.5.pdf                                      |   Bin 
 archivers/libarchive/files/doc/text/Makefile                                      |     8 +-
 archivers/libarchive/files/doc/text/archive_entry.3.txt                           |     6 +-
 archivers/libarchive/files/doc/text/archive_read.3.txt                            |     6 +-
 archivers/libarchive/files/doc/text/archive_read_disk.3.txt                       |     2 +-
 archivers/libarchive/files/doc/text/archive_util.3.txt                            |     2 +-
 archivers/libarchive/files/doc/text/archive_write.3.txt                           |    17 +-
 archivers/libarchive/files/doc/text/archive_write_disk.3.txt                      |    13 +-
 archivers/libarchive/files/doc/text/bsdcpio.1.txt                                 |    22 +-
 archivers/libarchive/files/doc/text/bsdtar.1.txt                                  |    54 +-
 archivers/libarchive/files/doc/text/libarchive-formats.5.txt                      |    54 +-
 archivers/libarchive/files/doc/text/libarchive.3.txt                              |     6 +-
 archivers/libarchive/files/doc/text/libarchive_internals.3.txt                    |     6 +-
 archivers/libarchive/files/doc/text/mtree.5.txt                                   |    47 +-
 archivers/libarchive/files/doc/text/tar.5.txt                                     |     4 +-
 archivers/libarchive/files/doc/wiki/Makefile                                      |     8 +-
 archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki                     |    30 +-
 archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki                      |    58 +-
 archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki                  |    56 +-
 archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki                      |    46 +-
 archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki                     |    53 +-
 archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki                 |    64 +-
 archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki                          |    87 +-
 archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki                           |   244 +-
 archivers/libarchive/files/doc/wiki/ManPageCpio5.wiki                             |    10 +-
 archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki                       |    58 +-
 archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki                |   106 +-
 archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki              |    24 +-
 archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki                            |   108 +-
 archivers/libarchive/files/doc/wiki/ManPageTar5.wiki                              |    24 +-
 archivers/libarchive/files/examples/minitar/minitar.c                             |    34 +-
 archivers/libarchive/files/examples/untar.c                                       |     6 +-
 archivers/libarchive/files/libarchive/CMakeLists.txt                              |    43 +-
 archivers/libarchive/files/libarchive/archive.h                                   |   271 +-
 archivers/libarchive/files/libarchive/archive_crypto.c                            |  1429 --
 archivers/libarchive/files/libarchive/archive_crypto_private.h                    |   377 -
 archivers/libarchive/files/libarchive/archive_endian.h                            |    44 +-
 archivers/libarchive/files/libarchive/archive_entry.3                             |     2 +-
 archivers/libarchive/files/libarchive/archive_entry.c                             |   171 +-
 archivers/libarchive/files/libarchive/archive_entry.h                             |    69 +-
 archivers/libarchive/files/libarchive/archive_entry_copy_stat.c                   |     4 +
 archivers/libarchive/files/libarchive/archive_entry_private.h                     |     5 +
 archivers/libarchive/files/libarchive/archive_pack_dev.c                          |     4 +-
 archivers/libarchive/files/libarchive/archive_pack_dev.h                          |     2 +-
 archivers/libarchive/files/libarchive/archive_platform.h                          |    22 +-
 archivers/libarchive/files/libarchive/archive_private.h                           |    19 +
 archivers/libarchive/files/libarchive/archive_read.3                              |     4 +-
 archivers/libarchive/files/libarchive/archive_read.c                              |   144 +-
 archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c         |    60 +-
 archivers/libarchive/files/libarchive/archive_read_disk_posix.c                   |    64 +-
 archivers/libarchive/files/libarchive/archive_read_disk_private.h                 |     5 +
 archivers/libarchive/files/libarchive/archive_read_disk_set_standard_lookup.c     |     2 +-
 archivers/libarchive/files/libarchive/archive_read_extract.c                      |   151 +-
 archivers/libarchive/files/libarchive/archive_read_open_fd.c                      |    29 +
 archivers/libarchive/files/libarchive/archive_read_open_file.c                    |    10 +-
 archivers/libarchive/files/libarchive/archive_read_open_filename.c                |     6 +-
 archivers/libarchive/files/libarchive/archive_read_open_memory.c                  |    12 +-
 archivers/libarchive/files/libarchive/archive_read_private.h                      |    76 +-
 archivers/libarchive/files/libarchive/archive_read_support_format_all.c           |     1 +
 archivers/libarchive/files/libarchive/archive_read_support_format_ar.c            |    25 +-
 archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c          |    31 +-
 archivers/libarchive/files/libarchive/archive_read_support_format_empty.c         |     2 +
 archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c       |    80 +-
 archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c         |   623 +-
 archivers/libarchive/files/libarchive/archive_read_support_format_raw.c           |     4 +-
 archivers/libarchive/files/libarchive/archive_read_support_format_tar.c           |   224 +-
 archivers/libarchive/files/libarchive/archive_read_support_format_xar.c           |    73 +-
 archivers/libarchive/files/libarchive/archive_read_support_format_zip.c           |  4200 +++++--
 archivers/libarchive/files/libarchive/archive_string.c                            |    94 +-
 archivers/libarchive/files/libarchive/archive_util.c                              |   198 +-
 archivers/libarchive/files/libarchive/archive_virtual.c                           |    16 +-
 archivers/libarchive/files/libarchive/archive_windows.c                           |    10 +-
 archivers/libarchive/files/libarchive/archive_windows.h                           |    14 +-
 archivers/libarchive/files/libarchive/archive_write.3                             |    15 +-
 archivers/libarchive/files/libarchive/archive_write.c                             |    29 +-
 archivers/libarchive/files/libarchive/archive_write_disk.3                        |    10 +-
 archivers/libarchive/files/libarchive/archive_write_disk_set_standard_lookup.c    |     7 +-
 archivers/libarchive/files/libarchive/archive_write_open_filename.c               |     5 +-
 archivers/libarchive/files/libarchive/archive_write_private.h                     |    17 +-
 archivers/libarchive/files/libarchive/archive_write_set_format.c                  |     4 +-
 archivers/libarchive/files/libarchive/archive_write_set_format_by_name.c          |     2 +
 archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c            |    43 +-
 archivers/libarchive/files/libarchive/archive_write_set_format_pax.c              |    37 +-
 archivers/libarchive/files/libarchive/archive_write_set_format_shar.c             |     1 +
 archivers/libarchive/files/libarchive/archive_write_set_format_zip.c              |  1662 ++-
 archivers/libarchive/files/libarchive/filter_fork_windows.c                       |     2 +-
 archivers/libarchive/files/libarchive/libarchive-formats.5                        |    56 +-
 archivers/libarchive/files/libarchive/libarchive.3                                |     4 +-
 archivers/libarchive/files/libarchive/libarchive_internals.3                      |     2 +-
 archivers/libarchive/files/libarchive/mtree.5                                     |    96 +-
 archivers/libarchive/files/libarchive/tar.5                                       |     2 +-
 archivers/libarchive/files/libarchive/test/CMakeLists.txt                         |    59 +-
 archivers/libarchive/files/libarchive/test/list.h                                 |   184 +-
 archivers/libarchive/files/libarchive/test/main.c                                 |   209 +-
 archivers/libarchive/files/libarchive/test/read_open_memory.c                     |    18 +-
 archivers/libarchive/files/libarchive/test/test.h                                 |    27 +-
 archivers/libarchive/files/libarchive/test/test_archive_crypto.c                  |   145 -
 archivers/libarchive/files/libarchive/test/test_compat_zip.c                      |    56 +-
 archivers/libarchive/files/libarchive/test/test_fuzz.c                            |   202 +-
 archivers/libarchive/files/libarchive/test/test_pax_filename_encoding.c           |    24 +-
 archivers/libarchive/files/libarchive/test/test_read_data_large.c                 |     6 +-
 archivers/libarchive/files/libarchive/test/test_read_format_ar.c                  |     6 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin.c            |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_Z.c          |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_be.c         |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_bz2.c        |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_gz.c         |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_lzma.c       |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_xz.c         |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_odc.c            |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c |     6 +-
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_gzip.c      |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c  |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4c_Z.c        |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_empty.c               |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_gtar_gz.c             |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_gtar_lzma.c           |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse.c         |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_iso_multi_extent.c    |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_isojoliet_bz2.c       |     6 +
 archivers/libarchive/files/libarchive/test/test_read_format_isojoliet_long.c      |     8 +
 archivers/libarchive/files/libarchive/test/test_read_format_isojoliet_rr.c        |    10 +
 archivers/libarchive/files/libarchive/test/test_read_format_isorr_bz2.c           |     3 +
 archivers/libarchive/files/libarchive/test/test_read_format_isorr_ce.c            |     3 +
 archivers/libarchive/files/libarchive/test/test_read_format_isorr_new_bz2.c       |     3 +
 archivers/libarchive/files/libarchive/test/test_read_format_isorr_rr_moved.c      |     3 +
 archivers/libarchive/files/libarchive/test/test_read_format_isozisofs_bz2.c       |     3 +
 archivers/libarchive/files/libarchive/test/test_read_format_mtree.c               |   122 +-
 archivers/libarchive/files/libarchive/test/test_read_format_mtree.mtree.uu        |    20 +-
 archivers/libarchive/files/libarchive/test/test_read_format_pax_bz2.c             |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_raw.c                 |     4 +
 archivers/libarchive/files/libarchive/test/test_read_format_tar.c                 |     4 +
 archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.c  |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_tbz.c                 |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_tgz.c                 |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_tlz.c                 |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_txz.c                 |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_tz.c                  |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_xar.c                 |     2 +
 archivers/libarchive/files/libarchive/test/test_read_format_zip.c                 |    34 +-
 archivers/libarchive/files/libarchive/test/test_read_truncated.c                  |     4 +-
 archivers/libarchive/files/libarchive/test/test_write_disk_perms.c                |   110 +-
 archivers/libarchive/files/libarchive/test/test_write_disk_secure.c               |    66 +
 archivers/libarchive/files/libarchive/test/test_write_format_ar.c                 |     4 +-
 archivers/libarchive/files/libarchive/test/test_write_format_cpio_newc.c          |     2 +-
 archivers/libarchive/files/libarchive/test/test_write_format_mtree.c              |   123 +
 archivers/libarchive/files/libarchive/test/test_write_format_pax.c                |     2 +-
 archivers/libarchive/files/libarchive/test/test_write_format_tar.c                |     4 +-
 archivers/libarchive/files/libarchive/test/test_write_format_zip.c                |   902 +-
 archivers/libarchive/files/libarchive/test/test_write_format_zip_no_compression.c |   310 -
 archivers/libarchive/files/libarchive/test/test_write_zip_set_compression_store.c |   308 -
 archivers/libarchive/files/libarchive_fe/err.c                                    |    26 +-
 archivers/libarchive/files/libarchive_fe/err.h                                    |     5 +-
 archivers/libarchive/files/tar/CMakeLists.txt                                     |     3 +-
 archivers/libarchive/files/tar/bsdtar.1                                           |    70 +-
 archivers/libarchive/files/tar/bsdtar.c                                           |    42 +-
 archivers/libarchive/files/tar/bsdtar.h                                           |    12 +
 archivers/libarchive/files/tar/bsdtar_platform.h                                  |     8 +-
 archivers/libarchive/files/tar/bsdtar_windows.h                                   |     6 +
 archivers/libarchive/files/tar/cmdline.c                                          |     5 +
 archivers/libarchive/files/tar/read.c                                             |   153 +-
 archivers/libarchive/files/tar/subst.c                                            |   102 +-
 archivers/libarchive/files/tar/test/CMakeLists.txt                                |    10 +-
 archivers/libarchive/files/tar/test/list.h                                        |     5 +
 archivers/libarchive/files/tar/test/main.c                                        |   229 +-
 archivers/libarchive/files/tar/test/test.h                                        |    29 +-
 archivers/libarchive/files/tar/test/test_option_s.c                               |    23 +-
 archivers/libarchive/files/tar/test/test_version.c                                |     5 +
 archivers/libarchive/files/tar/util.c                                             |   310 +-
 archivers/libarchive/files/tar/write.c                                            |    42 +-
 252 files changed, 18191 insertions(+), 11324 deletions(-)

diffs (truncated from 45471 to 300 lines):

diff -r 43aa3c99fcea -r 610bef409f5c archivers/libarchive/files/CMakeLists.txt
--- a/archivers/libarchive/files/CMakeLists.txt Mon Jun 20 17:19:56 2016 +0000
+++ b/archivers/libarchive/files/CMakeLists.txt Mon Jun 20 17:24:55 2016 +0000
@@ -1,5 +1,5 @@
 #
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6 FATAL_ERROR)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
 #
 PROJECT(libarchive C)
 #
@@ -15,7 +15,7 @@
 #   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)
+  SET(CMAKE_BUILD_TYPE "Debug" 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".
@@ -35,6 +35,9 @@
 # On MacOS, prefer MacPorts libraries to system libraries.
 # I haven't come up with a compelling argument for this to be conditional.
 list(APPEND CMAKE_PREFIX_PATH /opt/local)
+# Enable @rpath in the install name.
+# detail in "cmake  --help-policy CMP0042"
+SET(CMAKE_MACOSX_RPATH ON)
 
 #
 # Version - read from 'version' file.
@@ -55,11 +58,12 @@
 SET(VERSION                    "${_major}.${_trimmed_minor}.${_trimmed_revision}${_quality}")
 SET(BSDCPIO_VERSION_STRING     "${VERSION}")
 SET(BSDTAR_VERSION_STRING      "${VERSION}")
+SET(BSDCAT_VERSION_STRING      "${VERSION}")
 SET(LIBARCHIVE_VERSION_NUMBER  "${_version_number}")
 SET(LIBARCHIVE_VERSION_STRING  "${VERSION}")
 
 # INTERFACE_VERSION increments with every release
-# libarchive 2.7 == interface version 9 = 2 + 7 
+# libarchive 2.7 == interface version 9 = 2 + 7
 # libarchive 2.8 == interface version 10 = 2 + 8
 # libarchive 2.9 == interface version 11 = 2 + 9
 # libarchive 3.0 == interface version 12
@@ -84,7 +88,22 @@
 # 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$")
+IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$")
+  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")
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra")
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -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 (CMAKE_C_COMPILER_ID MATCHES "^Clang$")
   SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security")
   #################################################################
   # Set compile flags for all build types.
@@ -92,11 +111,28 @@
   #################################################################
   # 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} -g")
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra")
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -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$")
+ENDIF (CMAKE_C_COMPILER_ID MATCHES "^Clang$")
+IF (CMAKE_C_COMPILER_ID MATCHES "^XL$")
+  SET(CMAKE_C_COMPILER "xlc_r")
+  SET(CMAKE_REQUIRED_FLAGS "-qflag=e:e -qformat=sec")
+  #################################################################
+  # Set compile flags for all build types.
+  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=e:e -qformat=sec")
+  #################################################################
+  # 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} -g")
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qhalt=w")
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qflag=w:w")
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qinfo=pro:use")
+ENDIF(CMAKE_C_COMPILER_ID MATCHES "^XL$")
 IF (MSVC)
   #################################################################
   # Set compile flags for debug build.
@@ -143,17 +179,36 @@
 
 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)
+OPTION(ENABLE_ZLIB "Enable the use of the system found ZLIB library if found" ON)
+OPTION(ENABLE_BZip2 "Enable the use of the system found BZip2 library if found" ON)
+OPTION(ENABLE_LIBXML2 "Enable the use of the system found libxml2 library if found" ON)
+OPTION(ENABLE_EXPAT "Enable the use of the system found EXPAT library if found" ON)
+OPTION(ENABLE_PCREPOSIX "Enable the use of the system found PCREPOSIX library if found" ON)
+OPTION(ENABLE_LibGCC "Enable the use of the system found LibGCC library if found" ON)
+# CNG is used for encrypt/decrypt Zip archives on Windows.
+OPTION(ENABLE_CNG "Enable the use of CNG(Crypto Next Generation)" ON)
+
 OPTION(ENABLE_TAR "Enable tar building" ON)
 OPTION(ENABLE_TAR_SHARED "Enable dynamic build of tar" FALSE)
 OPTION(ENABLE_CPIO "Enable cpio building" ON)
 OPTION(ENABLE_CPIO_SHARED "Enable dynamic build of cpio" FALSE)
+OPTION(ENABLE_CAT "Enable cat building" ON)
+OPTION(ENABLE_CAT_SHARED "Enable dynamic build of cat" FALSE)
 OPTION(ENABLE_XATTR "Enable extended attribute support" ON)
 OPTION(ENABLE_ACL "Enable ACL support" ON)
 OPTION(ENABLE_ICONV "Enable iconv support" ON)
 OPTION(ENABLE_TEST "Enable unit and regression tests" ON)
+OPTION(ENABLE_COVERAGE "Enable code coverage (GCC only, automatically sets ENABLE_TEST to ON)" FALSE)
+OPTION(ENABLE_INSTALL "Enable installing of libraries" ON)
+
 SET(POSIX_REGEX_LIB "AUTO" CACHE STRING "Choose what library should provide POSIX regular expression support")
 SET(ENABLE_SAFESEH "AUTO" CACHE STRING "Enable use of /SAFESEH linker flag (MSVC only)")
-SET(WINDOWS_VERSION "" CACHE STRING "Set Windows version to use (Windows only)")
+SET(WINDOWS_VERSION "WIN7" CACHE STRING "Set Windows version to use (Windows only)")
+
+IF(ENABLE_COVERAGE)
+       include(LibarchiveCodeCoverage)
+ENDIF(ENABLE_COVERAGE)
 
 IF(ENABLE_TEST)
        ENABLE_TESTING()
@@ -161,22 +216,35 @@
 
 IF(WIN32)
   IF(WINDOWS_VERSION STREQUAL "WIN8")
+    SET(NTDDI_VERSION 0x06020000)
+    SET(_WIN32_WINNT 0x0602)
     SET(WINVER 0x0602)
   ELSEIF(WINDOWS_VERSION STREQUAL "WIN7")
+    SET(NTDDI_VERSION 0x06010000)
+    SET(_WIN32_WINNT 0x0601)
     SET(WINVER 0x0601)
   ELSEIF(WINDOWS_VERSION STREQUAL "WS08")
+    SET(NTDDI_VERSION 0x06000100)
+    SET(_WIN32_WINNT 0x0600)
     SET(WINVER 0x0600)
   ELSEIF(WINDOWS_VERSION STREQUAL "VISTA")
+    SET(NTDDI_VERSION 0x06000000)
+    SET(_WIN32_WINNT 0x0600)
     SET(WINVER 0x0600)
   ELSEIF(WINDOWS_VERSION STREQUAL "WS03")
+    SET(NTDDI_VERSION 0x05020000)
+    SET(_WIN32_WINNT 0x0502)
     SET(WINVER 0x0502)
   ELSEIF(WINDOWS_VERSION STREQUAL "WINXP")
+    SET(NTDDI_VERSION 0x05010000)
+    SET(_WIN32_WINNT 0x0501)
     SET(WINVER 0x0501)
   ELSE(WINDOWS_VERSION STREQUAL "WIN8")
-    # The default is to use Windows 2000 API.
-    SET(WINVER 0x0500)
+    # Default to Windows Server 2003 API if we don't recognize the specifier
+    SET(NTDDI_VERSION 0x05020000)
+    SET(_WIN32_WINNT 0x0502)
+    SET(WINVER 0x0502)
   ENDIF(WINDOWS_VERSION STREQUAL "WIN8")
-  SET(_WIN32_WINNT ${WINVER})
 ENDIF(WIN32)
 
 IF(MSVC)
@@ -184,12 +252,12 @@
     SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH")
     SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH")
     SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH")
-       SET(CMAKE_REQUIRED_LINKER_FLAGS "/SAFESEH")
+    SET(ENV{LDFLAGS} "$ENV{LDFLAGS} /SAFESEH")
   ELSEIF(ENABLE_SAFESEH STREQUAL "NO")
     SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
     SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
     SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
-       SET(CMAKE_REQUIRED_LINKER_FLAGS "/SAFESEH:NO")
+    SET(ENV{LDFLAGS} "$ENV{LDFLAGS} /SAFESEH:NO")
   ENDIF(ENABLE_SAFESEH STREQUAL "YES")
 ENDIF(MSVC)
 
@@ -198,8 +266,8 @@
 ENDIF()
 
 #
-INCLUDE(LibarchiveCheckCSourceCompiles)
-INCLUDE(LibarchiveCheckCSourceRuns)
+INCLUDE(CheckCSourceCompiles)
+INCLUDE(CheckCSourceRuns)
 INCLUDE(CheckFileOffsetBits)
 INCLUDE(CheckFuncs)
 INCLUDE(CheckHeaderDirent)
@@ -263,9 +331,9 @@
       ENDIF(NOT "${PREV_VAR_WITH_LIB}" STREQUAL "${LIBRARIES}")
       # Check if the library can be used with the macro.
       IF("${TRY_TYPE}" MATCHES "COMPILES")
-        LIBARCHIVE_CHECK_C_SOURCE_COMPILES("${SAMPLE_SOURCE}" ${VAR})
+        CHECK_C_SOURCE_COMPILES("${SAMPLE_SOURCE}" ${VAR})
       ELSEIF("${TRY_TYPE}" MATCHES "RUNS")
-        LIBARCHIVE_CHECK_C_SOURCE_RUNS("${SAMPLE_SOURCE}" ${VAR})
+        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")
@@ -297,11 +365,11 @@
   #   e.g.
   #     cmake -DCMAKE_PREFIX_PATH=<your-GnuWin32-path> <path-to-source>
   #
-  # If compiling error occured in zconf.h, You may need patch to zconf.h.
+  # If compiling error occurred in zconf.h, You may need patch to zconf.h.
   #--- zconf.h.orig    2005-07-21 00:40:26.000000000
   #+++ zconf.h 2009-01-19 11:39:10.093750000
   #@@ -286,7 +286,7 @@
-  # 
+  #
   # #if 1           /* HAVE_UNISTD_H -- this line is updated by ./configure */
   # #  include <sys/types.h> /* for off_t */
   #-#  include <unistd.h>    /* for SEEK_* and off_t */
@@ -315,7 +383,11 @@
 #
 # Find ZLIB
 #
-FIND_PACKAGE(ZLIB)
+IF(ENABLE_ZLIB)
+  FIND_PACKAGE(ZLIB)
+ELSE()
+  SET(ZLIB_FOUND FALSE) # Override cached value
+ENDIF()
 IF(ZLIB_FOUND)
   SET(HAVE_LIBZ 1)
   SET(HAVE_ZLIB_H 1)
@@ -350,7 +422,11 @@
 #
 # Find BZip2
 #
-FIND_PACKAGE(BZip2)
+IF(ENABLE_BZip2)
+  FIND_PACKAGE(BZip2)
+ELSE()
+  SET(BZIP2_FOUND FALSE) # Override cached value
+ENDIF()
 IF(BZIP2_FOUND)
   SET(HAVE_LIBBZ2 1)
   SET(HAVE_BZLIB_H 1)
@@ -370,10 +446,18 @@
 ENDIF(BZIP2_FOUND)
 MARK_AS_ADVANCED(CLEAR BZIP2_INCLUDE_DIR)
 MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARIES)
+
+
 #
 # Find LZMA
 #
-FIND_PACKAGE(LZMA)
+IF(ENABLE_LZMA)
+  FIND_PACKAGE(LZMA)
+ELSE()
+  SET(LZMA_FOUND FALSE) # Override cached value
+  SET(LZMADEC_FOUND FALSE) # Override cached value
+ENDIF()
+
 IF(LZMA_FOUND)
   SET(HAVE_LIBLZMA 1)
   SET(HAVE_LZMA_H 1)
@@ -393,6 +477,8 @@
   SET(HAVE_LZMADEC_H 1)
   INCLUDE_DIRECTORIES(${LZMADEC_INCLUDE_DIR})
   LIST(APPEND ADDITIONAL_LIBS ${LZMADEC_LIBRARIES})
+ELSE(LZMA_FOUND)
+# LZMA not found and will not be used.
 ENDIF(LZMA_FOUND)
 #
 # Find LZO2
@@ -418,6 +504,33 @@
 ENDIF(LZO2_FOUND)
 MARK_AS_ADVANCED(CLEAR LZO2_INCLUDE_DIR)
 MARK_AS_ADVANCED(CLEAR LZO2_LIBRARY)
+#
+# Find LZ4
+#
+IF (LZ4_INCLUDE_DIR)
+  # Already in cache, be silent
+  SET(LZ4_FIND_QUIETLY TRUE)
+ENDIF (LZ4_INCLUDE_DIR)
+
+FIND_PATH(LZ4_INCLUDE_DIR lz4.h)
+FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4)
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR)
+IF(LZ4_FOUND)
+  SET(HAVE_LIBLZ4 1)



Home | Main Index | Thread Index | Old Index