mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-19 00:15:21 +01:00
Qt/QML edition
This commit is contained in:
commit
d7b361ba44
2168 changed files with 721948 additions and 0 deletions
2046
dependencies/libarchive-3.4.2/CMakeLists.txt
vendored
Normal file
2046
dependencies/libarchive-3.4.2/CMakeLists.txt
vendored
Normal file
File diff suppressed because it is too large
Load diff
66
dependencies/libarchive-3.4.2/COPYING
vendored
Normal file
66
dependencies/libarchive-3.4.2/COPYING
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
The libarchive distribution as a whole is Copyright by Tim Kientzle
|
||||
and is subject to the copyright notice reproduced at the bottom of
|
||||
this file.
|
||||
|
||||
Each individual file in this distribution should have a clear
|
||||
copyright/licensing statement at the beginning of the file. If any do
|
||||
not, please let me know and I will rectify it. The following is
|
||||
intended to summarize the copyright status of the individual files;
|
||||
the actual statements in the files are controlling.
|
||||
|
||||
* Except as listed below, all C sources (including .c and .h files)
|
||||
and documentation files are subject to the copyright notice reproduced
|
||||
at the bottom of this file.
|
||||
|
||||
* The following source files are also subject in whole or in part to
|
||||
a 3-clause UC Regents copyright; please read the individual source
|
||||
files for details:
|
||||
libarchive/archive_entry.c
|
||||
libarchive/archive_read_support_filter_compress.c
|
||||
libarchive/archive_write_add_filter_compress.c
|
||||
libarchive/mtree.5
|
||||
|
||||
* The following source files are in the public domain:
|
||||
libarchive/archive_getdate.c
|
||||
|
||||
* The following source files are triple-licensed with the ability to choose
|
||||
from CC0 1.0 Universal, OpenSSL or Apache 2.0 licenses:
|
||||
libarchive/archive_blake2.h
|
||||
libarchive/archive_blake2_impl.h
|
||||
libarchive/archive_blake2s_ref.c
|
||||
libarchive/archive_blake2sp_ref.c
|
||||
|
||||
* The build files---including Makefiles, configure scripts,
|
||||
and auxiliary scripts used as part of the compile process---have
|
||||
widely varying licensing terms. Please check individual files before
|
||||
distributing them to see if those restrictions apply to you.
|
||||
|
||||
I intend for all new source code to use the license below and hope over
|
||||
time to replace code with other licenses with new implementations that
|
||||
do use the license below. The varying licensing of the build scripts
|
||||
seems to be an unavoidable mess.
|
||||
|
||||
|
||||
Copyright (c) 2003-2018 <author(s)>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer
|
||||
in this position and unchanged.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
35
dependencies/libarchive-3.4.2/INSTALL
vendored
Normal file
35
dependencies/libarchive-3.4.2/INSTALL
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
More complete build documentation is available on the libarchive
|
||||
Wiki: https://github.com/libarchive/libarchive/wiki
|
||||
|
||||
On most Unix-like systems, you should be able to install libarchive,
|
||||
bsdtar, and bsdcpio using the following common steps:
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
If you need to customize the target directories or otherwise adjust
|
||||
the build setting, use
|
||||
./configure --help
|
||||
to list the configure options.
|
||||
|
||||
If you are developing libarchive and need to update the
|
||||
configure script and other build files:
|
||||
/bin/sh build/autogen.sh
|
||||
|
||||
To create a distribution, please use the 'distcheck' target:
|
||||
/bin/sh build/autogen.sh && ./configure && make distcheck
|
||||
|
||||
On Unix-like and non-Unix-like systems, use the "cmake" utility (available from
|
||||
http://cmake.org/) to generate suitable build files for your platform.
|
||||
Cmake requires the name of the directory containing CmakeLists.txt and
|
||||
the "generator" to use for your build environment. For example, to
|
||||
build with Xcode on Mac OS, you can use the following command:
|
||||
cmake -G "Xcode" ~/libarchive-download-dir/
|
||||
The result will be appropriate makefiles, solution files, or project
|
||||
files that can be used with the corresponding development tool.
|
||||
The default on Unix-like systems is to generate Makefiles, so you
|
||||
can also use cmake instead of the configure script:
|
||||
cmake ~/libarchive-download-dir/
|
||||
make
|
||||
make install
|
||||
See the libarchive Wiki or the cmake site for further documentation.
|
1405
dependencies/libarchive-3.4.2/Makefile.am
vendored
Normal file
1405
dependencies/libarchive-3.4.2/Makefile.am
vendored
Normal file
File diff suppressed because it is too large
Load diff
14535
dependencies/libarchive-3.4.2/Makefile.in
vendored
Normal file
14535
dependencies/libarchive-3.4.2/Makefile.in
vendored
Normal file
File diff suppressed because it is too large
Load diff
727
dependencies/libarchive-3.4.2/NEWS
vendored
Normal file
727
dependencies/libarchive-3.4.2/NEWS
vendored
Normal file
|
@ -0,0 +1,727 @@
|
|||
Feb 11, 2020: libarchive 3.4.2 released
|
||||
|
||||
Jan 23, 2020: Important fixes for writing XAR archives
|
||||
|
||||
Jan 20, 2020: New tar option: --safe-writes (atomical file extraction)
|
||||
|
||||
Jan 03, 2020: Support mbed TLS (PolarSSL) as optional crypto provider
|
||||
|
||||
Dec 30, 2019: libarchive 3.4.1 released
|
||||
|
||||
Dec 11, 2019: New pax write option "xattrhdr"
|
||||
|
||||
Nov 17, 2019: Unicode filename support for reading lha/lzh archives
|
||||
|
||||
Jun 11, 2019: libarchive 3.4.0 released
|
||||
|
||||
May 18, 2019: Fixes for reading Android APK and JAR archives
|
||||
|
||||
Apr 16, 2019: Support for non-recursive list and extract
|
||||
|
||||
Apr 14, 2019: New tar option: --exclude-vcs
|
||||
|
||||
Mar 27, 2019: Support for file and directory symlinks on Windows
|
||||
|
||||
Mar 12, 2019: Important fixes for storing file attributes and flags
|
||||
|
||||
Jan 20, 2019: Support for xz, lzma, ppmd8 and bzip2 decompression in ZIP files
|
||||
|
||||
Oct 06, 2018: RAR 5.0 reader
|
||||
|
||||
Sep 03, 2018: libarchive 3.3.3 released
|
||||
|
||||
Jul 19, 2018: Avoid super-linear slowdown on malformed mtree files
|
||||
|
||||
Jan 27, 2018: Many fixes for building with Visual Studio
|
||||
|
||||
Oct 19, 2017: NO_OVERWRITE doesn't change existing directory attributes
|
||||
|
||||
Aug 12, 2017: New support for Zstandard read and write filters
|
||||
|
||||
Jul 09, 2017: libarchive 3.3.2 released
|
||||
|
||||
Mar 16, 2017: NFSv4 ACL support for Linux (librichacl)
|
||||
|
||||
Feb 26, 2017: libarchive 3.3.1 released
|
||||
Security & Feature release
|
||||
|
||||
Feb 19, 2017: libarchive 3.3.0 released
|
||||
Security & Feature release
|
||||
|
||||
Jan 29, 2017: Limited NFSv4 ACL support for Mac OS (Darwin)
|
||||
|
||||
Jan 10, 2017: POSIX.1e and NFSv4 ACL support for Solaris and derivates
|
||||
|
||||
Dec 27, 2016: NFSv4 ACL read and write support for pax
|
||||
Deprecated functions: archive_entry_acl_text(), archive_entry_acl_text_w()
|
||||
|
||||
Nov, 2016: libarchive is now being tested by the OSS-Fuzz project
|
||||
|
||||
Oct 26, 2016: Remove liblzmadec support
|
||||
|
||||
Oct 23, 2016: libarchive 3.2.2 released
|
||||
Security release
|
||||
|
||||
Jun 20, 2016: libarchive 3.2.1 released
|
||||
This fixes a handful of security and other critical issues with 3.2.0
|
||||
|
||||
May 01, 2016: libarchive 3.2.0 released
|
||||
|
||||
Apr 09, 2016: libarchive 3.1.901a released
|
||||
Another test release in preparation for 3.2.0
|
||||
|
||||
Feb 13, 2016: libarchive 3.1.900a released
|
||||
This is a test release in preparation for 3.2.0
|
||||
|
||||
Oct 21, 2015: Preliminary port to OSF
|
||||
|
||||
Apr 11, 2015: libarchive's issue tracker is now hosted at GitHub.
|
||||
https://github.com/libarchive/libarchive/issues
|
||||
|
||||
Early 2015: Many fixes to crash and overflow bugs thanks to Hanno Boeck
|
||||
|
||||
Oct 13, 2014: Zip encryption and decryption support
|
||||
|
||||
Aug 13, 2014: Add support for lz4 compression.
|
||||
|
||||
Jun 10, 2014: Add warc format support
|
||||
|
||||
May 3, 2014: Add experimental Zip streaming extension
|
||||
|
||||
Apr 6, 2014: Add bsdcat command-line tool
|
||||
|
||||
Jan 12, 2014: Add Zip64 support
|
||||
|
||||
Dec 1, 2013: Rewrite Zip write logic
|
||||
|
||||
Jul 1, 2013: Add ability to detect encrypted entries for many formats
|
||||
(This does not add the ability to *decrypt* those entries, however)
|
||||
|
||||
Feb 23, 2013: "raw" write support added
|
||||
|
||||
Feb 09, 2013: libarchive 3.1.2 released
|
||||
|
||||
Jan 28, 2013: libarchive's new website moved to http://www.libarchive.org.
|
||||
|
||||
Jan 13, 2013: libarchive 3.1.1 released
|
||||
|
||||
Jan 13, 2013: libarchive 3.1.0 released
|
||||
|
||||
Dec 07, 2012: Implement functions to manually set the format and filters used.
|
||||
|
||||
Nov 11, 2012: Add support for __MACOSX directory in Zip archives, which resource
|
||||
forks are stored in.
|
||||
|
||||
Oct 20, 2012: Add support for writing v7 tar format.
|
||||
|
||||
Oct 09, 2012: Add support for grzip compression.
|
||||
|
||||
Oct 07, 2012: Introduce b64encode filter.
|
||||
Oct 07, 2012: Introduce uuencode filter.
|
||||
|
||||
Oct 06, 2012: Add support for lzop.
|
||||
|
||||
Sep 27, 2012: Implement function used to seek within data blocks.
|
||||
(Currently only supported for uncompressed RAR archives).
|
||||
|
||||
Apr 22, 2012: Add basic archive read and write filter support for lrzip.
|
||||
|
||||
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
|
||||
Dec 23, 2011: Symlink support in Zip reader and writer
|
||||
Dec 23, 2011: Robustness fixes to 7Zip reader
|
||||
|
||||
Nov 27, 2011: libarchive 3.0.1b released
|
||||
|
||||
Nov 26, 2011: 7Zip reader
|
||||
Nov 26, 2011: Small fixes to ISO and Zip to improve robustness with corrupted input
|
||||
Nov 24, 2011: Improve streaming Zip reader's support for uncompressed entries
|
||||
Nov 20, 2011: New seeking Zip reader supports SFX Zip archives
|
||||
Nov 20, 2011: Build fixes on Windows
|
||||
|
||||
Nov 13, 2011: libarchive 3.0.0a released
|
||||
|
||||
Nov 06, 2011: Update shared-library version calculations for libarchive 3.x
|
||||
Sep 04, 2011: Fix tar -s; follow GNU tar for controlling hardlink/symlink substitutions
|
||||
Aug 18, 2011: Fix reading ISO images built by NetBSD's mkisofs
|
||||
Aug 15, 2011: Old archive_read_support_compression_XXX functions are deprecated and
|
||||
will disappear in libarchive 4.0.
|
||||
Jun 26, 2011: RAR reader
|
||||
Jun 16, 2011: Add tar:compat-2x option to emulate broken libarchive 2.x
|
||||
handling of pax UTF-8 headers
|
||||
Apr 25, 2011: Refactor read_open() into a collection of single-item setters;
|
||||
support the old interfaces as wrappers
|
||||
Apr 12, 2011: Split disk writer into separate POSIX and Windows implementations
|
||||
Apr 10, 2011: Improvements to character translations on Windows.
|
||||
Mar 30, 2011: More work to return errors instead of calling abort()
|
||||
Mar 23, 2011: Add charset option to many writers to control MBCS filenames
|
||||
Mar 17, 2011: Overhauled support for per-format extension options
|
||||
Mar 17, 2011: Track character set used for mbcs strings, support
|
||||
translating to/from user-specified locale
|
||||
Mar 09, 2011: Recognize mtree files without requiring a signature
|
||||
Mar 06, 2011: Use iconv to convert to/from Unicode instead of making bad
|
||||
assumptions about the C90 character set translation functions
|
||||
Feb 17, 2011: Fixes for AIX, TRU64, and other platforms
|
||||
Dec 22, 2010: CAB reader
|
||||
Dec 20, 2010: LHA/LZH reader
|
||||
Jul 03, 2010: minitar example demonstrates archive_read_disk directory traversal
|
||||
Jun 29, 2010: Many improvements to ISO reader compatibility
|
||||
Jun 26, 2010: Use larger buffers when copy files into an archive
|
||||
Jun 18, 2010: Reimplement Mac OS extensions in libarchive
|
||||
Jun 09, 2010: archive_read_disk now supports traversals
|
||||
May 28, 2010: XAR writer
|
||||
May 16, 2010: Fix ^T handling; don't exit on interrupted reads and writes
|
||||
May 09, 2010: Improved detection of platform-specific crypto support
|
||||
May 04, 2010: lzip read and write filters
|
||||
May 01, 2010: New options: tar --gid --gname --uid --uname
|
||||
Apr 28, 2010: Use Red-black tree for ISO reader/writer to improve performance
|
||||
Apr 17, 2010: Minimal writer for legacy GNU tar format
|
||||
Mar 12, 2010: Don't dereference symlinks on Linux when reading ACLs.
|
||||
Mar 06, 2010: Fix build when an older libarchive is already installed
|
||||
Feb 28, 2010: Relax handling of state failures; misuse by clients now generally
|
||||
results in a sticky ARCHIVE_FATAL rather than a visit to abort()
|
||||
Feb 25, 2010: ISO writer
|
||||
Feb 21, 2010: Split many man pages into smaller chunks.
|
||||
Feb 21, 2010: Performance: Cheat on block sizes when reading archives from disk.
|
||||
Feb 21, 2010: Use int64_t instead of off_t, dev_t, ino_t, uid_t, and gid_t
|
||||
Feb 20, 2010: Document new ACL functions.
|
||||
Feb 19, 2010: Support multiple write filters
|
||||
Feb 07, 2010: Remove some legacy libarchive 1.x APIs
|
||||
Feb 04, 2010: Read afio headers
|
||||
Feb 02, 2010: Archive sparse files compatibly with GNU tar
|
||||
Feb 01, 2010: Integrate Apple extensions for Mac OS extended attributes into bsdtar
|
||||
Jan 31, 2010: Support cpio -V
|
||||
|
||||
Feb 04, 2010: libarchive 2.8.0 released
|
||||
Jan 17, 2010: Fix error handling for 'echo nonexistent | cpio -o'
|
||||
Jan 17, 2010: Don't use futimes() on Cygwin
|
||||
|
||||
Jan 02, 2010: libarchive 2.7.902a released (test release for 2.8)
|
||||
Jan 02, 2010: Fix tar/test/test_windows on MinGW
|
||||
Jan 02, 2010: Fix memory leaks in libarchive tests
|
||||
Jan 01, 2010: Fix memory leak when filter startup fails
|
||||
|
||||
Dec 27, 2009: libarchive 2.7.901a released (test release for 2.8)
|
||||
|
||||
Aug 04, 2009: libarchive 2.7.1 released
|
||||
Jul 20, 2009: Suppress bogus warning about unxz
|
||||
Jul 19, 2009: Support Cygwin 1.7
|
||||
Jun 11, 2009: Support lzma/xz files compressed with larger buffer sizes.
|
||||
May 24, 2009: Handle gzip files signed with OpenBSD "gzsig" program.
|
||||
May 07, 2009: Avoid false failures when reading from pipe.
|
||||
|
||||
Apr 16, 2009: libarchive 2.7.0 released
|
||||
|
||||
Apr 10, 2009: libarchive 2.6.992a released
|
||||
Apr 09, 2009: Fix SIGPIPE issue building with MSVC.
|
||||
Apr 09, 2009: Fix several minor memory leaks in libarchive and libarchive_test
|
||||
|
||||
Apr 08, 2009: libarchive 2.6.991a released
|
||||
Apr 07, 2009: Additional tests added to bsdcpio_test
|
||||
|
||||
Apr 01, 2009: libarchive 2.6.990a released
|
||||
Apr 01, 2009: Use command-line gunzip, bunzip2, unxz, unlzma for
|
||||
decompression if the library is built without suitable
|
||||
libraries. The setup functions return ARCHIVE_WARN
|
||||
in this case so clients can adapt if necessary.
|
||||
Apr 01, 2009: Use getpw*_r and getgr*_r functions for thread-safety.
|
||||
Mar 24, 2009: Add archive_read_next_header2(), which is up to 25%
|
||||
more efficient for some clients; from Brian Harring.
|
||||
Mar 22, 2009: PDF versions of manpages are now included in the distribution.
|
||||
Mar, 2009: Major work to improve Cygwin build by Charles Wilson.
|
||||
Feb/Mar, 2009: Major work on cmake build support, mostly by Michihiro NAKAJIMA.
|
||||
Feb/Mar, 2009: Major work on Visual Studio support by Michihiro NAKAJIMA.
|
||||
All tests now pass.
|
||||
Feb 25, 2009: Fix Debian Bug #516577
|
||||
Feb 21, 2009: Yacc is no longer needed to build; date parser rewritten in C.
|
||||
Jan/Feb, 2009: Mtree work by Michihiro.
|
||||
Feb, 2009: Joliet support by Andreas Henriksson.
|
||||
Jan/Feb, 2009: New options framework by Michihiro.
|
||||
Feb, 2009: High-res timestamps on Tru64, AIX, and GNU Hurd, by Björn Jacke.
|
||||
Jan 18, 2009: Extended attributes work on FreeBSD and Linux now with pax format.
|
||||
Jan 07, 2009: New archive_read_disk_entry_from_file() knows about ACLs,
|
||||
extended attributes, etc so that bsdtar and bsdcpio don't require
|
||||
such system-specific knowledge.
|
||||
Jan 03, 2009: Read filter system extensively refactored. In particular,
|
||||
read filter pipelines are now built out automatically and individual
|
||||
filters should be much easier to implement. Documentation on the
|
||||
Googlecode Wiki explains how to implement new filters.
|
||||
Dec 28, 2008: Many Windows/Visual Studio fixes from Michihiro NAKAJIMA.
|
||||
|
||||
Dec 28, 2008: Main libarchive development moved from FreeBSD Perforce
|
||||
server to Google Code. This should make it easier for more
|
||||
people to participate in libarchive development.
|
||||
|
||||
Dec 28, 2008: libarchive 2.6.0 released
|
||||
Dec 25, 2008: libarchive 2.5.905a released
|
||||
Dec 10, 2008: libarchive 2.5.904a released
|
||||
Dec 04, 2008: libarchive 2.5.903a released
|
||||
Nov 09, 2008: libarchive 2.5.902a released
|
||||
Nov 08, 2008: libarchive 2.5.901a released
|
||||
Nov 08, 2008: Start of pre-release testing for libarchive 2.6
|
||||
|
||||
Nov 07, 2008: Read filter refactor: The decompression routines just
|
||||
consume and produce arbitrarily-sized blocks. The reblocking
|
||||
from read_support_compression_none() has been pulled into the
|
||||
read core. Also, the decompression bid now makes multiple
|
||||
passes and stacks read filters.
|
||||
Oct 21, 2008: bsdcpio: New command-line parser.
|
||||
Oct 19, 2008: Internal read_ahead change: short reads are now an error
|
||||
Oct 06, 2008: bsdtar: option parser no longer uses getopt_long(),
|
||||
gives consistent option parsing on all platforms.
|
||||
Sep 19, 2008: Jaakko Heinonen: shar utility built on libarchive
|
||||
Sep 17, 2008: Pedro Giffuni: birthtime support
|
||||
Sep 17, 2008: Miklos Vajna: lzma reader and test. Note: I still have
|
||||
some concerns about the auto-detection (LZMA file format
|
||||
doesn't support auto-detection well), so this is not yet
|
||||
enabled under archive_read_support_compression_all(). For
|
||||
now, you must call archive_read_support_compression_lzma() if
|
||||
you want LZMA read support.
|
||||
Sep 11, 2008: Ivailo Petrov: Many fixes to Windows build, new solution files
|
||||
Jul 26, 2008: archive_entry now tracks which values have not been set.
|
||||
This helps zip extraction (file size is often "unknown") and
|
||||
time restores (tar usually doesn't know atime).
|
||||
Jul 26, 2008: Joerg Sonnenberger: Performance improvements to shar writer
|
||||
Jul 25, 2008: Joerg Sonnenberger: mtree write support
|
||||
|
||||
Jul 02, 2008: libarchive 2.5.5 released
|
||||
|
||||
Jul 02, 2008: libarchive 2.5.5b released
|
||||
Jul 01, 2008: bsdcpio is being used by enough people, we can call it 1.0.0 now
|
||||
Jun 20, 2008: bsdcpio: If a -l link fails with EXDEV, copy the file instead
|
||||
Jun 19, 2008: bsdcpio: additional long options for better GNU cpio compat
|
||||
Jun 15, 2008: Many small portability and bugfixes since 2.5.4b.
|
||||
|
||||
May 25, 2008: libarchive 2.5.4b released
|
||||
May 21, 2008: Joerg Sonnenberger: fix bsdtar hardlink handling for newc format
|
||||
|
||||
May 21, 2008: More progress on Windows building. Thanks to "Scott"
|
||||
for the Windows makefiles, thanks to Kees Zeelenberg for
|
||||
code contributions.
|
||||
|
||||
May 21, 2008: Fix a number of non-exploitable integer and buffer overflows,
|
||||
thanks to David Remahl at Apple for pointing these out.
|
||||
|
||||
May 21, 2008: Colin Percival: SIGINFO or SIGUSR1 to bsdtar prints progress info
|
||||
|
||||
May 16, 2008: bsdtar's test harness no longer depends on file ordering.
|
||||
This was causing spurious test failures on a lot of systems.
|
||||
Thanks to Bernhard R. Link for the diagnosis.
|
||||
|
||||
May 14, 2008: Joerg Sonnenberger: -s substitution support for bsdtar
|
||||
|
||||
May 13, 2008: Joerg Sonnenberger: Many mtree improvements
|
||||
|
||||
May 11, 2008: Joerg Sonnenberger: fix hardlink extraction when
|
||||
hardlinks have different permissions from original file
|
||||
|
||||
April 30, 2008: Primary libarchive work has been moved into the FreeBSD
|
||||
project's Perforce repository: http://perforce.freebsd.org/
|
||||
The libarchive project can be browsed at
|
||||
//depot/user/kientzle/libarchive-portable
|
||||
Direct link: http://preview.tinyurl.com/46mdgr
|
||||
|
||||
May 04, 2008: libarchive 2.5.3b released
|
||||
* libarchive: Several fixes to link resolver to address bsdcpio crashes
|
||||
* bsdcpio: -p hardlink handling fixes
|
||||
* tar/pax: Ensure ustar dirnames end in '/'; be more careful about
|
||||
measuring filenames when deciding what pathname fields to use
|
||||
* libarchive: Mark which entry strings are set; be accurate about
|
||||
distinguishing empty strings ("") from unset ones (NULL)
|
||||
* tar: Don't crash reading entries with empty filenames
|
||||
* libarchive_test, bsdtar_test, bsdcpio_test: Better defaults:
|
||||
run all tests, delete temp dirs, summarize repeated failures
|
||||
* -no-undefined to libtool for Cygwin
|
||||
* libarchive_test: Skip large file tests on systems with 32-bit off_t
|
||||
* iso9660: Don't bother trying to find the body of an empty file;
|
||||
this works around strange behavior from some ISO9660 writers
|
||||
* tar: allow -r -T to be used together
|
||||
* tar: allow --format with -r or -u
|
||||
* libarchive: Don't build archive.h
|
||||
|
||||
May 04, 2008: Simplified building: archive.h is no longer constructed
|
||||
This may require additional #if conditionals on some platforms.
|
||||
|
||||
Mar 30, 2008: libarchive 2.5.1b released
|
||||
|
||||
Mar 15, 2008: libarchive 2.5.0b released
|
||||
Mar 15, 2008: bsdcpio now seems to correctly write hardlinks into newc,
|
||||
ustar, and old cpio archives. Just a little more testing before
|
||||
bsdcpio 1.0 becomes a reality.
|
||||
Mar 15, 2008: I think the new linkify() interface is finally handling
|
||||
all known hardlink strategies.
|
||||
Mar 15, 2008: Mtree read fixes from Joerg Sonnenberger.
|
||||
Mar 15, 2008: Many new bsdtar and bsdcpio options from Joerg Sonnenberger.
|
||||
Mar 15, 2008: test harnesses no longer require uudecode; they
|
||||
now have built-in decoding logic that decodes the reference
|
||||
files as they are needed.
|
||||
|
||||
Mar 14, 2008: libarchive 2.4.14 released; identical to 2.4.13 except for
|
||||
a point fix for gname/uname mixup in pax format that was introduced
|
||||
with the UTF-8 fixes.
|
||||
|
||||
Feb 26, 2008: libarchive 2.4.13 released
|
||||
Feb 25, 2008: Handle path, linkname, gname, or uname that can't be converted
|
||||
to/from UTF-8. Implement "hdrcharset" attribute from SUS-2008.
|
||||
Feb 25, 2008: Fix name clash on NetBSD.
|
||||
Feb 18, 2008: Fix writing empty 'ar' archives, per Kai Wang
|
||||
Feb 18, 2008: [bsdtar] Permit appending on block devices.
|
||||
Feb 09, 2008: New "linkify" resolver to help with newc hardlink writing;
|
||||
bsdcpio still needs to be converted to use this.
|
||||
Feb 02, 2008: Windows compatibility fixes from Ivailo Petrov, Kees Zeelenberg
|
||||
Jan 30, 2008: Ignore hardlink size for non-POSIX tar archives.
|
||||
|
||||
Jan 22, 2008: libarchive 2.4.12 released
|
||||
Jan 22, 2008: Fix bad padding when writing symlinks to newc cpio archives.
|
||||
Jan 22, 2008: Verify bsdcpio_test by getting it to work against GNU cpio 2.9.
|
||||
bsdcpio_test complains about missing options (-y and -z), format
|
||||
of informational messages (--version, --help), and a minor formatting
|
||||
issue in odc format output. After this update, bsdcpio_test uncovered
|
||||
several more cosmetic issues in bsdcpio, all now fixed.
|
||||
Jan 22, 2008: Experimental support for self-extracting Zip archives.
|
||||
Jan 22, 2008: Extend hardlink restore strategy to work correctly with
|
||||
hardlinks extracted from newc cpio files. (Which store the body
|
||||
only with the last occurrence of a link.)
|
||||
|
||||
Dec 30, 2007: libarchive 2.4.11 released
|
||||
Dec 30, 2007: Fixed a compile error in bsdcpio on some systems.
|
||||
|
||||
Dec 29, 2007: libarchive 2.4.10 released
|
||||
Dec 29, 2007: bsdcpio 0.9.0 is ready for wider use.
|
||||
Dec 29, 2007: Completed initial test harness for bsdcpio.
|
||||
|
||||
Dec 22, 2007: libarchive 2.4.9 released
|
||||
Dec 22, 2007: Implement the remaining options for bsdcpio: -a, -q, -L, -f,
|
||||
pattern selection for -i and -it.
|
||||
|
||||
Dec 13, 2007: libarchive 2.4.8 released
|
||||
Dec 13, 2007: gzip and bzip2 compression now handle zero-byte writes correctly,
|
||||
Thanks to Damien Golding for bringing this to my attention.
|
||||
|
||||
Dec 12, 2007: libarchive 2.4.7 released
|
||||
|
||||
Dec 10, 2007: libarchive 2.4.6 released
|
||||
Dec 09, 2007: tar/test/test_copy.c verifies "tar -c | tar -x" copy pipeline
|
||||
Dec 07, 2007: Fix a couple of minor memory leaks.
|
||||
|
||||
Dec 04, 2007: libarchive 2.4.5 released
|
||||
Dec 04, 2007: Fix cpio/test/test_write_odc by setting the umask first.
|
||||
|
||||
Dec 03, 2007: libarchive 2.4.4 released
|
||||
Dec 03, 2007: New configure options --disable-xattr and --disable-acl,
|
||||
thanks to Samuli Suominen.
|
||||
|
||||
Dec 03, 2007: libarchive 2.4.3 released
|
||||
Dec 03, 2007: Thanks to Lapo Luchini for sending me a ZIP file that
|
||||
libarchive couldn't handle. Fixed a bug in handling of
|
||||
"length at end" flags in ZIP files.
|
||||
Dec 03, 2007: Fixed bsdcpio -help, bsdtar -help tests.
|
||||
Dec 02, 2007: First cut at real bsdtar test harness.
|
||||
|
||||
Dec 02, 2007: libarchive 2.4.2 released
|
||||
|
||||
Dec 02, 2007: libarchive 2.4.1 released
|
||||
Dec 02, 2007: Minor fixes, rough cut of mdoc-to-man conversion for
|
||||
man pages.
|
||||
|
||||
Oct 30, 2007: libarchive 2.4.0 released
|
||||
Oct 30, 2007: Minor compile fix thanks to Joerg Schilling.
|
||||
Oct 30, 2007: Only run the format auction once at the beginning of the
|
||||
archive. This is simpler and supports better error recovery.
|
||||
Oct 29, 2007: Test support for very large entries in tar archives:
|
||||
libarchive_test now exercises entries from 2GB up to 1TB.
|
||||
|
||||
Oct 27, 2007: libarchive 2.3.5 released
|
||||
Oct 27, 2007: Correct some unnecessary internal data copying in the
|
||||
"compression none" reader and writer; this reduces user time
|
||||
by up to 2/3 in some tests. (Thanks to Jan Psota for
|
||||
publishing his performance test results to GNU tar's bug-tar
|
||||
mailing list; those results pointed me towards this problem.)
|
||||
Oct 27, 2007: Fix for skipping archive entries that are exactly
|
||||
a multiple of 4G on 32-bit platforms.
|
||||
Oct 25, 2007: Fix for reading very large (>8G) tar archives; this was
|
||||
broken when I put in support for new GNU tar sparse formats.
|
||||
Oct 20, 2007: Initial work on new pattern-matching code for cpio; I
|
||||
hope this eventually replaces the code currently in bsdtar.
|
||||
|
||||
Oct 08, 2007: libarchive 2.3.4 released
|
||||
Oct 05, 2007: Continuing work on bsdcpio test suite.
|
||||
Oct 05, 2007: New cpio.5 manpage, updates to "History" of bsdcpio.1 and
|
||||
bsdtar.1 manpages.
|
||||
Oct 05, 2007: Fix zip reader to immediately return EOF if you try
|
||||
to read body of non-regular file. In particular, this fixes
|
||||
bsdtar extraction of zip archives.
|
||||
|
||||
Sep 30, 2007: libarchive 2.3.3 released
|
||||
Sep 26, 2007: Rework Makefile.am so that the enable/disable options
|
||||
actually do the right things.
|
||||
Sep 26, 2007: cpio-odc and cpio-newc archives no longer write bodies
|
||||
for non-regular files.
|
||||
Sep 26, 2007: Test harness for bsdcpio is in place, needs more tests written.
|
||||
This is much nicer than the ragtag collection of test scripts
|
||||
that bsdtar has.
|
||||
|
||||
Sep 20, 2007: libarchive 2.3.2 released
|
||||
Sep 20, 2007: libarchive 2.3.1 broke bsdtar because the archive_write_data()
|
||||
fix was implemented incorrectly.
|
||||
|
||||
Sep 16, 2007: libarchive 2.3.1 released
|
||||
Sep 16, 2007: Many fixes to bsdcpio 0.3: handle hardlinks with -p, recognize
|
||||
block size on writing, fix a couple of segfaults.
|
||||
Sep 16, 2007: Fixed return value from archive_write_data() when used
|
||||
with archive_write_disk() to match the documentation and other
|
||||
instances of this same function.
|
||||
Sep 15, 2007: Add archive_entry_link_resolver, archive_entry_strmode
|
||||
|
||||
Sep 11, 2007: libarchive 2.2.8 released
|
||||
Sep 09, 2007: bsdcpio 0.2 supports most (not yet all) of the old POSIX spec.
|
||||
|
||||
Sep 01, 2007: libarchive 2.2.7 released
|
||||
Aug 31, 2007: Support for reading mtree files, including an mtree.5 manpage
|
||||
(A little experimental still.)
|
||||
Aug 18, 2007: Read gtar 1.17 --posix --sparse entries.
|
||||
Aug 13, 2007: Refined suid/sgid restore handling; it is no longer
|
||||
an error if suid/sgid bits are dropped when you request
|
||||
perm restore but don't request owner restore.
|
||||
Aug 06, 2007: Use --enable-bsdcpio if you want to try bsdcpio
|
||||
|
||||
Aug 05, 2007: libarchive 2.2.6 released
|
||||
Aug 05, 2007: New configure option --disable-bsdtar, thanks to Joerg
|
||||
Sonnenberger.
|
||||
Aug 05, 2007: Several bug fixes from FreeBSD CVS repo.
|
||||
|
||||
Jul 13, 2007: libarchive 2.2.5 released
|
||||
|
||||
Jul 12, 2007: libarchive 2.2.4 released
|
||||
Jul 12, 2007: Thanks to Colin Percival's help in diagnosing and
|
||||
fixing several critical security bugs. Details available at
|
||||
http://security.freebsd.org/advisories/FreeBSD-SA-07:05.libarchive.asc
|
||||
|
||||
May 26, 2007: libarchive 2.2.3 released
|
||||
May 26, 2007: Fix memory leaks in ZIP reader and shar writer, add some
|
||||
missing system headers to archive_entry.h, dead code cleanup
|
||||
from Colin Percival, more tests for gzip/bzip2, fix an
|
||||
EOF anomaly in bzip2 decompression.
|
||||
|
||||
May 12, 2007: libarchive 2.2.2 released
|
||||
May 12, 2007: Fix archive_write_disk permission restore by cloning
|
||||
entry passed into write_header so that permission info is
|
||||
still available at finish_entry time. (archive_read_extract()
|
||||
worked okay because it held onto the passed-in entry, but
|
||||
direct consumers of archive_write_disk would break). This
|
||||
required fixing archive_entry_clone(), which now works and has
|
||||
a reasonably complete test case.
|
||||
May 10, 2007: Skeletal cpio implementation.
|
||||
|
||||
May 06, 2007: libarchive 2.2.1 released
|
||||
May 06, 2007: Flesh out a lot more of test_entry.c so as to catch
|
||||
problems such as the device node breakage before releasing <sigh>.
|
||||
May 05, 2007: Fix a bad bug introduced in 2.1.9 that broke device
|
||||
node entries in tar archives.
|
||||
May 03, 2007: Move 'struct stat' out of archive_entry core as well.
|
||||
This removes some portability headaches and fixes a bunch
|
||||
of corner cases that arise when manipulating archives on
|
||||
dissimilar systems.
|
||||
|
||||
Apr 30, 2007: libarchive 2.1.10 released
|
||||
Apr 31, 2007: Minor code cleanup.
|
||||
|
||||
Apr 24, 2007: libarchive 2.1.9 released
|
||||
Apr 24, 2007: Fix some recently-introduced problems with libraries
|
||||
(Just let automake handle it and it all works much better.)
|
||||
Finish isolating major()/minor()/makedev() in archive_entry.c.
|
||||
|
||||
Apr 23, 2007: libarchive 2.1.8 released
|
||||
Apr 23, 2007: Minor fixes found from building on MacOS X
|
||||
|
||||
Apr 22, 2007: libarchive 2.1.7 released
|
||||
Apr 22, 2007: Eliminated all uses of 'struct stat' from the
|
||||
format readers/writers. This should improve portability;
|
||||
'struct stat' is now only used in archive_entry and in
|
||||
code that actually touches the disk.
|
||||
|
||||
Apr 17, 2007: libarchive 2.1.6 released
|
||||
Libarchive now compiles and passes all tests on Interix.
|
||||
|
||||
Apr 16, 2007: libarchive 2.1.5 released
|
||||
|
||||
Apr 15, 2007: libarchive 2.1b2 released
|
||||
Apr 15, 2007: New libarchive_internals.3 documentation of internal APIs.
|
||||
Not complete, but should prove helpful.
|
||||
Apr 15, 2007: Experimental "read_compress_program" and "write_compress_program"
|
||||
for using libarchive with external compression. Not yet
|
||||
well tested, and likely has portability issues. Feedback
|
||||
appreciated.
|
||||
|
||||
Apr 14, 2007: libarchive 2.0.31 released
|
||||
Apr 14, 2007: More fixes for Interix, more 'ar' work
|
||||
|
||||
Apr 14, 2007: libarchive 2.0.30 released
|
||||
Apr 13, 2007: libarchive now enforces trailing '/' on dirs
|
||||
written to tar archives
|
||||
|
||||
Apr 11, 2007: libarchive 2.0.29 released
|
||||
Apr 11, 2007: Make it easier to statically configure for different platforms.
|
||||
Apr 11, 2007: Updated config.guess, config.sub, libtool
|
||||
|
||||
Apr 06, 2007: libarchive 2.0.28 released
|
||||
Apr 06, 2007: 'ar' format read/write support thanks to Kai Wang.
|
||||
|
||||
Apr 01, 2007: libarchive 2.0.27 released
|
||||
Mar 31, 2007: Several minor fixes from Colin Percival and Joerg Sonnenberger.
|
||||
|
||||
Mar 12, 2007: libarchive 2.0.25 released
|
||||
Mar 12, 2007: Fix broken --unlink flag.
|
||||
|
||||
Mar 11, 2007: libarchive 2.0.24 released
|
||||
Mar 10, 2007: Correct an ACL blunder that causes any ACL with an entry
|
||||
that refers to a non-existent user or group to not be restored correctly.
|
||||
The fix both makes the parser more tolerant (so that archives created
|
||||
with the buggy ACLs can be read now) and corrects the ACL formatter.
|
||||
Mar 10, 2007: More work on test portability to Linux.
|
||||
|
||||
Mar 10, 2007: libarchive 2.0.22 released
|
||||
Mar 10, 2007: Header cleanups; added linux/fs.h, removed
|
||||
some unnecessary headers, added #include guards in bsdtar.
|
||||
If you see any obvious compile failures from this, let me know.
|
||||
Mar 10, 2007: Work on bsdtar test scripts: not yet robust enough
|
||||
to enable as part of "make check", but getting better.
|
||||
Mar 10, 2007: libarchive now returns ARCHIVE_FAILED when
|
||||
a header write fails in a way that only affects this item.
|
||||
Less bad than ARCHIVE_FATAL, but worse than ARCHIVE_WARN.
|
||||
|
||||
Mar 07, 2007: libarchive 2.0.21 released
|
||||
Mar 07, 2007: Add some ACL tests (only for the system-independent
|
||||
portion of the ACL support for now).
|
||||
Mar 07, 2007: tar's ability to read ACLs off disk got
|
||||
turned off for FreeBSD; re-enable it. (ACL restores and
|
||||
libarchive support for storing/reading ACLs from pax
|
||||
archives was unaffected.)
|
||||
|
||||
Mar 02, 2007: libarchive 2.0.20 released
|
||||
Mar 2, 2007: It's not perfect, but it's pretty good.
|
||||
Libarchive 2.0 is officially out of beta.
|
||||
|
||||
Feb 28, 2007: libarchive 2.0b17 released
|
||||
Feb 27, 2007: Make the GID restore checks more robust by checking
|
||||
whether the current user has too few or too many privileges.
|
||||
|
||||
Feb 26, 2007: libarchive 2.0b15 released
|
||||
Feb 26, 2007: Don't lose symlinks when extracting from ISOs.
|
||||
Thanks to Diego "Flameeyes" Pettenò for telling me about the
|
||||
broken testcase on Gentoo that (finally!) led me to the cause
|
||||
of this long-standing bug.
|
||||
|
||||
Feb 26, 2007: libarchive 2.0b14 released
|
||||
Feb 26, 2007: Fix a broken test on platforms that lack lchmod().
|
||||
|
||||
Feb 25, 2007: libarchive 2.0b13 released
|
||||
Feb 25, 2007: Empty archives were being written as empty files,
|
||||
without a proper end-of-archive marker. Fixed.
|
||||
|
||||
Feb 23, 2007: libarchive 2.0b12 released
|
||||
Feb 22, 2007: Basic security checks added: _EXTRACT_SECURE_NODOTDOT
|
||||
and _EXTRACT_SECURE_SYMLINK. These checks used to be in bsdtar,
|
||||
but they belong down in libarchive where they can be used by
|
||||
other tools and where they can be better optimized.
|
||||
|
||||
Feb 11, 2007: libarchive 2.0b11 released
|
||||
Feb 10, 2007: Fixed a bunch of errors in libarchive's handling
|
||||
of EXTRACT_PERM and EXTRACT_OWNER, especially relating
|
||||
to SUID and SGID bits.
|
||||
|
||||
Jan 31, 2007: libarchive 2.0b9 released
|
||||
Jan 31, 2007: Added read support for "empty" archives as a
|
||||
distinct archive format. Bsdtar uses this to handle, e.g.,
|
||||
"touch foo.tar; tar -rf foo.tar"
|
||||
|
||||
Jan 22, 2007: libarchive 2.0b6 released
|
||||
Jan 22, 2007: archive_write_disk API is now in place. It provides
|
||||
a finer-grained interface than archive_read_extract. In particular,
|
||||
you can use it to create objects on disk without having an archive
|
||||
around (just feed it archive_entry objects describing what you
|
||||
want to create), you can override the uname/gname-to-uid/gid lookups
|
||||
(minitar uses this to avoid getpwXXX() and getgrXXX() bloat).
|
||||
|
||||
Jan 09, 2007: libarchive 2.0a3 released
|
||||
Jan 9, 2007: archive_extract is now much better; it handles the
|
||||
most common cases with a minimal number of system calls.
|
||||
Some features still need a lot of testing, especially corner
|
||||
cases involving objects that already exist on disk. I expect
|
||||
the next round of API overhaul will simplify building test cases.
|
||||
Jan 9, 2007: a number of fixes thanks to Colin Percival, especially
|
||||
corrections to the skip() framework and handling of large files.
|
||||
Jan 9, 2007: Fixes for large ISOs. The code should correctly handle
|
||||
very large ISOs with entries up to 4G. Thanks to Robert Sciuk
|
||||
for pointing out these issues.
|
||||
|
||||
Sep 05, 2006: libarchive 1.3.1 released
|
||||
Sep 5, 2006: Bump version to 1.3 for new I/O wrappers.
|
||||
Sep 4, 2006: New memory and FILE read/write wrappers.
|
||||
Sep 4, 2006: libarchive test harness is now minimally functional;
|
||||
it's located a few minor bugs in error-handling logic
|
||||
|
||||
Aug 17, 2006: libarchive 1.2.54 released
|
||||
Aug 17, 2006: Outline ABI changes for libarchive 2.0; these
|
||||
are protected behind #ifdef's until I think I've found everything
|
||||
that needs to change.
|
||||
Aug 17, 2006: Fix error-handling in archive_read/write_close()
|
||||
They weren't returning any errors before.
|
||||
Aug 17, 2006: Fix recursive-add logic to not trigger if it's not set
|
||||
Fixes a bug adding files when writing archive to pipe or when
|
||||
using archive_write_open() directly.
|
||||
Jul 2006: New "skip" handling improves performance extracting
|
||||
single files from large uncompressed archives.
|
||||
|
||||
Mar 21, 2006: 1.2.52 released
|
||||
Mar 21, 2006: Fix -p on platforms that don't have platform-specific
|
||||
extended attribute code.
|
||||
Mar 20, 2006: Add NEWS file; fill in some older history from other
|
||||
files. I'll try to keep this file up-to-date from now on.
|
||||
|
||||
OLDER NEWS SUMMARIES
|
||||
|
||||
Mar 19, 2006: libarchive 1.2.51 released
|
||||
Mar 18, 2006: Many fixes to extended attribute support, including a redesign
|
||||
of the storage format to simplify debugging.
|
||||
Mar 12, 2006: Remove 'tp' support; it was a fun idea, but not worth
|
||||
spending much time on.
|
||||
Mar 11, 2006: Incorporated Jaakko Heinonen's still-experimental support
|
||||
for extended attributes (Currently Linux-only.).
|
||||
Mar 11, 2006: Reorganized distribution package: There is now one tar.gz
|
||||
file that builds both libarchive and bsdtar.
|
||||
Feb 13, 2006: Minor bug fixes: correctly read cpio device entries, write
|
||||
Pax attribute entry names.
|
||||
Nov 7, 2005: Experimental 'tp' format support in libarchive. Feedback
|
||||
appreciated; this is not enabled by archive_read_support_format_all()
|
||||
yet as I'm not quite content with the format detection heuristics.
|
||||
Nov 7, 2005: Some more portability improvements thanks to Darin Broady,
|
||||
minor bugfixes.
|
||||
Oct 12, 2005: Use GNU libtool to build shared libraries on many systems.
|
||||
Aug 9, 2005: Correctly detect that MacOS X does not have POSIX ACLs.
|
||||
Apr 17, 2005: Kees Zeelenberg has ported libarchive and bsdtar to Windows:
|
||||
http://gnuwin32.sourceforge.net/
|
||||
Apr 11, 2005: Extended Zip/Zip64 support thanks to Dan Nelson. -L/-h
|
||||
fix from Jaakko Heinonen.
|
||||
Mar 12, 2005: archive_read_extract can now handle very long
|
||||
pathnames (I've tested with pathnames up to 1MB).
|
||||
Mar 12, 2005: Marcus Geiger has written an article about libarchive
|
||||
http://xsnil.antbear.org/2005/02/05/archive-mit-libarchive-verarbeiten/
|
||||
including examples of using it from Objective-C. His MoinX
|
||||
http://moinx.antbear.org/ desktop Wiki uses
|
||||
libarchive for archiving and restoring Wiki pages.
|
||||
Jan 22, 2005: Preliminary ZIP extraction support,
|
||||
new directory-walking code for bsdtar.
|
||||
Jan 16, 2005: ISO9660 extraction code added; manpage corrections.
|
||||
May 22, 2004: Many gtar-compatible long options have been added; almost
|
||||
all FreeBSD ports extract correctly with bsdtar.
|
||||
May 18, 2004: bsdtar can read Solaris, HP-UX, Unixware, star, gtar,
|
||||
and pdtar archives.
|
224
dependencies/libarchive-3.4.2/README.md
vendored
Normal file
224
dependencies/libarchive-3.4.2/README.md
vendored
Normal file
|
@ -0,0 +1,224 @@
|
|||
# Welcome to libarchive!
|
||||
|
||||
The libarchive project develops a portable, efficient C library that
|
||||
can read and write streaming archives in a variety of formats. It
|
||||
also includes implementations of the common `tar`, `cpio`, and `zcat`
|
||||
command-line tools that use the libarchive library.
|
||||
|
||||
## Questions? Issues?
|
||||
|
||||
* http://www.libarchive.org 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
|
||||
https://github.com/libarchive/libarchive/issues
|
||||
* To submit an enhancement to libarchive, please
|
||||
submit a pull request via GitHub: https://github.com/libarchive/libarchive/pulls
|
||||
|
||||
## Contents of the Distribution
|
||||
|
||||
This distribution bundle includes the following major components:
|
||||
|
||||
* **libarchive**: a library for reading and writing streaming archives
|
||||
* **tar**: the 'bsdtar' program is a full-featured 'tar' implementation built on libarchive
|
||||
* **cpio**: the 'bsdcpio' program is a different interface to essentially the same functionality
|
||||
* **cat**: the 'bsdcat' program is a simple replacement tool for zcat, bzcat, xzcat, and such
|
||||
* **examples**: Some small example programs that you may find useful.
|
||||
* **examples/minitar**: a compact sample demonstrating use of libarchive.
|
||||
* **contrib**: Various items sent to me by third parties; please contact the authors with any questions.
|
||||
|
||||
The top-level directory contains the following information files:
|
||||
|
||||
* **NEWS** - highlights of recent changes
|
||||
* **COPYING** - what you can do with this
|
||||
* **INSTALL** - installation instructions
|
||||
* **README** - this file
|
||||
* **CMakeLists.txt** - input for "cmake" build tool, see INSTALL
|
||||
* **configure** - configuration script, see INSTALL for details. If your copy of the source lacks a `configure` script, you can try to construct it by running the script in `build/autogen.sh` (or use `cmake`).
|
||||
|
||||
The following files in the top-level directory are used by the 'configure' script:
|
||||
* `Makefile.am`, `aclocal.m4`, `configure.ac` - used to build this distribution, only needed by maintainers
|
||||
* `Makefile.in`, `config.h.in` - templates used by configure script
|
||||
|
||||
## Documentation
|
||||
|
||||
In addition to the informational articles and documentation
|
||||
in the online [libarchive Wiki](https://github.com/libarchive/libarchive/wiki),
|
||||
the distribution also includes a number of manual pages:
|
||||
|
||||
* bsdtar.1 explains the use of the bsdtar program
|
||||
* bsdcpio.1 explains the use of the bsdcpio program
|
||||
* bsdcat.1 explains the use of the bsdcat program
|
||||
* libarchive.3 gives an overview of the library as a whole
|
||||
* archive_read.3, archive_write.3, archive_write_disk.3, and
|
||||
archive_read_disk.3 provide detailed calling sequences for the read
|
||||
and write APIs
|
||||
* archive_entry.3 details the "struct archive_entry" utility class
|
||||
* archive_internals.3 provides some insight into libarchive's
|
||||
internal structure and operation.
|
||||
* libarchive-formats.5 documents the file formats supported by the library
|
||||
* cpio.5, mtree.5, and tar.5 provide detailed information about these
|
||||
popular archive formats, including hard-to-find details about
|
||||
modern cpio and tar variants.
|
||||
|
||||
The manual pages above are provided in the 'doc' directory in
|
||||
a number of different formats.
|
||||
|
||||
You should also read the copious comments in `archive.h` and the
|
||||
source code for the sample programs for more details. Please let us
|
||||
know about any errors or omissions you find.
|
||||
|
||||
## Supported Formats
|
||||
|
||||
Currently, the library automatically detects and reads the following fomats:
|
||||
* Old V7 tar archives
|
||||
* POSIX ustar
|
||||
* GNU tar format (including GNU long filenames, long link names, and sparse files)
|
||||
* Solaris 9 extended tar format (including ACLs)
|
||||
* POSIX pax interchange format
|
||||
* POSIX octet-oriented cpio
|
||||
* SVR4 ASCII cpio
|
||||
* Binary cpio (big-endian or little-endian)
|
||||
* ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
|
||||
* ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives)
|
||||
* ZIPX archives (with support for bzip2, ppmd8, lzma and xz compressed entries)
|
||||
* GNU and BSD 'ar' archives
|
||||
* 'mtree' format
|
||||
* 7-Zip archives
|
||||
* Microsoft CAB format
|
||||
* LHA and LZH archives
|
||||
* RAR and RAR 5.0 archives (with some limitations due to RAR's proprietary status)
|
||||
* XAR archives
|
||||
|
||||
The library also detects and handles any of the following before evaluating the archive:
|
||||
* uuencoded files
|
||||
* files with RPM wrapper
|
||||
* gzip compression
|
||||
* bzip2 compression
|
||||
* compress/LZW compression
|
||||
* lzma, lzip, and xz compression
|
||||
* lz4 compression
|
||||
* lzop compression
|
||||
* zstandard compression
|
||||
|
||||
The library can create archives in any of the following formats:
|
||||
* POSIX ustar
|
||||
* POSIX pax interchange format
|
||||
* "restricted" pax format, which will create ustar archives except for
|
||||
entries that require pax extensions (for long filenames, ACLs, etc).
|
||||
* Old GNU tar format
|
||||
* Old V7 tar format
|
||||
* POSIX octet-oriented cpio
|
||||
* SVR4 "newc" cpio
|
||||
* shar archives
|
||||
* ZIP archives (with uncompressed or "deflate" compressed entries)
|
||||
* 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:
|
||||
* uuencode
|
||||
* gzip compression
|
||||
* bzip2 compression
|
||||
* compress/LZW compression
|
||||
* lzma, lzip, and xz compression
|
||||
* lz4 compression
|
||||
* lzop compression
|
||||
* zstandard compression
|
||||
|
||||
## Notes about the Library Design
|
||||
|
||||
The following notes address many of the most common
|
||||
questions we are asked about libarchive:
|
||||
|
||||
* This is a heavily stream-oriented system. That means that
|
||||
it is optimized to read or write the archive in a single
|
||||
pass from beginning to end. For example, this allows
|
||||
libarchive to process archives too large to store on disk
|
||||
by processing them on-the-fly as they are read from or
|
||||
written to a network or tape drive. This also makes
|
||||
libarchive useful for tools that need to produce
|
||||
archives on-the-fly (such as webservers that provide
|
||||
archived contents of a users account).
|
||||
|
||||
* In-place modification and random access to the contents
|
||||
of an archive are not directly supported. For some formats,
|
||||
this is not an issue: For example, tar.gz archives are not
|
||||
designed for random access. In some other cases, libarchive
|
||||
can re-open an archive and scan it from the beginning quickly
|
||||
enough to provide the needed abilities even without true
|
||||
random access. Of course, some applications do require true
|
||||
random access; those applications should consider alternatives
|
||||
to libarchive.
|
||||
|
||||
* The library is designed to be extended with new compression and
|
||||
archive formats. The only requirement is that the format be
|
||||
readable or writable as a stream and that each archive entry be
|
||||
independent. There are articles on the libarchive Wiki explaining
|
||||
how to extend libarchive.
|
||||
|
||||
* On read, compression and format are always detected automatically.
|
||||
|
||||
* The same API is used for all formats; it should be very
|
||||
easy for software using libarchive to transparently handle
|
||||
any of libarchive's archiving formats.
|
||||
|
||||
* Libarchive's automatic support for decompression can be used
|
||||
without archiving by explicitly selecting the "raw" and "empty"
|
||||
formats.
|
||||
|
||||
* I've attempted to minimize static link pollution. If you don't
|
||||
explicitly invoke a particular feature (such as support for a
|
||||
particular compression or format), it won't get pulled in to
|
||||
statically-linked programs. In particular, if you don't explicitly
|
||||
enable a particular compression or decompression support, you won't
|
||||
need to link against the corresponding compression or decompression
|
||||
libraries. This also reduces the size of statically-linked
|
||||
binaries in environments where that matters.
|
||||
|
||||
* The library is generally _thread safe_ depending on the platform:
|
||||
it does not define any global variables of its own. However, some
|
||||
platforms do not provide fully thread-safe versions of key C library
|
||||
functions. On those platforms, libarchive will use the non-thread-safe
|
||||
functions. Patches to improve this are of great interest to us.
|
||||
|
||||
* In particular, libarchive's modules to read or write a directory
|
||||
tree do use `chdir()` to optimize the directory traversals. This
|
||||
can cause problems for programs that expect to do disk access from
|
||||
multiple threads. Of course, those modules are completely
|
||||
optional and you can use the rest of libarchive without them.
|
||||
|
||||
* The library is _not_ thread aware, however. It does no locking
|
||||
or thread management of any kind. If you create a libarchive
|
||||
object and need to access it from multiple threads, you will
|
||||
need to provide your own locking.
|
||||
|
||||
* On read, the library accepts whatever blocks you hand it.
|
||||
Your read callback is free to pass the library a byte at a time
|
||||
or mmap the entire archive and give it to the library at once.
|
||||
On write, the library always produces correctly-blocked output.
|
||||
|
||||
* The object-style approach allows you to have multiple archive streams
|
||||
open at once. bsdtar uses this in its "@archive" extension.
|
||||
|
||||
* The archive itself is read/written using callback functions.
|
||||
You can read an archive directly from an in-memory buffer or
|
||||
write it to a socket, if you wish. There are some utility
|
||||
functions to provide easy-to-use "open file," etc, capabilities.
|
||||
|
||||
* The read/write APIs are designed to allow individual entries
|
||||
to be read or written to any data source: You can create
|
||||
a block of data in memory and add it to a tar archive without
|
||||
first writing a temporary file. You can also read an entry from
|
||||
an archive and write the data directly to a socket. If you want
|
||||
to read/write entries to disk, there are convenience functions to
|
||||
make this especially easy.
|
||||
|
||||
* Note: The "pax interchange format" is a POSIX standard extended tar
|
||||
format that should be used when the older _ustar_ format is not
|
||||
appropriate. It has many advantages over other tar formats
|
||||
(including the legacy GNU tar format) and is widely supported by
|
||||
current tar implementations.
|
||||
|
10521
dependencies/libarchive-3.4.2/aclocal.m4
vendored
Normal file
10521
dependencies/libarchive-3.4.2/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
67
dependencies/libarchive-3.4.2/build/autoconf/ax_append_compile_flags.m4
vendored
Normal file
67
dependencies/libarchive-3.4.2/build/autoconf/ax_append_compile_flags.m4
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# For every FLAG1, FLAG2 it is checked whether the compiler works with the
|
||||
# flag. If it does, the flag is added FLAGS-VARIABLE
|
||||
#
|
||||
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
|
||||
# CFLAGS) is used. During the check the flag is always added to the
|
||||
# current language's flags.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: This macro depends on the AX_APPEND_FLAG and
|
||||
# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
|
||||
# AX_APPEND_LINK_FLAGS.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 5
|
||||
|
||||
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
|
||||
[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
|
||||
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
|
||||
for flag in $1; do
|
||||
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
|
||||
done
|
||||
])dnl AX_APPEND_COMPILE_FLAGS
|
71
dependencies/libarchive-3.4.2/build/autoconf/ax_append_flag.m4
vendored
Normal file
71
dependencies/libarchive-3.4.2/build/autoconf/ax_append_flag.m4
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
|
||||
# added in between.
|
||||
#
|
||||
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
|
||||
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
|
||||
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
|
||||
# FLAG.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 6
|
||||
|
||||
AC_DEFUN([AX_APPEND_FLAG],
|
||||
[dnl
|
||||
AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
|
||||
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
|
||||
AS_VAR_SET_IF(FLAGS,[
|
||||
AS_CASE([" AS_VAR_GET(FLAGS) "],
|
||||
[*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
|
||||
[
|
||||
AS_VAR_APPEND(FLAGS,[" $1"])
|
||||
AC_RUN_LOG([: FLAGS="$FLAGS"])
|
||||
])
|
||||
],
|
||||
[
|
||||
AS_VAR_SET(FLAGS,[$1])
|
||||
AC_RUN_LOG([: FLAGS="$FLAGS"])
|
||||
])
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])dnl AX_APPEND_FLAG
|
74
dependencies/libarchive-3.4.2/build/autoconf/ax_check_compile_flag.m4
vendored
Normal file
74
dependencies/libarchive-3.4.2/build/autoconf/ax_check_compile_flag.m4
vendored
Normal file
|
@ -0,0 +1,74 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
37
dependencies/libarchive-3.4.2/build/autoconf/ax_require_defined.m4
vendored
Normal file
37
dependencies/libarchive-3.4.2/build/autoconf/ax_require_defined.m4
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_REQUIRE_DEFINED(MACRO)
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
|
||||
# been defined and thus are available for use. This avoids random issues
|
||||
# where a macro isn't expanded. Instead the configure script emits a
|
||||
# non-fatal:
|
||||
#
|
||||
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
|
||||
#
|
||||
# It's like AC_REQUIRE except it doesn't expand the required macro.
|
||||
#
|
||||
# Here's an example:
|
||||
#
|
||||
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 1
|
||||
|
||||
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
|
||||
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
|
||||
])dnl AX_REQUIRE_DEFINED
|
51
dependencies/libarchive-3.4.2/build/autoconf/check_stdcall_func.m4
vendored
Normal file
51
dependencies/libarchive-3.4.2/build/autoconf/check_stdcall_func.m4
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
# AC_LANG_STDCALL_FUNC_LINK_TRY(FUNCTION, SIGNATURE)
|
||||
# -------------------------------
|
||||
# Produce a source which links correctly iff the FUNCTION exists.
|
||||
AC_DEFUN([AC_LANG_STDCALL_FUNC_LINK_TRY],
|
||||
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
|
||||
|
||||
# AC_CHECK_STDCALL_FUNC(FUNCTION, SIGNATURE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# -----------------------------------------------------------------
|
||||
AC_DEFUN([AC_CHECK_STDCALL_FUNC],
|
||||
[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl
|
||||
AC_CACHE_CHECK([for $1], ac_var,
|
||||
[AC_LINK_IFELSE([AC_LANG_STDCALL_FUNC_LINK_TRY([$1],[$2])],
|
||||
[AS_VAR_SET(ac_var, yes)],
|
||||
[AS_VAR_SET(ac_var, no)])])
|
||||
AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
|
||||
AS_VAR_POPDEF([ac_var])dnl
|
||||
])# AC_CHECK_FUNC
|
||||
|
||||
# AC_LANG_STDCALL_FUNC_LINK_TRY(C)(FUNCTION, SIGNATURE)
|
||||
# ----------------------------------
|
||||
# Don't include <ctype.h> because on OSF/1 3.0 it includes
|
||||
# <sys/types.h> which includes <sys/select.h> which contains a
|
||||
# prototype for select. Similarly for bzero.
|
||||
m4_define([AC_LANG_STDCALL_FUNC_LINK_TRY(C)],
|
||||
[AC_LANG_PROGRAM(
|
||||
[/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char __stdcall $1 ( $2 ) below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char __stdcall $1 ( $2 );
|
||||
char (*f) ( $2 );
|
||||
],
|
||||
[/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_$1) || defined (__stub___$1)
|
||||
choke me
|
||||
#else
|
||||
f = $1;
|
||||
#endif
|
||||
])])
|
||||
|
||||
# AC_LANG_STDCALL_FUNC_LINK_TRY(C++)(FUNCTION)
|
||||
# ------------------------------------
|
||||
m4_copy([AC_LANG_STDCALL_FUNC_LINK_TRY(C)], [AC_LANG_STDCALL_FUNC_LINK_TRY(C++)])
|
||||
|
347
dependencies/libarchive-3.4.2/build/autoconf/compile
vendored
Executable file
347
dependencies/libarchive-3.4.2/build/autoconf/compile
vendored
Executable file
|
@ -0,0 +1,347 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
1480
dependencies/libarchive-3.4.2/build/autoconf/config.guess
vendored
Executable file
1480
dependencies/libarchive-3.4.2/build/autoconf/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load diff
696
dependencies/libarchive-3.4.2/build/autoconf/config.rpath
vendored
Executable file
696
dependencies/libarchive-3.4.2/build/autoconf/config.rpath
vendored
Executable file
|
@ -0,0 +1,696 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# NOTE: This file was brought from
|
||||
# http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/config.rpath
|
||||
# You should sometimes check if the file is updated and bring it to
|
||||
# our trunk and copy this note to the top of that file.
|
||||
#
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2011 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# Known limitations:
|
||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||
# known workaround is to choose shorter directory names for the build
|
||||
# directory and/or the installation directory.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shrext=.so
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
# Code taken from libtool.m4's _LT_CC_BASENAME.
|
||||
|
||||
for cc_temp in $CC""; do
|
||||
case $cc_temp in
|
||||
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
|
||||
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
|
||||
\-*) ;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's _LT_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
case $cc_basename in
|
||||
ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
icc* | ifort*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
lf95*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
nagfor*)
|
||||
wl='-Wl,-Wl,,'
|
||||
;;
|
||||
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
xl* | bgxl* | bgf* | mpixl*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
*Sun\ F* | *Sun*Fortran*)
|
||||
wl=
|
||||
;;
|
||||
*Sun\ C*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
*nto* | *qnx*)
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
rdos*)
|
||||
;;
|
||||
solaris*)
|
||||
case $cc_basename in
|
||||
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
# Set some defaults for GNU ld with shared library support. These
|
||||
# are reset later if shared libraries are not supported. Putting them
|
||||
# here allows them to be overridden if necessary.
|
||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||
# option of GNU ld is called -rpath, not --rpath.
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
case "$host_os" in
|
||||
aix[3-9]*)
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
case "$host_cpu" in
|
||||
powerpc)
|
||||
;;
|
||||
m68k)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
haiku*)
|
||||
;;
|
||||
interix[3-9]*)
|
||||
hardcode_direct=no
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris*)
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
|
||||
case `$LD -v 2>&1` in
|
||||
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = no; then
|
||||
hardcode_libdir_flag_spec=
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix[4-9]*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
:
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||
echo 'int main () { return 0; }' > conftest.c
|
||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
fi
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath="/usr/lib:/lib"
|
||||
fi
|
||||
rm -f conftest.c conftest
|
||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
case "$host_cpu" in
|
||||
powerpc)
|
||||
;;
|
||||
m68k)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=no
|
||||
if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
hpux10*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
fi
|
||||
;;
|
||||
hpux11*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
*)
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
*nto* | *qnx*)
|
||||
;;
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
case $host_vendor in
|
||||
sni)
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6*)
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
|
||||
hardcode_libdir_separator=':'
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
|
||||
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
|
||||
# only about the one the linker finds when passed -lNAME. This is the last
|
||||
# element of library_names_spec in libtool.m4, or possibly two of them if the
|
||||
# linker has special search rules.
|
||||
library_names_spec= # the last element of library_names_spec in libtool.m4
|
||||
libname_spec='lib$name'
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
aix[4-9]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
amigaos*)
|
||||
case "$host_cpu" in
|
||||
powerpc*)
|
||||
library_names_spec='$libname$shrext' ;;
|
||||
m68k)
|
||||
library_names_spec='$libname.a' ;;
|
||||
esac
|
||||
;;
|
||||
beos*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
bsdi[45]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||
shrext=.dll
|
||||
library_names_spec='$libname.dll.a $libname.lib'
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shrext=.dylib
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
dgux*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
case "$host_os" in
|
||||
freebsd[123]*)
|
||||
library_names_spec='$libname$shrext$versuffix' ;;
|
||||
*)
|
||||
library_names_spec='$libname$shrext' ;;
|
||||
esac
|
||||
;;
|
||||
gnu*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
haiku*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
shrext=.so
|
||||
;;
|
||||
hppa*64*)
|
||||
shrext=.sl
|
||||
;;
|
||||
*)
|
||||
shrext=.sl
|
||||
;;
|
||||
esac
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
interix[3-9]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
library_names_spec='$libname$shrext'
|
||||
case "$host_os" in
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
netbsd*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
newsos6)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
*nto* | *qnx*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
openbsd*)
|
||||
library_names_spec='$libname$shrext$versuffix'
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shrext=.dll
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
rdos*)
|
||||
;;
|
||||
solaris*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sunos4*)
|
||||
library_names_spec='$libname$shrext$versuffix'
|
||||
;;
|
||||
sysv4 | sysv4.3*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
tpf*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
uts4*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Format of library name prefix.
|
||||
libname_spec="$escaped_libname_spec"
|
||||
|
||||
# Library names that the linker finds when passed -lNAME.
|
||||
library_names_spec="$escaped_library_names_spec"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
EOF
|
1801
dependencies/libarchive-3.4.2/build/autoconf/config.sub
vendored
Executable file
1801
dependencies/libarchive-3.4.2/build/autoconf/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load diff
791
dependencies/libarchive-3.4.2/build/autoconf/depcomp
vendored
Executable file
791
dependencies/libarchive-3.4.2/build/autoconf/depcomp
vendored
Executable file
|
@ -0,0 +1,791 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2016-01-11.22; # UTC
|
||||
|
||||
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
271
dependencies/libarchive-3.4.2/build/autoconf/iconv.m4
vendored
Normal file
271
dependencies/libarchive-3.4.2/build/autoconf/iconv.m4
vendored
Normal file
|
@ -0,0 +1,271 @@
|
|||
# iconv.m4 serial 19 (gettext-0.18.2)
|
||||
dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
|
||||
[
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([iconv])
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_ICONV_LINK],
|
||||
[
|
||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||
dnl those with the standalone portable GNU libiconv installed).
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||
|
||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed libiconv and not disabled its use
|
||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||
dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
|
||||
am_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||
|
||||
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
|
||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||
am_cv_lib_iconv=no
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
]],
|
||||
[[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);]])],
|
||||
[am_cv_func_iconv=yes])
|
||||
if test "$am_cv_func_iconv" != yes; then
|
||||
am_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
]],
|
||||
[[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);]])],
|
||||
[am_cv_lib_iconv=yes]
|
||||
[am_cv_func_iconv=yes])
|
||||
LIBS="$am_save_LIBS"
|
||||
fi
|
||||
])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
|
||||
dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
|
||||
dnl Solaris 10.
|
||||
am_save_LIBS="$LIBS"
|
||||
if test $am_cv_lib_iconv = yes; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
fi
|
||||
am_cv_func_iconv_works=no
|
||||
for ac_iconv_const in '' 'const'; do
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <iconv.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef ICONV_CONST
|
||||
# define ICONV_CONST $ac_iconv_const
|
||||
#endif
|
||||
]],
|
||||
[[int result = 0;
|
||||
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
|
||||
returns. */
|
||||
{
|
||||
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
|
||||
if (cd_utf8_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
|
||||
char buf[10];
|
||||
ICONV_CONST char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_utf8_to_88591,
|
||||
&inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
result |= 1;
|
||||
iconv_close (cd_utf8_to_88591);
|
||||
}
|
||||
}
|
||||
/* Test against Solaris 10 bug: Failures are not distinguishable from
|
||||
successful returns. */
|
||||
{
|
||||
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
|
||||
if (cd_ascii_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static ICONV_CONST char input[] = "\263";
|
||||
char buf[10];
|
||||
ICONV_CONST char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_ascii_to_88591,
|
||||
&inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
result |= 2;
|
||||
iconv_close (cd_ascii_to_88591);
|
||||
}
|
||||
}
|
||||
/* Test against AIX 6.1..7.1 bug: Buffer overrun. */
|
||||
{
|
||||
iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
|
||||
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
||||
{
|
||||
static ICONV_CONST char input[] = "\304";
|
||||
static char buf[2] = { (char)0xDE, (char)0xAD };
|
||||
ICONV_CONST char *inptr = input;
|
||||
size_t inbytesleft = 1;
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = 1;
|
||||
size_t res = iconv (cd_88591_to_utf8,
|
||||
&inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
|
||||
result |= 4;
|
||||
iconv_close (cd_88591_to_utf8);
|
||||
}
|
||||
}
|
||||
#if 0 /* This bug could be worked around by the caller. */
|
||||
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
|
||||
{
|
||||
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
|
||||
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
||||
{
|
||||
static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
|
||||
char buf[50];
|
||||
ICONV_CONST char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_88591_to_utf8,
|
||||
&inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if ((int)res > 0)
|
||||
result |= 8;
|
||||
iconv_close (cd_88591_to_utf8);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
|
||||
provided. */
|
||||
if (/* Try standardized names. */
|
||||
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
|
||||
/* Try IRIX, OSF/1 names. */
|
||||
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
|
||||
/* Try AIX names. */
|
||||
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
|
||||
/* Try HP-UX names. */
|
||||
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
|
||||
result |= 16;
|
||||
return result;
|
||||
]])],
|
||||
[am_cv_func_iconv_works=yes], ,
|
||||
[case "$host_os" in
|
||||
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
|
||||
*) am_cv_func_iconv_works="guessing yes" ;;
|
||||
esac])
|
||||
test "$am_cv_func_iconv_works" = no || break
|
||||
done
|
||||
LIBS="$am_save_LIBS"
|
||||
])
|
||||
case "$am_cv_func_iconv_works" in
|
||||
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
|
||||
*) am_func_iconv=yes ;;
|
||||
esac
|
||||
else
|
||||
am_func_iconv=no am_cv_lib_iconv=no
|
||||
fi
|
||||
if test "$am_func_iconv" = yes; then
|
||||
AC_DEFINE([HAVE_ICONV], [1],
|
||||
[Define if you have the iconv() function and it works.])
|
||||
fi
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
AC_MSG_CHECKING([how to link with libiconv])
|
||||
AC_MSG_RESULT([$LIBICONV])
|
||||
else
|
||||
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
||||
dnl either.
|
||||
CPPFLAGS="$am_save_CPPFLAGS"
|
||||
LIBICONV=
|
||||
LTLIBICONV=
|
||||
fi
|
||||
AC_SUBST([LIBICONV])
|
||||
AC_SUBST([LTLIBICONV])
|
||||
])
|
||||
|
||||
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
|
||||
dnl avoid warnings like
|
||||
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
|
||||
dnl This is tricky because of the way 'aclocal' is implemented:
|
||||
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
|
||||
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
|
||||
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
|
||||
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
|
||||
dnl warnings.
|
||||
m4_define([gl_iconv_AC_DEFUN],
|
||||
m4_version_prereq([2.64],
|
||||
[[AC_DEFUN_ONCE(
|
||||
[$1], [$2])]],
|
||||
[m4_ifdef([gl_00GNULIB],
|
||||
[[AC_DEFUN_ONCE(
|
||||
[$1], [$2])]],
|
||||
[[AC_DEFUN(
|
||||
[$1], [$2])]])]))
|
||||
gl_iconv_AC_DEFUN([AM_ICONV],
|
||||
[
|
||||
AM_ICONV_LINK
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_MSG_CHECKING([for iconv declaration])
|
||||
AC_CACHE_VAL([am_cv_proto_iconv], [
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
|
||||
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||
#else
|
||||
size_t iconv();
|
||||
#endif
|
||||
]],
|
||||
[[]])],
|
||||
[am_cv_proto_iconv_arg1=""],
|
||||
[am_cv_proto_iconv_arg1="const"])
|
||||
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||
AC_MSG_RESULT([
|
||||
$am_cv_proto_iconv])
|
||||
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
|
||||
[Define as const if the declaration of iconv() needs const.])
|
||||
dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
|
||||
m4_ifdef([gl_ICONV_H_DEFAULTS],
|
||||
[AC_REQUIRE([gl_ICONV_H_DEFAULTS])
|
||||
if test -n "$am_cv_proto_iconv_arg1"; then
|
||||
ICONV_CONST="const"
|
||||
fi
|
||||
])
|
||||
fi
|
||||
])
|
508
dependencies/libarchive-3.4.2/build/autoconf/install-sh
vendored
Executable file
508
dependencies/libarchive-3.4.2/build/autoconf/install-sh
vendored
Executable file
|
@ -0,0 +1,508 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2014-09-12.12; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# $RANDOM is not portable (e.g. dash); use it when possible to
|
||||
# lower collision chance
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
# As "mkdir -p" follows symlinks and we work in /tmp possibly; so
|
||||
# create the $tmpdir first (and fail if unsuccessful) to make sure
|
||||
# that nobody tries to guess the $tmpdir name.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
20
dependencies/libarchive-3.4.2/build/autoconf/la_uid_t.m4
vendored
Normal file
20
dependencies/libarchive-3.4.2/build/autoconf/la_uid_t.m4
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# la_TYPE_UID_T
|
||||
# -------------
|
||||
AC_DEFUN([la_TYPE_UID_T],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_CACHE_CHECK(for uid_t in sys/types.h, la_cv_type_uid_t,
|
||||
[AC_EGREP_HEADER(uid_t, sys/types.h,
|
||||
la_cv_type_uid_t=yes, la_cv_type_uid_t=no)])
|
||||
if test $la_cv_type_uid_t = no; then
|
||||
case $host in
|
||||
*mingw*) def_uid_t=short ;;
|
||||
*) def_uid_t=int ;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(uid_t, [$def_uid_t],
|
||||
[Define to match typeof st_uid field of struct stat if <sys/types.h> doesn't define.])
|
||||
AC_DEFINE_UNQUOTED(gid_t, [$def_uid_t],
|
||||
[Define to match typeof st_gid field of struct stat if <sys/types.h> doesn't define.])
|
||||
fi
|
||||
])
|
||||
AU_ALIAS([AC_TYPE_UID_T], [la_TYPE_UID_T])
|
||||
|
109
dependencies/libarchive-3.4.2/build/autoconf/lib-ld.m4
vendored
Normal file
109
dependencies/libarchive-3.4.2/build/autoconf/lib-ld.m4
vendored
Normal file
|
@ -0,0 +1,109 @@
|
|||
# lib-ld.m4 serial 5 (gettext-0.18.2)
|
||||
dnl Copyright (C) 1996-2003, 2009-2011 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
dnl with libtool.m4.
|
||||
|
||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
case `$LD -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
acl_cv_prog_gnu_ld=yes ;;
|
||||
*)
|
||||
acl_cv_prog_gnu_ld=no ;;
|
||||
esac])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-1.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_ARG_WITH([gnu-ld],
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
# Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
|
||||
# contains only /bin. Note that ksh looks also at the FPATH variable,
|
||||
# so we have to set that as well for the test.
|
||||
PATH_SEPARATOR=:
|
||||
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
||||
&& { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
||||
|| PATH_SEPARATOR=';'
|
||||
}
|
||||
fi
|
||||
ac_prog=ld
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $ac_prog in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
[re_direlt='/[^/][^/]*/\.\./']
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL([acl_cv_path_LD],
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
test "$with_gnu_ld" != no && break ;;
|
||||
*)
|
||||
test "$with_gnu_ld" != yes && break ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$acl_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT([$LD])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
777
dependencies/libarchive-3.4.2/build/autoconf/lib-link.m4
vendored
Normal file
777
dependencies/libarchive-3.4.2/build/autoconf/lib-link.m4
vendored
Normal file
|
@ -0,0 +1,777 @@
|
|||
# lib-link.m4 serial 26 (gettext-0.18.2)
|
||||
dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ([2.54])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
pushdef([Name],[m4_translit([$1],[./+-], [____])])
|
||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
AC_SUBST([LIB]NAME[_PREFIX])
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
popdef([NAME])
|
||||
popdef([Name])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. The missing-message
|
||||
dnl defaults to 'no' and may contain additional hints for the user.
|
||||
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
|
||||
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
pushdef([Name],[m4_translit([$1],[./+-], [____])])
|
||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
|
||||
dnl because these -l options might require -L options that are present in
|
||||
dnl LIBS. -l options benefit only from the -L options listed before it.
|
||||
dnl Otherwise, add it to the front of LIBS, because it may be a static
|
||||
dnl library that depends on another static library that is present in LIBS.
|
||||
dnl Static libraries benefit only from the static libraries listed after
|
||||
dnl it.
|
||||
case " $LIB[]NAME" in
|
||||
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
|
||||
*) LIBS="$LIB[]NAME $LIBS" ;;
|
||||
esac
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[$3]], [[$4]])],
|
||||
[ac_cv_lib[]Name=yes],
|
||||
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
LIB[]NAME[]_PREFIX=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
AC_SUBST([LIB]NAME[_PREFIX])
|
||||
popdef([NAME])
|
||||
popdef([Name])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl acl_libext,
|
||||
dnl acl_shlibext,
|
||||
dnl acl_libname_spec,
|
||||
dnl acl_library_names_spec,
|
||||
dnl acl_hardcode_libdir_flag_spec,
|
||||
dnl acl_hardcode_libdir_separator,
|
||||
dnl acl_hardcode_direct,
|
||||
dnl acl_hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
acl_libext="$acl_cv_libext"
|
||||
acl_shlibext="$acl_cv_shlibext"
|
||||
acl_libname_spec="$acl_cv_libname_spec"
|
||||
acl_library_names_spec="$acl_cv_library_names_spec"
|
||||
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
acl_hardcode_direct="$acl_cv_hardcode_direct"
|
||||
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE([rpath],
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_FROMPACKAGE(name, package)
|
||||
dnl declares that libname comes from the given package. The configure file
|
||||
dnl will then not have a --with-libname-prefix option but a
|
||||
dnl --with-package-prefix option. Several libraries can come from the same
|
||||
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
|
||||
dnl macro call that searches for libname.
|
||||
AC_DEFUN([AC_LIB_FROMPACKAGE],
|
||||
[
|
||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
define([acl_frompackage_]NAME, [$2])
|
||||
popdef([NAME])
|
||||
pushdef([PACK],[$2])
|
||||
pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
define([acl_libsinpackage_]PACKUP,
|
||||
m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
|
||||
popdef([PACKUP])
|
||||
popdef([PACK])
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
|
||||
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
|
||||
pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
|
||||
dnl Autoconf >= 2.61 supports dots in --with options.
|
||||
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_ARG_WITH(P_A_C_K[-prefix],
|
||||
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
|
||||
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/$acl_libdirstem"
|
||||
if test "$acl_libdirstem2" != "$acl_libdirstem" \
|
||||
&& ! test -d "$withval/$acl_libdirstem"; then
|
||||
additional_libdir="$withval/$acl_libdirstem2"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
LIB[]NAME[]_PREFIX=
|
||||
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
|
||||
dnl computed. So it has to be reset here.
|
||||
HAVE_LIB[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
|
||||
if test -n "$acl_shlibext"; then
|
||||
shrext=".$acl_shlibext" # typically: shrext=.so
|
||||
else
|
||||
shrext=
|
||||
fi
|
||||
if test $use_additional = yes; then
|
||||
dir="$additional_libdir"
|
||||
dnl The same code as in the loop below:
|
||||
dnl First look for a shared library.
|
||||
if test -n "$acl_shlibext"; then
|
||||
if test -f "$dir/$libname$shrext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext"
|
||||
else
|
||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||
ver=`(cd "$dir" && \
|
||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||
| sed 1q ) 2>/dev/null`
|
||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext.$ver"
|
||||
fi
|
||||
else
|
||||
eval library_names=\"$acl_library_names_spec\"
|
||||
for f in $library_names; do
|
||||
if test -f "$dir/$f"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$f"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Then look for a static library.
|
||||
if test "X$found_dir" = "X"; then
|
||||
if test -f "$dir/$libname.$acl_libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/$libname.$acl_libext"
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
if test -f "$dir/$libname.la"; then
|
||||
found_la="$dir/$libname.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
dnl First look for a shared library.
|
||||
if test -n "$acl_shlibext"; then
|
||||
if test -f "$dir/$libname$shrext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext"
|
||||
else
|
||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||
ver=`(cd "$dir" && \
|
||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||
| sed 1q ) 2>/dev/null`
|
||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext.$ver"
|
||||
fi
|
||||
else
|
||||
eval library_names=\"$acl_library_names_spec\"
|
||||
for f in $library_names; do
|
||||
if test -f "$dir/$f"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$f"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Then look for a static library.
|
||||
if test "X$found_dir" = "X"; then
|
||||
if test -f "$dir/$libname.$acl_libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/$libname.$acl_libext"
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
if test -f "$dir/$libname.la"; then
|
||||
found_la="$dir/$libname.la"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no \
|
||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
|
||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$acl_hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$acl_hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/$acl_libdirstem | */$acl_libdirstem/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
|
||||
if test "$name" = '$1'; then
|
||||
LIB[]NAME[]_PREFIX="$basedir"
|
||||
fi
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
*/$acl_libdirstem2 | */$acl_libdirstem2/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
|
||||
if test "$name" = '$1'; then
|
||||
LIB[]NAME[]_PREFIX="$basedir"
|
||||
fi
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|
||||
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$acl_hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
popdef([P_A_C_K])
|
||||
popdef([PACKLIBS])
|
||||
popdef([PACKUP])
|
||||
popdef([PACK])
|
||||
popdef([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
dnl For those cases where a variable contains several -L and -l options
|
||||
dnl referring to unknown libraries and directories, this macro determines the
|
||||
dnl necessary additional linker options for the runtime path.
|
||||
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
|
||||
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
|
||||
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
|
||||
dnl otherwise linking without libtool is assumed.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
$1=
|
||||
if test "$enable_rpath" != no; then
|
||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode directories into the resulting
|
||||
dnl binary.
|
||||
rpathdirs=
|
||||
next=
|
||||
for opt in $2; do
|
||||
if test -n "$next"; then
|
||||
dir="$next"
|
||||
dnl No need to hardcode the standard /usr/lib.
|
||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
next=
|
||||
else
|
||||
case $opt in
|
||||
-L) next=yes ;;
|
||||
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
|
||||
dnl No need to hardcode the standard /usr/lib.
|
||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
next= ;;
|
||||
*) next= ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n ""$3""; then
|
||||
dnl libtool is used for linking. Use -R options.
|
||||
for dir in $rpathdirs; do
|
||||
$1="${$1}${$1:+ }-R$dir"
|
||||
done
|
||||
else
|
||||
dnl The linker is used for linking directly.
|
||||
if test -n "$acl_hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user
|
||||
dnl must pass all path elements in one option.
|
||||
alldirs=
|
||||
for dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
|
||||
done
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
$1="$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$dir"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
$1="${$1}${$1:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([$1])
|
||||
])
|
224
dependencies/libarchive-3.4.2/build/autoconf/lib-prefix.m4
vendored
Normal file
224
dependencies/libarchive-3.4.2/build/autoconf/lib-prefix.m4
vendored
Normal file
|
@ -0,0 +1,224 @@
|
|||
# lib-prefix.m4 serial 7 (gettext-0.18)
|
||||
dnl Copyright (C) 2001-2005, 2008-2011 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
||||
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
||||
dnl require excessive bracketing.
|
||||
ifdef([AC_HELP_STRING],
|
||||
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
||||
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib-prefix],
|
||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/$acl_libdirstem"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_MULTILIB creates
|
||||
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
|
||||
dnl "lib" or "lib64" or "lib/64",
|
||||
dnl - a variable acl_libdirstem2, as a secondary possible value for
|
||||
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
|
||||
dnl "lib/amd64".
|
||||
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
|
||||
[
|
||||
dnl There is no formal standard regarding lib and lib64.
|
||||
dnl On glibc systems, the current practice is that on a system supporting
|
||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
||||
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
|
||||
dnl the compiler's default mode by looking at the compiler's library search
|
||||
dnl path. If at least one of its elements ends in /lib64 or points to a
|
||||
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
|
||||
dnl Otherwise we use the default, namely "lib".
|
||||
dnl On Solaris systems, the current practice is that on a system supporting
|
||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
||||
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
|
||||
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
acl_libdirstem=lib
|
||||
acl_libdirstem2=
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
|
||||
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
|
||||
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
|
||||
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
|
||||
dnl symlink is missing, so we set acl_libdirstem2 too.
|
||||
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
|
||||
[AC_EGREP_CPP([sixtyfour bits], [
|
||||
#ifdef _LP64
|
||||
sixtyfour bits
|
||||
#endif
|
||||
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
|
||||
])
|
||||
if test $gl_cv_solaris_64bit = yes; then
|
||||
acl_libdirstem=lib/64
|
||||
case "$host_cpu" in
|
||||
sparc*) acl_libdirstem2=lib/sparcv9 ;;
|
||||
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
|
||||
if test -n "$searchpath"; then
|
||||
acl_save_IFS="${IFS= }"; IFS=":"
|
||||
for searchdir in $searchpath; do
|
||||
if test -d "$searchdir"; then
|
||||
case "$searchdir" in
|
||||
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
|
||||
*/../ | */.. )
|
||||
# Better ignore directories of this form. They are misleading.
|
||||
;;
|
||||
*) searchdir=`cd "$searchdir" && pwd`
|
||||
case "$searchdir" in
|
||||
*/lib64 ) acl_libdirstem=lib64 ;;
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$acl_save_IFS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
|
||||
])
|
11156
dependencies/libarchive-3.4.2/build/autoconf/ltmain.sh
vendored
Normal file
11156
dependencies/libarchive-3.4.2/build/autoconf/ltmain.sh
vendored
Normal file
File diff suppressed because it is too large
Load diff
215
dependencies/libarchive-3.4.2/build/autoconf/missing
vendored
Executable file
215
dependencies/libarchive-3.4.2/build/autoconf/missing
vendored
Executable file
|
@ -0,0 +1,215 @@
|
|||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
148
dependencies/libarchive-3.4.2/build/autoconf/test-driver
vendored
Executable file
148
dependencies/libarchive-3.4.2/build/autoconf/test-driver
vendored
Executable file
|
@ -0,0 +1,148 @@
|
|||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2013-07-13.22; # UTC
|
||||
|
||||
# Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$0: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
END
|
||||
}
|
||||
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=no
|
||||
color_tests=no
|
||||
enable_hard_errors=yes
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
missing_opts=
|
||||
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||
if test x"$missing_opts" != x; then
|
||||
usage_error "the following mandatory options are missing:$missing_opts"
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage_error "missing argument"
|
||||
fi
|
||||
|
||||
if test $color_tests = yes; then
|
||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||
red='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # No color.
|
||||
else
|
||||
red= grn= lgn= blu= mgn= std=
|
||||
fi
|
||||
|
||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||
trap "st=129; $do_exit" 1
|
||||
trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
estatus=$?
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
tweaked_estatus=1
|
||||
else
|
||||
tweaked_estatus=$estatus
|
||||
fi
|
||||
|
||||
case $tweaked_estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report the test outcome and exit status in the logs, so that one can
|
||||
# know whether the test passed or failed simply by looking at the '.log'
|
||||
# file, without the need of also peaking into the corresponding '.trs'
|
||||
# file (automake bug#11814).
|
||||
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
# Register the test result, and other relevant metadata.
|
||||
echo ":test-result: $res" > $trs_file
|
||||
echo ":global-test-result: $res" >> $trs_file
|
||||
echo ":recheck: $recheck" >> $trs_file
|
||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
68
dependencies/libarchive-3.4.2/build/autogen.sh
vendored
Executable file
68
dependencies/libarchive-3.4.2/build/autogen.sh
vendored
Executable file
|
@ -0,0 +1,68 @@
|
|||
#!/bin/sh
|
||||
|
||||
PATH=/usr/local/gnu-autotools/bin/:$PATH
|
||||
export PATH
|
||||
|
||||
# Start from one level above the build directory
|
||||
if [ -f version ]; then
|
||||
cd ..
|
||||
fi
|
||||
|
||||
if [ \! -f build/version ]; then
|
||||
echo "Can't find source directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# BSD make's "OBJDIR" support freaks out the automake-generated
|
||||
# Makefile. Effectively disable it.
|
||||
export MAKEOBJDIRPREFIX=/junk
|
||||
|
||||
# Start from the build directory, where the version file is located
|
||||
if [ -f build/version ]; then
|
||||
cd build
|
||||
fi
|
||||
|
||||
if [ \! -f version ]; then
|
||||
echo "Can't find version file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Update the build number in the 'version' file.
|
||||
# Separate number from additional alpha/beta/etc marker
|
||||
MARKER=`cat version | sed 's/[0-9.]//g'`
|
||||
# Bump the number
|
||||
VN=`cat version | sed 's/[^0-9.]//g'`
|
||||
# Build out the string.
|
||||
VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"
|
||||
|
||||
cd ..
|
||||
|
||||
# Clean up the source dir as much as we can.
|
||||
/bin/sh build/clean.sh
|
||||
|
||||
# Substitute the versions into Libarchive's archive.h and archive_entry.h
|
||||
perl -p -i -e "s/^(#define\tARCHIVE_VERSION_NUMBER).*/\$1 $VN/" libarchive/archive.h
|
||||
perl -p -i -e "s/^(#define\tARCHIVE_VERSION_NUMBER).*/\$1 $VN/" libarchive/archive_entry.h
|
||||
perl -p -i -e "s/^(#define\tARCHIVE_VERSION_ONLY_STRING).*/\$1 \"$VS\"/" libarchive/archive.h
|
||||
# Substitute versions into configure.ac as well
|
||||
perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_S\]),.*\)/$1,['"$VS"'])/' configure.ac
|
||||
perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_N\]),.*\)/$1,['"$VN"'])/' configure.ac
|
||||
|
||||
# Remove developer CFLAGS if a release build is being made
|
||||
if [ -n "${MAKE_LIBARCHIVE_RELEASE}" ]; then
|
||||
perl -p -i -e "s/^(DEV_CFLAGS.*)/# \$1/" Makefile.am
|
||||
perl -p -i -e 's/CMAKE_BUILD_TYPE "[A-Za-z]*"/CMAKE_BUILD_TYPE "Release"/' CMakeLists.txt
|
||||
fi
|
||||
|
||||
set -xe
|
||||
aclocal -I build/autoconf
|
||||
|
||||
# Note: --automake flag needed only for libtoolize from
|
||||
# libtool 1.5.x; in libtool 2.2.x it is a synonym for --quiet
|
||||
case `uname` in
|
||||
Darwin) glibtoolize --automake -c;;
|
||||
*) libtoolize --automake -c;;
|
||||
esac
|
||||
autoconf
|
||||
autoheader
|
||||
automake -a -c
|
36
dependencies/libarchive-3.4.2/build/bump-version.sh
vendored
Executable file
36
dependencies/libarchive-3.4.2/build/bump-version.sh
vendored
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh +v
|
||||
|
||||
# Start from the build directory, where the version file is located
|
||||
if [ -f build/version ]; then
|
||||
cd build
|
||||
fi
|
||||
|
||||
if [ \! -f version ]; then
|
||||
echo "Can't find version file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Update the build number in the 'version' file.
|
||||
# Separate number from additional alpha/beta/etc marker
|
||||
MARKER=`cat version | sed 's/[0-9.]//g'`
|
||||
# Bump the number
|
||||
VN=`cat version | sed 's/[^0-9.]//g'`
|
||||
# Reassemble and write back out
|
||||
VN=$(($VN + 1))
|
||||
rm -f version.old
|
||||
mv version version.old
|
||||
chmod +w version.old
|
||||
echo $VN$MARKER > version
|
||||
VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"
|
||||
cd ..
|
||||
|
||||
ANNOUNCE=`date +"%b %d, %Y:"`" libarchive $VS released"
|
||||
|
||||
echo $ANNOUNCE
|
||||
|
||||
# Add a version notice to NEWS
|
||||
mv NEWS NEWS.bak
|
||||
chmod +w NEWS.bak
|
||||
echo $ANNOUNCE >> NEWS
|
||||
echo >> NEWS
|
||||
cat NEWS.bak >> NEWS
|
99
dependencies/libarchive-3.4.2/build/clean.sh
vendored
Executable file
99
dependencies/libarchive-3.4.2/build/clean.sh
vendored
Executable file
|
@ -0,0 +1,99 @@
|
|||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Attempt to remove as many generated files as we can.
|
||||
# Ideally, a well-used development sandbox would look like
|
||||
# a pristine checkout after running this script.
|
||||
#
|
||||
|
||||
if [ \! -f build/version ]; then
|
||||
echo 'Must run the clean script from the top-level dir of the libarchive distribution' 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If we're on BSD, blow away the build dir under /usr/obj
|
||||
rm -rf /usr/obj`pwd`
|
||||
|
||||
#
|
||||
# Try to clean up a bit more...
|
||||
#
|
||||
|
||||
find . -name '*.So' | xargs rm -f
|
||||
find . -name '*.a' | xargs rm -f
|
||||
find . -name '*.la' | xargs rm -f
|
||||
find . -name '*.lo' | xargs rm -f
|
||||
find . -name '*.o' | xargs rm -f
|
||||
find . -name '*.orig' | xargs rm -f
|
||||
find . -name '*.po' | xargs rm -f
|
||||
find . -name '*.rej' | xargs rm -f
|
||||
find . -name '*~' | xargs rm -f
|
||||
find . -name '.depend' | xargs rm -f
|
||||
find . -name '.deps' | xargs rm -rf
|
||||
find . -name '.dirstamp' | xargs rm -f
|
||||
find . -name '.libs' | xargs rm -rf
|
||||
find . -name 'CMakeFiles' | xargs rm -rf
|
||||
find . -name 'cmake_install.cmake' | xargs rm -f
|
||||
find . -name 'CTestTestfile.cmake' | xargs rm -f
|
||||
|
||||
rm -rf Testing
|
||||
rm -rf autom4te.cache
|
||||
rm -rf bin
|
||||
rm -rf cmake.tmp
|
||||
rm -rf libarchive/Testing
|
||||
|
||||
rm -f CMakeCache.txt
|
||||
rm -f DartConfiguration.tcl
|
||||
rm -f Makefile
|
||||
rm -f Makefile.in
|
||||
rm -f aclocal.m4
|
||||
rm -f bsdcpio
|
||||
rm -f bsdcpio_test
|
||||
rm -f bsdtar
|
||||
rm -f bsdtar_test
|
||||
rm -f build/autoconf/compile
|
||||
rm -f build/autoconf/config.guess
|
||||
rm -f build/autoconf/config.sub
|
||||
rm -f build/autoconf/depcomp
|
||||
rm -f build/autoconf/install-sh
|
||||
rm -f build/autoconf/libtool.m4
|
||||
rm -f build/autoconf/ltmain.sh
|
||||
rm -f build/autoconf/ltoptions.m4
|
||||
rm -f build/autoconf/ltsugar.m4
|
||||
rm -f build/autoconf/ltversion.m4
|
||||
rm -f build/autoconf/lt~obsolete.m4
|
||||
rm -f build/autoconf/missing
|
||||
rm -f build/autoconf/test-driver
|
||||
rm -f build/pkgconfig/libarchive.pc
|
||||
rm -f build/version.old
|
||||
rm -f cat/test/list.h
|
||||
rm -f config.h
|
||||
rm -f config.h.in
|
||||
rm -f config.log
|
||||
rm -f config.status
|
||||
rm -f configure
|
||||
rm -f cpio/*.1.gz
|
||||
rm -f cpio/Makefile
|
||||
rm -f cpio/bsdcpio
|
||||
rm -f cpio/test/Makefile
|
||||
rm -f cpio/test/bsdcpio_test
|
||||
rm -f cpio/test/list.h
|
||||
rm -f doc/html/*
|
||||
rm -f doc/man/*
|
||||
rm -f doc/pdf/*
|
||||
rm -f doc/text/*
|
||||
rm -f doc/wiki/*
|
||||
rm -f libarchive/*.[35].gz
|
||||
rm -f libarchive/Makefile
|
||||
rm -f libarchive/libarchive.so*
|
||||
rm -f libarchive/test/Makefile
|
||||
rm -f libarchive/test/libarchive_test
|
||||
rm -f libarchive/test/list.h
|
||||
rm -f libarchive_test
|
||||
rm -f libtool
|
||||
rm -f stamp-h1
|
||||
rm -f tar/*.1.gz
|
||||
rm -f tar/Makefile
|
||||
rm -f tar/bsdtar
|
||||
rm -f tar/test/Makefile
|
||||
rm -f tar/test/bsdtar_test
|
||||
rm -f tar/test/list.h
|
14
dependencies/libarchive-3.4.2/build/cmake/CheckFileOffsetBits.c
vendored
Normal file
14
dependencies/libarchive-3.4.2/build/cmake/CheckFileOffsetBits.c
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <sys/types.h>
|
||||
|
||||
#define KB ((off_t)1024)
|
||||
#define MB ((off_t)1024 * KB)
|
||||
#define GB ((off_t)1024 * MB)
|
||||
#define TB ((off_t)1024 * GB)
|
||||
int t2[(((64 * GB -1) % 671088649) == 268434537)
|
||||
&& (((TB - (64 * GB -1) + 255) % 1792151290) == 305159546)? 1: -1];
|
||||
|
||||
int main()
|
||||
{
|
||||
;
|
||||
return 0;
|
||||
}
|
44
dependencies/libarchive-3.4.2/build/cmake/CheckFileOffsetBits.cmake
vendored
Normal file
44
dependencies/libarchive-3.4.2/build/cmake/CheckFileOffsetBits.cmake
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
# - Check if _FILE_OFFSET_BITS macro needed for large files
|
||||
# CHECK_FILE_OFFSET_BITS ()
|
||||
#
|
||||
# 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
|
||||
# Copyright (c) 2009, Michihiro NAKAJIMA
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
#INCLUDE(CheckCXXSourceCompiles)
|
||||
|
||||
GET_FILENAME_COMPONENT(_selfdir_CheckFileOffsetBits
|
||||
"${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
MACRO (CHECK_FILE_OFFSET_BITS)
|
||||
IF(NOT DEFINED _FILE_OFFSET_BITS)
|
||||
MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files")
|
||||
TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
|
||||
IF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
|
||||
TRY_COMPILE(__WITH_FILE_OFFSET_BITS_64
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=64)
|
||||
ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
|
||||
|
||||
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 "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 "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)
|
||||
|
||||
ENDMACRO (CHECK_FILE_OFFSET_BITS)
|
||||
|
49
dependencies/libarchive-3.4.2/build/cmake/CheckFuncs.cmake
vendored
Normal file
49
dependencies/libarchive-3.4.2/build/cmake/CheckFuncs.cmake
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
# Check if the system has the specified function; treat glibc "stub"
|
||||
# functions as nonexistent:
|
||||
# CHECK_FUNCTION_EXISTS_GLIBC (FUNCTION FUNCVAR)
|
||||
#
|
||||
# FUNCTION - the function(s) where the prototype should be declared
|
||||
# FUNCVAR - variable to define if the function does exist
|
||||
#
|
||||
# In particular, this understands the glibc convention of
|
||||
# defining macros __stub_XXXX or __stub___XXXX if the function
|
||||
# does appear in the library but is merely a stub that does nothing.
|
||||
# By detecting this case, we can select alternate behavior on
|
||||
# platforms that don't support this functionality.
|
||||
#
|
||||
# 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
|
||||
# Copyright (c) 2009, Michihiro NAKAJIMA
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
INCLUDE(CheckFunctionExists)
|
||||
GET_FILENAME_COMPONENT(_selfdir_CheckFunctionExistsGlibc
|
||||
"${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
MACRO (CHECK_FUNCTION_EXISTS_GLIBC _FUNC _FUNCVAR)
|
||||
IF(NOT DEFINED ${_FUNCVAR})
|
||||
SET(CHECK_STUB_FUNC_1 "__stub_${_FUNC}")
|
||||
SET(CHECK_STUB_FUNC_2 "__stub___${_FUNC}")
|
||||
CONFIGURE_FILE( ${_selfdir_CheckFunctionExistsGlibc}/CheckFuncs_stub.c.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake.tmp/CheckFuncs_stub.c IMMEDIATE)
|
||||
TRY_COMPILE(__stub
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake.tmp/CheckFuncs_stub.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS
|
||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
|
||||
"${CHECK_INCLUDE_FILE_C_INCLUDE_DIRS}")
|
||||
IF (__stub)
|
||||
SET("${_FUNCVAR}" "" CACHE INTERNAL "Have function ${_FUNC}")
|
||||
ELSE (__stub)
|
||||
CHECK_FUNCTION_EXISTS("${_FUNC}" "${_FUNCVAR}")
|
||||
ENDIF (__stub)
|
||||
ENDIF(NOT DEFINED ${_FUNCVAR})
|
||||
ENDMACRO (CHECK_FUNCTION_EXISTS_GLIBC)
|
||||
|
16
dependencies/libarchive-3.4.2/build/cmake/CheckFuncs_stub.c.in
vendored
Normal file
16
dependencies/libarchive-3.4.2/build/cmake/CheckFuncs_stub.c.in
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifdef __STDC__
|
||||
#include <limits.h>
|
||||
#else
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
#if defined ${CHECK_STUB_FUNC_1} || defined ${CHECK_STUB_FUNC_2}
|
||||
return 0;
|
||||
#else
|
||||
this system have stub
|
||||
return 0;
|
||||
#endif
|
||||
}
|
32
dependencies/libarchive-3.4.2/build/cmake/CheckHeaderDirent.cmake
vendored
Normal file
32
dependencies/libarchive-3.4.2/build/cmake/CheckHeaderDirent.cmake
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
# - Check if the system has the specified type
|
||||
# CHECK_HEADER_DIRENT (HEADER1 HEARDER2 ...)
|
||||
#
|
||||
# HEADER - the header(s) where the prototype should be declared
|
||||
#
|
||||
# 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
|
||||
# Copyright (c) 2009, Michihiro NAKAJIMA
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
INCLUDE(CheckTypeExists)
|
||||
|
||||
MACRO (CHECK_HEADER_DIRENT)
|
||||
CHECK_TYPE_EXISTS("DIR *" dirent.h HAVE_DIRENT_H)
|
||||
IF(NOT HAVE_DIRENT_H)
|
||||
CHECK_TYPE_EXISTS("DIR *" sys/ndir.h HAVE_SYS_NDIR_H)
|
||||
IF(NOT HAVE_SYS_NDIR_H)
|
||||
CHECK_TYPE_EXISTS("DIR *" ndir.h HAVE_NDIR_H)
|
||||
IF(NOT HAVE_NDIR_H)
|
||||
CHECK_TYPE_EXISTS("DIR *" sys/dir.h HAVE_SYS_DIR_H)
|
||||
ENDIF(NOT HAVE_NDIR_H)
|
||||
ENDIF(NOT HAVE_SYS_NDIR_H)
|
||||
ENDIF(NOT HAVE_DIRENT_H)
|
||||
ENDMACRO (CHECK_HEADER_DIRENT)
|
||||
|
42
dependencies/libarchive-3.4.2/build/cmake/CheckTypeExists.cmake
vendored
Normal file
42
dependencies/libarchive-3.4.2/build/cmake/CheckTypeExists.cmake
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
# - Check if the system has the specified type
|
||||
# CHECK_TYPE_EXISTS (TYPE HEADER VARIABLE)
|
||||
#
|
||||
# TYPE - the name of the type or struct or class you are interested in
|
||||
# HEADER - the header(s) where the prototype should be declared
|
||||
# VARIABLE - variable to store the result
|
||||
#
|
||||
# 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
|
||||
# Copyright (c) 2009, Michihiro NAKAJIMA
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
INCLUDE(CheckCSourceCompiles)
|
||||
|
||||
MACRO (CHECK_TYPE_EXISTS _TYPE _HEADER _RESULT)
|
||||
SET(_INCLUDE_FILES)
|
||||
FOREACH (it ${_HEADER})
|
||||
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
|
||||
ENDFOREACH (it)
|
||||
|
||||
SET(_CHECK_TYPE_EXISTS_SOURCE_CODE "
|
||||
${_INCLUDE_FILES}
|
||||
int main()
|
||||
{
|
||||
static ${_TYPE} tmp;
|
||||
if (sizeof(tmp))
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
")
|
||||
CHECK_C_SOURCE_COMPILES("${_CHECK_TYPE_EXISTS_SOURCE_CODE}" ${_RESULT})
|
||||
|
||||
ENDMACRO (CHECK_TYPE_EXISTS)
|
||||
|
33
dependencies/libarchive-3.4.2/build/cmake/CreatePkgConfigFile.cmake
vendored
Normal file
33
dependencies/libarchive-3.4.2/build/cmake/CreatePkgConfigFile.cmake
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
# - Generate a libarchive.pc like autotools for pkg-config
|
||||
#
|
||||
|
||||
# Set the required variables (we use the same input file as autotools)
|
||||
SET(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
SET(exec_prefix \${prefix})
|
||||
SET(libdir \${exec_prefix}/lib)
|
||||
SET(includedir \${prefix}/include)
|
||||
# Now, this is not particularly pretty, nor is it terribly accurate...
|
||||
# Loop over all our additional libs
|
||||
FOREACH(mylib ${ADDITIONAL_LIBS})
|
||||
# Extract the filename from the absolute path
|
||||
GET_FILENAME_COMPONENT(mylib_name ${mylib} NAME_WE)
|
||||
# Strip the lib prefix
|
||||
STRING(REGEX REPLACE "^lib" "" mylib_name ${mylib_name})
|
||||
# Append it to our LIBS string
|
||||
SET(LIBS "${LIBS} -l${mylib_name}")
|
||||
ENDFOREACH()
|
||||
# libxml2 is easier, since it's already using pkg-config
|
||||
FOREACH(mylib ${PC_LIBXML_STATIC_LDFLAGS})
|
||||
SET(LIBS "${LIBS} ${mylib}")
|
||||
ENDFOREACH()
|
||||
# FIXME: The order of the libraries doesn't take dependencies into account,
|
||||
# thus there's a good chance it'll make some binutils versions unhappy...
|
||||
# This only affects Libs.private (looked up for static builds) though.
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc
|
||||
@ONLY)
|
||||
# And install it, of course ;).
|
||||
IF(ENABLE_INSTALL)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc
|
||||
DESTINATION "lib/pkgconfig")
|
||||
ENDIF()
|
22
dependencies/libarchive-3.4.2/build/cmake/FindLibGCC.cmake
vendored
Normal file
22
dependencies/libarchive-3.4.2/build/cmake/FindLibGCC.cmake
vendored
Normal file
|
@ -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)
|
13
dependencies/libarchive-3.4.2/build/cmake/FindMbedTLS.cmake
vendored
Normal file
13
dependencies/libarchive-3.4.2/build/cmake/FindMbedTLS.cmake
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h)
|
||||
|
||||
find_library(MBEDTLS_LIBRARY mbedtls)
|
||||
find_library(MBEDX509_LIBRARY mbedx509)
|
||||
find_library(MBEDCRYPTO_LIBRARY mbedcrypto)
|
||||
|
||||
set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(MBEDTLS DEFAULT_MSG
|
||||
MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
||||
|
||||
mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
23
dependencies/libarchive-3.4.2/build/cmake/FindNettle.cmake
vendored
Normal file
23
dependencies/libarchive-3.4.2/build/cmake/FindNettle.cmake
vendored
Normal file
|
@ -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)
|
34
dependencies/libarchive-3.4.2/build/cmake/FindPCREPOSIX.cmake
vendored
Normal file
34
dependencies/libarchive-3.4.2/build/cmake/FindPCREPOSIX.cmake
vendored
Normal file
|
@ -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)
|
68
dependencies/libarchive-3.4.2/build/cmake/LibarchiveCodeCoverage.cmake
vendored
Normal file
68
dependencies/libarchive-3.4.2/build/cmake/LibarchiveCodeCoverage.cmake
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
#################################################################
|
||||
# Adds a build target called "coverage" for code coverage.
|
||||
#
|
||||
# This compiles the code using special GCC flags, run the tests,
|
||||
# and then generates a nice HTML output. This new "coverage" make
|
||||
# target will only be available if you build using GCC in Debug
|
||||
# mode. If any of the required programs (lcov and genhtml) were
|
||||
# not found, a FATAL_ERROR message is printed.
|
||||
#
|
||||
# If not already done, this code will set ENABLE_TEST to ON.
|
||||
#
|
||||
# To build the code coverage and open it in your browser do this:
|
||||
#
|
||||
# mkdir debug
|
||||
# cd debug
|
||||
# cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON ..
|
||||
# make -j4
|
||||
# make coverage
|
||||
# xdg-open coverage/index.html
|
||||
#################################################################
|
||||
|
||||
# Find programs we need
|
||||
FIND_PROGRAM(LCOV_EXECUTABLE lcov DOC "Full path to lcov executable")
|
||||
FIND_PROGRAM(GENHTML_EXECUTABLE genhtml DOC "Full path to genhtml executable")
|
||||
MARK_AS_ADVANCED(LCOV_EXECUTABLE GENHTML_EXECUTABLE)
|
||||
|
||||
# Check, compiler, build types and programs are available
|
||||
IF(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
MESSAGE(FATAL_ERROR "Coverage can only be built on GCC")
|
||||
ELSEIF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
MESSAGE(FATAL_ERROR "Coverage can only be built in Debug mode")
|
||||
ELSEIF(NOT LCOV_EXECUTABLE)
|
||||
MESSAGE(FATAL_ERROR "lcov executable not found")
|
||||
ELSEIF(NOT GENHTML_EXECUTABLE)
|
||||
MESSAGE(FATAL_ERROR "genhtml executable not found")
|
||||
ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
# Enable testing if not already done
|
||||
SET(ENABLE_TEST ON)
|
||||
|
||||
#################################################################
|
||||
# Set special compiler and linker flags for test coverage
|
||||
#################################################################
|
||||
# 0. Enable debug: -g
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
|
||||
# 1. Disable optimizations: -O0
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
|
||||
# 2. Enable all kind of warnings:
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W")
|
||||
# 3. Enable special coverage flag (HINT: --coverage is a synonym for -fprofile-arcs -ftest-coverage)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
|
||||
#################################################################
|
||||
|
||||
ADD_CUSTOM_TARGET(coverage
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Beginning test coverage. Output is written to coverage.log."
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-1/5: Reset all execution counts to zero"
|
||||
COMMAND ${LCOV_EXECUTABLE} --directory . --zerocounters > coverage.log 2>&1
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-2/5: Run testrunner"
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} >> coverage.log 2>&1
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-3/5: Collect coverage data"
|
||||
COMMAND ${LCOV_EXECUTABLE} --capture --directory . --output-file "./coverage.info" >> coverage.log 2>&1
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-4/5: Generate HTML from coverage data"
|
||||
COMMAND ${GENHTML_EXECUTABLE} "coverage.info" --title="libarchive-${LIBARCHIVE_VERSION_STRING}" --show-details --legend --output-directory "./coverage" >> coverage.log 2>&1
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-5/5: Open test coverage HTML output in browser: xdg-open ./coverage/index.html"
|
||||
COMMENT "Runs testrunner and generates coverage output (formats: .info and .html)")
|
||||
|
1338
dependencies/libarchive-3.4.2/build/cmake/config.h.in
vendored
Normal file
1338
dependencies/libarchive-3.4.2/build/cmake/config.h.in
vendored
Normal file
File diff suppressed because it is too large
Load diff
12
dependencies/libarchive-3.4.2/build/pkgconfig/libarchive.pc.in
vendored
Normal file
12
dependencies/libarchive-3.4.2/build/pkgconfig/libarchive.pc.in
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libarchive
|
||||
Description: library that can create and read several streaming archive formats
|
||||
Version: @VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Cflags.private: -DLIBARCHIVE_STATIC
|
||||
Libs: -L${libdir} -larchive
|
||||
Libs.private: @LIBS@
|
1
dependencies/libarchive-3.4.2/build/version
vendored
Normal file
1
dependencies/libarchive-3.4.2/build/version
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
3004002
|
37
dependencies/libarchive-3.4.2/cat/CMakeLists.txt
vendored
Normal file
37
dependencies/libarchive-3.4.2/cat/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
############################################
|
||||
#
|
||||
# How to build bsdcat
|
||||
#
|
||||
############################################
|
||||
IF(ENABLE_CAT)
|
||||
|
||||
SET(bsdcat_SOURCES
|
||||
bsdcat.c
|
||||
bsdcat.h
|
||||
bsdcat_platform.h
|
||||
cmdline.c
|
||||
../libarchive_fe/err.c
|
||||
../libarchive_fe/err.h
|
||||
../libarchive_fe/lafe_platform.h
|
||||
)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libarchive_fe)
|
||||
|
||||
# bsdcat documentation
|
||||
SET(bsdcat_MANS bsdcat.1)
|
||||
|
||||
# How to build bsdcat
|
||||
ADD_EXECUTABLE(bsdcat ${bsdcat_SOURCES})
|
||||
IF(ENABLE_CAT_SHARED)
|
||||
TARGET_LINK_LIBRARIES(bsdcat archive ${ADDITIONAL_LIBS})
|
||||
ELSE(ENABLE_CAT_SHARED)
|
||||
TARGET_LINK_LIBRARIES(bsdcat archive_static ${ADDITIONAL_LIBS})
|
||||
SET_TARGET_PROPERTIES(bsdcat PROPERTIES COMPILE_DEFINITIONS
|
||||
LIBARCHIVE_STATIC)
|
||||
ENDIF(ENABLE_CAT_SHARED)
|
||||
|
||||
# Installation rules
|
||||
INSTALL(TARGETS bsdcat RUNTIME DESTINATION bin)
|
||||
INSTALL_MAN(${bsdcat_MANS})
|
||||
ENDIF(ENABLE_CAT)
|
||||
|
||||
add_subdirectory(test)
|
61
dependencies/libarchive-3.4.2/cat/bsdcat.1
vendored
Normal file
61
dependencies/libarchive-3.4.2/cat/bsdcat.1
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
.\" Copyright (c) 2011-2014, Mike Kazantsev
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd March 1, 2014
|
||||
.Dt BSDCAT 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm bsdcat
|
||||
.Nd expand files to standard output
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op options
|
||||
.Op files
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
expands files to standard output.
|
||||
.Sh OPTIONS
|
||||
.Nm
|
||||
typically takes a filename as an argument or reads standard input when used in a
|
||||
pipe.
|
||||
In both cases decompressed data it written to standard output.
|
||||
.Sh EXAMPLES
|
||||
To decompress a file:
|
||||
.Pp
|
||||
.Dl bsdcat example.txt.gz > example.txt
|
||||
.Pp
|
||||
To decompress standard input in a pipe:
|
||||
.Pp
|
||||
.Dl cat example.txt.gz | bsdcat > example.txt
|
||||
.Pp
|
||||
Both examples achieve the same results - a decompressed file by redirecting
|
||||
output.
|
||||
.Sh SEE ALSO
|
||||
.Xr bzcat 1 ,
|
||||
.Xr uncompress 1 ,
|
||||
.Xr xzcat 1 ,
|
||||
.Xr zcat 1 ,
|
||||
.Xr libarchive-formats 5
|
156
dependencies/libarchive-3.4.2/cat/bsdcat.c
vendored
Normal file
156
dependencies/libarchive-3.4.2/cat/bsdcat.c
vendored
Normal file
|
@ -0,0 +1,156 @@
|
|||
/*-
|
||||
* Copyright (c) 2011-2014, Mike Kazantsev
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "bsdcat_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "bsdcat.h"
|
||||
#include "err.h"
|
||||
|
||||
#define BYTES_PER_BLOCK (20*512)
|
||||
|
||||
static struct archive *a;
|
||||
static struct archive_entry *ae;
|
||||
static const char *bsdcat_current_path;
|
||||
static int exit_status = 0;
|
||||
|
||||
|
||||
void
|
||||
usage(FILE *stream, int eval)
|
||||
{
|
||||
const char *p;
|
||||
p = lafe_getprogname();
|
||||
fprintf(stream,
|
||||
"Usage: %s [-h] [--help] [--version] [--] [filenames...]\n", p);
|
||||
exit(eval);
|
||||
}
|
||||
|
||||
static void
|
||||
version(void)
|
||||
{
|
||||
printf("bsdcat %s - %s \n",
|
||||
BSDCAT_VERSION_STRING,
|
||||
archive_version_details());
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
bsdcat_next(void)
|
||||
{
|
||||
if (a != NULL) {
|
||||
if (archive_read_close(a) != ARCHIVE_OK)
|
||||
bsdcat_print_error();
|
||||
archive_read_free(a);
|
||||
}
|
||||
|
||||
a = archive_read_new();
|
||||
archive_read_support_filter_all(a);
|
||||
archive_read_support_format_empty(a);
|
||||
archive_read_support_format_raw(a);
|
||||
}
|
||||
|
||||
void
|
||||
bsdcat_print_error(void)
|
||||
{
|
||||
lafe_warnc(0, "%s: %s",
|
||||
bsdcat_current_path, archive_error_string(a));
|
||||
exit_status = 1;
|
||||
}
|
||||
|
||||
void
|
||||
bsdcat_read_to_stdout(const char* filename)
|
||||
{
|
||||
int r;
|
||||
|
||||
if (archive_read_open_filename(a, filename, BYTES_PER_BLOCK)
|
||||
!= ARCHIVE_OK)
|
||||
bsdcat_print_error();
|
||||
else if (r = archive_read_next_header(a, &ae),
|
||||
r != ARCHIVE_OK && r != ARCHIVE_EOF)
|
||||
bsdcat_print_error();
|
||||
else if (r == ARCHIVE_EOF)
|
||||
/* for empty payloads don't try and read data */
|
||||
;
|
||||
else if (archive_read_data_into_fd(a, 1) != ARCHIVE_OK)
|
||||
bsdcat_print_error();
|
||||
if (archive_read_close(a) != ARCHIVE_OK)
|
||||
bsdcat_print_error();
|
||||
archive_read_free(a);
|
||||
a = NULL;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct bsdcat *bsdcat, bsdcat_storage;
|
||||
int c;
|
||||
|
||||
bsdcat = &bsdcat_storage;
|
||||
memset(bsdcat, 0, sizeof(*bsdcat));
|
||||
|
||||
lafe_setprogname(*argv, "bsdcat");
|
||||
|
||||
bsdcat->argv = argv;
|
||||
bsdcat->argc = argc;
|
||||
|
||||
while ((c = bsdcat_getopt(bsdcat)) != -1) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
usage(stdout, 0);
|
||||
break;
|
||||
case OPTION_VERSION:
|
||||
version();
|
||||
break;
|
||||
default:
|
||||
usage(stderr, 1);
|
||||
}
|
||||
}
|
||||
|
||||
bsdcat_next();
|
||||
if (*bsdcat->argv == NULL) {
|
||||
bsdcat_current_path = "<stdin>";
|
||||
bsdcat_read_to_stdout(NULL);
|
||||
} else {
|
||||
while (*bsdcat->argv) {
|
||||
bsdcat_current_path = *bsdcat->argv++;
|
||||
bsdcat_read_to_stdout(bsdcat_current_path);
|
||||
bsdcat_next();
|
||||
}
|
||||
archive_read_free(a); /* Help valgrind & friends */
|
||||
}
|
||||
|
||||
exit(exit_status);
|
||||
}
|
61
dependencies/libarchive-3.4.2/cat/bsdcat.h
vendored
Normal file
61
dependencies/libarchive-3.4.2/cat/bsdcat.h
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*-
|
||||
* Copyright (c) 2014, Mike Kazantsev
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef BSDCAT_H_INCLUDED
|
||||
#define BSDCAT_H_INCLUDED
|
||||
|
||||
#if defined(PLATFORM_CONFIG_H)
|
||||
/* Use hand-built config.h in environments that need it. */
|
||||
#include PLATFORM_CONFIG_H
|
||||
#else
|
||||
/* Not having a config.h of some sort is a serious problem. */
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <archive.h>
|
||||
#include <archive_entry.h>
|
||||
|
||||
struct bsdcat {
|
||||
/* Option parser state */
|
||||
int getopt_state;
|
||||
char *getopt_word;
|
||||
|
||||
/* Miscellaneous state information */
|
||||
int argc;
|
||||
char **argv;
|
||||
const char *argument;
|
||||
};
|
||||
|
||||
enum {
|
||||
OPTION_VERSION
|
||||
};
|
||||
|
||||
int bsdcat_getopt(struct bsdcat *);
|
||||
void usage(FILE *stream, int eval);
|
||||
void bsdcat_next(void);
|
||||
void bsdcat_print_error(void);
|
||||
void bsdcat_read_to_stdout(const char* filename);
|
||||
|
||||
#endif
|
75
dependencies/libarchive-3.4.2/cat/bsdcat_platform.h
vendored
Normal file
75
dependencies/libarchive-3.4.2/cat/bsdcat_platform.h
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*-
|
||||
* Copyright (c) 2003-2007 Tim Kientzle
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD: src/usr.bin/tar/bsdtar_platform.h,v 1.26 2008/12/06 07:37:14 kientzle Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* This header is the first thing included in any of the bsdtar
|
||||
* source files. As far as possible, platform-specific issues should
|
||||
* be dealt with here and not within individual source files.
|
||||
*/
|
||||
|
||||
#ifndef BSDCAT_PLATFORM_H_INCLUDED
|
||||
#define BSDCAT_PLATFORM_H_INCLUDED
|
||||
|
||||
#if defined(PLATFORM_CONFIG_H)
|
||||
/* Use hand-built config.h in environments that need it. */
|
||||
#include PLATFORM_CONFIG_H
|
||||
#else
|
||||
/* Not having a config.h of some sort is a serious problem. */
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
/* Get a real definition for __FBSDID if we can */
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
/* If not, define it so as to avoid dangling semicolons. */
|
||||
#ifndef __FBSDID
|
||||
#define __FBSDID(a) struct _undefined_hack
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBARCHIVE
|
||||
/* If we're using the platform libarchive, include system headers. */
|
||||
#include <archive.h>
|
||||
#include <archive_entry.h>
|
||||
#else
|
||||
/* Otherwise, include user headers. */
|
||||
#include "archive.h"
|
||||
#include "archive_entry.h"
|
||||
#endif
|
||||
|
||||
/* How to mark functions that don't return. */
|
||||
/* This facilitates use of some newer static code analysis tools. */
|
||||
#undef __LA_DEAD
|
||||
#if defined(__GNUC__) && (__GNUC__ > 2 || \
|
||||
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
|
||||
#define __LA_DEAD __attribute__((__noreturn__))
|
||||
#else
|
||||
#define __LA_DEAD
|
||||
#endif
|
||||
|
||||
#endif /* !BSDCAT_PLATFORM_H_INCLUDED */
|
283
dependencies/libarchive-3.4.2/cat/cmdline.c
vendored
Normal file
283
dependencies/libarchive-3.4.2/cat/cmdline.c
vendored
Normal file
|
@ -0,0 +1,283 @@
|
|||
/*-
|
||||
* Copyright (c) 2003-2008 Tim Kientzle
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Command line parser for tar.
|
||||
*/
|
||||
|
||||
#include "bsdcat_platform.h"
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "bsdcat.h"
|
||||
#include "err.h"
|
||||
|
||||
/*
|
||||
* Short options for tar. Please keep this sorted.
|
||||
*/
|
||||
static const char *short_options = "h";
|
||||
|
||||
/*
|
||||
* Long options for tar. Please keep this list sorted.
|
||||
*
|
||||
* The symbolic names for options that lack a short equivalent are
|
||||
* defined in bsdcat.h. Also note that so far I've found no need
|
||||
* to support optional arguments to long options. That would be
|
||||
* a small change to the code below.
|
||||
*/
|
||||
|
||||
static const struct bsdcat_option {
|
||||
const char *name;
|
||||
int required; /* 1 if this option requires an argument. */
|
||||
int equivalent; /* Equivalent short option. */
|
||||
} tar_longopts[] = {
|
||||
{ "help", 0, 'h' },
|
||||
{ "version", 0, OPTION_VERSION },
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
/*
|
||||
* This getopt implementation has two key features that common
|
||||
* getopt_long() implementations lack. Apart from those, it's a
|
||||
* straightforward option parser, considerably simplified by not
|
||||
* needing to support the wealth of exotic getopt_long() features. It
|
||||
* has, of course, been shamelessly tailored for bsdcat. (If you're
|
||||
* looking for a generic getopt_long() implementation for your
|
||||
* project, I recommend Gregory Pietsch's public domain getopt_long()
|
||||
* implementation.) The two additional features are:
|
||||
*
|
||||
* Old-style tar arguments: The original tar implementation treated
|
||||
* the first argument word as a list of single-character option
|
||||
* letters. All arguments follow as separate words. For example,
|
||||
* tar xbf 32 /dev/tape
|
||||
* Here, the "xbf" is three option letters, "32" is the argument for
|
||||
* "b" and "/dev/tape" is the argument for "f". We support this usage
|
||||
* if the first command-line argument does not begin with '-'. We
|
||||
* also allow regular short and long options to follow, e.g.,
|
||||
* tar xbf 32 /dev/tape -P --format=pax
|
||||
*
|
||||
* -W long options: There's an obscure GNU convention (only rarely
|
||||
* supported even there) that allows "-W option=argument" as an
|
||||
* alternative way to support long options. This was supported in
|
||||
* early bsdcat as a way to access long options on platforms that did
|
||||
* not support getopt_long() and is preserved here for backwards
|
||||
* compatibility. (Of course, if I'd started with a custom
|
||||
* command-line parser from the beginning, I would have had normal
|
||||
* long option support on every platform so that hack wouldn't have
|
||||
* been necessary. Oh, well. Some mistakes you just have to live
|
||||
* with.)
|
||||
*
|
||||
* TODO: We should be able to use this to pull files and intermingled
|
||||
* options (such as -C) from the command line in write mode. That
|
||||
* will require a little rethinking of the argument handling in
|
||||
* bsdcat.c.
|
||||
*
|
||||
* TODO: If we want to support arbitrary command-line options from -T
|
||||
* input (as GNU tar does), we may need to extend this to handle option
|
||||
* words from sources other than argv/argc. I'm not really sure if I
|
||||
* like that feature of GNU tar, so it's certainly not a priority.
|
||||
*/
|
||||
|
||||
int
|
||||
bsdcat_getopt(struct bsdcat *bsdcat)
|
||||
{
|
||||
enum { state_start = 0, state_old_tar, state_next_word,
|
||||
state_short, state_long };
|
||||
|
||||
const struct bsdcat_option *popt, *match = NULL, *match2 = NULL;
|
||||
const char *p, *long_prefix = "--";
|
||||
size_t optlength;
|
||||
int opt = '?';
|
||||
int required = 0;
|
||||
|
||||
bsdcat->argument = NULL;
|
||||
|
||||
/* First time through, initialize everything. */
|
||||
if (bsdcat->getopt_state == state_start) {
|
||||
/* Skip program name. */
|
||||
++bsdcat->argv;
|
||||
--bsdcat->argc;
|
||||
if (*bsdcat->argv == NULL)
|
||||
return (-1);
|
||||
/* Decide between "new style" and "old style" arguments. */
|
||||
bsdcat->getopt_state = state_next_word;
|
||||
}
|
||||
|
||||
/*
|
||||
* We're ready to look at the next word in argv.
|
||||
*/
|
||||
if (bsdcat->getopt_state == state_next_word) {
|
||||
/* No more arguments, so no more options. */
|
||||
if (bsdcat->argv[0] == NULL)
|
||||
return (-1);
|
||||
/* Doesn't start with '-', so no more options. */
|
||||
if (bsdcat->argv[0][0] != '-')
|
||||
return (-1);
|
||||
/* "--" marks end of options; consume it and return. */
|
||||
if (strcmp(bsdcat->argv[0], "--") == 0) {
|
||||
++bsdcat->argv;
|
||||
--bsdcat->argc;
|
||||
return (-1);
|
||||
}
|
||||
/* Get next word for parsing. */
|
||||
bsdcat->getopt_word = *bsdcat->argv++;
|
||||
--bsdcat->argc;
|
||||
if (bsdcat->getopt_word[1] == '-') {
|
||||
/* Set up long option parser. */
|
||||
bsdcat->getopt_state = state_long;
|
||||
bsdcat->getopt_word += 2; /* Skip leading '--' */
|
||||
} else {
|
||||
/* Set up short option parser. */
|
||||
bsdcat->getopt_state = state_short;
|
||||
++bsdcat->getopt_word; /* Skip leading '-' */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We're parsing a group of POSIX-style single-character options.
|
||||
*/
|
||||
if (bsdcat->getopt_state == state_short) {
|
||||
/* Peel next option off of a group of short options. */
|
||||
opt = *bsdcat->getopt_word++;
|
||||
if (opt == '\0') {
|
||||
/* End of this group; recurse to get next option. */
|
||||
bsdcat->getopt_state = state_next_word;
|
||||
return bsdcat_getopt(bsdcat);
|
||||
}
|
||||
|
||||
/* Does this option take an argument? */
|
||||
p = strchr(short_options, opt);
|
||||
if (p == NULL)
|
||||
return ('?');
|
||||
if (p[1] == ':')
|
||||
required = 1;
|
||||
|
||||
/* If it takes an argument, parse that. */
|
||||
if (required) {
|
||||
/* If arg is run-in, bsdcat->getopt_word already points to it. */
|
||||
if (bsdcat->getopt_word[0] == '\0') {
|
||||
/* Otherwise, pick up the next word. */
|
||||
bsdcat->getopt_word = *bsdcat->argv;
|
||||
if (bsdcat->getopt_word == NULL) {
|
||||
lafe_warnc(0,
|
||||
"Option -%c requires an argument",
|
||||
opt);
|
||||
return ('?');
|
||||
}
|
||||
++bsdcat->argv;
|
||||
--bsdcat->argc;
|
||||
}
|
||||
if (opt == 'W') {
|
||||
bsdcat->getopt_state = state_long;
|
||||
long_prefix = "-W "; /* For clearer errors. */
|
||||
} else {
|
||||
bsdcat->getopt_state = state_next_word;
|
||||
bsdcat->argument = bsdcat->getopt_word;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* We're reading a long option, including -W long=arg convention. */
|
||||
if (bsdcat->getopt_state == state_long) {
|
||||
/* After this long option, we'll be starting a new word. */
|
||||
bsdcat->getopt_state = state_next_word;
|
||||
|
||||
/* Option name ends at '=' if there is one. */
|
||||
p = strchr(bsdcat->getopt_word, '=');
|
||||
if (p != NULL) {
|
||||
optlength = (size_t)(p - bsdcat->getopt_word);
|
||||
bsdcat->argument = (char *)(uintptr_t)(p + 1);
|
||||
} else {
|
||||
optlength = strlen(bsdcat->getopt_word);
|
||||
}
|
||||
|
||||
/* Search the table for an unambiguous match. */
|
||||
for (popt = tar_longopts; popt->name != NULL; popt++) {
|
||||
/* Short-circuit if first chars don't match. */
|
||||
if (popt->name[0] != bsdcat->getopt_word[0])
|
||||
continue;
|
||||
/* If option is a prefix of name in table, record it.*/
|
||||
if (strncmp(bsdcat->getopt_word, popt->name, optlength) == 0) {
|
||||
match2 = match; /* Record up to two matches. */
|
||||
match = popt;
|
||||
/* If it's an exact match, we're done. */
|
||||
if (strlen(popt->name) == optlength) {
|
||||
match2 = NULL; /* Forget the others. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Fail if there wasn't a unique match. */
|
||||
if (match == NULL) {
|
||||
lafe_warnc(0,
|
||||
"Option %s%s is not supported",
|
||||
long_prefix, bsdcat->getopt_word);
|
||||
return ('?');
|
||||
}
|
||||
if (match2 != NULL) {
|
||||
lafe_warnc(0,
|
||||
"Ambiguous option %s%s (matches --%s and --%s)",
|
||||
long_prefix, bsdcat->getopt_word, match->name, match2->name);
|
||||
return ('?');
|
||||
}
|
||||
|
||||
/* We've found a unique match; does it need an argument? */
|
||||
if (match->required) {
|
||||
/* Argument required: get next word if necessary. */
|
||||
if (bsdcat->argument == NULL) {
|
||||
bsdcat->argument = *bsdcat->argv;
|
||||
if (bsdcat->argument == NULL) {
|
||||
lafe_warnc(0,
|
||||
"Option %s%s requires an argument",
|
||||
long_prefix, match->name);
|
||||
return ('?');
|
||||
}
|
||||
++bsdcat->argv;
|
||||
--bsdcat->argc;
|
||||
}
|
||||
} else {
|
||||
/* Argument forbidden: fail if there is one. */
|
||||
if (bsdcat->argument != NULL) {
|
||||
lafe_warnc(0,
|
||||
"Option %s%s does not allow an argument",
|
||||
long_prefix, match->name);
|
||||
return ('?');
|
||||
}
|
||||
}
|
||||
return (match->equivalent);
|
||||
}
|
||||
|
||||
return (opt);
|
||||
}
|
80
dependencies/libarchive-3.4.2/cat/test/CMakeLists.txt
vendored
Normal file
80
dependencies/libarchive-3.4.2/cat/test/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
############################################
|
||||
#
|
||||
# How to build bsdtar_test
|
||||
#
|
||||
############################################
|
||||
IF(ENABLE_CAT AND ENABLE_TEST)
|
||||
SET(bsdcat_test_SOURCES
|
||||
../../test_utils/test_utils.c
|
||||
../../test_utils/test_main.c
|
||||
test.h
|
||||
test_0.c
|
||||
test_empty_gz.c
|
||||
test_empty_lz4.c
|
||||
test_empty_xz.c
|
||||
test_empty_zstd.c
|
||||
test_error.c
|
||||
test_error_mixed.c
|
||||
test_expand_Z.c
|
||||
test_expand_bz2.c
|
||||
test_expand_gz.c
|
||||
test_expand_lz4.c
|
||||
test_expand_mixed.c
|
||||
test_expand_plain.c
|
||||
test_expand_xz.c
|
||||
test_expand_zstd.c
|
||||
test_help.c
|
||||
test_stdin.c
|
||||
test_version.c
|
||||
)
|
||||
|
||||
#
|
||||
# Register target
|
||||
#
|
||||
ADD_EXECUTABLE(bsdcat_test ${bsdcat_test_SOURCES})
|
||||
IF(ENABLE_ACL)
|
||||
SET(TEST_ACL_LIBS "")
|
||||
IF(HAVE_LIBACL)
|
||||
LIST(APPEND TEST_ACL_LIBS ${ACL_LIBRARY})
|
||||
ENDIF(HAVE_LIBACL)
|
||||
IF(HAVE_LIBRICHACL)
|
||||
LIST(APPEND TEST_ACL_LIBS ${RICHACL_LIBRARY})
|
||||
ENDIF(HAVE_LIBRICHACL)
|
||||
TARGET_LINK_LIBRARIES(bsdcat_test ${TEST_ACL_LIBS})
|
||||
ENDIF(ENABLE_ACL)
|
||||
SET_PROPERTY(TARGET bsdcat_test PROPERTY COMPILE_DEFINITIONS LIST_H)
|
||||
|
||||
#
|
||||
# Generate list.h by grepping DEFINE_TEST() lines out of the C sources.
|
||||
#
|
||||
GENERATE_LIST_H(${CMAKE_CURRENT_BINARY_DIR}/list.h
|
||||
${CMAKE_CURRENT_LIST_FILE} ${bsdcat_test_SOURCES})
|
||||
SET_PROPERTY(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# list.h has a line DEFINE_TEST(testname) for every
|
||||
# test. We can use that to define the tests for cmake by
|
||||
# defining a DEFINE_TEST macro and reading list.h in.
|
||||
MACRO (DEFINE_TEST _testname)
|
||||
ADD_TEST(
|
||||
NAME bsdcat_${_testname}
|
||||
COMMAND bsdcat_test -vv
|
||||
-p $<TARGET_FILE:bsdcat>
|
||||
-r ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${_testname})
|
||||
ENDMACRO (DEFINE_TEST _testname)
|
||||
|
||||
INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/list.h)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/test_utils)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/cat/test)
|
||||
|
||||
# Experimental new test handling
|
||||
ADD_CUSTOM_TARGET(run_bsdcat_test
|
||||
COMMAND bsdcat_test -p $<TARGET_FILE:bsdcat>
|
||||
-r ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-vv)
|
||||
ADD_DEPENDENCIES(run_bsdcat_test bsdcat)
|
||||
ADD_DEPENDENCIES(run_all_tests run_bsdcat_test)
|
||||
|
||||
ENDIF(ENABLE_CAT AND ENABLE_TEST)
|
18
dependencies/libarchive-3.4.2/cat/test/list.h
vendored
Normal file
18
dependencies/libarchive-3.4.2/cat/test/list.h
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
DEFINE_TEST(test_0)
|
||||
DEFINE_TEST(test_empty_gz)
|
||||
DEFINE_TEST(test_empty_lz4)
|
||||
DEFINE_TEST(test_empty_xz)
|
||||
DEFINE_TEST(test_empty_zstd)
|
||||
DEFINE_TEST(test_error)
|
||||
DEFINE_TEST(test_error_mixed)
|
||||
DEFINE_TEST(test_expand_Z)
|
||||
DEFINE_TEST(test_expand_bz2)
|
||||
DEFINE_TEST(test_expand_gz)
|
||||
DEFINE_TEST(test_expand_lz4)
|
||||
DEFINE_TEST(test_expand_mixed)
|
||||
DEFINE_TEST(test_expand_plain)
|
||||
DEFINE_TEST(test_expand_xz)
|
||||
DEFINE_TEST(test_expand_zstd)
|
||||
DEFINE_TEST(test_help)
|
||||
DEFINE_TEST(test_stdin)
|
||||
DEFINE_TEST(test_version)
|
40
dependencies/libarchive-3.4.2/cat/test/test.h
vendored
Normal file
40
dependencies/libarchive-3.4.2/cat/test/test.h
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2003-2006 Tim Kientzle
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* Every test program should #include "test.h" as the first thing. */
|
||||
|
||||
#define KNOWNREF "test_expand.Z.uu"
|
||||
#define ENVBASE "BSDCAT" /* Prefix for environment variables. */
|
||||
#define PROGRAM "bsdcat" /* Name of program being tested. */
|
||||
#define PROGRAM_ALIAS "cat" /* Generic alias for program */
|
||||
#undef LIBRARY /* Not testing a library. */
|
||||
#undef EXTRA_DUMP /* How to dump extra data */
|
||||
#undef EXTRA_ERRNO /* How to dump errno */
|
||||
/* How to generate extra version info. */
|
||||
#define EXTRA_VERSION (systemf("%s --version", testprog) ? "" : "")
|
||||
|
||||
#include "test_common.h"
|
67
dependencies/libarchive-3.4.2/cat/test/test_0.c
vendored
Normal file
67
dependencies/libarchive-3.4.2/cat/test/test_0.c
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*-
|
||||
* Copyright (c) 2003-2007 Tim Kientzle
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
/*
|
||||
* This first test does basic sanity checks on the environment. For
|
||||
* most of these, we just exit on failure.
|
||||
*/
|
||||
#if !defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define DEV_NULL "/dev/null"
|
||||
#else
|
||||
#define DEV_NULL "NUL"
|
||||
#endif
|
||||
|
||||
DEFINE_TEST(test_0)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
failure("File %s does not exist?!", testprog);
|
||||
if (!assertEqualInt(0, stat(testprogfile, &st))) {
|
||||
fprintf(stderr,
|
||||
"\nFile %s does not exist; aborting test.\n\n",
|
||||
testprog);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
failure("%s is not executable?!", testprog);
|
||||
if (!assert((st.st_mode & 0111) != 0)) {
|
||||
fprintf(stderr,
|
||||
"\nFile %s not executable; aborting test.\n\n",
|
||||
testprog);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to successfully run the program; this requires that
|
||||
* we know some option that will succeed.
|
||||
*/
|
||||
if (0 != systemf("%s --version >" DEV_NULL, testprog)) {
|
||||
failure("Unable to successfully run: %s --version\n", testprog);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* TODO: Ensure that our reference files are available. */
|
||||
}
|
4
dependencies/libarchive-3.4.2/cat/test/test_empty.gz.uu
vendored
Normal file
4
dependencies/libarchive-3.4.2/cat/test/test_empty.gz.uu
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
begin 644 test_empty.gz
|
||||
?'XL(""\MZE,``W1E<W1?96UP='D``P``````````````
|
||||
`
|
||||
end
|
4
dependencies/libarchive-3.4.2/cat/test/test_empty.lz4.uu
vendored
Normal file
4
dependencies/libarchive-3.4.2/cat/test/test_empty.lz4.uu
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
begin 644 test_empty.lz4
|
||||
/!")-&&1PN0`````%7<P"
|
||||
`
|
||||
end
|
4
dependencies/libarchive-3.4.2/cat/test/test_empty.xz.uu
vendored
Normal file
4
dependencies/libarchive-3.4.2/cat/test/test_empty.xz.uu
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
begin 644 test_empty.xz
|
||||
@_3=Z6%H```3FUK1&`````!S?1"$?MO-]`0`````$65H`
|
||||
`
|
||||
end
|
4
dependencies/libarchive-3.4.2/cat/test/test_empty.zst.uu
vendored
Normal file
4
dependencies/libarchive-3.4.2/cat/test/test_empty.zst.uu
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
begin 644 test_empty.zst
|
||||
-*+4O_010`0``F>G840``
|
||||
`
|
||||
end
|
41
dependencies/libarchive-3.4.2/cat/test/test_empty_gz.c
vendored
Normal file
41
dependencies/libarchive-3.4.2/cat/test/test_empty_gz.c
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Sebastian Freundt
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_empty_gz)
|
||||
{
|
||||
const char *reffile = "test_empty.gz";
|
||||
int f;
|
||||
|
||||
extract_reference_file(reffile);
|
||||
f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
|
||||
if (f == 0 || canGzip()) {
|
||||
assertEqualInt(0, f);
|
||||
assertEmptyFile("test.out");
|
||||
assertEmptyFile("test.err");
|
||||
} else {
|
||||
skipping("It seems gzip is not supported on this platform");
|
||||
}
|
||||
}
|
41
dependencies/libarchive-3.4.2/cat/test/test_empty_lz4.c
vendored
Normal file
41
dependencies/libarchive-3.4.2/cat/test/test_empty_lz4.c
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Sebastian Freundt
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_empty_lz4)
|
||||
{
|
||||
const char *reffile = "test_empty.lz4";
|
||||
int f;
|
||||
|
||||
extract_reference_file(reffile);
|
||||
f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
|
||||
if (f == 0 || canLz4()) {
|
||||
assertEqualInt(0, f);
|
||||
assertEmptyFile("test.out");
|
||||
assertEmptyFile("test.err");
|
||||
} else {
|
||||
skipping("It seems lz4 is not supported on this platform");
|
||||
}
|
||||
}
|
41
dependencies/libarchive-3.4.2/cat/test/test_empty_xz.c
vendored
Normal file
41
dependencies/libarchive-3.4.2/cat/test/test_empty_xz.c
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Sebastian Freundt
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_empty_xz)
|
||||
{
|
||||
const char *reffile = "test_empty.xz";
|
||||
int f;
|
||||
|
||||
extract_reference_file(reffile);
|
||||
f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
|
||||
if (f == 0 || canXz()) {
|
||||
assertEqualInt(0, f);
|
||||
assertEmptyFile("test.out");
|
||||
assertEmptyFile("test.err");
|
||||
} else {
|
||||
skipping("It seems xz is not supported on this platform");
|
||||
}
|
||||
}
|
41
dependencies/libarchive-3.4.2/cat/test/test_empty_zstd.c
vendored
Normal file
41
dependencies/libarchive-3.4.2/cat/test/test_empty_zstd.c
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*-
|
||||
* Copyright (c) 2017 Sean Purcell
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_empty_zstd)
|
||||
{
|
||||
const char *reffile = "test_empty.zst";
|
||||
int f;
|
||||
|
||||
extract_reference_file(reffile);
|
||||
f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
|
||||
if (f == 0 || canZstd()) {
|
||||
assertEqualInt(0, f);
|
||||
assertEmptyFile("test.out");
|
||||
assertEmptyFile("test.err");
|
||||
} else {
|
||||
skipping("It seems zstd is not supported on this platform");
|
||||
}
|
||||
}
|
36
dependencies/libarchive-3.4.2/cat/test/test_error.c
vendored
Normal file
36
dependencies/libarchive-3.4.2/cat/test/test_error.c
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Mike Kazantsev
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_error)
|
||||
{
|
||||
const char *reffile = "test_expand.error";
|
||||
|
||||
assertFileNotExists(reffile);
|
||||
assert(0 != systemf("%s %s >test.out 2>test.err", testprog, reffile));
|
||||
|
||||
assertEmptyFile("test.out");
|
||||
assertNonEmptyFile("test.err");
|
||||
}
|
43
dependencies/libarchive-3.4.2/cat/test/test_error_mixed.c
vendored
Normal file
43
dependencies/libarchive-3.4.2/cat/test/test_error_mixed.c
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Mike Kazantsev
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_error_mixed)
|
||||
{
|
||||
const char *reffile1 = "test_expand.plain";
|
||||
const char *reffile2 = "test_expand.error";
|
||||
const char *reffile3 = "test_expand.Z";
|
||||
|
||||
assertFileNotExists(reffile2);
|
||||
extract_reference_file(reffile1);
|
||||
extract_reference_file(reffile3);
|
||||
assert(0 != systemf("%s %s %s %s >test.out 2>test.err",
|
||||
testprog, reffile1, reffile2, reffile3));
|
||||
|
||||
assertTextFileContents(
|
||||
"contents of test_expand.plain.\n"
|
||||
"contents of test_expand.Z.\n", "test.out");
|
||||
assertNonEmptyFile("test.err");
|
||||
}
|
3
dependencies/libarchive-3.4.2/cat/test/test_expand.Z.uu
vendored
Normal file
3
dependencies/libarchive-3.4.2/cat/test/test_expand.Z.uu
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
begin 664 test_expand.Z
|
||||
@'YV08]ZXH5-FX!P0;\R`(#B'SI<R>."$<4/&A187"@`
|
||||
end
|
5
dependencies/libarchive-3.4.2/cat/test/test_expand.bz2.uu
vendored
Normal file
5
dependencies/libarchive-3.4.2/cat/test/test_expand.bz2.uu
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
begin 664 test_expand.bz2
|
||||
M0EIH.3%!62936=[T@^L [__N000(!!(#!@\P+(, !@4 1 @$" (0 80$
|
||||
M(!D0 " 5%)D::#( #0]0 9J%1Z@>H :!B:&33(!"X";"%C@I$+32H/(0MXG
|
||||
J,EA1G51 WG-"6JV7JKA;/&]$X 6MNH 8'N@3[\XCA_%W)%.%"0WO2#ZP
|
||||
end
|
4
dependencies/libarchive-3.4.2/cat/test/test_expand.gz.uu
vendored
Normal file
4
dependencies/libarchive-3.4.2/cat/test/test_expand.gz.uu
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
begin 664 test_expand.gz
|
||||
M'XL("-UD1%,``V%S9`!+SL\K2<TK*5;(3U,H22TNB4^M*$C,2]%+K]+C`@`Z
|
||||
'PQU''```````
|
||||
end
|
5
dependencies/libarchive-3.4.2/cat/test/test_expand.lz4.uu
vendored
Normal file
5
dependencies/libarchive-3.4.2/cat/test/test_expand.lz4.uu
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
begin 644 test_expand.lz4
|
||||
M!")-&&1PN1T``(!C;VYT96YT<R!O9B!T97-T7V5X<&%N9"YL>C0N"@`````Y
|
||||
#!E9+
|
||||
`
|
||||
end
|
3
dependencies/libarchive-3.4.2/cat/test/test_expand.plain.uu
vendored
Normal file
3
dependencies/libarchive-3.4.2/cat/test/test_expand.plain.uu
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
begin 664 test_expand.plain
|
||||
?8V]N=&5N=',@;V8@=&5S=%]E>'!A;F0N<&QA:6XN"@
|
||||
end
|
4
dependencies/libarchive-3.4.2/cat/test/test_expand.xz.uu
vendored
Normal file
4
dependencies/libarchive-3.4.2/cat/test/test_expand.xz.uu
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
begin 664 test_expand.xz
|
||||
M_3=Z6%H 3FUK1& @ A 18 !T+^6C 0 ;8V]N=&5N=',@;V8@=&5S=%]E
|
||||
G>'!A;F0N>'HN"@!S;^LVAO^3[ !-!R3&JV/'[;S?0$ !%E:
|
||||
end
|
4
dependencies/libarchive-3.4.2/cat/test/test_expand.zst.uu
vendored
Normal file
4
dependencies/libarchive-3.4.2/cat/test/test_expand.zst.uu
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
begin 644 test_expand.zst
|
||||
J*+4O_010Z0``8V]N=&5N=',@;V8@=&5S=%]E>'!A;F0N>G-T+@J;23#F
|
||||
`
|
||||
end
|
36
dependencies/libarchive-3.4.2/cat/test/test_expand_Z.c
vendored
Normal file
36
dependencies/libarchive-3.4.2/cat/test/test_expand_Z.c
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Mike Kazantsev
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_expand_Z)
|
||||
{
|
||||
const char *reffile = "test_expand.Z";
|
||||
|
||||
extract_reference_file(reffile);
|
||||
assertEqualInt(0, systemf("%s %s >test.out 2>test.err", testprog, reffile));
|
||||
|
||||
assertTextFileContents("contents of test_expand.Z.\n", "test.out");
|
||||
assertEmptyFile("test.err");
|
||||
}
|
42
dependencies/libarchive-3.4.2/cat/test/test_expand_bz2.c
vendored
Normal file
42
dependencies/libarchive-3.4.2/cat/test/test_expand_bz2.c
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Mike Kazantsev
|
||||
* Copyright (c) 2012 Michihiro NAKAJIMA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_expand_bz2)
|
||||
{
|
||||
const char *reffile = "test_expand.bz2";
|
||||
int f;
|
||||
|
||||
extract_reference_file(reffile);
|
||||
f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
|
||||
if (f == 0 || canBzip2()) {
|
||||
assertEqualInt(0, f);
|
||||
assertTextFileContents("contents of test_expand.bz2.\n", "test.out");
|
||||
assertEmptyFile("test.err");
|
||||
} else {
|
||||
skipping("It seems bzip2 is not supported on this platform");
|
||||
}
|
||||
}
|
42
dependencies/libarchive-3.4.2/cat/test/test_expand_gz.c
vendored
Normal file
42
dependencies/libarchive-3.4.2/cat/test/test_expand_gz.c
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Mike Kazantsev
|
||||
* Copyright (c) 2012 Michihiro NAKAJIMA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_expand_gz)
|
||||
{
|
||||
const char *reffile = "test_expand.gz";
|
||||
int f;
|
||||
|
||||
extract_reference_file(reffile);
|
||||
f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
|
||||
if (f == 0 || canGzip()) {
|
||||
assertEqualInt(0, f);
|
||||
assertTextFileContents("contents of test_expand.gz.\n", "test.out");
|
||||
assertEmptyFile("test.err");
|
||||
} else {
|
||||
skipping("It seems gzip is not supported on this platform");
|
||||
}
|
||||
}
|
42
dependencies/libarchive-3.4.2/cat/test/test_expand_lz4.c
vendored
Normal file
42
dependencies/libarchive-3.4.2/cat/test/test_expand_lz4.c
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Mike Kazantsev
|
||||
* Copyright (c) 2012, 2014 Michihiro NAKAJIMA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_expand_lz4)
|
||||
{
|
||||
const char *reffile = "test_expand.lz4";
|
||||
int f;
|
||||
|
||||
extract_reference_file(reffile);
|
||||
f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
|
||||
if (f == 0 || canLz4()) {
|
||||
assertEqualInt(0, f);
|
||||
assertTextFileContents("contents of test_expand.lz4.\n", "test.out");
|
||||
assertEmptyFile("test.err");
|
||||
} else {
|
||||
skipping("It seems lz4 is not supported on this platform");
|
||||
}
|
||||
}
|
41
dependencies/libarchive-3.4.2/cat/test/test_expand_mixed.c
vendored
Normal file
41
dependencies/libarchive-3.4.2/cat/test/test_expand_mixed.c
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Mike Kazantsev
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_expand_mixed)
|
||||
{
|
||||
const char *reffile1 = "test_expand.Z";
|
||||
const char *reffile2 = "test_expand.plain";
|
||||
|
||||
extract_reference_file(reffile1);
|
||||
extract_reference_file(reffile2);
|
||||
assertEqualInt(0, systemf("%s %s %s >test.out 2>test.err",
|
||||
testprog, reffile1, reffile2));
|
||||
|
||||
assertTextFileContents(
|
||||
"contents of test_expand.Z.\n"
|
||||
"contents of test_expand.plain.\n", "test.out");
|
||||
assertEmptyFile("test.err");
|
||||
}
|
36
dependencies/libarchive-3.4.2/cat/test/test_expand_plain.c
vendored
Normal file
36
dependencies/libarchive-3.4.2/cat/test/test_expand_plain.c
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Mike Kazantsev
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_expand_plain)
|
||||
{
|
||||
const char *reffile = "test_expand.plain";
|
||||
|
||||
extract_reference_file(reffile);
|
||||
assertEqualInt(0, systemf("%s %s >test.out 2>test.err", testprog, reffile));
|
||||
|
||||
assertTextFileContents("contents of test_expand.plain.\n", "test.out");
|
||||
assertEmptyFile("test.err");
|
||||
}
|
42
dependencies/libarchive-3.4.2/cat/test/test_expand_xz.c
vendored
Normal file
42
dependencies/libarchive-3.4.2/cat/test/test_expand_xz.c
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Mike Kazantsev
|
||||
* Copyright (c) 2012 Michihiro NAKAJIMA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_expand_xz)
|
||||
{
|
||||
const char *reffile = "test_expand.xz";
|
||||
int f;
|
||||
|
||||
extract_reference_file(reffile);
|
||||
f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
|
||||
if (f == 0 || canXz()) {
|
||||
assertEqualInt(0, f);
|
||||
assertTextFileContents("contents of test_expand.xz.\n", "test.out");
|
||||
assertEmptyFile("test.err");
|
||||
} else {
|
||||
skipping("It seems xz is not supported on this platform");
|
||||
}
|
||||
}
|
41
dependencies/libarchive-3.4.2/cat/test/test_expand_zstd.c
vendored
Normal file
41
dependencies/libarchive-3.4.2/cat/test/test_expand_zstd.c
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*-
|
||||
* Copyright (c) 2017 Sean Purcell
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
DEFINE_TEST(test_expand_zstd)
|
||||
{
|
||||
const char *reffile = "test_expand.zst";
|
||||
int f;
|
||||
|
||||
extract_reference_file(reffile);
|
||||
f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
|
||||
if (f == 0 || canZstd()) {
|
||||
assertEqualInt(0, f);
|
||||
assertTextFileContents("contents of test_expand.zst.\n", "test.out");
|
||||
assertEmptyFile("test.err");
|
||||
} else {
|
||||
skipping("It seems zstd is not supported on this platform");
|
||||
}
|
||||
}
|
75
dependencies/libarchive-3.4.2/cat/test/test_help.c
vendored
Normal file
75
dependencies/libarchive-3.4.2/cat/test/test_help.c
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*-
|
||||
* Copyright (c) 2003-2007 Tim Kientzle
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
/*
|
||||
* Test that "--help", "-h", and "-W help" options all work and
|
||||
* generate reasonable output.
|
||||
*/
|
||||
|
||||
static int
|
||||
in_first_line(const char *p, const char *substring)
|
||||
{
|
||||
size_t l = strlen(substring);
|
||||
|
||||
while (*p != '\0' && *p != '\n') {
|
||||
if (memcmp(p, substring, l) == 0)
|
||||
return (1);
|
||||
++p;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
DEFINE_TEST(test_help)
|
||||
{
|
||||
int r;
|
||||
char *p;
|
||||
size_t plen;
|
||||
|
||||
/* Exercise --help option. */
|
||||
r = systemf("%s --help >help.stdout 2>help.stderr", testprog);
|
||||
assertEqualInt(r, 0);
|
||||
failure("--help should generate nothing to stderr.");
|
||||
assertEmptyFile("help.stderr");
|
||||
/* Help message should start with name of program. */
|
||||
p = slurpfile(&plen, "help.stdout");
|
||||
failure("Help output should be long enough.");
|
||||
assert(plen >= 6);
|
||||
failure("First line of help output should contain 'bsdcat': %s", p);
|
||||
assert(in_first_line(p, "bsdcat"));
|
||||
/*
|
||||
* TODO: Extend this check to further verify that --help output
|
||||
* looks approximately right.
|
||||
*/
|
||||
free(p);
|
||||
|
||||
/* -h option should generate the same output. */
|
||||
r = systemf("%s -h >h.stdout 2>h.stderr", testprog);
|
||||
assertEqualInt(r, 0);
|
||||
failure("-h should generate nothing to stderr.");
|
||||
assertEmptyFile("h.stderr");
|
||||
failure("stdout should be same for -h and --help");
|
||||
assertEqualFile("h.stdout", "help.stdout");
|
||||
}
|
42
dependencies/libarchive-3.4.2/cat/test/test_stdin.c
vendored
Normal file
42
dependencies/libarchive-3.4.2/cat/test/test_stdin.c
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*-
|
||||
* Copyright (c) 2017 Sean Purcell
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
#if !defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define DEV_NULL "/dev/null"
|
||||
#else
|
||||
#define DEV_NULL "NUL"
|
||||
#endif
|
||||
|
||||
DEFINE_TEST(test_stdin)
|
||||
{
|
||||
int f;
|
||||
|
||||
f = systemf("%s <%s >test.out 2>test.err", testprog, DEV_NULL);
|
||||
assertEqualInt(0, f);
|
||||
assertEmptyFile("test.out");
|
||||
assertEmptyFile("test.err");
|
||||
}
|
||||
|
34
dependencies/libarchive-3.4.2/cat/test/test_version.c
vendored
Normal file
34
dependencies/libarchive-3.4.2/cat/test/test_version.c
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*-
|
||||
* Copyright (c) 2003-2017 Tim Kientzle
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
/*
|
||||
* Test that --version option works and generates reasonable output.
|
||||
*/
|
||||
|
||||
DEFINE_TEST(test_version)
|
||||
{
|
||||
assertVersion(testprog, "bsdcat");
|
||||
}
|
1428
dependencies/libarchive-3.4.2/config.h.in
vendored
Normal file
1428
dependencies/libarchive-3.4.2/config.h.in
vendored
Normal file
File diff suppressed because it is too large
Load diff
24025
dependencies/libarchive-3.4.2/configure
vendored
Executable file
24025
dependencies/libarchive-3.4.2/configure
vendored
Executable file
File diff suppressed because it is too large
Load diff
1214
dependencies/libarchive-3.4.2/configure.ac
vendored
Normal file
1214
dependencies/libarchive-3.4.2/configure.ac
vendored
Normal file
File diff suppressed because it is too large
Load diff
59
dependencies/libarchive-3.4.2/contrib/README
vendored
Normal file
59
dependencies/libarchive-3.4.2/contrib/README
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
Many people have graciously sent me configuration
|
||||
files, small programs that use libarchive, and other
|
||||
useful and interesting tidbits.
|
||||
|
||||
I do not support or use any of these; but if you can use them, enjoy!
|
||||
|
||||
======================================================================
|
||||
|
||||
From: Andre Stechert <andre@splunk.com>
|
||||
|
||||
libarchive_autodetect-st_lib_archive.m4
|
||||
|
||||
M4 macros for use with autoconf to detect whether a suitable
|
||||
version of libarchive is installed on this system.
|
||||
|
||||
|
||||
======================================================================
|
||||
|
||||
libarchive.spec
|
||||
|
||||
An RPM ".spec" file for building libarchive on most systems.
|
||||
This apparently was originally developed by a group at pld-linux.org.
|
||||
Several people have sent me different versions of this file.
|
||||
|
||||
======================================================================
|
||||
|
||||
From: Robert Meier <rm1023@dcx.com>
|
||||
|
||||
libarchive.1aix53.spec
|
||||
|
||||
As above, for use on AIX5.3.
|
||||
|
||||
======================================================================
|
||||
|
||||
psota-benchmark
|
||||
|
||||
Some scripts used by Jan Psota in benchmarking
|
||||
various tar implementations.
|
||||
|
||||
I've edited his results slightly to correctly reflect that
|
||||
bsdtar does not support a "compare" operation.
|
||||
|
||||
======================================================================
|
||||
|
||||
shar
|
||||
|
||||
A simple shar program written on top of libarchive.
|
||||
|
||||
======================================================================
|
||||
|
||||
untar.c
|
||||
|
||||
A very simple and very portable standalone program that can
|
||||
extract basic ustar archives.
|
||||
This does not use libarchive and so can be used to extract
|
||||
the libarchive distribution on any system that has a C compiler
|
||||
but does not have a tar program.
|
||||
|
||||
======================================================================
|
308
dependencies/libarchive-3.4.2/contrib/android/Android.mk
vendored
Normal file
308
dependencies/libarchive-3.4.2/contrib/android/Android.mk
vendored
Normal file
|
@ -0,0 +1,308 @@
|
|||
#
|
||||
# Copyright (C) 2014 Trevor Drake
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
# A bit of a non-standard LOCAL_PATH declaration here
|
||||
# The Android.mk lives below the top source directory
|
||||
# but LOCAL_PATH needs to point to the top of the module
|
||||
# source tree to maintain the integrity of the intermediates
|
||||
# directories
|
||||
LOCAL_PATH := $(subst /contrib/android,,$(call my-dir))
|
||||
|
||||
libarchive_target_config := contrib/android/config/android.h
|
||||
|
||||
libarchive_src_files := libarchive/archive_acl.c \
|
||||
libarchive/archive_check_magic.c \
|
||||
libarchive/archive_cmdline.c \
|
||||
libarchive/archive_cryptor.c \
|
||||
libarchive/archive_digest.c \
|
||||
libarchive/archive_entry.c \
|
||||
libarchive/archive_entry_copy_stat.c \
|
||||
libarchive/archive_entry_link_resolver.c \
|
||||
libarchive/archive_entry_sparse.c \
|
||||
libarchive/archive_entry_stat.c \
|
||||
libarchive/archive_entry_strmode.c \
|
||||
libarchive/archive_entry_xattr.c \
|
||||
libarchive/archive_getdate.c \
|
||||
libarchive/archive_hmac.c \
|
||||
libarchive/archive_match.c \
|
||||
libarchive/archive_options.c \
|
||||
libarchive/archive_pack_dev.c \
|
||||
libarchive/archive_pathmatch.c \
|
||||
libarchive/archive_ppmd7.c \
|
||||
libarchive/archive_random.c \
|
||||
libarchive/archive_rb.c \
|
||||
libarchive/archive_read.c \
|
||||
libarchive/archive_read_add_passphrase.c \
|
||||
libarchive/archive_read_append_filter.c \
|
||||
libarchive/archive_read_data_into_fd.c \
|
||||
libarchive/archive_read_disk_entry_from_file.c \
|
||||
libarchive/archive_read_disk_posix.c \
|
||||
libarchive/archive_read_disk_set_standard_lookup.c \
|
||||
libarchive/archive_read_extract.c \
|
||||
libarchive/archive_read_extract2.c \
|
||||
libarchive/archive_read_open_fd.c \
|
||||
libarchive/archive_read_open_file.c \
|
||||
libarchive/archive_read_open_filename.c \
|
||||
libarchive/archive_read_open_memory.c \
|
||||
libarchive/archive_read_set_format.c \
|
||||
libarchive/archive_read_set_options.c \
|
||||
libarchive/archive_read_support_filter_all.c \
|
||||
libarchive/archive_read_support_filter_bzip2.c \
|
||||
libarchive/archive_read_support_filter_compress.c \
|
||||
libarchive/archive_read_support_filter_grzip.c \
|
||||
libarchive/archive_read_support_filter_gzip.c \
|
||||
libarchive/archive_read_support_filter_lrzip.c \
|
||||
libarchive/archive_read_support_filter_lz4.c \
|
||||
libarchive/archive_read_support_filter_lzop.c \
|
||||
libarchive/archive_read_support_filter_none.c \
|
||||
libarchive/archive_read_support_filter_program.c \
|
||||
libarchive/archive_read_support_filter_rpm.c \
|
||||
libarchive/archive_read_support_filter_uu.c \
|
||||
libarchive/archive_read_support_filter_xz.c \
|
||||
libarchive/archive_read_support_filter_zstd.c \
|
||||
libarchive/archive_read_support_format_7zip.c \
|
||||
libarchive/archive_read_support_format_all.c \
|
||||
libarchive/archive_read_support_format_ar.c \
|
||||
libarchive/archive_read_support_format_by_code.c \
|
||||
libarchive/archive_read_support_format_cab.c \
|
||||
libarchive/archive_read_support_format_cpio.c \
|
||||
libarchive/archive_read_support_format_empty.c \
|
||||
libarchive/archive_read_support_format_iso9660.c \
|
||||
libarchive/archive_read_support_format_lha.c \
|
||||
libarchive/archive_read_support_format_mtree.c \
|
||||
libarchive/archive_read_support_format_rar.c \
|
||||
libarchive/archive_read_support_format_raw.c \
|
||||
libarchive/archive_read_support_format_tar.c \
|
||||
libarchive/archive_read_support_format_warc.c \
|
||||
libarchive/archive_read_support_format_xar.c \
|
||||
libarchive/archive_read_support_format_zip.c \
|
||||
libarchive/archive_string.c \
|
||||
libarchive/archive_string_sprintf.c \
|
||||
libarchive/archive_util.c \
|
||||
libarchive/archive_version_details.c \
|
||||
libarchive/archive_virtual.c \
|
||||
libarchive/archive_write.c \
|
||||
libarchive/archive_write_disk_posix.c \
|
||||
libarchive/archive_write_disk_set_standard_lookup.c \
|
||||
libarchive/archive_write_open_fd.c \
|
||||
libarchive/archive_write_open_file.c \
|
||||
libarchive/archive_write_open_filename.c \
|
||||
libarchive/archive_write_open_memory.c \
|
||||
libarchive/archive_write_add_filter.c \
|
||||
libarchive/archive_write_add_filter_b64encode.c \
|
||||
libarchive/archive_write_add_filter_by_name.c \
|
||||
libarchive/archive_write_add_filter_bzip2.c \
|
||||
libarchive/archive_write_add_filter_compress.c \
|
||||
libarchive/archive_write_add_filter_grzip.c \
|
||||
libarchive/archive_write_add_filter_gzip.c \
|
||||
libarchive/archive_write_add_filter_lrzip.c \
|
||||
libarchive/archive_write_add_filter_lz4.c \
|
||||
libarchive/archive_write_add_filter_lzop.c \
|
||||
libarchive/archive_write_add_filter_none.c \
|
||||
libarchive/archive_write_add_filter_program.c \
|
||||
libarchive/archive_write_add_filter_uuencode.c \
|
||||
libarchive/archive_write_add_filter_xz.c \
|
||||
libarchive/archive_write_add_filter_zstd.c \
|
||||
libarchive/archive_write_set_format.c \
|
||||
libarchive/archive_write_set_format_7zip.c \
|
||||
libarchive/archive_write_set_format_ar.c \
|
||||
libarchive/archive_write_set_format_by_name.c \
|
||||
libarchive/archive_write_set_format_cpio.c \
|
||||
libarchive/archive_write_set_format_cpio_newc.c \
|
||||
libarchive/archive_write_set_format_iso9660.c \
|
||||
libarchive/archive_write_set_format_mtree.c \
|
||||
libarchive/archive_write_set_format_pax.c \
|
||||
libarchive/archive_write_set_format_raw.c \
|
||||
libarchive/archive_write_set_format_shar.c \
|
||||
libarchive/archive_write_set_format_ustar.c \
|
||||
libarchive/archive_write_set_format_v7tar.c \
|
||||
libarchive/archive_write_set_format_gnutar.c \
|
||||
libarchive/archive_write_set_format_warc.c \
|
||||
libarchive/archive_write_set_format_xar.c \
|
||||
libarchive/archive_write_set_format_zip.c \
|
||||
libarchive/archive_write_set_options.c \
|
||||
libarchive/archive_write_set_passphrase.c \
|
||||
libarchive/filter_fork_posix.c \
|
||||
libarchive/xxhash.c
|
||||
|
||||
ifeq ($(HOST_OS),windows)
|
||||
libarchive_host_src_files := \
|
||||
libarchive/archive_entry_copy_bhfi.c \
|
||||
libarchive/archive_read_disk_windows.c \
|
||||
libarchive/archive_write_disk_windows.c \
|
||||
libarchive/filter_fork_windows.c \
|
||||
libarchive/archive_windows.c
|
||||
else
|
||||
libarchive_host_src_files :=
|
||||
endif
|
||||
|
||||
libarchive_fe_src_files := libarchive_fe/err.c \
|
||||
libarchive_fe/line_reader.c \
|
||||
libarchive_fe/passphrase.c
|
||||
|
||||
bsdtar_src_files := tar/bsdtar.c \
|
||||
tar/bsdtar_windows.c \
|
||||
tar/cmdline.c \
|
||||
tar/creation_set.c \
|
||||
tar/read.c \
|
||||
tar/subst.c \
|
||||
tar/util.c \
|
||||
tar/write.c
|
||||
|
||||
bsdcpio_src_files := cpio/cmdline.c \
|
||||
cpio/cpio.c
|
||||
|
||||
bsdcat_src_files := cat/cmdline.c \
|
||||
cat/bsdcat.c
|
||||
|
||||
|
||||
ifeq ($(HOST_OS),darwin)
|
||||
$(warning Host : $(HOST_OS) Not Supported. Host Build Will Be Skipped )
|
||||
else
|
||||
libarchive_host_config := contrib/android/config/$(HOST_OS)_host.h
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libarchive
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_SRC_FILES := $(libarchive_src_files) $(libarchive_host_src_files)
|
||||
LOCAL_CFLAGS := -DPLATFORM_CONFIG_H=\"$(libarchive_host_config)\"
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/contrib/android/include
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/libarchive
|
||||
include $(BUILD_HOST_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libarchive
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := -DPLATFORM_CONFIG_H=\"$(libarchive_host_config)\"
|
||||
LOCAL_SHARED_LIBRARIES := libz-host
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := libarchive
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/contrib/android/include
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/libarchive
|
||||
include $(BUILD_HOST_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libarchive_fe
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := -DPLATFORM_CONFIG_H=\"$(libarchive_host_config)\"
|
||||
LOCAL_SRC_FILES := $(libarchive_fe_src_files)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/contrib/android/include
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/libarchive_fe
|
||||
include $(BUILD_HOST_STATIC_LIBRARY)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
# Do not build target binaries if we are not targeting linux
|
||||
# on the host
|
||||
ifeq ($(HOST_OS),linux)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bsdtar
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := -DBSDTAR_VERSION_STRING=ARCHIVE_VERSION_ONLY_STRING -DPLATFORM_CONFIG_H=\"$(libarchive_host_config)\"
|
||||
LOCAL_SHARED_LIBRARIES := libz-host
|
||||
LOCAL_STATIC_LIBRARIES := libarchive libarchive_fe
|
||||
LOCAL_SRC_FILES := $(bsdtar_src_files)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/contrib/android/include
|
||||
include $(BUILD_HOST_EXECUTABLE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bsdcpio
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := -DBSDCPIO_VERSION_STRING=ARCHIVE_VERSION_ONLY_STRING -DPLATFORM_CONFIG_H=\"$(libarchive_host_config)\"
|
||||
LOCAL_SHARED_LIBRARIES := libz-host
|
||||
LOCAL_STATIC_LIBRARIES := libarchive libarchive_fe
|
||||
LOCAL_SRC_FILES := $(bsdcpio_src_files)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/contrib/android/include
|
||||
include $(BUILD_HOST_EXECUTABLE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bsdcat
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := -DBSDCAT_VERSION_STRING=ARCHIVE_VERSION_ONLY_STRING -DPLATFORM_CONFIG_H=\"$(libarchive_host_config)\"
|
||||
LOCAL_SHARED_LIBRARIES := libz-host
|
||||
LOCAL_STATIC_LIBRARIES := libarchive libarchive_fe
|
||||
LOCAL_SRC_FILES := $(bsdcat_src_files)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/contrib/android/include
|
||||
include $(BUILD_HOST_EXECUTABLE)
|
||||
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libarchive
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_SRC_FILES := $(libarchive_src_files)
|
||||
LOCAL_STATIC_LIBRARIES := libz liblz4
|
||||
LOCAL_CFLAGS := -DPLATFORM_CONFIG_H=\"$(libarchive_target_config)\"
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/contrib/android/include
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/libarchive
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libarchive
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES :=
|
||||
LOCAL_CFLAGS := -DPLATFORM_CONFIG_H=\"$(libarchive_target_config)\"
|
||||
LOCAL_SHARED_LIBRARIES := libz
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := libarchive
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/contrib/android/include
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/libarchive
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libarchive_fe
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := -DPLATFORM_CONFIG_H=\"$(libarchive_target_config)\"
|
||||
LOCAL_SRC_FILES := $(libarchive_fe_src_files)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/contrib/android/include
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/libarchive_fe
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bsdtar
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := -DBSDTAR_VERSION_STRING=ARCHIVE_VERSION_ONLY_STRING -DPLATFORM_CONFIG_H=\"$(libarchive_target_config)\"
|
||||
LOCAL_SHARED_LIBRARIES := libz
|
||||
LOCAL_STATIC_LIBRARIES := libarchive libarchive_fe
|
||||
LOCAL_SRC_FILES := $(bsdtar_src_files)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/libarchive $(LOCAL_PATH)/libarchive_fe $(LOCAL_PATH)/contrib/android/include
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bsdcpio
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := -DBSDCPIO_VERSION_STRING=ARCHIVE_VERSION_ONLY_STRING -DPLATFORM_CONFIG_H=\"$(libarchive_target_config)\"
|
||||
LOCAL_SHARED_LIBRARIES := libz
|
||||
LOCAL_STATIC_LIBRARIES := libarchive libarchive_fe
|
||||
LOCAL_SRC_FILES := $(bsdcpio_src_files)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/libarchive $(LOCAL_PATH)/libarchive_fe $(LOCAL_PATH)/contrib/android/include
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bsdcat
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := -DBSDCAT_VERSION_STRING=ARCHIVE_VERSION_ONLY_STRING -DPLATFORM_CONFIG_H=\"$(libarchive_target_config)\"
|
||||
LOCAL_SHARED_LIBRARIES := libz
|
||||
LOCAL_STATIC_LIBRARIES := libarchive libarchive_fe
|
||||
LOCAL_SRC_FILES := $(bsdcat_src_files)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/libarchive $(LOCAL_PATH)/libarchive_fe $(LOCAL_PATH)/contrib/android/include
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
endif
|
184
dependencies/libarchive-3.4.2/contrib/android/config/android.h
vendored
Normal file
184
dependencies/libarchive-3.4.2/contrib/android/config/android.h
vendored
Normal file
|
@ -0,0 +1,184 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Trevor Drake
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef ARCHIVE_PLATFORM_H_ANDROID_INCLUDED
|
||||
#define ARCHIVE_PLATFORM_H_ANDROID_INCLUDED
|
||||
|
||||
#include <android/api-level.h>
|
||||
#ifdef __ANDROID_API__
|
||||
#if __ANDROID_API__ > 20
|
||||
#define HAVE_FSTATVFS 1
|
||||
#define HAVE_STATVFS 1
|
||||
#define HAVE_TIMEGM 1
|
||||
#define HAVE_SYS_XATTR_H 1
|
||||
#define HAVE_LINUX_FIEMAP_H 1
|
||||
#define HAVE_SYS_STATVFS_H 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define HAVE_CHOWN 1
|
||||
#define HAVE_CHROOT 1
|
||||
#define HAVE_CTIME_R 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_DECL_EXTATTR_NAMESPACE_USER 0
|
||||
#define HAVE_DECL_INTMAX_MIN 1
|
||||
#define HAVE_DECL_INTMAX_MAX 1
|
||||
#define HAVE_DECL_INT64_MAX 1
|
||||
#define HAVE_DECL_INT64_MIN 1
|
||||
#define HAVE_DECL_SIZE_MAX 1
|
||||
#define HAVE_DECL_SSIZE_MAX 1
|
||||
#define HAVE_DECL_STRERROR_R 1
|
||||
#define HAVE_DECL_UINTMAX_MAX 1
|
||||
#define HAVE_DECL_UINT32_MAX 1
|
||||
#define HAVE_DECL_UINT64_MAX 1
|
||||
#define HAVE_DIRENT_H 1
|
||||
#define HAVE_DIRFD 1
|
||||
#define HAVE_DLFCN_H 1
|
||||
#define HAVE_EILSEQ 1
|
||||
#define HAVE_ERRNO_H 1
|
||||
#define HAVE_FCHDIR 1
|
||||
#define HAVE_FCHMOD 1
|
||||
#define HAVE_FCHOWN 1
|
||||
#define HAVE_FCNTL 1
|
||||
#define HAVE_FCNTL_H 1
|
||||
#define HAVE_FDOPENDIR 1
|
||||
#define HAVE_FGETXATTR 1
|
||||
#define HAVE_FLISTXATTR 1
|
||||
#define HAVE_FORK 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_FSETXATTR 1
|
||||
#define HAVE_FSTAT 1
|
||||
#define HAVE_FSTATAT 1
|
||||
#define HAVE_FSTATFS 1
|
||||
#define HAVE_FTRUNCATE 1
|
||||
#define HAVE_GETEUID 1
|
||||
#define HAVE_GETPID 1
|
||||
#define HAVE_GETPWNAM_R 1
|
||||
#define HAVE_GETPWUID_R 1
|
||||
#define HAVE_GETXATTR 1
|
||||
#define HAVE_GMTIME_R 1
|
||||
#define HAVE_GRP_H 1
|
||||
#define HAVE_INTMAX_T 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LCHOWN 1
|
||||
#define HAVE_LGETXATTR 1
|
||||
#define HAVE_LIBLZMA 1
|
||||
#define HAVE_LIBZ 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_LINK 1
|
||||
#define HAVE_LINUX_FS_H 1
|
||||
#define HAVE_LINUX_MAGIC_H 1
|
||||
#define HAVE_LINUX_TYPES_H 1
|
||||
#define HAVE_LISTXATTR 1
|
||||
#define HAVE_LLISTXATTR 1
|
||||
#define HAVE_LOCALE_H 1
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
#define HAVE_LONG_LONG_INT 1
|
||||
#define HAVE_LSETXATTR 1
|
||||
#define HAVE_LSTAT 1
|
||||
#define HAVE_MBRTOWC 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MKDIR 1
|
||||
#define HAVE_MKFIFO 1
|
||||
#define HAVE_MKNOD 1
|
||||
#define HAVE_MKSTEMP 1
|
||||
#define HAVE_OPENAT 1
|
||||
#define HAVE_PATHS_H 1
|
||||
#define HAVE_PIPE 1
|
||||
#define HAVE_POLL 1
|
||||
#define HAVE_POLL_H 1
|
||||
#define HAVE_PTHREAD_H 1
|
||||
#define HAVE_PWD_H 1
|
||||
#define HAVE_READDIR_R 1
|
||||
#define HAVE_READLINK 1
|
||||
#define HAVE_READLINKAT 1
|
||||
#define HAVE_REGEX_H 1
|
||||
#define HAVE_SELECT 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_SETLOCALE 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STATFS 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRERROR 1
|
||||
#define HAVE_STRERROR_R 1
|
||||
#define HAVE_STRFTIME 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
|
||||
#define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
|
||||
#define HAVE_STRUCT_TM_TM_GMTOFF 1
|
||||
#define HAVE_SYMLINK 1
|
||||
#define HAVE_SYS_CDEFS_H 1
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
#define HAVE_SYS_MOUNT_H 1
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
#define HAVE_SYS_POLL_H 1
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
#define HAVE_SYS_STATFS_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_SYS_UTSNAME_H 1
|
||||
#define HAVE_SYS_VFS_H 1
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
#define HAVE_TIME_H 1
|
||||
#define HAVE_TZSET 1
|
||||
#define HAVE_UINTMAX_T 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_UNSIGNED_LONG_LONG 1
|
||||
#define HAVE_UNSIGNED_LONG_LONG_INT 1
|
||||
#define HAVE_UTIME 1
|
||||
#define HAVE_UTIMENSAT 1
|
||||
#define HAVE_UTIMES 1
|
||||
#define HAVE_UTIME_H 1
|
||||
#define HAVE_VFORK 1
|
||||
#define HAVE_VPRINTF 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_WCHAR_T 1
|
||||
#define HAVE_WCRTOMB 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_WCSCPY 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCTOMB 1
|
||||
#define HAVE_WCTYPE_H 1
|
||||
#define HAVE_WMEMCMP 1
|
||||
#define HAVE_WMEMCPY 1
|
||||
#define HAVE_ARC4RANDOM_BUF 1
|
||||
#define HAVE_ZLIB_H 1
|
||||
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
#define STDC_HEADERS 1
|
||||
#define STRERROR_R_CHAR_P 1
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
#endif
|
189
dependencies/libarchive-3.4.2/contrib/android/config/linux_host.h
vendored
Normal file
189
dependencies/libarchive-3.4.2/contrib/android/config/linux_host.h
vendored
Normal file
|
@ -0,0 +1,189 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Trevor Drake
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef ARCHIVE_PLATFORM_H_ANDROID_LINUX_HOST_INCLUDED
|
||||
#define ARCHIVE_PLATFORM_H_ANDROID_LINUX_HOST_INCLUDED
|
||||
|
||||
#define HAVE_CHOWN 1
|
||||
#define HAVE_CHROOT 1
|
||||
#define HAVE_CTIME_R 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_DECL_EXTATTR_NAMESPACE_USER 0
|
||||
#define HAVE_DECL_INT64_MAX 1
|
||||
#define HAVE_DECL_INT64_MIN 1
|
||||
#define HAVE_DECL_SIZE_MAX 1
|
||||
#define HAVE_DECL_SSIZE_MAX 1
|
||||
#define HAVE_DECL_STRERROR_R 1
|
||||
#define HAVE_DECL_UINT32_MAX 1
|
||||
#define HAVE_DECL_UINT64_MAX 1
|
||||
#define HAVE_DIRENT_H 1
|
||||
#define HAVE_DIRFD 1
|
||||
#define HAVE_DLFCN_H 1
|
||||
#define HAVE_EILSEQ 1
|
||||
#define HAVE_ERRNO_H 1
|
||||
#define HAVE_FCHDIR 1
|
||||
#define HAVE_FCHMOD 1
|
||||
#define HAVE_FCHOWN 1
|
||||
#define HAVE_FCNTL 1
|
||||
#define HAVE_FCNTL_H 1
|
||||
#define HAVE_FDOPENDIR 1
|
||||
#define HAVE_FGETXATTR 1
|
||||
#define HAVE_FLISTXATTR 1
|
||||
#define HAVE_FORK 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_FSETXATTR 1
|
||||
#define HAVE_FSTAT 1
|
||||
#define HAVE_FSTATAT 1
|
||||
#define HAVE_FSTATFS 1
|
||||
#define HAVE_FSTATVFS 1
|
||||
#define HAVE_FTRUNCATE 1
|
||||
#define HAVE_FUTIMENS 1
|
||||
#define HAVE_FUTIMES 1
|
||||
#define HAVE_FUTIMESAT 1
|
||||
#define HAVE_GETEUID 1
|
||||
#define HAVE_GETGRGID_R 1
|
||||
#define HAVE_GETGRNAM_R 1
|
||||
#define HAVE_GETPID 1
|
||||
#define HAVE_GETPWNAM_R 1
|
||||
#define HAVE_GETPWUID_R 1
|
||||
#define HAVE_GETXATTR 1
|
||||
#define HAVE_GMTIME_R 1
|
||||
#define HAVE_GRP_H 1
|
||||
#define HAVE_ICONV 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_INTMAX_T 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LANGINFO_H 1
|
||||
#define HAVE_LCHOWN 1
|
||||
#define HAVE_LGETXATTR 1
|
||||
#define HAVE_LIBLZMA 1
|
||||
#define HAVE_LIBZ 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_LINK 1
|
||||
#define HAVE_LINUX_FIEMAP_H 1
|
||||
#define HAVE_LINUX_FS_H 1
|
||||
#define HAVE_LINUX_MAGIC_H 1
|
||||
#define HAVE_LINUX_TYPES_H 1
|
||||
#define HAVE_LISTXATTR 1
|
||||
#define HAVE_LLISTXATTR 1
|
||||
#define HAVE_LOCALE_H 1
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
#define HAVE_LONG_LONG_INT 1
|
||||
#define HAVE_LSETXATTR 1
|
||||
#define HAVE_LSTAT 1
|
||||
#define HAVE_LUTIMES 1
|
||||
#define HAVE_MBRTOWC 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MKDIR 1
|
||||
#define HAVE_MKFIFO 1
|
||||
#define HAVE_MKNOD 1
|
||||
#define HAVE_MKSTEMP 1
|
||||
#define HAVE_NL_LANGINFO 1
|
||||
#define HAVE_OPENAT 1
|
||||
#define HAVE_PATHS_H 1
|
||||
#define HAVE_PIPE 1
|
||||
#define HAVE_POLL 1
|
||||
#define HAVE_POLL_H 1
|
||||
#define HAVE_POSIX_SPAWNP 1
|
||||
#define HAVE_PTHREAD_H 1
|
||||
#define HAVE_PWD_H 1
|
||||
#define HAVE_READDIR_R 1
|
||||
#define HAVE_READLINK 1
|
||||
#define HAVE_READLINKAT 1
|
||||
#define HAVE_REGEX_H 1
|
||||
#define HAVE_SELECT 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_SETLOCALE 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_SPAWN_H 1
|
||||
#define HAVE_STATFS 1
|
||||
#define HAVE_STATVFS 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRERROR 1
|
||||
#define HAVE_STRERROR_R 1
|
||||
#define HAVE_STRFTIME 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
|
||||
#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
|
||||
#define HAVE_STRUCT_TM_TM_GMTOFF 1
|
||||
#define HAVE_SYMLINK 1
|
||||
#define HAVE_SYS_CDEFS_H 1
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
#define HAVE_SYS_MOUNT_H 1
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
#define HAVE_SYS_POLL_H 1
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
#define HAVE_SYS_STATFS_H 1
|
||||
#define HAVE_SYS_STATVFS_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_SYS_UTSNAME_H 1
|
||||
#define HAVE_SYS_VFS_H 1
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
#define HAVE_SYS_XATTR_H 1
|
||||
#define HAVE_TIMEGM 1
|
||||
#define HAVE_TIME_H 1
|
||||
#define HAVE_TZSET 1
|
||||
#define HAVE_UINTMAX_T 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_UNSIGNED_LONG_LONG 1
|
||||
#define HAVE_UNSIGNED_LONG_LONG_INT 1
|
||||
#define HAVE_UTIME 1
|
||||
#define HAVE_UTIMENSAT 1
|
||||
#define HAVE_UTIMES 1
|
||||
#define HAVE_UTIME_H 1
|
||||
#define HAVE_VFORK 1
|
||||
#define HAVE_VPRINTF 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_WCHAR_T 1
|
||||
#define HAVE_WCRTOMB 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_WCSCPY 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCTOMB 1
|
||||
#define HAVE_WCTYPE_H 1
|
||||
#define HAVE_WMEMCMP 1
|
||||
#define HAVE_WMEMCPY 1
|
||||
#define HAVE_ZLIB_H 1
|
||||
#define ICONV_CONST
|
||||
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
#define STDC_HEADERS 1
|
||||
#define STRERROR_R_CHAR_P 1
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
#endif
|
1059
dependencies/libarchive-3.4.2/contrib/android/config/windows_host.h
vendored
Normal file
1059
dependencies/libarchive-3.4.2/contrib/android/config/windows_host.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
dependencies/libarchive-3.4.2/contrib/android/include/Bcrypt.h
vendored
Normal file
1
dependencies/libarchive-3.4.2/contrib/android/include/Bcrypt.h
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
#include <bcrypt.h>
|
1
dependencies/libarchive-3.4.2/contrib/android/include/Windows.h
vendored
Normal file
1
dependencies/libarchive-3.4.2/contrib/android/include/Windows.h
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
#include <windows.h>
|
47
dependencies/libarchive-3.4.2/contrib/android/include/android_lf.h
vendored
Normal file
47
dependencies/libarchive-3.4.2/contrib/android/include/android_lf.h
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Macros for file64 functions
|
||||
*
|
||||
* Android does not support the macro _FILE_OFFSET_BITS=64
|
||||
* As of android-21 it does however support many file64 functions
|
||||
*/
|
||||
|
||||
#ifndef ARCHIVE_ANDROID_LF_H_INCLUDED
|
||||
#define ARCHIVE_ANDROID_LF_H_INCLUDED
|
||||
|
||||
#if __ANDROID_API__ > 20
|
||||
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/vfs.h>
|
||||
|
||||
//dirent.h
|
||||
#define readdir_r readdir64_r
|
||||
#define readdir readdir64
|
||||
#define dirent dirent64
|
||||
//fcntl.h
|
||||
#define openat openat64
|
||||
#define open open64
|
||||
#define mkstemp mkstemp64
|
||||
//unistd.h
|
||||
#define lseek lseek64
|
||||
#define ftruncate ftruncate64
|
||||
//sys/stat.h
|
||||
#define fstatat fstatat64
|
||||
#define fstat fstat64
|
||||
#define lstat lstat64
|
||||
#define stat stat64
|
||||
//sys/statvfs.h
|
||||
#define fstatvfs fstatvfs64
|
||||
#define statvfs statvfs64
|
||||
//sys/types.h
|
||||
#define off_t off64_t
|
||||
//sys/vfs.h
|
||||
#define fstatfs fstatfs64
|
||||
#define statfs statfs64
|
||||
#endif
|
||||
|
||||
#endif /* ARCHIVE_ANDROID_LF_H_INCLUDED */
|
224
dependencies/libarchive-3.4.2/contrib/archivetest.c
vendored
Normal file
224
dependencies/libarchive-3.4.2/contrib/archivetest.c
vendored
Normal file
|
@ -0,0 +1,224 @@
|
|||
/*-
|
||||
* Copyright (c) 2019 Martin Matuska
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Archivetest verifies reading archives with libarchive
|
||||
*
|
||||
* It may be used to reproduce failures in testcases discovered by OSS-Fuzz
|
||||
* https://github.com/google/oss-fuzz/blob/master/projects/libarchive
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <archive.h>
|
||||
#include <archive_entry.h>
|
||||
|
||||
#if defined __MINGW32__
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
static const char *errnostr(int e)
|
||||
{
|
||||
char *estr;
|
||||
switch(e) {
|
||||
case ARCHIVE_EOF:
|
||||
estr = "ARCHIVE_EOF";
|
||||
break;
|
||||
case ARCHIVE_OK:
|
||||
estr = "ARCHIVE_OK";
|
||||
break;
|
||||
case ARCHIVE_WARN:
|
||||
estr = "ARCHIVE_WARN";
|
||||
break;
|
||||
case ARCHIVE_RETRY:
|
||||
estr = "ARCHIVE_RETRY";
|
||||
break;
|
||||
case ARCHIVE_FAILED:
|
||||
estr = "ARCHIVE_FAILED";
|
||||
break;
|
||||
case ARCHIVE_FATAL:
|
||||
estr = "ARCHIVE_FATAL";
|
||||
break;
|
||||
default:
|
||||
estr = "Unknown";
|
||||
break;
|
||||
}
|
||||
return (estr);
|
||||
}
|
||||
|
||||
static void usage(const char *prog)
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [-f filename] [-h] [-q] [-s]\n", prog);
|
||||
}
|
||||
|
||||
static void printhelp()
|
||||
{
|
||||
fprintf(stdout, "archivetest: verify reading archives with "
|
||||
"libarchive\n\n"
|
||||
"Options:\n"
|
||||
" -f filename Filename to verify\n"
|
||||
" -h Show this help\n"
|
||||
" -q Quiet mode\n"
|
||||
" -s Verify only headers (skip data)\n\n"
|
||||
"If no filename is specified, data is read from standard input.\n"
|
||||
"\n%s\n", archive_version_details());
|
||||
}
|
||||
|
||||
static int v_print(int verbose, const char *format, ...)
|
||||
{
|
||||
int r = 0;
|
||||
|
||||
if (verbose) {
|
||||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
r = vfprintf(stdout, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
return (r);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct archive *a;
|
||||
struct archive_entry *entry;
|
||||
char *filename;
|
||||
const char *p;
|
||||
char buffer[4096];
|
||||
int c;
|
||||
int v, skip_data;
|
||||
int r = ARCHIVE_OK;
|
||||
int format_printed;
|
||||
|
||||
filename = NULL;
|
||||
skip_data = 0;
|
||||
v = 1;
|
||||
|
||||
while ((c = getopt (argc, argv, "f:hqs")) != -1) {
|
||||
switch (c) {
|
||||
case 'f':
|
||||
filename = optarg;
|
||||
break;
|
||||
case 'h':
|
||||
printhelp();
|
||||
exit(0);
|
||||
case 'q':
|
||||
v = 0;
|
||||
break;
|
||||
case 's':
|
||||
skip_data = 1;
|
||||
break;
|
||||
case '?':
|
||||
if (optopt == 'f')
|
||||
fprintf(stderr, "Option -%c requires "
|
||||
"an argument.\n", optopt);
|
||||
else if (isprint(optopt))
|
||||
fprintf(stderr, "Unknown option '-%c'"
|
||||
".\n", optopt);
|
||||
else
|
||||
fprintf(stderr, "Unknown option "
|
||||
"character '\\x%x'.\n", optopt);
|
||||
usage(argv[0]);
|
||||
exit(1);
|
||||
break;
|
||||
default:
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
a = archive_read_new();
|
||||
|
||||
archive_read_support_filter_all(a);
|
||||
archive_read_support_format_all(a);
|
||||
|
||||
v_print(v, "Data source: ");
|
||||
|
||||
if (filename == NULL) {
|
||||
v_print(v, "standard input\n");
|
||||
r = archive_read_open_fd(a, STDIN_FILENO, 4096);
|
||||
} else {
|
||||
v_print(v, "filename: %s\n", filename);
|
||||
r = archive_read_open_filename(a, filename, 4096);
|
||||
}
|
||||
|
||||
if (r != ARCHIVE_OK) {
|
||||
archive_read_free(a);
|
||||
fprintf(stderr, "Invalid or unsupported data source\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
format_printed = 0;
|
||||
c = 1;
|
||||
|
||||
while (1) {
|
||||
r = archive_read_next_header(a, &entry);
|
||||
if (r == ARCHIVE_FATAL) {
|
||||
v_print(v, "Entry %d: fatal error reading "
|
||||
"header\n", c);
|
||||
break;
|
||||
}
|
||||
if (!format_printed) {
|
||||
v_print(v, "Filter: %s\nFormat: %s\n",
|
||||
archive_filter_name(a, 0), archive_format_name(a));
|
||||
format_printed = 1;
|
||||
}
|
||||
if (r == ARCHIVE_RETRY)
|
||||
continue;
|
||||
if (r == ARCHIVE_EOF)
|
||||
break;
|
||||
p = archive_entry_pathname(entry);
|
||||
v_print(v, "Entry %d: %s, pathname", c, errnostr(r));
|
||||
if (p == NULL || p[0] == '\0')
|
||||
v_print(v, " unreadable");
|
||||
else
|
||||
v_print(v, ": %s", p);
|
||||
v_print(v, ", data: ");
|
||||
if (skip_data) {
|
||||
v_print(v, "skipping");
|
||||
} else {
|
||||
while ((r = archive_read_data(a, buffer, 4096) > 0))
|
||||
;
|
||||
if (r == ARCHIVE_FATAL) {
|
||||
v_print(v, "ERROR\nError string: %s\n",
|
||||
archive_error_string(a));
|
||||
break;
|
||||
}
|
||||
v_print(v, "OK");
|
||||
}
|
||||
v_print(v, "\n");
|
||||
c++;
|
||||
}
|
||||
|
||||
v_print(v, "Last return code: %s (%d)\n", errnostr(r), r);
|
||||
if (r == ARCHIVE_EOF || r == ARCHIVE_OK) {
|
||||
archive_read_free(a);
|
||||
exit(0);
|
||||
}
|
||||
v_print(v, "Error string: %s\n", archive_error_string(a));
|
||||
archive_read_free(a);
|
||||
exit(2);
|
||||
}
|
160
dependencies/libarchive-3.4.2/contrib/libarchive.1aix53.spec
vendored
Normal file
160
dependencies/libarchive-3.4.2/contrib/libarchive.1aix53.spec
vendored
Normal file
|
@ -0,0 +1,160 @@
|
|||
# $LastChangedRevision$, $LastChangedDate$
|
||||
Summary: Library to create and read several different archive formats
|
||||
Summary(pl): Biblioteka do tworzenia i odczytu ró¿nych formatów archiwów
|
||||
Name: libarchive
|
||||
Version: 2.0a3
|
||||
Release: 1aix53
|
||||
License: BSD
|
||||
Group: Libraries
|
||||
Source0: http://people.freebsd.org/~kientzle/libarchive/src/%{name}-%{version}.tar.gz
|
||||
Patch: %{name}-0123457890.patch
|
||||
URL: http://people.freebsd.org/~kientzle/libarchive/
|
||||
Requires: glibc
|
||||
Requires: zlib
|
||||
Requires: bzip2
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gawk
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: bzip2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
Libarchive is a programming library that can create and read several
|
||||
different streaming archive formats, including most popular TAR
|
||||
variants and several CPIO formats. It can also write SHAR archives.
|
||||
|
||||
%description -l pl
|
||||
Libarchive jest bibliotek± s³u¿ac± to tworzenia i odczytu wielu
|
||||
ró¿nych strumieniowych formatów archiwów, w³±czaj±c w to popularne
|
||||
odmiany TAR oraz wiele formatów CPIO. Biblioteka ta potrafi tak¿e
|
||||
zapisywaæ archiwa SHAR.
|
||||
|
||||
%package devel
|
||||
Summary: Header files for libarchive library
|
||||
Summary(pl): Pliki nag³ówkowe biblioteki libarchive
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Header files for libarchive library.
|
||||
|
||||
%description devel -l pl
|
||||
Pliki nag³ówkowe biblioteki libarchive.
|
||||
|
||||
%package static
|
||||
Summary: Static libarchive library
|
||||
Summary(pl): Statyczna biblioteka libarchive
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-devel = %{version}-%{release}
|
||||
|
||||
%description static
|
||||
Static libarchive library.
|
||||
|
||||
%description static -l pl
|
||||
Statyczna biblioteka libarchive.
|
||||
|
||||
%package -n bsdtar
|
||||
Summary: bsdtar - tar(1) implementation based on libarchive
|
||||
Summary(pl): bsdtar - implementacja programu tar(1) oparta na libarchive
|
||||
Group: Applications/Archiving
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description -n bsdtar
|
||||
bsdtar - tar(1) implementation based on libarchive.
|
||||
|
||||
%description -n bsdtar -l pl
|
||||
bsdtar - implementacja programu tar(1), oparta na libarchive.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
# Specify paths to avoid use of vacpp
|
||||
# -maix64 - required to use large files with aix-5.3
|
||||
# -static - required for interoperability without copying libraries
|
||||
# -D_BSD - required to include definition of makedev
|
||||
# -X64 - required to assemble 64-bit COFF files
|
||||
mkdir -p %{buildroot}
|
||||
PATH=/opt/freeware/libexec:/opt/freeware/bin:/usr/local/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:. \
|
||||
CPATH=/opt/freeware/include:/usr/local/include \
|
||||
LIBPATH=/opt/freeware/lib:/usr/local/lib:/usr/share/lib \
|
||||
LD_LIBRARY_PATH=/opt/freeware/lib:/usr/local/lib:/usr/share/lib \
|
||||
CFLAGS="$RPM_OPT_FLAGS -maix64 -static -D_BSD" \
|
||||
CXXFLAGS="$RPM_OPT_FLAGS -maix64 -static -D_BSD" \
|
||||
AR="ar -X64" \
|
||||
./configure \
|
||||
--prefix=%{_prefix} \
|
||||
--libexecdir=%{_libexecdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--infodir=%{_infodir} \
|
||||
--enable-shared=yes \
|
||||
--enable-static=yes \
|
||||
| tee %{buildroot}/config.log
|
||||
make | tee %{buildroot}/make.log
|
||||
|
||||
%install
|
||||
[ "%buildroot" != "/" ] && [ -d %buildroot ] && rm -rf %buildroot;
|
||||
make DESTDIR=%buildroot install
|
||||
# original install builds, but does install bsdtar
|
||||
cp .libs/%{name}.a %{buildroot}%{_libdir}
|
||||
cp bsdtar %{buildroot}%{_bindir}
|
||||
cp tar/bsdtar.1 %{buildroot}%{_mandir}/man1
|
||||
|
||||
%clean
|
||||
rm -fr %buildroot
|
||||
|
||||
%files
|
||||
%defattr(644,root,root,755)
|
||||
%{_libdir}/libarchive.a
|
||||
|
||||
%files devel
|
||||
%defattr(644,root,root,755)
|
||||
%{_libdir}/libarchive.la
|
||||
%{_includedir}/*.h
|
||||
%doc %{_mandir}/man3/*
|
||||
%doc %{_mandir}/man5/*
|
||||
|
||||
%files -n bsdtar
|
||||
%defattr(644,root,root,755)
|
||||
%attr(755,root,root) %{_bindir}/bsdtar
|
||||
%doc %{_mandir}/man1/bsdtar.1*
|
||||
|
||||
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
|
||||
%changelog
|
||||
* %{date} PLD Team <feedback@pld-linux.org>
|
||||
All persons listed below can be reached at <cvs_login>@pld-linux.org
|
||||
|
||||
$Log: libarchive.spec,v $
|
||||
Release 1aix53 2006/12/12 rm1023@dcx.com
|
||||
- tweak for aix-5.3
|
||||
- added libarchive-0123457890.patch for "0123457890" error
|
||||
- replaced libarchive-1.3.1.tar.gz with libarchive-2.0a3.tar.gz
|
||||
- removed obsolete -CVE-2006-5680.patch and -man_progname.patch
|
||||
|
||||
Revision 1.6 2006/11/15 10:41:28 qboosh
|
||||
- BR: acl-devel,attr-devel
|
||||
- devel deps
|
||||
|
||||
Revision 1.5 2006/11/08 22:22:25 twittner
|
||||
- up to 1.3.1
|
||||
- added BR: e2fsprogs-devel
|
||||
- added -CVE-2006-5680.patch against entering an infinite
|
||||
loop in corrupt archives
|
||||
- added bsdtar package (bsdtar is included now in libarchive
|
||||
sources)
|
||||
- rel. 0.1 for testing
|
||||
|
||||
Revision 1.4 2005/12/15 18:26:36 twittner
|
||||
- up to 1.2.37
|
||||
- removed -shared.patch (no longer needed)
|
||||
|
||||
Revision 1.3 2005/10/05 17:00:12 arekm
|
||||
- up to 1.02.034
|
||||
|
||||
Revision 1.2 2005/07/27 20:17:21 qboosh
|
||||
- typo
|
||||
|
||||
Revision 1.1 2005/07/27 08:36:03 adamg
|
||||
- new
|
216
dependencies/libarchive-3.4.2/contrib/libarchive.spec
vendored
Normal file
216
dependencies/libarchive-3.4.2/contrib/libarchive.spec
vendored
Normal file
|
@ -0,0 +1,216 @@
|
|||
Name: {{{ git_name }}}
|
||||
Version: {{{ git_version lead=3 follow=4 }}}
|
||||
Release: 1%{?dist}
|
||||
Summary: A library for handling streaming archive formats
|
||||
|
||||
License: BSD
|
||||
URL: http://www.libarchive.org/
|
||||
Source: {{{ git_pack }}}
|
||||
|
||||
VCS: {{{ git_vcs }}}
|
||||
|
||||
BuildRequires: automake
|
||||
BuildRequires: bison
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: e2fsprogs-devel
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libacl-devel
|
||||
BuildRequires: libattr-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libzstd-devel
|
||||
BuildRequires: lz4-devel
|
||||
BuildRequires: lzo-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: sharutils
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
%description
|
||||
Libarchive is a programming library that can create and read several different
|
||||
streaming archive formats, including most popular tar variants, several cpio
|
||||
formats, and both BSD and GNU ar variants. It can also write shar archives and
|
||||
read ISO9660 CDROM images and ZIP archives.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
|
||||
%package -n bsdtar
|
||||
Summary: Manipulate tape archives
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n bsdtar
|
||||
The bsdtar package contains standalone bsdtar utility split off regular
|
||||
libarchive packages.
|
||||
|
||||
|
||||
%package -n bsdcpio
|
||||
Summary: Copy files to and from archives
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n bsdcpio
|
||||
The bsdcpio package contains standalone bsdcpio utility split off regular
|
||||
libarchive packages.
|
||||
|
||||
|
||||
%package -n bsdcat
|
||||
Summary: Expand files to standard output
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n bsdcat
|
||||
The bsdcat program typically takes a filename as an argument or reads standard
|
||||
input when used in a pipe. In both cases decompressed data it written to
|
||||
standard output.
|
||||
|
||||
|
||||
%prep
|
||||
{{{ git_setup_macro }}}
|
||||
%autosetup -p1
|
||||
|
||||
|
||||
%build
|
||||
build/autogen.sh
|
||||
%configure --disable-static --without-nettle LT_SYS_LIBRARY_PATH=%_libdir
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
||||
|
||||
# rhbz#1294252
|
||||
replace ()
|
||||
{
|
||||
filename=$1
|
||||
file=`basename "$filename"`
|
||||
binary=${file%%.*}
|
||||
pattern=${binary##bsd}
|
||||
|
||||
awk "
|
||||
# replace the topic
|
||||
/^.Dt ${pattern^^} 1/ {
|
||||
print \".Dt ${binary^^} 1\";
|
||||
next;
|
||||
}
|
||||
# replace the first occurence of \"$pattern\" by \"$binary\"
|
||||
!stop && /^.Nm $pattern/ {
|
||||
print \".Nm $binary\" ;
|
||||
stop = 1 ;
|
||||
next;
|
||||
}
|
||||
# print remaining lines
|
||||
1;
|
||||
" "$filename" > "$filename.new"
|
||||
mv "$filename".new "$filename"
|
||||
}
|
||||
|
||||
for manpage in bsdtar.1 bsdcpio.1
|
||||
do
|
||||
installed_manpage=`find "$RPM_BUILD_ROOT" -name "$manpage"`
|
||||
replace "$installed_manpage"
|
||||
done
|
||||
|
||||
|
||||
%check
|
||||
%if %{with check}
|
||||
logfiles ()
|
||||
{
|
||||
find -name '*_test.log' -or -name test-suite.log
|
||||
}
|
||||
|
||||
tempdirs ()
|
||||
{
|
||||
cat `logfiles` \
|
||||
| awk "match(\$0, /[^[:space:]]*`date -I`[^[:space:]]*/) { print substr(\$0, RSTART, RLENGTH); }" \
|
||||
| sort | uniq
|
||||
}
|
||||
|
||||
cat_logs ()
|
||||
{
|
||||
for i in `logfiles`
|
||||
do
|
||||
echo "=== $i ==="
|
||||
cat "$i"
|
||||
done
|
||||
}
|
||||
|
||||
run_testsuite ()
|
||||
{
|
||||
rc=0
|
||||
%make_build check -j1 || {
|
||||
# error happened - try to extract in koji as much info as possible
|
||||
cat_logs
|
||||
|
||||
for i in `tempdirs`; do
|
||||
if test -d "$i" ; then
|
||||
find $i -printf "%p\n ~> a: %a\n ~> c: %c\n ~> t: %t\n ~> %s B\n"
|
||||
cat $i/*.log
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
cat_logs
|
||||
}
|
||||
|
||||
# On a ppc/ppc64 is some race condition causing 'make check' fail on ppc
|
||||
# when both 32 and 64 builds are done in parallel on the same machine in
|
||||
# koji. Try to run once again if failed.
|
||||
%ifarch ppc
|
||||
run_testsuite || run_testsuite
|
||||
%else
|
||||
run_testsuite
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%doc NEWS README.md
|
||||
%{_libdir}/libarchive.so.13*
|
||||
%{_mandir}/*/cpio.*
|
||||
%{_mandir}/*/mtree.*
|
||||
%{_mandir}/*/tar.*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*.h
|
||||
%{_mandir}/*/archive*
|
||||
%{_mandir}/*/libarchive*
|
||||
%{_libdir}/libarchive.so
|
||||
%{_libdir}/pkgconfig/libarchive.pc
|
||||
|
||||
%files -n bsdtar
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%doc NEWS README.md
|
||||
%{_bindir}/bsdtar
|
||||
%{_mandir}/*/bsdtar*
|
||||
|
||||
%files -n bsdcpio
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%doc NEWS README.md
|
||||
%{_bindir}/bsdcpio
|
||||
%{_mandir}/*/bsdcpio*
|
||||
|
||||
%files -n bsdcat
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%doc NEWS README.md
|
||||
%{_bindir}/bsdcat
|
||||
%{_mandir}/*/bsdcat*
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Mar 28 2019 Pavel Raiskup <praiskup@redhat.com> - 3.3.3-7
|
||||
- simplify libtool hacks
|
||||
|
||||
{{ git_changelog }}
|
154
dependencies/libarchive-3.4.2/contrib/libarchive_autodetect-st_lib_archive.m4
vendored
Normal file
154
dependencies/libarchive-3.4.2/contrib/libarchive_autodetect-st_lib_archive.m4
vendored
Normal file
|
@ -0,0 +1,154 @@
|
|||
dnl
|
||||
dnl @synopsis ST_LIB_ARCHIVE([ENABLED-DEFAULT])
|
||||
dnl
|
||||
dnl This macro figures out what's necessary to link a program against an
|
||||
dnl instance of the BSD libarchive package by Tim Kientzle.
|
||||
dnl
|
||||
dnl See http://people.freebsd.org/~kientzle/libarchive/ for more info.
|
||||
dnl
|
||||
dnl It exports and substitutes the variables LIBARCHIVE_LIBS, LIBARCHIVE_LDFLAGS,
|
||||
dnl and LIBARCHIVE_CPPFLAGS to appropriate values for the identified instance of
|
||||
dnl libarchive. The values are AC_SUBST'd, so a user could, for example, simply
|
||||
dnl include @LIBARCHIVE_CPPFLAGS@ in the definition of AM_CPPFLAGS in a Makefile.am.
|
||||
dnl
|
||||
dnl ENABLED-DEFAULT is either "yes" or "no" and determines whether the default value
|
||||
dnl is --with-libarchive or --without-libarchive. It is not possible to specify a
|
||||
dnl default directory. More simply, any reasonable choice for a default should just
|
||||
dnl go into the auto-detect list.
|
||||
dnl
|
||||
dnl The macro defines the symbol HAVE_LIBARCHIVE if the library is found. You
|
||||
dnl should use autoheader to include a definition for this symbol in a config.h
|
||||
dnl file. Sample usage in a C/C++ source is as follows:
|
||||
dnl
|
||||
dnl #ifdef HAVE_LIBARCHIVE
|
||||
dnl #include <archive.h>
|
||||
dnl #endif /* HAVE_LIBARCHIVE */
|
||||
dnl
|
||||
dnl @category InstalledPackages
|
||||
dnl @author Andre Stechert <andre@splunk.com>
|
||||
dnl @version 2006-04-20
|
||||
dnl @license GPLWithACException
|
||||
|
||||
AC_DEFUN([ST_LIB_ARCHIVE],
|
||||
[
|
||||
#
|
||||
# Handle input from the configurer and blend with the requirements from the maintainer.
|
||||
# We go through the trouble of creating a second set of variables other than the with_foo
|
||||
# variables in order to be sure that error/corner cases have been cleaned up.
|
||||
#
|
||||
# After this statement, three trusted variable are defined.
|
||||
#
|
||||
# st_lib_archive_ENABLED will be either "yes" or "no". its value determines whether
|
||||
# or not we bother with the rest of the checks and whether or not we export a
|
||||
# bunch of variables.
|
||||
#
|
||||
# st_lib_archive_LOCATION will be either "auto" or "defined". if it is "auto", then
|
||||
# we try a bunch of standard locations. if it is "defined", then we just try the value
|
||||
# provided in st_lib_archive_DIR.
|
||||
#
|
||||
# st_lib_archive_DIR will contain the string provided by the user, provided that it's
|
||||
# actually a directory.
|
||||
#
|
||||
AC_MSG_CHECKING([if libarchive is wanted])
|
||||
AC_ARG_WITH([libarchive],
|
||||
AS_HELP_STRING([--with-libarchive=DIR], [libarchive installation directory]),
|
||||
[if test "x$with_libarchive" = "xno" ; then
|
||||
st_lib_archive_ENABLED=no
|
||||
elif test "x$with_libarchive" = "xyes" ; then
|
||||
st_lib_archive_ENABLED=yes
|
||||
st_lib_archive_LOCATION=auto
|
||||
else
|
||||
st_lib_archive_ENABLED=yes
|
||||
st_lib_archive_LOCATION=defined
|
||||
if test -d "$with_libarchive" ; then
|
||||
st_lib_archive_DIR="$with_libarchive"
|
||||
else
|
||||
AC_MSG_ERROR([$with_libarchive is not a directory])
|
||||
fi
|
||||
fi],
|
||||
[if test "x$1" = "xno" ; then
|
||||
st_lib_archive_ENABLED=no
|
||||
elif test "x$1" = "xyes" ; then
|
||||
st_lib_archive_ENABLED=yes
|
||||
else
|
||||
st_lib_archive_ENABLED=yes
|
||||
fi])
|
||||
|
||||
if test "$st_lib_archive_ENABLED" = "yes" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
#
|
||||
# After this statement, one trusted variable is defined.
|
||||
#
|
||||
# st_lib_archive_LIB will be either "lib" or "lib64", depending on whether the configurer
|
||||
# specified 32, 64. The default is "lib".
|
||||
#
|
||||
AC_MSG_CHECKING([whether to use lib or lib64])
|
||||
AC_ARG_WITH([libarchive-bits],
|
||||
AS_HELP_STRING([--with-libarchive-bits=32/64], [if 64, look in /lib64 on hybrid systems]),
|
||||
[if test "x$with_libarchive_bits" = "x32" ; then
|
||||
st_lib_archive_LIB=lib
|
||||
elif test "x$with_libarchive_bits" = "x64" ; then
|
||||
st_lib_archive_LIB=lib64
|
||||
else
|
||||
AC_MSG_ERROR([the argument must be either 32 or 64])
|
||||
fi],
|
||||
[st_lib_archive_LIB=lib])
|
||||
AC_MSG_RESULT($st_lib_archive_LIB)
|
||||
#
|
||||
# Save the environment before verifying libarchive availability
|
||||
#
|
||||
st_lib_archive_SAVECPPFLAGS="$CPPFLAGS"
|
||||
st_lib_archive_SAVELDFLAGS="$LDFLAGS"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
|
||||
if test "x$st_lib_archive_LOCATION" = "xdefined" ; then
|
||||
CPPFLAGS="-I$st_lib_archive_DIR/include $st_lib_archive_SAVECPPFLAGS"
|
||||
LDFLAGS="-L$st_lib_archive_DIR/$st_lib_archive_LIB $st_lib_archive_SAVELDFLAGS"
|
||||
AC_CHECK_LIB(archive, archive_read_new, [st_lib_archive_found_lib=yes], [st_lib_archive_found_lib=no])
|
||||
AC_CHECK_HEADER(archive.h, [st_lib_archive_found_hdr=yes], [st_lib_archive_found_hdr=no])
|
||||
if test "x$st_lib_archive_found_lib" = "xyes" && test "x$st_lib_archive_found_hdr" = "xyes"; then
|
||||
LIBARCHIVE_CPPFLAGS="-I$dir/include"
|
||||
LIBARCHIVE_LDFLAGS="-L$dir/$st_lib_archive_LIB"
|
||||
else
|
||||
AC_MSG_ERROR([could not find libarchive in the requested location])
|
||||
fi
|
||||
else
|
||||
#
|
||||
# These are the common install directories for Linux, FreeBSD, Solaris, and Mac.
|
||||
#
|
||||
for dir in /usr /usr/local /usr/sfw /opt/csw /opt/local /sw
|
||||
do
|
||||
if test -d "$dir" ; then
|
||||
CPPFLAGS="-I$dir/include $st_lib_archive_SAVECPPFLAGS"
|
||||
LDFLAGS="-L$dir/$st_lib_archive_LIB $st_lib_archive_SAVELDFLAGS"
|
||||
AC_CHECK_LIB(archive, archive_read_new, [st_lib_archive_found_lib=yes], [st_lib_archive_found_lib=no])
|
||||
AC_CHECK_HEADER(archive.h, [st_lib_archive_found_hdr=yes], [st_lib_archive_found_hdr=no])
|
||||
if test "x$st_lib_archive_found_lib" = "xyes" && test "x$st_lib_archive_found_hdr" = "xyes"; then
|
||||
LIBARCHIVE_CPPFLAGS="-I$dir/include"
|
||||
LIBARCHIVE_LDFLAGS="-L$dir/$st_lib_archive_LIB"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test "x$st_lib_archive_found_hdr" = "xyes" && test "x$st_lib_archive_found_lib" = "xyes" ; then
|
||||
LIBARCHIVE_LIBS="-larchive"
|
||||
AC_DEFINE([HAVE_LIBARCHIVE], [1], [Defined to 1 if libarchive is available for use.])
|
||||
AC_SUBST(LIBARCHIVE_LIBS)
|
||||
AC_SUBST(LIBARCHIVE_CPPFLAGS)
|
||||
AC_SUBST(LIBARCHIVE_LDFLAGS)
|
||||
fi
|
||||
|
||||
#
|
||||
# Restore the environment now that we're done.
|
||||
#
|
||||
AC_LANG_RESTORE
|
||||
CPPFLAGS="$st_lib_archive_SAVECPPFLAGS"
|
||||
LDFLAGS="$st_lib_archive_SAVELDFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AM_CONDITIONAL(LIBARCHIVE, test "x$st_lib_archive_found_lib" = "xyes" && test "x$st_lib_archive_found_hdr" = "xyes")
|
||||
])
|
136
dependencies/libarchive-3.4.2/contrib/psota-benchmark/results.txt
vendored
Normal file
136
dependencies/libarchive-3.4.2/contrib/psota-benchmark/results.txt
vendored
Normal file
|
@ -0,0 +1,136 @@
|
|||
ODP: [Bug-tar] GNU tar, star and BSD tar speed comparison +new script
|
||||
|
||||
Jan Psota
|
||||
Thu, 25 Oct 2007 06:51:13 -0700
|
||||
|
||||
Latest TCP script at the bottom (3180 bytes).
|
||||
4 tests: 64bit dual core Athlon tmpfs / disk (reiserfs) - 60MB/s,
|
||||
32bit Athlon tmpfs / disk (reiserfs) - 55MB/s
|
||||
Both machines were idle -- used for testing only.
|
||||
Tarball and extracted files were on different physical devices.
|
||||
Test data: linux 2.6.22/3 kernel sources for memory operations,
|
||||
for the other data average file size should bring enough info.
|
||||
|
||||
2 x [...] processor means 1 processor with 2 cores (2 entries in cpuinfo).
|
||||
Archive format is set to pax (Joerg).
|
||||
Let's end with it. I only wanted to send You a new version of TCP script :-).
|
||||
|
||||
--
|
||||
Jan Psota
|
||||
|
||||
TCP, version 2007-10-25
|
||||
Linux 2.6.22-suspend2-r2 / Gentoo Base System release 2.0.0_rc5
|
||||
2012MB of memory, 2 x AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ 2211.348
|
||||
512 KB 4426.24 bmips
|
||||
gcc (GCC) 4.2.2 (Gentoo 4.2.2 p1.0)
|
||||
CFLAGS="-O2 -march=k8 -pipe"
|
||||
|
||||
bsdtar: bsdtar 2.3.4 - libarchive 2.3.4
|
||||
gnutar: tar (GNU tar) 1.19
|
||||
star: star: star 1.5a85 (x86_64-unknown-linux-gnu)
|
||||
|
||||
best time of 5 repetitions,
|
||||
src=linux-2.6.23, 291M in 23867 files, avg 13KB/file,
|
||||
archive=/tmp/tcp.tar, extract to /tmp/tcptmp
|
||||
program operation real user system %CPU speed
|
||||
bsdtar create 0.764 0.232 0.532 99.96 370308 KB/s
|
||||
gnutar create 0.743 0.200 0.512 95.87 380775 KB/s
|
||||
star create 0.587 0.040 0.820 100.00 441247 KB/s
|
||||
|
||||
bsdtar list 0.164 0.096 0.068 99.84 1579341 KB/s
|
||||
gnutar list 0.218 0.064 0.152 98.92 1188128 KB/s
|
||||
star list 0.359 0.044 0.240 79.09 721481 KB/s
|
||||
|
||||
bsdtar extract 0.733 0.200 0.504 96.02 353358 KB/s
|
||||
gnutar extract 0.625 0.092 0.508 96.02 414419 KB/s
|
||||
star extract 0.875 0.096 0.980 100.00 296013 KB/s
|
||||
|
||||
bsdtar compare 0.001 0.000 0.000 0.00 259012000 KB/s
|
||||
gnutar compare 0.719 0.288 0.400 95.66 360239 KB/s
|
||||
star compare 0.695 0.224 0.636 100.00 372679 KB/s
|
||||
|
||||
[...]
|
||||
best time of 3 repetitions,
|
||||
src=/home, 3.2G in 7447 files, avg 554KB/file,
|
||||
archive=/var/tcp.tar, extract to /mnt/a/tcptmp
|
||||
program operation real user system %CPU speed
|
||||
bsdtar create 184.680 0.552 13.365 7.53 17958 KB/s
|
||||
gnutar create 159.240 0.256 12.417 7.95 20827 KB/s
|
||||
star create 181.779 0.140 14.789 8.21 18203 KB/s
|
||||
|
||||
bsdtar list 0.053 0.032 0.016 91.41 62435471 KB/s
|
||||
gnutar list 56.535 0.136 3.764 6.89 58531 KB/s
|
||||
star list 56.652 0.080 5.236 9.38 58410 KB/s
|
||||
|
||||
bsdtar extract 78.914 0.820 15.149 20.23 41932 KB/s
|
||||
gnutar extract 78.480 0.196 14.197 18.33 42164 KB/s
|
||||
star extract 79.439 0.132 12.973 16.49 41655 KB/s
|
||||
|
||||
bsdtar compare 0.001 0.000 0.000 0.00 3309080000 KB/s
|
||||
gnutar compare 61.771 3.464 8.905 20.02 53570 KB/s
|
||||
star compare 57.561 1.728 9.897 20.19 57488 KB/s
|
||||
|
||||
|
||||
Linux 2.6.22-suspend2-smp / Gentoo Base System release 2.0.0_rc5
|
||||
504MB of memory, 1 x AMD Athlon(tm) Processor 1500.033 256 KB 3002.55 bmips
|
||||
gcc (GCC) 4.2.2 (Gentoo 4.2.2 p1.0)
|
||||
CFLAGS="-O2 -march=athlon-xp -mfpmath=sse -frename-registers -pipe"
|
||||
|
||||
bsdtar: bsdtar 2.3.4 - libarchive 2.3.4
|
||||
gnutar: tar (GNU tar) 1.19
|
||||
star: star: star 1.5a85 (i686-pc-linux-gnu)
|
||||
|
||||
best time of 3 repetitions,
|
||||
src=/usr/src/linux-2.6.22-suspend2/drivers, 119M in 5900 files,
|
||||
avg 21KB/file, archive=/tmp/tcp.tar, extract to /tmp/tcptmp
|
||||
program operation real user system %CPU speed
|
||||
bsdtar create 1.329 0.192 1.132 99.63 89784 KB/s
|
||||
gnutar create 1.223 0.124 1.092 99.46 97566 KB/s
|
||||
star create 1.848 0.036 1.708 94.36 61372 KB/s
|
||||
|
||||
bsdtar list 0.167 0.060 0.108 100.00 679137 KB/s
|
||||
gnutar list 0.161 0.040 0.124 100.00 704447 KB/s
|
||||
star list 0.859 0.044 0.716 88.51 132032 KB/s
|
||||
|
||||
bsdtar extract 1.186 0.172 1.012 99.87 95629 KB/s
|
||||
gnutar extract 1.064 0.056 1.004 99.63 106593 KB/s
|
||||
star extract 1.920 0.088 1.724 94.40 59070 KB/s
|
||||
|
||||
bsdtar compare 0.002 0.000 0.000 0.00 56708000 KB/s
|
||||
gnutar compare 0.925 0.232 0.692 99.90 122611 KB/s
|
||||
star compare 1.569 0.376 1.096 93.79 72285 KB/s
|
||||
|
||||
[...]
|
||||
best time of 3 repetitions,
|
||||
src=/home/jasiu, 2.1G in 8416 files, avg 277KB/file,
|
||||
archive=/home/j2/tcp.tar, extract to /mnt/a/tar/tcptmp
|
||||
program operation real user system %CPU speed
|
||||
bsdtar create 182.171 1.692 29.130 16.91 11584 KB/s
|
||||
gnutar create 174.999 0.632 27.450 16.04 12059 KB/s
|
||||
star create 180.004 0.360 41.795 23.41 11677 KB/s
|
||||
|
||||
bsdtar list 0.214 0.076 0.136 99.04 9822294 KB/s
|
||||
gnutar list 0.210 0.076 0.136 100.00 10009385 KB/s
|
||||
star list 43.462 0.148 18.109 42.00 48363 KB/s
|
||||
|
||||
bsdtar extract 94.912 4.476 31.574 37.98 22146 KB/s
|
||||
gnutar extract 94.657 0.396 29.462 31.54 22206 KB/s
|
||||
star extract 100.814 0.400 39.906 39.98 20849 KB/s
|
||||
|
||||
bsdtar compare 0.003 0.000 0.004 100.00 700657000 KB/s
|
||||
gnutar compare 80.174 3.932 20.365 30.30 26217 KB/s
|
||||
star compare 73.911 8.341 27.670 48.72 28439 KB/s
|
||||
|
||||
=============================================================
|
||||
|
||||
Note by Tim Kientzle: The "bsdtar compare" results here are
|
||||
invalid since bsdtar does not support that operation.
|
||||
For the list numbers, note that libarchive automatically optimizes
|
||||
list operations on uncompressed tar archives on disk by using lseek()
|
||||
to skip over the bodies of entries. GNU tar added an option to
|
||||
provide the same feature.
|
||||
|
||||
The biggest problem with these tests is that they only
|
||||
cover uncompressed archives stored on disk. The results for
|
||||
compressed archives and/or archives stored on tape are
|
||||
likely quite different.
|
110
dependencies/libarchive-3.4.2/contrib/psota-benchmark/tcp.sh
vendored
Executable file
110
dependencies/libarchive-3.4.2/contrib/psota-benchmark/tcp.sh
vendored
Executable file
|
@ -0,0 +1,110 @@
|
|||
#!/bin/sh
|
||||
# tar comparison program
|
||||
# 2007-10-25 Jan Psota
|
||||
|
||||
n=3 # number of repetitions
|
||||
TAR="bsdtar gnutar star" # Tape archivers to compare
|
||||
OPT=("" "--seek" "-no-fsync")
|
||||
pax="--format=pax" # comment out for defaults
|
||||
OPN=(create list extract compare) # operations
|
||||
version="2007-10-25"
|
||||
TIMEFORMAT=$'%R\t%U\t%S\t%P'
|
||||
LC_ALL=C
|
||||
|
||||
test $# -ge 2 || {
|
||||
echo -e "usage:\t$0 source_dir where_to_place_archive
|
||||
[where_to_extract_it]
|
||||
|
||||
TCP, version $version
|
||||
TCP stands for Tar Comparison Program here.
|
||||
It currently compares: BSD tar (bsdtar), GNU tar (gnutar) and star in archive
|
||||
creation, listing, extraction and archive-to-extracted comparison.
|
||||
Tcp prints out best time of n=$n repetitions.
|
||||
|
||||
Tcp creates temporary archive named tcp.tar with $pax and some native
|
||||
(--seek/-no-fsync) options and extracts it to [\$3]/tcptmp/.
|
||||
If unset, third argument defaults to [\$2].
|
||||
After normal exit tcp removes tarball and extracted files.
|
||||
Tcp does not check filesystems destination directories are on for free space,
|
||||
so make sure there is enough space (a bit more than source_dir uses) for both:
|
||||
archive and extracted files.
|
||||
Do not use white space in arguments.
|
||||
Jan Psota, $version"
|
||||
exit 0
|
||||
}
|
||||
src=$1
|
||||
dst=$2/tcp.tar
|
||||
dst_path=${3:-$2}/tcptmp
|
||||
test -e $dst -o -e /tmp/tcp \
|
||||
&& { echo "$dst or /tmp/tcp exists, exiting"; exit 1; }
|
||||
mkdir $dst_path || exit 2
|
||||
|
||||
use_times ()
|
||||
{
|
||||
awk -F"\t" -vN=$n -vL="`du -k $dst`" -vOFS="\t" -vORS="" '
|
||||
{ if (NF==4) { printf "\t%s\t%10.1d KB/s\n", $0, ($1+0>0 ?
|
||||
(L+0)/($1+0) : 0) } }' \
|
||||
/tmp/tcp | sort | head -1
|
||||
> /tmp/tcp
|
||||
}
|
||||
|
||||
test -d $src || { echo "'$src' is not a directory"; exit 3; }
|
||||
|
||||
# system information: type, release, memory, cpu(s), compiler and flags
|
||||
echo -e "TCP, version $version\n"`uname -sr`" / "`head -1 /etc/*-release`
|
||||
free -m | awk '/^Mem/ { printf "%dMB of memory, ", $2 }'
|
||||
test -e /proc/cpuinfo \
|
||||
&& awk -F: '/name|cache size|MHz|mips/ { if (!a) b=b $2 }
|
||||
/^$/ { a++ } END { print a" x"b" bmips" }' /proc/cpuinfo
|
||||
test -e /etc/gentoo-release \
|
||||
&& gcc --version | head -1 && grep ^CFLAGS /etc/make.conf
|
||||
|
||||
# tar versions
|
||||
t=
|
||||
echo
|
||||
for tar in $TAR; do
|
||||
if which $tar &> /dev/null; then
|
||||
t="$t $tar";
|
||||
echo -ne "$tar:\t"; $tar --version | head -1;
|
||||
fi
|
||||
done
|
||||
|
||||
TAR="$t"
|
||||
|
||||
echo -e "\nbest time of $n repetitions,\n"\
|
||||
" src=$src, "\
|
||||
`du -sh $src | awk '{print $1}'`" in "`find $src | wc -l`" files, "\
|
||||
"avg "$((`du -sk $src | awk '{print $1}'`/`find $src -type f | wc -l`))"KB/file,\n"\
|
||||
" archive=$dst, extract to $dst_path"
|
||||
|
||||
echo -e "program\toperation\treal\tuser\tsystem\t%CPU\t speed"
|
||||
> /tmp/tcp
|
||||
let op_num=0
|
||||
for op in "cf $dst $pax -C $src ." "tf $dst" "xf $dst -C $dst_path" \
|
||||
"f $dst -C $dst_path --diff"; do
|
||||
let tar_num=0
|
||||
for tar in $TAR; do
|
||||
echo -en "$tar\t${OPN[op_num]}\t"
|
||||
for ((i=1; i<=$n; i++)); do
|
||||
echo $op | grep -q ^cf && rm -f $dst
|
||||
echo $op | grep -q ^xf &&
|
||||
{ chmod -R u+w $dst_path
|
||||
rm -rf $dst_path; mkdir $dst_path; }
|
||||
sync
|
||||
if echo $op | grep -q ^f; then # op == compare
|
||||
time $tar $op ${OPT[$tar_num]} > /dev/null
|
||||
else # op in (create | list | extract)
|
||||
time $tar $op ${OPT[$tar_num]} > /dev/null \
|
||||
|| break 3
|
||||
fi 2>> /tmp/tcp
|
||||
done
|
||||
use_times
|
||||
let tar_num++
|
||||
done
|
||||
let op_num++
|
||||
echo
|
||||
done
|
||||
rm -rf $dst_path $dst
|
||||
echo
|
||||
cat /tmp/tcp
|
||||
rm -f /tmp/tcp
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue