Commit Graph

164 Commits

Author SHA1 Message Date
Kolan Sh 44eeae2c55 CMake origin/3.3.0 merged. 2015-07-27 20:56:55 +03:00
Kolan Sh 8d46d4838b Make NSIS uninstaller filename (Uninstall.exe) customizable.
When we have to generate two different setup packages
from the same project (modules, libraries, data-files, etc...)
we want to have opportunity to install/update/delete them independently.
But the later installed package would overwrite the 'Uninstall.exe'.
This patch fixes the issue by customizing uninstaller name:
set (CPACK_UNINSTALL_NAME "My Custom Uninstaller Name")
before directive
include (CPack).
2015-04-22 22:04:00 +03:00
Brad King 8b4c40155a Merge topic 'fix-libarchive-mktemp'
1f33b45d libarchive: Fix string concatentation in Windows mktemp implementation
2015-04-10 08:31:01 -04:00
Nils Gladitz ad194ae0b1 libarchive: Use base-256 encoding for UID/GID like GNU tar does 2015-04-09 14:27:16 -04:00
Tim Kientzle 1f33b45d5d libarchive: Fix string concatentation in Windows mktemp implementation
Port upstream LibArchive commit "compute string pointers after
concatenation" (2014-09-25) and commit "Move variables to top of
function for non-C99 compilers" (2014-11-15) to our CMake copy.
Otherwise we may compute a pointer to memory that is about to be freed
and then compute a bad size to give to CryptGenRandom.

Inspired-by: Tim Kientzle <kientzle@gmail.com>
2015-04-09 14:08:43 -04:00
Brad King 6b9a0e1797 libarchive: Constify internal __archive_get_date implementation
The caller of this API already re-declares it as const, so update the
implementation accordingly.
2015-01-15 11:48:10 -05:00
Brad King 95d84f76d9 Merge topic 'cmake-cmp0054-warnings'
29c3edb8 Avoid if() quoted auto-dereference
2014-10-21 15:08:07 -04:00
Ben Boeckel 29c3edb87a Avoid if() quoted auto-dereference
When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly
dereference or quote the variable. We want if() to auto-dereference the
variable and not its value. Also replace MATCHES with STREQUAL where
equivalent.
2014-10-20 11:49:16 -04:00
Stephen Kelly 2db55ffa56 Remove borland workarounds.
CMake 3.0 is the last release to require to be able to build with
Borland.
2014-10-15 23:16:44 +02:00
Geoff Viola bef23e8181 Fix some spelling errors in comments 2014-10-13 10:00:53 -04:00
Brad King cede5cbd53 libarchive: Avoid depending on if() to dereference a quoted variable 2014-09-11 21:23:24 +02:00
Daniel Pfeifer 8436d18115 CMake: Enable use of liblzma in libarchive (#14504)
Build liblzma as part of CMake or find one on the system.  Modify our
port of libarchive to use the liblzma configured for use with CMake.
2014-07-29 08:45:36 -04:00
Brad King f56e74ef56 Merge topic 'hpux-libarchive-compile'
c1ddd77d libarchive: Fix compilation on Tru64 with F_SETTIMES
2014-06-09 10:36:13 -04:00
Brad King c1ddd77d0c libarchive: Fix compilation on Tru64 with F_SETTIMES
The parent commit left a typo in the conditional code path for Tru64.
Add the missing '.'.
2014-06-09 10:36:41 -04:00
Brad King 8c29d8d1e7 Merge topic 'hpux-libarchive-compile'
478b1c8b libarchive: fix compilation on newer HP-UX versions
2014-06-09 10:28:40 -04:00
Rolf Eike Beer 478b1c8b36 libarchive: fix compilation on newer HP-UX versions
Newer HP-UX versions (e.g. 11.31) also offers F_SETTIMES, but with a different
struct for the timing information.

Suggested-by: Eric Berge <ericmberge@gmail.com>
2014-06-09 10:15:27 -04:00
Brad King fe27c993ff Merge topic 'update-libarchive'
67f5f0a9 libarchive: Use _snprintf on Windows, not snprintf
fcfbb0a9 libarchive: Drop LIBARCHIVE_ADDITIONAL_LIBS, CMake does not need it
61a649d9 libarchive: Update README-CMake.txt for new snapshot
4533560c Merge branch 'libarchive-upstream' into update-libarchive
44d6b82f libarchive: Disable all whitespace checks in third-party code
37f225b7 libarchive 3.1.2-246-ga5a5d28b (reduced)
6ab7c326 libarchive: Avoid left-shift overflow of signed integer
2014-04-17 09:11:06 -04:00
Brad King 67f5f0a9fd libarchive: Use _snprintf on Windows, not snprintf 2014-04-15 16:52:18 -04:00
Brad King fcfbb0a924 libarchive: Drop LIBARCHIVE_ADDITIONAL_LIBS, CMake does not need it 2014-04-15 16:37:52 -04:00
Brad King 61a649d974 libarchive: Update README-CMake.txt for new snapshot 2014-04-15 16:36:44 -04:00
Brad King 4533560c23 Merge branch 'libarchive-upstream' into update-libarchive
Resolve conflicts in Utilities/cmlibarchive/CMakeLists.txt as
appropriate.
2014-04-15 16:34:50 -04:00
Brad King 44d6b82f43 libarchive: Disable all whitespace checks in third-party code 2014-04-15 16:34:17 -04:00
Brad King 6ab7c32648 libarchive: Avoid left-shift overflow of signed integer
In libarchive/archive_write_set_format_zip.c there are two calls to
archive_le32enc whose second argument is of the form

 archive_entry_mode(zip->entry) << 16

However, the return type from archive_entry_mode may be a signed integer
so the shift may overflow.  Since the second argument of archive_le32enc
expects uint32_t anyway, simply cast to that prior to shifting.
2014-04-15 09:08:20 -04:00
Mike Crowe d9b591790e libarchive: Skip finding libacl.h when ENABLE_ACL is OFF (#14866) 2014-04-14 09:34:12 -04:00
Brad King 5a58efaac3 libarchive: Avoid using name 'u_long'
The system headers on some platforms define a 'u_long' type so we cannot
use the name.  Spell out 'unsigned long' instead.
2014-04-11 09:01:27 -04:00
Brad King 8088332178 libarchive: Do not require includers to have windows.h
In archive_entry.h refer to "BY_HANDLE_FILE_INFORMATION *" using
"struct _BY_HANDLE_FILE_INFORMATION *" to avoid requiring the
includer to already have <windows.h>.
2014-04-03 15:20:53 -04:00
Brad King dfb0458e5b libarchive: Convert literal LL suffix to ARCHIVE_LITERAL_LL 2014-04-03 15:20:53 -04:00
Brad King b0a9807f39 libarchive: Update archive_util.c to use CMake zlib and bzip2 headers 2014-04-03 15:20:53 -04:00
Brad King debe4decce libarchive: Drop options not present in reduced version
Drop ENABLE_TAR and ENABLE_CPIO related options because we do not build
these command-line tools.  Drop ENABLE_TEST and ENABLE_COVERAGE options
because we do not build the tests.
2014-04-03 15:03:48 -04:00
Brad King 66b0c4fa19 libarchive: Do not generate a pkg-config file
CMake does not install the headers or libraries so skip the .pc file
too.
2014-04-03 15:03:43 -04:00
Brad King 8092e759ea libarchive: Update README-CMake.txt for new snapshot 2014-04-03 15:03:39 -04:00
Brad King 2f1978632b Merge branch 'libarchive-upstream' into update-libarchive
Resolve conflicts in favor of the upstream side where possible.
Resolve a logical conflict in archive_windows.h where the upstream
port to Watcom was done slightly differently from ours.
2014-04-03 15:02:49 -04:00
Brad King 23e4666cf5 libarchive: Disable more whitespace checks in third-party code 2014-04-03 14:37:13 -04:00
Jiri Malak 52285a993b libarchive: Fix compliation with Open Watcom 2014-03-09 10:36:21 -04:00
Ruslan Baratov 9e41eb68ec Fix wording of "the the" typos throughout text 2014-01-03 11:35:32 -05:00
Brad King 0bff4df5f6 libarchive: Use ARCHIVE_LITERAL_ULL to add ULL integer suffix
The macro maps to an implementation that works on older compilers
when necessary.
2013-12-09 14:04:24 -05:00
Brad King 61b39af353 libarchive: Port upstream issue 320 second fix
Port upstream commit 6cf33c93 (Issue 320: Rewrite (again) to avoid
the left shift that CLang dislikes so much, 2013-12-07) into CMake.

Inspired-by: Tim Kientzle <kientzle@freebsd.org>
2013-12-09 12:55:21 -05:00
Brad King 5ee1297d6b libarchive: Port upstream issue 320 fix
Port upstream commit 533e8fda (Rework the sign-extension to avoid
left-shift of an explicit negative number, 2013-06-29) into CMake.

Inspired-by: Tim Kientzle <kientzle@freebsd.org>
2013-11-25 11:16:45 -05:00
Daniele E. Domenichelli 15610bb5b1 Drop use of configure_file IMMEDIATE option
Since commit 7d47c693 (Drop compatibility with CMake < 2.4, 2013-10-08)
we no longer need to use the configure_file IMMEDIATE option to support
compatibility modes less than 2.0.
2013-11-13 10:12:17 -05:00
Brad King ab65862417 Clang: Add separate "AppleClang" compiler id
Apple distributes their own Clang build with their own version numbers
that differ from upstream Clang.  Use the __apple_build_version__ symbol
to identify the Apple Clang compiler and report the Apple Build Version
as the fourth version component in CMAKE_<LANG>_COMPILER_VERSION.  Add
Compiler/AppleClang-<lang> and Platform/Darwin-AppleClang-<lang> modules
that simply include the upstream equivalents.

Fix comparisons of CMAKE_<LANG>_COMPILER_ID to Clang in CMake's own
source and tests to account for AppleClang.
2013-10-07 20:12:46 -04:00
Brad King df62f64db7 Clean up install rules of CMake itself (#14371)
Ensure CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR are always
relative paths in CMake code, and set defaults accordingly.  Use the
install() command instead of install_files() and install_targets().
This is more modern and also avoids stripping of the first character
from user-specified destinations.

While at it, fix the default destinations reported in the bootstrap
help.
2013-08-26 11:54:07 -04:00
Brad King 26fe7e3adf libarchive: Backport to CMake 2.8.2
Avoid requiring CMake 2.8.6 for CMakePushCheckState or CMake 2.8.8 for
CMakeExpandImportedTargets.  Drop the custom versions of CMake modules
CheckCSource(Compiles|Runs) because we do not use the SAFESEH option
anyway.
2013-07-31 08:22:15 -04:00
Brad King b81a4e1568 libarchive: Remove build options not used by CMake
Drop options POSIX_REGEX_LIB and ENABLE_SAFESEH that we do not want for
the CMake build of libarchive.
2013-07-31 08:21:20 -04:00
Brad King 3218f52f11 libarchive: Avoid struct init with variable
Compilers such as Borland and MIPSpro do not like struct initialization
with variables.  Initialize using assignment instead.
2013-07-31 08:20:24 -04:00
Brad King bae3a73cee libarchive: Silence API deprecation warnings
CMake uses old libarchive APIs for now.
2013-07-31 08:20:05 -04:00
Brad King 677384017a libarchive: Include cm_zlib.h to get zlib used by CMake
Follow up change from commit ffa6faa4 (libarchive: Include cm_zlib.h to
get zlib used by CMake, 2011-12-20) for new includes of zlib.h in
updated libarchive.
2013-07-31 08:19:58 -04:00
Brad King 8dc0a9f898 libarchive: Update README-CMake.txt for new snapshot 2013-07-31 08:19:48 -04:00
Brad King 102071f80c Merge branch 'libarchive-upstream' into update-libarchive
Conflicts:
	Utilities/cmlibarchive/CMakeLists.txt
	Utilities/cmlibarchive/libarchive/archive.h
	Utilities/cmlibarchive/libarchive/archive_entry.h
	Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
	Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c
	Utilities/cmlibarchive/libarchive/archive_windows.h
	Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c
2013-07-31 08:19:13 -04:00
Ömer Fadıl USTA 499531c64e libarchive: Fix free() order to avoid accessing freed memory
The archive_string_conv type sc variable already freed via free(sc) on
the other hand in second line we are tyring to free its subset via
free(sc->from_charset) this will cause a problem because we couldn't
reach sc after first release.

Reviewed-by: Igor Murzov <e-mail@date.by>
2013-07-15 10:20:00 -04:00
Andreas Mohr bf019d765d Fix spelling and typos (non-binary) 2013-05-07 08:39:19 -04:00