diff options
author | Brad King <brad.king@kitware.com> | 2016-06-30 13:47:33 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-06-30 13:47:33 (GMT) |
commit | 21afc0291e9aa9ace69da008e267dfc3c278eca0 (patch) | |
tree | bcbd149e1ef3a7a0f6b07d2e3a055954bf4bab17 | |
parent | b399d135683cfffcef727bc1b5bb795f0172036b (diff) | |
parent | 60212979ea6cf92be7557358ef89484317ae0340 (diff) | |
download | CMake-21afc0291e9aa9ace69da008e267dfc3c278eca0.zip CMake-21afc0291e9aa9ace69da008e267dfc3c278eca0.tar.gz CMake-21afc0291e9aa9ace69da008e267dfc3c278eca0.tar.bz2 |
Merge topic 'update-liblzma'
60212979 Merge branch 'upstream-liblzma' into update-liblzma
e4d39146 liblzma 2014-12-21 (265e5ffb)
d4f52404 liblzma: Revise update script to get version 5.0.8
bf969198 Merge branch 'upstream-liblzma' into update-liblzma
ca4276e4 liblzma: Remove CMake-specific README
d38a37ea liblzma 2013-06-30 (b69900ed)
ec8f744a Add script to update liblzma from upstream
-rwxr-xr-x | Utilities/Scripts/update-liblzma.bash | 30 | ||||
-rw-r--r-- | Utilities/cmliblzma/README-CMake.txt | 66 | ||||
-rw-r--r-- | Utilities/cmliblzma/liblzma/api/lzma/block.h | 3 | ||||
-rw-r--r-- | Utilities/cmliblzma/liblzma/api/lzma/version.h | 2 | ||||
-rw-r--r-- | Utilities/cmliblzma/liblzma/check/crc32_fast.c | 2 | ||||
-rw-r--r-- | Utilities/cmliblzma/liblzma/check/sha256.c | 2 | ||||
-rw-r--r-- | Utilities/cmliblzma/liblzma/lzma/lzma_encoder_presets.c | 9 |
7 files changed, 41 insertions, 73 deletions
diff --git a/Utilities/Scripts/update-liblzma.bash b/Utilities/Scripts/update-liblzma.bash new file mode 100755 index 0000000..088eb91 --- /dev/null +++ b/Utilities/Scripts/update-liblzma.bash @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -e +set -x +shopt -s dotglob + +readonly name="liblzma" +readonly ownership="liblzma upstream <xz-devel@tukaani.org>" +readonly subtree="Utilities/cmliblzma" +readonly repo="http://git.tukaani.org/xz.git" +readonly tag="v5.0.8" +readonly shortlog=false +readonly paths=" + COPYING + src/common/common_w32res.rc + src/common/sysdefs.h + src/common/tuklib_integer.h + src/liblzma/ +" + +extract_source () { + git_archive + pushd "${extractdir}/${name}-reduced" + mv src/common . + mv src/liblzma . + rmdir src + popd +} + +. "${BASH_SOURCE%/*}/update-third-party.bash" diff --git a/Utilities/cmliblzma/README-CMake.txt b/Utilities/cmliblzma/README-CMake.txt deleted file mode 100644 index b512997..0000000 --- a/Utilities/cmliblzma/README-CMake.txt +++ /dev/null @@ -1,66 +0,0 @@ -The Utilities/cmliblzma directory contains a reduced distribution -of the liblzma source tree with only the library source code and -CMake build system. It is not a submodule; the actual content is part -of our source tree and changes can be made and committed directly. - -We update from upstream using Git's "subtree" merge strategy. A -special branch contains commits of upstream liblzma snapshots and -nothing else. No Git ref points explicitly to the head of this -branch, but it is merged into our history. - -Update liblzma from upstream as follows. Create a local branch to -explicitly reference the upstream snapshot branch head: - - git branch liblzma-upstream c289e634 - -Use a temporary directory to checkout the branch: - - mkdir liblzma-tmp - cd liblzma-tmp - git init - git pull .. liblzma-upstream - rm -rf * - -Now place the (reduced) liblzma content in this directory. See -instructions shown by - - git log c289e634 - -for help extracting the content from the upstream svn repo. Then run -the following commands to commit the new version. Substitute the -appropriate date and version number: - - git add --all - - GIT_AUTHOR_NAME='liblzma upstream' \ - GIT_AUTHOR_EMAIL='xz-devel@tukaani.org' \ - GIT_AUTHOR_DATE='Sun Jun 30 19:55:49 2013 +0300' \ - git commit -m 'liblzma 5.0.5-gb69900ed (reduced)' && - git commit --amend - -Edit the commit message to describe the procedure used to obtain the -content. Then push the changes back up to the main local repository: - - git push .. HEAD:liblzma-upstream - cd .. - rm -rf liblzma-tmp - -Create a topic in the main repository on which to perform the update: - - git checkout -b update-liblzma master - -Merge the liblzma-upstream branch as a subtree: - - git merge -s recursive -X subtree=Utilities/cmliblzma \ - liblzma-upstream - -If there are conflicts, resolve them and commit. Build and test the -tree. Commit any additional changes needed to succeed. - -Finally, run - - git rev-parse --short=8 liblzma-upstream - -to get the commit from which the liblzma-upstream branch must be started -on the next update. Edit the "git branch liblzma-upstream" line above to -record it, and commit this file. diff --git a/Utilities/cmliblzma/liblzma/api/lzma/block.h b/Utilities/cmliblzma/liblzma/api/lzma/block.h index 8a4bf23..e6710a7 100644 --- a/Utilities/cmliblzma/liblzma/api/lzma/block.h +++ b/Utilities/cmliblzma/liblzma/api/lzma/block.h @@ -318,6 +318,9 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode( * The size of the Block Header must have already been decoded with * lzma_block_header_size_decode() macro and stored to block->header_size. * + * The integrity check type from Stream Header must have been stored + * to block->check. + * * block->filters must have been allocated, but they don't need to be * initialized (possible existing filter options are not freed). * diff --git a/Utilities/cmliblzma/liblzma/api/lzma/version.h b/Utilities/cmliblzma/liblzma/api/lzma/version.h index 66e9396..09866b9 100644 --- a/Utilities/cmliblzma/liblzma/api/lzma/version.h +++ b/Utilities/cmliblzma/liblzma/api/lzma/version.h @@ -22,7 +22,7 @@ */ #define LZMA_VERSION_MAJOR 5 #define LZMA_VERSION_MINOR 0 -#define LZMA_VERSION_PATCH 5 +#define LZMA_VERSION_PATCH 8 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE #ifndef LZMA_VERSION_COMMIT diff --git a/Utilities/cmliblzma/liblzma/check/crc32_fast.c b/Utilities/cmliblzma/liblzma/check/crc32_fast.c index 13f65b4..c2c3cb7 100644 --- a/Utilities/cmliblzma/liblzma/check/crc32_fast.c +++ b/Utilities/cmliblzma/liblzma/check/crc32_fast.c @@ -20,7 +20,7 @@ #include "crc_macros.h" -// If you make any changes, do some bench marking! Seemingly unrelated +// If you make any changes, do some benchmarking! Seemingly unrelated // changes can very easily ruin the performance (and very probably is // very compiler dependent). extern LZMA_API(uint32_t) diff --git a/Utilities/cmliblzma/liblzma/check/sha256.c b/Utilities/cmliblzma/liblzma/check/sha256.c index c2c85eb..3af6aa6 100644 --- a/Utilities/cmliblzma/liblzma/check/sha256.c +++ b/Utilities/cmliblzma/liblzma/check/sha256.c @@ -80,7 +80,7 @@ static const uint32_t SHA256_K[64] = { static void -transform(uint32_t state[], const uint32_t data[]) +transform(uint32_t state[8], const uint32_t data[16]) { uint32_t W[16]; uint32_t T[8]; diff --git a/Utilities/cmliblzma/liblzma/lzma/lzma_encoder_presets.c b/Utilities/cmliblzma/liblzma/lzma/lzma_encoder_presets.c index 8af9b9f..9332abf 100644 --- a/Utilities/cmliblzma/liblzma/lzma/lzma_encoder_presets.c +++ b/Utilities/cmliblzma/liblzma/lzma/lzma_encoder_presets.c @@ -16,8 +16,9 @@ extern LZMA_API(lzma_bool) lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset) { - static const uint8_t dict_size_values[] = { 18, 20, 21, 22, 22, 23, 23, 24, 25, 26 }; - static const uint8_t depth_values[] = { 4, 8, 24, 48 }; + static const uint8_t dict_pow2[] + = { 18, 20, 21, 22, 22, 23, 23, 24, 25, 26 }; + static const uint8_t depths[] = { 4, 8, 24, 48 }; const uint32_t level = preset & LZMA_PRESET_LEVEL_MASK; const uint32_t flags = preset & ~LZMA_PRESET_LEVEL_MASK; @@ -33,13 +34,13 @@ lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset) options->lp = LZMA_LP_DEFAULT; options->pb = LZMA_PB_DEFAULT; - options->dict_size = UINT32_C(1) << dict_size_values[level]; + options->dict_size = UINT32_C(1) << dict_pow2[level]; if (level <= 3) { options->mode = LZMA_MODE_FAST; options->mf = level == 0 ? LZMA_MF_HC3 : LZMA_MF_HC4; options->nice_len = level <= 1 ? 128 : 273; - options->depth = depth_values[level]; + options->depth = depths[level]; } else { options->mode = LZMA_MODE_NORMAL; options->mf = LZMA_MF_BT4; |