rugged 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -0
- data/README.md +3 -3
- data/ext/rugged/rugged.c +7 -4
- data/ext/rugged/rugged_commit.c +1 -1
- data/ext/rugged/rugged_config.c +1 -1
- data/ext/rugged/rugged_object.c +1 -1
- data/ext/rugged/rugged_remote.c +32 -2
- data/ext/rugged/rugged_repo.c +13 -3
- data/lib/rugged/commit.rb +17 -4
- data/lib/rugged/repository.rb +7 -8
- data/lib/rugged/submodule_collection.rb +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +41 -74
- data/vendor/libgit2/COPYING +109 -1
- data/vendor/libgit2/cmake/{Modules/AddCFlagIfSupported.cmake → AddCFlagIfSupported.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/EnableWarnings.cmake → EnableWarnings.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindCoreFoundation.cmake → FindCoreFoundation.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindGSSAPI.cmake → FindGSSAPI.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindGSSFramework.cmake → FindGSSFramework.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindHTTP_Parser.cmake → FindHTTP_Parser.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindIconv.cmake → FindIconv.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindPCRE.cmake → FindPCRE.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindPCRE2.cmake → FindPCRE2.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindPkgLibraries.cmake → FindPkgLibraries.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindSecurity.cmake → FindSecurity.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindStatNsec.cmake → FindStatNsec.cmake} +0 -0
- data/vendor/libgit2/cmake/Findfutimens.cmake +14 -0
- data/vendor/libgit2/cmake/{Modules/FindmbedTLS.cmake → FindmbedTLS.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/IdeSplitSources.cmake → IdeSplitSources.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/PkgBuildConfig.cmake → PkgBuildConfig.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/SanitizeBool.cmake → SanitizeBool.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/SelectGSSAPI.cmake → SelectGSSAPI.cmake} +18 -26
- data/vendor/libgit2/cmake/{Modules/SelectHTTPSBackend.cmake → SelectHTTPSBackend.cmake} +29 -32
- data/vendor/libgit2/cmake/{Modules/SelectHashes.cmake → SelectHashes.cmake} +21 -28
- data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +101 -0
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +4 -3
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +24 -10
- data/vendor/libgit2/deps/ntlmclient/compat.h +0 -27
- data/vendor/libgit2/deps/ntlmclient/crypt.h +14 -9
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +20 -20
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +3 -3
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +37 -36
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +4 -3
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +178 -51
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +74 -5
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +164 -135
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +13 -9
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +16 -3
- data/vendor/libgit2/deps/ntlmclient/unicode.h +10 -4
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +16 -27
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.h +20 -0
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +28 -52
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.h +22 -0
- data/vendor/libgit2/deps/ntlmclient/util.c +15 -1
- data/vendor/libgit2/deps/ntlmclient/util.h +2 -1
- data/vendor/libgit2/deps/pcre/LICENCE +93 -0
- data/vendor/libgit2/deps/pcre/pcre.h +2 -2
- data/vendor/libgit2/deps/pcre/pcre_compile.c +29 -17
- data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +4 -4
- data/vendor/libgit2/deps/pcre/pcreposix.c +2 -3
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -5
- data/vendor/libgit2/deps/zlib/deflate.c +1 -0
- data/vendor/libgit2/include/git2/annotated_commit.h +1 -1
- data/vendor/libgit2/include/git2/apply.h +2 -0
- data/vendor/libgit2/include/git2/attr.h +89 -0
- data/vendor/libgit2/include/git2/blame.h +95 -42
- data/vendor/libgit2/include/git2/blob.h +31 -3
- data/vendor/libgit2/include/git2/branch.h +25 -0
- data/vendor/libgit2/include/git2/cert.h +42 -5
- data/vendor/libgit2/include/git2/checkout.h +28 -12
- data/vendor/libgit2/include/git2/commit.h +35 -19
- data/vendor/libgit2/include/git2/common.h +33 -6
- data/vendor/libgit2/include/git2/config.h +1 -1
- data/vendor/libgit2/include/git2/deprecated.h +248 -8
- data/vendor/libgit2/include/git2/diff.h +35 -20
- data/vendor/libgit2/include/git2/errors.h +8 -7
- data/vendor/libgit2/include/git2/filter.h +57 -17
- data/vendor/libgit2/include/git2/graph.h +20 -2
- data/vendor/libgit2/include/git2/index.h +4 -5
- data/vendor/libgit2/include/git2/indexer.h +2 -1
- data/vendor/libgit2/include/git2/odb.h +44 -20
- data/vendor/libgit2/include/git2/pack.h +1 -1
- data/vendor/libgit2/include/git2/patch.h +8 -0
- data/vendor/libgit2/include/git2/rebase.h +25 -1
- data/vendor/libgit2/include/git2/refs.h +9 -5
- data/vendor/libgit2/include/git2/remote.h +59 -6
- data/vendor/libgit2/include/git2/repository.h +95 -52
- data/vendor/libgit2/include/git2/revparse.h +5 -5
- data/vendor/libgit2/include/git2/status.h +115 -59
- data/vendor/libgit2/include/git2/strarray.h +6 -10
- data/vendor/libgit2/include/git2/submodule.h +9 -0
- data/vendor/libgit2/include/git2/sys/commit_graph.h +174 -0
- data/vendor/libgit2/include/git2/sys/filter.h +49 -28
- data/vendor/libgit2/include/git2/sys/midx.h +74 -0
- data/vendor/libgit2/include/git2/sys/odb_backend.h +7 -0
- data/vendor/libgit2/include/git2/sys/transport.h +1 -0
- data/vendor/libgit2/include/git2/tag.h +12 -0
- data/vendor/libgit2/include/git2/transport.h +1 -1
- data/vendor/libgit2/include/git2/tree.h +2 -14
- data/vendor/libgit2/include/git2/types.h +9 -0
- data/vendor/libgit2/include/git2/version.h +3 -3
- data/vendor/libgit2/include/git2/worktree.h +1 -0
- data/vendor/libgit2/src/CMakeLists.txt +77 -44
- data/vendor/libgit2/src/alloc.c +21 -8
- data/vendor/libgit2/src/allocators/failalloc.c +92 -0
- data/vendor/libgit2/src/allocators/failalloc.h +23 -0
- data/vendor/libgit2/src/allocators/stdalloc.c +41 -10
- data/vendor/libgit2/src/allocators/win32_leakcheck.c +118 -0
- data/vendor/libgit2/src/allocators/{win32_crtdbg.h → win32_leakcheck.h} +3 -3
- data/vendor/libgit2/src/annotated_commit.c +21 -9
- data/vendor/libgit2/src/apply.c +21 -8
- data/vendor/libgit2/src/array.h +11 -11
- data/vendor/libgit2/src/assert_safe.h +58 -0
- data/vendor/libgit2/src/attr.c +181 -74
- data/vendor/libgit2/src/attr_file.c +92 -42
- data/vendor/libgit2/src/attr_file.h +32 -11
- data/vendor/libgit2/src/attrcache.c +44 -40
- data/vendor/libgit2/src/attrcache.h +4 -5
- data/vendor/libgit2/src/blame.c +28 -15
- data/vendor/libgit2/src/blame_git.c +6 -3
- data/vendor/libgit2/src/blob.c +46 -24
- data/vendor/libgit2/src/branch.c +87 -37
- data/vendor/libgit2/src/buffer.c +339 -27
- data/vendor/libgit2/src/buffer.h +153 -2
- data/vendor/libgit2/src/cache.c +3 -24
- data/vendor/libgit2/src/cache.h +7 -7
- data/vendor/libgit2/src/cc-compat.h +10 -2
- data/vendor/libgit2/src/checkout.c +97 -98
- data/vendor/libgit2/src/cherrypick.c +8 -2
- data/vendor/libgit2/src/clone.c +104 -29
- data/vendor/libgit2/src/commit.c +41 -28
- data/vendor/libgit2/src/commit_graph.c +1209 -0
- data/vendor/libgit2/src/commit_graph.h +162 -0
- data/vendor/libgit2/src/commit_list.c +46 -0
- data/vendor/libgit2/src/commit_list.h +2 -0
- data/vendor/libgit2/src/common.h +26 -2
- data/vendor/libgit2/src/config.c +40 -22
- data/vendor/libgit2/src/config_cache.c +9 -4
- data/vendor/libgit2/src/config_entries.c +35 -27
- data/vendor/libgit2/src/config_file.c +25 -8
- data/vendor/libgit2/src/config_parse.c +5 -7
- data/vendor/libgit2/src/config_snapshot.c +2 -1
- data/vendor/libgit2/src/crlf.c +16 -6
- data/vendor/libgit2/src/date.c +4 -3
- data/vendor/libgit2/src/delta.c +1 -1
- data/vendor/libgit2/src/describe.c +11 -4
- data/vendor/libgit2/src/diff.c +23 -19
- data/vendor/libgit2/src/diff_driver.c +21 -17
- data/vendor/libgit2/src/diff_file.c +5 -7
- data/vendor/libgit2/src/diff_generate.c +56 -28
- data/vendor/libgit2/src/diff_parse.c +2 -3
- data/vendor/libgit2/src/diff_print.c +81 -65
- data/vendor/libgit2/src/diff_stats.c +19 -16
- data/vendor/libgit2/src/diff_tform.c +13 -13
- data/vendor/libgit2/src/diff_xdiff.c +4 -2
- data/vendor/libgit2/src/diff_xdiff.h +1 -1
- data/vendor/libgit2/src/errors.c +26 -19
- data/vendor/libgit2/src/features.h.in +5 -1
- data/vendor/libgit2/src/fetch.c +7 -2
- data/vendor/libgit2/src/fetchhead.c +8 -4
- data/vendor/libgit2/src/filebuf.c +9 -7
- data/vendor/libgit2/src/filter.c +209 -113
- data/vendor/libgit2/src/filter.h +24 -5
- data/vendor/libgit2/src/futils.c +8 -8
- data/vendor/libgit2/src/futils.h +4 -4
- data/vendor/libgit2/src/graph.c +64 -9
- data/vendor/libgit2/src/hash/sha1/collisiondetect.c +3 -3
- data/vendor/libgit2/src/hash/sha1/common_crypto.c +3 -3
- data/vendor/libgit2/src/hash/sha1/generic.h +1 -1
- data/vendor/libgit2/src/hash/sha1/mbedtls.c +12 -12
- data/vendor/libgit2/src/hash/sha1/openssl.c +3 -3
- data/vendor/libgit2/src/hash/sha1/sha1dc/sha1.c +0 -2
- data/vendor/libgit2/src/hash/sha1/win32.c +15 -11
- data/vendor/libgit2/src/hash.c +16 -13
- data/vendor/libgit2/src/hash.h +1 -1
- data/vendor/libgit2/src/hashsig.c +23 -10
- data/vendor/libgit2/src/ident.c +13 -3
- data/vendor/libgit2/src/idxmap.c +0 -22
- data/vendor/libgit2/src/ignore.c +35 -19
- data/vendor/libgit2/src/index.c +126 -84
- data/vendor/libgit2/src/index.h +1 -1
- data/vendor/libgit2/src/indexer.c +60 -36
- data/vendor/libgit2/src/integer.h +79 -2
- data/vendor/libgit2/src/iterator.c +40 -28
- data/vendor/libgit2/src/iterator.h +1 -1
- data/vendor/libgit2/src/khash.h +2 -11
- data/vendor/libgit2/src/{settings.c → libgit2.c} +125 -49
- data/vendor/libgit2/src/libgit2.h +15 -0
- data/vendor/libgit2/src/mailmap.c +23 -10
- data/vendor/libgit2/src/map.h +3 -3
- data/vendor/libgit2/src/merge.c +108 -46
- data/vendor/libgit2/src/merge.h +2 -1
- data/vendor/libgit2/src/merge_driver.c +19 -13
- data/vendor/libgit2/src/merge_file.c +15 -9
- data/vendor/libgit2/src/message.c +3 -1
- data/vendor/libgit2/src/midx.c +879 -0
- data/vendor/libgit2/src/midx.h +110 -0
- data/vendor/libgit2/src/mwindow.c +214 -95
- data/vendor/libgit2/src/mwindow.h +3 -3
- data/vendor/libgit2/src/net.c +133 -4
- data/vendor/libgit2/src/net.h +16 -2
- data/vendor/libgit2/src/netops.c +6 -4
- data/vendor/libgit2/src/netops.h +2 -2
- data/vendor/libgit2/src/notes.c +10 -10
- data/vendor/libgit2/src/object.c +24 -15
- data/vendor/libgit2/src/odb.c +298 -57
- data/vendor/libgit2/src/odb.h +16 -2
- data/vendor/libgit2/src/odb_loose.c +31 -21
- data/vendor/libgit2/src/odb_mempack.c +3 -1
- data/vendor/libgit2/src/odb_pack.c +391 -114
- data/vendor/libgit2/src/oid.c +7 -4
- data/vendor/libgit2/src/pack-objects.c +83 -69
- data/vendor/libgit2/src/pack.c +383 -150
- data/vendor/libgit2/src/pack.h +44 -9
- data/vendor/libgit2/src/patch.c +14 -7
- data/vendor/libgit2/src/patch_generate.c +3 -5
- data/vendor/libgit2/src/patch_parse.c +6 -3
- data/vendor/libgit2/src/path.c +102 -57
- data/vendor/libgit2/src/path.h +79 -6
- data/vendor/libgit2/src/pathspec.c +12 -11
- data/vendor/libgit2/src/pool.c +34 -22
- data/vendor/libgit2/src/pool.h +9 -1
- data/vendor/libgit2/src/posix.c +43 -12
- data/vendor/libgit2/src/posix.h +9 -0
- data/vendor/libgit2/src/proxy.c +2 -0
- data/vendor/libgit2/src/push.c +2 -0
- data/vendor/libgit2/src/reader.c +10 -6
- data/vendor/libgit2/src/rebase.c +95 -49
- data/vendor/libgit2/src/refdb.c +165 -13
- data/vendor/libgit2/src/refdb.h +69 -0
- data/vendor/libgit2/src/refdb_fs.c +144 -152
- data/vendor/libgit2/src/reflog.c +21 -20
- data/vendor/libgit2/src/refs.c +151 -231
- data/vendor/libgit2/src/refs.h +2 -20
- data/vendor/libgit2/src/refspec.c +80 -44
- data/vendor/libgit2/src/regexp.c +2 -2
- data/vendor/libgit2/src/remote.c +312 -121
- data/vendor/libgit2/src/remote.h +2 -1
- data/vendor/libgit2/src/repository.c +351 -189
- data/vendor/libgit2/src/repository.h +23 -29
- data/vendor/libgit2/src/reset.c +7 -6
- data/vendor/libgit2/src/revert.c +8 -2
- data/vendor/libgit2/src/revparse.c +19 -13
- data/vendor/libgit2/src/revwalk.c +35 -20
- data/vendor/libgit2/src/runtime.c +162 -0
- data/vendor/libgit2/src/runtime.h +62 -0
- data/vendor/libgit2/src/{refdb_fs.h → settings.h} +3 -11
- data/vendor/libgit2/src/signature.c +6 -5
- data/vendor/libgit2/src/sortedcache.c +2 -3
- data/vendor/libgit2/src/sortedcache.h +10 -8
- data/vendor/libgit2/src/stash.c +7 -3
- data/vendor/libgit2/src/status.c +9 -4
- data/vendor/libgit2/src/strarray.c +64 -0
- data/vendor/libgit2/src/streams/mbedtls.c +14 -17
- data/vendor/libgit2/src/streams/mbedtls.h +1 -1
- data/vendor/libgit2/src/streams/openssl.c +113 -207
- data/vendor/libgit2/src/streams/openssl.h +9 -1
- data/vendor/libgit2/src/streams/openssl_dynamic.c +309 -0
- data/vendor/libgit2/src/streams/openssl_dynamic.h +348 -0
- data/vendor/libgit2/src/streams/openssl_legacy.c +203 -0
- data/vendor/libgit2/src/streams/openssl_legacy.h +63 -0
- data/vendor/libgit2/src/streams/registry.c +10 -9
- data/vendor/libgit2/src/streams/socket.c +6 -2
- data/vendor/libgit2/src/streams/stransport.c +6 -3
- data/vendor/libgit2/src/streams/tls.c +5 -3
- data/vendor/libgit2/src/submodule.c +134 -66
- data/vendor/libgit2/src/submodule.h +9 -9
- data/vendor/libgit2/src/sysdir.c +8 -26
- data/vendor/libgit2/src/sysdir.h +0 -11
- data/vendor/libgit2/src/tag.c +49 -11
- data/vendor/libgit2/src/thread.c +140 -0
- data/vendor/libgit2/src/thread.h +479 -0
- data/vendor/libgit2/src/threadstate.c +83 -0
- data/vendor/libgit2/src/threadstate.h +24 -0
- data/vendor/libgit2/src/trace.c +2 -2
- data/vendor/libgit2/src/trace.h +17 -13
- data/vendor/libgit2/src/transaction.c +21 -9
- data/vendor/libgit2/src/transport.c +3 -3
- data/vendor/libgit2/src/transports/auth.c +1 -1
- data/vendor/libgit2/src/transports/auth_negotiate.c +11 -4
- data/vendor/libgit2/src/transports/auth_ntlm.c +10 -6
- data/vendor/libgit2/src/transports/credential.c +17 -7
- data/vendor/libgit2/src/transports/credential_helpers.c +2 -0
- data/vendor/libgit2/src/transports/git.c +1 -3
- data/vendor/libgit2/src/transports/http.c +19 -17
- data/vendor/libgit2/src/transports/http.h +1 -0
- data/vendor/libgit2/src/transports/httpclient.c +84 -42
- data/vendor/libgit2/src/transports/httpclient.h +1 -1
- data/vendor/libgit2/src/transports/local.c +5 -5
- data/vendor/libgit2/src/transports/smart.c +14 -9
- data/vendor/libgit2/src/transports/smart.h +1 -1
- data/vendor/libgit2/src/transports/smart_protocol.c +11 -5
- data/vendor/libgit2/src/transports/ssh.c +51 -17
- data/vendor/libgit2/src/transports/winhttp.c +156 -88
- data/vendor/libgit2/src/tree.c +100 -77
- data/vendor/libgit2/src/tree.h +1 -0
- data/vendor/libgit2/src/tsort.c +0 -2
- data/vendor/libgit2/src/unix/map.c +3 -1
- data/vendor/libgit2/src/unix/posix.h +16 -1
- data/vendor/libgit2/src/unix/pthread.h +2 -1
- data/vendor/libgit2/src/utf8.c +150 -0
- data/vendor/libgit2/src/utf8.h +52 -0
- data/vendor/libgit2/src/util.c +74 -183
- data/vendor/libgit2/src/util.h +33 -39
- data/vendor/libgit2/src/vector.c +23 -19
- data/vendor/libgit2/src/vector.h +4 -2
- data/vendor/libgit2/src/win32/findfile.c +4 -2
- data/vendor/libgit2/src/win32/git2.rc +18 -3
- data/vendor/libgit2/src/win32/map.c +1 -1
- data/vendor/libgit2/src/win32/msvc-compat.h +9 -1
- data/vendor/libgit2/src/win32/path_w32.c +23 -25
- data/vendor/libgit2/src/win32/path_w32.h +0 -1
- data/vendor/libgit2/src/win32/posix_w32.c +77 -1
- data/vendor/libgit2/src/win32/precompiled.h +0 -1
- data/vendor/libgit2/src/win32/reparse.h +4 -4
- data/vendor/libgit2/src/win32/thread.c +24 -15
- data/vendor/libgit2/src/win32/thread.h +1 -1
- data/vendor/libgit2/src/win32/w32_buffer.c +3 -3
- data/vendor/libgit2/src/win32/w32_common.h +18 -9
- data/vendor/libgit2/src/win32/{w32_crtdbg_stacktrace.c → w32_leakcheck.c} +269 -33
- data/vendor/libgit2/src/win32/w32_leakcheck.h +222 -0
- data/vendor/libgit2/src/win32/w32_util.h +6 -6
- data/vendor/libgit2/src/worktree.c +37 -15
- data/vendor/libgit2/src/zstream.c +1 -1
- metadata +56 -38
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in +0 -29
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake +0 -96
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
- data/vendor/libgit2/src/buf_text.c +0 -316
- data/vendor/libgit2/src/buf_text.h +0 -122
- data/vendor/libgit2/src/global.c +0 -361
- data/vendor/libgit2/src/global.h +0 -41
- data/vendor/libgit2/src/thread-utils.c +0 -58
- data/vendor/libgit2/src/thread-utils.h +0 -246
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +0 -127
- data/vendor/libgit2/src/win32/w32_stack.c +0 -188
- data/vendor/libgit2/src/win32/w32_stack.h +0 -140
data/vendor/libgit2/COPYING
CHANGED
|
@@ -420,7 +420,7 @@ The GNU C Library is free software; you can redistribute it and/or
|
|
|
420
420
|
modify it under the terms of the GNU Lesser General Public
|
|
421
421
|
License as published by the Free Software Foundation; either
|
|
422
422
|
version 2.1 of the License, or (at your option) any later version.
|
|
423
|
-
|
|
423
|
+
|
|
424
424
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
425
425
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
426
426
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
@@ -1019,3 +1019,111 @@ following restrictions are are met:
|
|
|
1019
1019
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
|
1020
1020
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
|
1021
1021
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
1022
|
+
|
|
1023
|
+
----------------------------------------------------------------------
|
|
1024
|
+
|
|
1025
|
+
Portions of the OpenSSL headers are included under the OpenSSL license:
|
|
1026
|
+
|
|
1027
|
+
Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
|
1028
|
+
All rights reserved.
|
|
1029
|
+
|
|
1030
|
+
This package is an SSL implementation written
|
|
1031
|
+
by Eric Young (eay@cryptsoft.com).
|
|
1032
|
+
The implementation was written so as to conform with Netscapes SSL.
|
|
1033
|
+
|
|
1034
|
+
This library is free for commercial and non-commercial use as long as
|
|
1035
|
+
the following conditions are aheared to. The following conditions
|
|
1036
|
+
apply to all code found in this distribution, be it the RC4, RSA,
|
|
1037
|
+
lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
|
1038
|
+
included with this distribution is covered by the same copyright terms
|
|
1039
|
+
except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
|
1040
|
+
|
|
1041
|
+
Copyright remains Eric Young's, and as such any Copyright notices in
|
|
1042
|
+
the code are not to be removed.
|
|
1043
|
+
If this package is used in a product, Eric Young should be given attribution
|
|
1044
|
+
as the author of the parts of the library used.
|
|
1045
|
+
This can be in the form of a textual message at program startup or
|
|
1046
|
+
in documentation (online or textual) provided with the package.
|
|
1047
|
+
|
|
1048
|
+
Redistribution and use in source and binary forms, with or without
|
|
1049
|
+
modification, are permitted provided that the following conditions
|
|
1050
|
+
are met:
|
|
1051
|
+
1. Redistributions of source code must retain the copyright
|
|
1052
|
+
notice, this list of conditions and the following disclaimer.
|
|
1053
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
1054
|
+
notice, this list of conditions and the following disclaimer in the
|
|
1055
|
+
documentation and/or other materials provided with the distribution.
|
|
1056
|
+
3. All advertising materials mentioning features or use of this software
|
|
1057
|
+
must display the following acknowledgement:
|
|
1058
|
+
"This product includes cryptographic software written by
|
|
1059
|
+
Eric Young (eay@cryptsoft.com)"
|
|
1060
|
+
The word 'cryptographic' can be left out if the rouines from the library
|
|
1061
|
+
being used are not cryptographic related :-).
|
|
1062
|
+
4. If you include any Windows specific code (or a derivative thereof) from
|
|
1063
|
+
the apps directory (application code) you must include an acknowledgement:
|
|
1064
|
+
"This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
|
1065
|
+
|
|
1066
|
+
THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
|
1067
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
1068
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
1069
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
1070
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
1071
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
1072
|
+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
1073
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
1074
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
1075
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
1076
|
+
SUCH DAMAGE.
|
|
1077
|
+
|
|
1078
|
+
The licence and distribution terms for any publically available version or
|
|
1079
|
+
derivative of this code cannot be changed. i.e. this code cannot simply be
|
|
1080
|
+
copied and put under another distribution licence
|
|
1081
|
+
[including the GNU Public Licence.]
|
|
1082
|
+
|
|
1083
|
+
====================================================================
|
|
1084
|
+
Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved.
|
|
1085
|
+
|
|
1086
|
+
Redistribution and use in source and binary forms, with or without
|
|
1087
|
+
modification, are permitted provided that the following conditions
|
|
1088
|
+
are met:
|
|
1089
|
+
|
|
1090
|
+
1. Redistributions of source code must retain the above copyright
|
|
1091
|
+
notice, this list of conditions and the following disclaimer.
|
|
1092
|
+
|
|
1093
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
1094
|
+
notice, this list of conditions and the following disclaimer in
|
|
1095
|
+
the documentation and/or other materials provided with the
|
|
1096
|
+
distribution.
|
|
1097
|
+
|
|
1098
|
+
3. All advertising materials mentioning features or use of this
|
|
1099
|
+
software must display the following acknowledgment:
|
|
1100
|
+
"This product includes software developed by the OpenSSL Project
|
|
1101
|
+
for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
|
1102
|
+
|
|
1103
|
+
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
1104
|
+
endorse or promote products derived from this software without
|
|
1105
|
+
prior written permission. For written permission, please contact
|
|
1106
|
+
openssl-core@openssl.org.
|
|
1107
|
+
|
|
1108
|
+
5. Products derived from this software may not be called "OpenSSL"
|
|
1109
|
+
nor may "OpenSSL" appear in their names without prior written
|
|
1110
|
+
permission of the OpenSSL Project.
|
|
1111
|
+
|
|
1112
|
+
6. Redistributions of any form whatsoever must retain the following
|
|
1113
|
+
acknowledgment:
|
|
1114
|
+
"This product includes software developed by the OpenSSL Project
|
|
1115
|
+
for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
|
1116
|
+
|
|
1117
|
+
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
1118
|
+
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
1119
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
1120
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
1121
|
+
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
1122
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
1123
|
+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
1124
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
1125
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
1126
|
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
1127
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
1128
|
+
OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1129
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
INCLUDE(EnableWarnings)
|
|
2
|
+
|
|
3
|
+
IF (APPLE)
|
|
4
|
+
# We cannot simply CHECK_FUNCTION_EXISTS on macOS because
|
|
5
|
+
# MACOSX_DEPLOYMENT_TARGET may be set to a version in the past
|
|
6
|
+
# that doesn't have futimens. Instead we need to enable warnings
|
|
7
|
+
# as errors, then check for the symbol existing in `sys/stat.h`,
|
|
8
|
+
# then reset warnings as errors.
|
|
9
|
+
ENABLE_WARNINGS(error)
|
|
10
|
+
CHECK_SYMBOL_EXISTS(futimens sys/stat.h HAVE_FUTIMENS)
|
|
11
|
+
DISABLE_WARNINGS(error)
|
|
12
|
+
ELSE ()
|
|
13
|
+
CHECK_FUNCTION_EXISTS(futimens HAVE_FUTIMENS)
|
|
14
|
+
ENDIF ()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
# Select the backend to use
|
|
2
|
-
|
|
3
|
-
# We try to find any packages our backends might use
|
|
4
|
-
|
|
5
1
|
INCLUDE(SanitizeBool)
|
|
6
2
|
|
|
3
|
+
# We try to find any packages our backends might use
|
|
7
4
|
FIND_PACKAGE(GSSAPI)
|
|
8
5
|
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
9
6
|
INCLUDE(FindGSSFramework)
|
|
10
7
|
ENDIF()
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
IF (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
9
|
+
IF(USE_GSSAPI)
|
|
10
|
+
# Auto-select GSS backend
|
|
11
|
+
SanitizeBool(USE_GSSAPI)
|
|
12
|
+
IF (USE_GSSAPI STREQUAL ON)
|
|
13
|
+
IF (GSSFRAMEWORK_FOUND)
|
|
14
|
+
SET(USE_GSSAPI "GSS.framework")
|
|
15
|
+
ELSEIF(GSSAPI_FOUND)
|
|
16
|
+
SET(USE_GSSAPI "gssapi")
|
|
17
|
+
ELSE()
|
|
18
|
+
MESSAGE(FATAL_ERROR "Unable to autodetect a usable GSS backend."
|
|
19
|
+
"Please pass the backend name explicitly (-DUSE_GSS=backend)")
|
|
20
|
+
ENDIF()
|
|
22
21
|
ENDIF()
|
|
23
|
-
ELSEIF(USE_GSSAPI)
|
|
24
|
-
# Backend was explicitly set
|
|
25
|
-
SET(GSS_BACKEND ${USE_GSSAPI})
|
|
26
|
-
ELSE()
|
|
27
|
-
SET(GSS_BACKEND NO)
|
|
28
|
-
ENDIF()
|
|
29
22
|
|
|
30
|
-
IF(GSS_BACKEND)
|
|
31
23
|
# Check that we can find what's required for the selected backend
|
|
32
|
-
IF (
|
|
24
|
+
IF (USE_GSSAPI STREQUAL "GSS.framework")
|
|
33
25
|
IF (NOT GSSFRAMEWORK_FOUND)
|
|
34
26
|
MESSAGE(FATAL_ERROR "Asked for GSS.framework backend, but it wasn't found")
|
|
35
27
|
ENDIF()
|
|
@@ -37,8 +29,8 @@ IF(GSS_BACKEND)
|
|
|
37
29
|
LIST(APPEND LIBGIT2_LIBS ${GSSFRAMEWORK_LIBRARIES})
|
|
38
30
|
|
|
39
31
|
SET(GIT_GSSFRAMEWORK 1)
|
|
40
|
-
ADD_FEATURE_INFO(SPNEGO GIT_GSSFRAMEWORK "SPNEGO authentication support (${
|
|
41
|
-
ELSEIF (
|
|
32
|
+
ADD_FEATURE_INFO(SPNEGO GIT_GSSFRAMEWORK "SPNEGO authentication support (${USE_GSSAPI})")
|
|
33
|
+
ELSEIF (USE_GSSAPI STREQUAL "gssapi")
|
|
42
34
|
IF (NOT GSSAPI_FOUND)
|
|
43
35
|
MESSAGE(FATAL_ERROR "Asked for gssapi GSS backend, but it wasn't found")
|
|
44
36
|
ENDIF()
|
|
@@ -46,9 +38,9 @@ IF(GSS_BACKEND)
|
|
|
46
38
|
LIST(APPEND LIBGIT2_LIBS ${GSSAPI_LIBRARIES})
|
|
47
39
|
|
|
48
40
|
SET(GIT_GSSAPI 1)
|
|
49
|
-
ADD_FEATURE_INFO(SPNEGO GIT_GSSAPI "SPNEGO authentication support (${
|
|
41
|
+
ADD_FEATURE_INFO(SPNEGO GIT_GSSAPI "SPNEGO authentication support (${USE_GSSAPI})")
|
|
50
42
|
ELSE()
|
|
51
|
-
MESSAGE(FATAL_ERROR "Asked for backend ${
|
|
43
|
+
MESSAGE(FATAL_ERROR "Asked for backend ${USE_GSSAPI} but it wasn't found")
|
|
52
44
|
ENDIF()
|
|
53
45
|
ELSE()
|
|
54
46
|
SET(GIT_GSSAPI 0)
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
# Select the backend to use
|
|
2
|
-
|
|
3
1
|
INCLUDE(SanitizeBool)
|
|
4
2
|
|
|
5
3
|
# We try to find any packages our backends might use
|
|
@@ -10,36 +8,31 @@ IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
10
8
|
FIND_PACKAGE(CoreFoundation)
|
|
11
9
|
ENDIF()
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
IF (
|
|
17
|
-
IF (
|
|
18
|
-
|
|
11
|
+
IF(USE_HTTPS)
|
|
12
|
+
# Auto-select TLS backend
|
|
13
|
+
SanitizeBool(USE_HTTPS)
|
|
14
|
+
IF (USE_HTTPS STREQUAL ON)
|
|
15
|
+
IF (SECURITY_FOUND)
|
|
16
|
+
IF (SECURITY_HAS_SSLCREATECONTEXT)
|
|
17
|
+
SET(USE_HTTPS "SecureTransport")
|
|
18
|
+
ELSE()
|
|
19
|
+
MESSAGE(STATUS "Security framework is too old, falling back to OpenSSL")
|
|
20
|
+
SET(USE_HTTPS "OpenSSL")
|
|
21
|
+
ENDIF()
|
|
22
|
+
ELSEIF (WINHTTP)
|
|
23
|
+
SET(USE_HTTPS "WinHTTP")
|
|
24
|
+
ELSEIF(OPENSSL_FOUND)
|
|
25
|
+
SET(USE_HTTPS "OpenSSL")
|
|
26
|
+
ELSEIF(MBEDTLS_FOUND)
|
|
27
|
+
SET(USE_HTTPS "mbedTLS")
|
|
19
28
|
ELSE()
|
|
20
|
-
MESSAGE(
|
|
21
|
-
|
|
29
|
+
MESSAGE(FATAL_ERROR "Unable to autodetect a usable HTTPS backend."
|
|
30
|
+
"Please pass the backend name explicitly (-DUSE_HTTPS=backend)")
|
|
22
31
|
ENDIF()
|
|
23
|
-
ELSEIF (WINHTTP)
|
|
24
|
-
SET(HTTPS_BACKEND "WinHTTP")
|
|
25
|
-
ELSEIF(OPENSSL_FOUND)
|
|
26
|
-
SET(HTTPS_BACKEND "OpenSSL")
|
|
27
|
-
ELSEIF(MBEDTLS_FOUND)
|
|
28
|
-
SET(HTTPS_BACKEND "mbedTLS")
|
|
29
|
-
ELSE()
|
|
30
|
-
MESSAGE(FATAL_ERROR "Unable to autodetect a usable HTTPS backend."
|
|
31
|
-
"Please pass the backend name explicitly (-DUSE_HTTPS=backend)")
|
|
32
32
|
ENDIF()
|
|
33
|
-
ELSEIF(USE_HTTPS)
|
|
34
|
-
# HTTPS backend was explicitly set
|
|
35
|
-
SET(HTTPS_BACKEND ${USE_HTTPS})
|
|
36
|
-
ELSE()
|
|
37
|
-
SET(HTTPS_BACKEND NO)
|
|
38
|
-
ENDIF()
|
|
39
33
|
|
|
40
|
-
IF(HTTPS_BACKEND)
|
|
41
34
|
# Check that we can find what's required for the selected backend
|
|
42
|
-
IF (
|
|
35
|
+
IF (USE_HTTPS STREQUAL "SecureTransport")
|
|
43
36
|
IF (NOT COREFOUNDATION_FOUND)
|
|
44
37
|
MESSAGE(FATAL_ERROR "Cannot use SecureTransport backend, CoreFoundation.framework not found")
|
|
45
38
|
ENDIF()
|
|
@@ -54,7 +47,7 @@ IF(HTTPS_BACKEND)
|
|
|
54
47
|
LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${SECURITY_INCLUDE_DIR})
|
|
55
48
|
LIST(APPEND LIBGIT2_LIBS ${COREFOUNDATION_LDFLAGS} ${SECURITY_LDFLAGS})
|
|
56
49
|
LIST(APPEND LIBGIT2_PC_LIBS ${COREFOUNDATION_LDFLAGS} ${SECURITY_LDFLAGS})
|
|
57
|
-
ELSEIF (
|
|
50
|
+
ELSEIF (USE_HTTPS STREQUAL "OpenSSL")
|
|
58
51
|
IF (NOT OPENSSL_FOUND)
|
|
59
52
|
MESSAGE(FATAL_ERROR "Asked for OpenSSL TLS backend, but it wasn't found")
|
|
60
53
|
ENDIF()
|
|
@@ -64,7 +57,7 @@ IF(HTTPS_BACKEND)
|
|
|
64
57
|
LIST(APPEND LIBGIT2_LIBS ${OPENSSL_LIBRARIES})
|
|
65
58
|
LIST(APPEND LIBGIT2_PC_LIBS ${OPENSSL_LDFLAGS})
|
|
66
59
|
LIST(APPEND LIBGIT2_PC_REQUIRES "openssl")
|
|
67
|
-
ELSEIF(
|
|
60
|
+
ELSEIF(USE_HTTPS STREQUAL "mbedTLS")
|
|
68
61
|
IF (NOT MBEDTLS_FOUND)
|
|
69
62
|
MESSAGE(FATAL_ERROR "Asked for mbedTLS backend, but it wasn't found")
|
|
70
63
|
ENDIF()
|
|
@@ -113,14 +106,18 @@ IF(HTTPS_BACKEND)
|
|
|
113
106
|
# https://github.com/ARMmbed/mbedtls/issues/228
|
|
114
107
|
# For now, pass its link flags as our own
|
|
115
108
|
LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
|
|
116
|
-
ELSEIF (
|
|
109
|
+
ELSEIF (USE_HTTPS STREQUAL "WinHTTP")
|
|
117
110
|
# WinHTTP setup was handled in the WinHTTP-specific block above
|
|
111
|
+
ELSEIF (USE_HTTPS STREQUAL "OpenSSL-Dynamic")
|
|
112
|
+
SET(GIT_OPENSSL 1)
|
|
113
|
+
SET(GIT_OPENSSL_DYNAMIC 1)
|
|
114
|
+
LIST(APPEND LIBGIT2_LIBS dl)
|
|
118
115
|
ELSE()
|
|
119
|
-
MESSAGE(FATAL_ERROR "Asked for backend ${
|
|
116
|
+
MESSAGE(FATAL_ERROR "Asked for backend ${USE_HTTPS} but it wasn't found")
|
|
120
117
|
ENDIF()
|
|
121
118
|
|
|
122
119
|
SET(GIT_HTTPS 1)
|
|
123
|
-
ADD_FEATURE_INFO(HTTPS GIT_HTTPS "using ${
|
|
120
|
+
ADD_FEATURE_INFO(HTTPS GIT_HTTPS "using ${USE_HTTPS}")
|
|
124
121
|
ELSE()
|
|
125
122
|
SET(GIT_HTTPS 0)
|
|
126
123
|
ADD_FEATURE_INFO(HTTPS NO "")
|
|
@@ -5,37 +5,28 @@ INCLUDE(SanitizeBool)
|
|
|
5
5
|
# USE_SHA1=CollisionDetection(ON)/HTTPS/Generic/OFF
|
|
6
6
|
|
|
7
7
|
SanitizeBool(USE_SHA1)
|
|
8
|
-
IF(USE_SHA1 STREQUAL ON
|
|
9
|
-
SET(
|
|
8
|
+
IF(USE_SHA1 STREQUAL ON)
|
|
9
|
+
SET(USE_SHA1 "CollisionDetection")
|
|
10
10
|
ELSEIF(USE_SHA1 STREQUAL "HTTPS")
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
SET(SHA1_BACKEND ${HTTPS_BACKEND})
|
|
11
|
+
IF(USE_HTTPS STREQUAL "SecureTransport")
|
|
12
|
+
SET(USE_SHA1 "CommonCrypto")
|
|
13
|
+
ELSEIF(USE_HTTPS STREQUAL "WinHTTP")
|
|
14
|
+
SET(USE_SHA1 "Win32")
|
|
15
|
+
ELSEIF(USE_HTTPS)
|
|
16
|
+
SET(USE_SHA1 ${USE_HTTPS})
|
|
18
17
|
ELSE()
|
|
18
|
+
SET(USE_SHA1 "CollisionDetection")
|
|
19
19
|
ENDIF()
|
|
20
|
-
IF(NOT HTTPS_BACKEND)
|
|
21
|
-
SET(SHA1_BACKEND "CollisionDetection")
|
|
22
|
-
ENDIF()
|
|
23
|
-
message(STATUS "Using SHA1 backend ${SHA1_BACKEND}")
|
|
24
|
-
ELSEIF(USE_SHA1 STREQUAL "Generic")
|
|
25
|
-
SET(SHA1_BACKEND "Generic")
|
|
26
|
-
# ELSEIF(NOT USE_SHA1)
|
|
27
|
-
ELSE()
|
|
28
|
-
MESSAGE(FATAL_ERROR "Invalid value for USE_SHA1: ${USE_SHA1}")
|
|
29
20
|
ENDIF()
|
|
30
21
|
|
|
31
|
-
IF(
|
|
22
|
+
IF(USE_SHA1 STREQUAL "CollisionDetection")
|
|
32
23
|
SET(GIT_SHA1_COLLISIONDETECT 1)
|
|
33
24
|
ADD_DEFINITIONS(-DSHA1DC_NO_STANDARD_INCLUDES=1)
|
|
34
25
|
ADD_DEFINITIONS(-DSHA1DC_CUSTOM_INCLUDE_SHA1_C=\"common.h\")
|
|
35
26
|
ADD_DEFINITIONS(-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"common.h\")
|
|
36
27
|
FILE(GLOB SRC_SHA1 hash/sha1/collisiondetect.* hash/sha1/sha1dc/*)
|
|
37
|
-
ELSEIF(
|
|
38
|
-
# OPENSSL_FOUND should already be set, we're checking
|
|
28
|
+
ELSEIF(USE_SHA1 STREQUAL "OpenSSL")
|
|
29
|
+
# OPENSSL_FOUND should already be set, we're checking USE_HTTPS
|
|
39
30
|
|
|
40
31
|
SET(GIT_SHA1_OPENSSL 1)
|
|
41
32
|
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
@@ -44,10 +35,10 @@ ELSEIF(SHA1_BACKEND STREQUAL "OpenSSL")
|
|
|
44
35
|
LIST(APPEND LIBGIT2_PC_REQUIRES "openssl")
|
|
45
36
|
ENDIF()
|
|
46
37
|
FILE(GLOB SRC_SHA1 hash/sha1/openssl.*)
|
|
47
|
-
ELSEIF(
|
|
38
|
+
ELSEIF(USE_SHA1 STREQUAL "CommonCrypto")
|
|
48
39
|
SET(GIT_SHA1_COMMON_CRYPTO 1)
|
|
49
40
|
FILE(GLOB SRC_SHA1 hash/sha1/common_crypto.*)
|
|
50
|
-
ELSEIF(
|
|
41
|
+
ELSEIF(USE_SHA1 STREQUAL "mbedTLS")
|
|
51
42
|
SET(GIT_SHA1_MBEDTLS 1)
|
|
52
43
|
FILE(GLOB SRC_SHA1 hash/sha1/mbedtls.*)
|
|
53
44
|
LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR})
|
|
@@ -56,14 +47,16 @@ ELSEIF(SHA1_BACKEND STREQUAL "mbedTLS")
|
|
|
56
47
|
# https://github.com/ARMmbed/mbedtls/issues/228
|
|
57
48
|
# For now, pass its link flags as our own
|
|
58
49
|
LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
|
|
59
|
-
ELSEIF(
|
|
50
|
+
ELSEIF(USE_SHA1 STREQUAL "Win32")
|
|
60
51
|
SET(GIT_SHA1_WIN32 1)
|
|
61
52
|
FILE(GLOB SRC_SHA1 hash/sha1/win32.*)
|
|
62
|
-
ELSEIF(
|
|
53
|
+
ELSEIF(USE_SHA1 STREQUAL "Generic")
|
|
63
54
|
FILE(GLOB SRC_SHA1 hash/sha1/generic.*)
|
|
64
|
-
# ELSEIF(NOT USE_SHA1)
|
|
65
55
|
ELSE()
|
|
66
|
-
MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend: ${
|
|
56
|
+
MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend: ${USE_SHA1}")
|
|
67
57
|
ENDIF()
|
|
68
58
|
|
|
69
|
-
|
|
59
|
+
list(APPEND SRC_SHA1 "hash/sha1.h")
|
|
60
|
+
list(SORT SRC_SHA1)
|
|
61
|
+
|
|
62
|
+
ADD_FEATURE_INFO(SHA ON "using ${USE_SHA1}")
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# CMake build script for the bundled Chromium zlib implementation. So far, it
|
|
2
|
+
# is only supported for x86_64 processors with CLMUL, SSE3, SSE4.2.
|
|
3
|
+
#
|
|
4
|
+
# TODO: The Chromium build file (in deps/chromium-zlib/zlib/BUILD.gn) supports
|
|
5
|
+
# more platforms (like ARM with NEON), more can be enabled as needed.
|
|
6
|
+
|
|
7
|
+
CMAKE_MINIMUM_REQUIRED(VERSION 3.11)
|
|
8
|
+
|
|
9
|
+
include(FetchContent)
|
|
10
|
+
include(FindGit)
|
|
11
|
+
|
|
12
|
+
# Ensure that the git binary is present to download the sources.
|
|
13
|
+
find_package(Git)
|
|
14
|
+
IF(NOT Git_FOUND)
|
|
15
|
+
message(FATAL_ERROR "git is required to download the Chromium zlib sources")
|
|
16
|
+
ENDIF()
|
|
17
|
+
|
|
18
|
+
FetchContent_Populate(chromium_zlib_src
|
|
19
|
+
GIT_REPOSITORY https://chromium.googlesource.com/chromium/src/third_party/zlib.git
|
|
20
|
+
GIT_TAG 2c183c9f93a328bfb3121284da13cf89a0f7e64a
|
|
21
|
+
QUIET
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
# The Chromium build globally disables some warnings.
|
|
25
|
+
disable_warnings(implicit-fallthrough)
|
|
26
|
+
disable_warnings(unused-function)
|
|
27
|
+
disable_warnings(unused-parameter)
|
|
28
|
+
disable_warnings(sign-compare)
|
|
29
|
+
disable_warnings(declaration-after-statement)
|
|
30
|
+
disable_warnings(missing-declarations)
|
|
31
|
+
|
|
32
|
+
# -O3 is also set by the Chromium configuration and has been deemed safe enough
|
|
33
|
+
# for them.
|
|
34
|
+
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
|
|
35
|
+
SET(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
|
|
36
|
+
|
|
37
|
+
# Common definitions.
|
|
38
|
+
add_definitions(
|
|
39
|
+
-DSTDC
|
|
40
|
+
-DNO_GZIP
|
|
41
|
+
-DZLIB_IMPLEMENTATION
|
|
42
|
+
)
|
|
43
|
+
list(APPEND SRC_ZLIB
|
|
44
|
+
"${chromium_zlib_src_SOURCE_DIR}/adler32.c"
|
|
45
|
+
"${chromium_zlib_src_SOURCE_DIR}/chromeconf.h"
|
|
46
|
+
"${chromium_zlib_src_SOURCE_DIR}/compress.c"
|
|
47
|
+
"${chromium_zlib_src_SOURCE_DIR}/contrib/optimizations/insert_string.h"
|
|
48
|
+
"${chromium_zlib_src_SOURCE_DIR}/cpu_features.c"
|
|
49
|
+
"${chromium_zlib_src_SOURCE_DIR}/cpu_features.h"
|
|
50
|
+
"${chromium_zlib_src_SOURCE_DIR}/crc32.c"
|
|
51
|
+
"${chromium_zlib_src_SOURCE_DIR}/crc32.h"
|
|
52
|
+
"${chromium_zlib_src_SOURCE_DIR}/deflate.c"
|
|
53
|
+
"${chromium_zlib_src_SOURCE_DIR}/deflate.h"
|
|
54
|
+
"${chromium_zlib_src_SOURCE_DIR}/gzclose.c"
|
|
55
|
+
"${chromium_zlib_src_SOURCE_DIR}/gzguts.h"
|
|
56
|
+
"${chromium_zlib_src_SOURCE_DIR}/gzlib.c"
|
|
57
|
+
"${chromium_zlib_src_SOURCE_DIR}/gzread.c"
|
|
58
|
+
"${chromium_zlib_src_SOURCE_DIR}/gzwrite.c"
|
|
59
|
+
"${chromium_zlib_src_SOURCE_DIR}/infback.c"
|
|
60
|
+
"${chromium_zlib_src_SOURCE_DIR}/inffast.c"
|
|
61
|
+
"${chromium_zlib_src_SOURCE_DIR}/inffast.h"
|
|
62
|
+
"${chromium_zlib_src_SOURCE_DIR}/inffixed.h"
|
|
63
|
+
"${chromium_zlib_src_SOURCE_DIR}/inflate.h"
|
|
64
|
+
"${chromium_zlib_src_SOURCE_DIR}/inftrees.c"
|
|
65
|
+
"${chromium_zlib_src_SOURCE_DIR}/inftrees.h"
|
|
66
|
+
"${chromium_zlib_src_SOURCE_DIR}/trees.c"
|
|
67
|
+
"${chromium_zlib_src_SOURCE_DIR}/trees.h"
|
|
68
|
+
"${chromium_zlib_src_SOURCE_DIR}/uncompr.c"
|
|
69
|
+
"${chromium_zlib_src_SOURCE_DIR}/zconf.h"
|
|
70
|
+
"${chromium_zlib_src_SOURCE_DIR}/zlib.h"
|
|
71
|
+
"${chromium_zlib_src_SOURCE_DIR}/zutil.c"
|
|
72
|
+
"${chromium_zlib_src_SOURCE_DIR}/zutil.h"
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# x86_64-specific optimizations
|
|
76
|
+
string(APPEND CMAKE_C_FLAGS " -mssse3 -msse4.2 -mpclmul")
|
|
77
|
+
add_definitions(
|
|
78
|
+
-DCHROMIUM_ZLIB_NO_CHROMECONF
|
|
79
|
+
-DX86_NOT_WINDOWS
|
|
80
|
+
-DADLER32_SIMD_SSSE3
|
|
81
|
+
-DCRC32_SIMD_SSE42_PCLMUL
|
|
82
|
+
-DDEFLATE_FILL_WINDOW_SSE2
|
|
83
|
+
-DINFLATE_CHUNK_READ_64LE
|
|
84
|
+
-DINFLATE_CHUNK_SIMD_SSE2
|
|
85
|
+
)
|
|
86
|
+
list(APPEND SRC_ZLIB
|
|
87
|
+
"${chromium_zlib_src_SOURCE_DIR}/adler32_simd.c"
|
|
88
|
+
"${chromium_zlib_src_SOURCE_DIR}/adler32_simd.h"
|
|
89
|
+
"${chromium_zlib_src_SOURCE_DIR}/contrib/optimizations/chunkcopy.h"
|
|
90
|
+
"${chromium_zlib_src_SOURCE_DIR}/contrib/optimizations/inffast_chunk.c"
|
|
91
|
+
"${chromium_zlib_src_SOURCE_DIR}/contrib/optimizations/inffast_chunk.h"
|
|
92
|
+
"${chromium_zlib_src_SOURCE_DIR}/contrib/optimizations/inflate.c"
|
|
93
|
+
"${chromium_zlib_src_SOURCE_DIR}/crc32_simd.c"
|
|
94
|
+
"${chromium_zlib_src_SOURCE_DIR}/crc32_simd.h"
|
|
95
|
+
"${chromium_zlib_src_SOURCE_DIR}/crc_folding.c"
|
|
96
|
+
"${chromium_zlib_src_SOURCE_DIR}/fill_window_sse.c"
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
list(SORT SRC_ZLIB)
|
|
100
|
+
include_directories("${chromium_zlib_src_SOURCE_DIR}")
|
|
101
|
+
add_library(chromium_zlib OBJECT ${SRC_ZLIB})
|