From ee252a2c42d615f58663ca7682fc5e57f37f14d9 Mon Sep 17 00:00:00 2001 From: Amin Yahyaaabadi Date: Thu, 31 Dec 2020 08:03:15 -0600 Subject: [PATCH 01/18] Update git-utils from v1.1 --- .gitmodules | 2 +- deps/libgit2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index fff038fe..b154d9da 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "deps/libgit2"] path = deps/libgit2 url = https://github.com/libgit2/libgit2.git - ignore = untracked + branch = maint/v1.1 diff --git a/deps/libgit2 b/deps/libgit2 index fef847ae..20c9fc91 160000 --- a/deps/libgit2 +++ b/deps/libgit2 @@ -1 +1 @@ -Subproject commit fef847ae57d74e93563bc04222d9da7007fffc4f +Subproject commit 20c9fc9168ce14aca86e8bdfd2a55d337a030248 From e14544b2c0e96e487f53c57abea8b3e86c8398cf Mon Sep 17 00:00:00 2001 From: Amin Yahyaaabadi Date: Thu, 31 Dec 2020 08:01:50 -0600 Subject: [PATCH 02/18] Add install command to use -j max --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0313a560..982c393c 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "scripts": { "lint": "standard src spec", "test": "jasmine-focused --captureExceptions spec", - "prepare": "git submodule update --init --recursive" + "prepare": "git submodule update --init --recursive", + "install": "node-gyp rebuild -j max" } } From e669afa745d0b3f8c1a621a0f7cfa00876548f4f Mon Sep 17 00:00:00 2001 From: Amin Yahyaaabadi Date: Thu, 31 Dec 2020 07:32:00 -0600 Subject: [PATCH 03/18] Add commands for automatically generating the file names required --- binding.gyp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/binding.gyp b/binding.gyp index 71fafacd..129b6a77 100644 --- a/binding.gyp +++ b/binding.gyp @@ -48,6 +48,8 @@ 'zlib', 'http_parser', ], + # Automatically generated by using the following command in bash: + # find "./deps/libgit2/src" -mindepth 1 -type f ! -path "./deps/libgit2/src/win32/*" ! -path "./deps/libgit2/src/unix/*" ! -path "./deps/libgit2/src/hash/*" -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ 'deps/libgit2/src/annotated_commit.c', 'deps/libgit2/src/annotated_commit.h', @@ -380,6 +382,9 @@ 4047, # 'volatile void *' differs in levels of indirection from 'int' 4013, # 'InterlockedDecrement' undefined; assuming extern returning int ], + # Automatically generated by using the following command in bash: + # find "./deps/libgit2/src/win32" -mindepth 1 -type f -print0 | xargs -0 -I {} echo " '{}'," + # find "./deps/libgit2/src/hash/" -regex '.*win32.*' -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ 'deps/libgit2/src/net.c', 'deps/libgit2/src/win32/dir.c', @@ -417,6 +422,9 @@ 'libraries': [ '-lpthread', ], + # Automatically generated by using the following command in bash: + # find "./deps/libgit2/src/unix" -mindepth 1 -type f -print0 | xargs -0 -I {} echo " '{}'," + # find "./deps/libgit2/src/hash/" -regex '.*generic.*' -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ 'deps/libgit2/src/unix/map.c', 'deps/libgit2/src/unix/posix.h', @@ -451,6 +459,8 @@ 'target_name': 'zlib', 'win_delay_load_hook': 'false', 'type': 'static_library', + # Automatically generated by using the following command in bash: + # find "./deps/libgit2/deps/zlib/" -regex ".*\.[h|c]" -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ 'deps/libgit2/deps/zlib/adler32.c', 'deps/libgit2/deps/zlib/crc32.c', @@ -501,6 +511,8 @@ 'target_name': 'http_parser', 'win_delay_load_hook': 'false', 'type': 'static_library', + # Automatically generated by using the following command in bash: + # find "./deps/libgit2/deps/http-parser" -regex ".*\.[h|c]" -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ 'deps/libgit2/deps/http-parser/http_parser.c', 'deps/libgit2/deps/http-parser/http_parser.h', @@ -526,6 +538,8 @@ 'target_name': 'pcre', 'win_delay_load_hook': 'false', 'type': 'static_library', + # Automatically generated by using the following command in bash: + # find "./deps/libgit2/deps/pcre" -regex ".*\.[h|c]" -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ 'deps/libgit2/deps/pcre/pcre_byte_order.c', 'deps/libgit2/deps/pcre/pcre_chartables.c', From 5e58a1e5a0e388a81a1d897d9569af59288dcd43 Mon Sep 17 00:00:00 2001 From: Amin Yahyaaabadi Date: Thu, 31 Dec 2020 07:56:15 -0600 Subject: [PATCH 04/18] Add hash related files and compiler flags --- binding.gyp | 1 + 1 file changed, 1 insertion(+) diff --git a/binding.gyp b/binding.gyp index 129b6a77..c1be6f56 100644 --- a/binding.gyp +++ b/binding.gyp @@ -343,6 +343,7 @@ 'defines': [ 'GIT_WINHTTP', 'GIT_REGEX_BUILTIN', + 'GIT_SHA1_WIN32' ], 'dependencies': [ 'pcre', From d035ff584752f686cc2d7f00b6439f44b287bddc Mon Sep 17 00:00:00 2001 From: Amin Yahyaaabadi Date: Thu, 31 Dec 2020 08:01:54 -0600 Subject: [PATCH 05/18] Update the files using the commands --- binding.gyp | 730 +++++++++++++++++++++++++++------------------------- 1 file changed, 378 insertions(+), 352 deletions(-) diff --git a/binding.gyp b/binding.gyp index c1be6f56..de6f8309 100644 --- a/binding.gyp +++ b/binding.gyp @@ -51,279 +51,294 @@ # Automatically generated by using the following command in bash: # find "./deps/libgit2/src" -mindepth 1 -type f ! -path "./deps/libgit2/src/win32/*" ! -path "./deps/libgit2/src/unix/*" ! -path "./deps/libgit2/src/hash/*" -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ - 'deps/libgit2/src/annotated_commit.c', - 'deps/libgit2/src/annotated_commit.h', - 'deps/libgit2/src/apply.c', - 'deps/libgit2/src/apply.h', - 'deps/libgit2/src/alloc.c', - 'deps/libgit2/src/alloc.h', - 'deps/libgit2/src/array.h', - 'deps/libgit2/src/attr.c', - 'deps/libgit2/src/attr.h', - 'deps/libgit2/src/attr_file.c', - 'deps/libgit2/src/attr_file.h', - 'deps/libgit2/src/attrcache.c', - 'deps/libgit2/src/attrcache.h', - 'deps/libgit2/src/bitvec.h', - 'deps/libgit2/src/blame.c', - 'deps/libgit2/src/blame.h', - 'deps/libgit2/src/blame_git.c', - 'deps/libgit2/src/blame_git.h', - 'deps/libgit2/src/blob.c', - 'deps/libgit2/src/blob.h', - 'deps/libgit2/src/branch.c', - 'deps/libgit2/src/branch.h', - 'deps/libgit2/src/buf_text.c', - 'deps/libgit2/src/buf_text.h', - 'deps/libgit2/src/buffer.c', - 'deps/libgit2/src/buffer.h', - 'deps/libgit2/src/cache.c', - 'deps/libgit2/src/cache.h', - 'deps/libgit2/src/cc-compat.h', - 'deps/libgit2/src/checkout.c', - 'deps/libgit2/src/checkout.h', - 'deps/libgit2/src/cherrypick.c', - 'deps/libgit2/src/clone.c', - 'deps/libgit2/src/clone.h', - 'deps/libgit2/src/commit.c', - 'deps/libgit2/src/commit.h', - 'deps/libgit2/src/commit_list.c', - 'deps/libgit2/src/commit_list.h', - 'deps/libgit2/src/common.h', - 'deps/libgit2/src/config.c', - 'deps/libgit2/src/config.h', - 'deps/libgit2/src/config_cache.c', - 'deps/libgit2/src/config_entries.c', - 'deps/libgit2/src/config_entries.h', - 'deps/libgit2/src/config_file.c', - 'deps/libgit2/src/config_file.h', - 'deps/libgit2/src/config_parse.c', - 'deps/libgit2/src/config_parse.h', - 'deps/libgit2/src/crlf.c', - 'deps/libgit2/src/date.c', - 'deps/libgit2/src/delta.c', - 'deps/libgit2/src/delta.h', - 'deps/libgit2/src/describe.c', - 'deps/libgit2/src/diff.c', - 'deps/libgit2/src/diff.h', - 'deps/libgit2/src/diff_driver.c', - 'deps/libgit2/src/diff_driver.h', - 'deps/libgit2/src/diff_file.c', - 'deps/libgit2/src/diff_file.h', - 'deps/libgit2/src/diff_generate.c', - 'deps/libgit2/src/diff_generate.h', - 'deps/libgit2/src/diff_parse.c', - 'deps/libgit2/src/diff_parse.h', - 'deps/libgit2/src/diff_print.c', - 'deps/libgit2/src/diff_stats.c', - 'deps/libgit2/src/diff_tform.c', - 'deps/libgit2/src/diff_tform.h', - 'deps/libgit2/src/diff_xdiff.c', - 'deps/libgit2/src/diff_xdiff.h', - 'deps/libgit2/src/errors.c', - 'deps/libgit2/src/fetch.c', - 'deps/libgit2/src/fetch.h', - 'deps/libgit2/src/fetchhead.c', - 'deps/libgit2/src/fetchhead.h', - 'deps/libgit2/src/filebuf.c', - 'deps/libgit2/src/filebuf.h', - 'deps/libgit2/src/fileops.c', - 'deps/libgit2/src/fileops.h', - 'deps/libgit2/src/filter.c', - 'deps/libgit2/src/filter.h', - 'deps/libgit2/src/wildmatch.c', - 'deps/libgit2/src/wildmatch.h', - 'deps/libgit2/src/global.c', - 'deps/libgit2/src/global.h', - 'deps/libgit2/src/graph.c', - 'deps/libgit2/src/hash.c', - 'deps/libgit2/src/hash.h', - 'deps/libgit2/src/hashsig.c', - 'deps/libgit2/src/ident.c', - 'deps/libgit2/src/idxmap.c', - 'deps/libgit2/src/idxmap.h', - 'deps/libgit2/src/ignore.c', - 'deps/libgit2/src/ignore.h', - 'deps/libgit2/src/index.c', - 'deps/libgit2/src/index.h', - 'deps/libgit2/src/indexer.c', - 'deps/libgit2/src/indexer.h', - 'deps/libgit2/src/integer.h', - 'deps/libgit2/src/iterator.c', - 'deps/libgit2/src/iterator.h', - 'deps/libgit2/src/khash.h', - 'deps/libgit2/src/mailmap.c', - 'deps/libgit2/src/mailmap.h', - 'deps/libgit2/src/map.h', - 'deps/libgit2/src/merge.c', - 'deps/libgit2/src/merge.h', - 'deps/libgit2/src/merge_driver.c', - 'deps/libgit2/src/merge_driver.h', - 'deps/libgit2/src/merge_file.c', - 'deps/libgit2/src/message.c', - 'deps/libgit2/src/message.h', - 'deps/libgit2/src/mwindow.c', - 'deps/libgit2/src/mwindow.h', - 'deps/libgit2/src/netops.c', - 'deps/libgit2/src/netops.h', - 'deps/libgit2/src/notes.c', - 'deps/libgit2/src/notes.h', - 'deps/libgit2/src/object.c', - 'deps/libgit2/src/object.h', - 'deps/libgit2/src/object_api.c', - 'deps/libgit2/src/odb.c', - 'deps/libgit2/src/odb.h', - 'deps/libgit2/src/odb_loose.c', - 'deps/libgit2/src/odb_mempack.c', - 'deps/libgit2/src/odb_pack.c', - 'deps/libgit2/src/offmap.c', - 'deps/libgit2/src/offmap.h', - 'deps/libgit2/src/oid.c', - 'deps/libgit2/src/oid.h', - 'deps/libgit2/src/oidarray.c', - 'deps/libgit2/src/oidarray.h', - 'deps/libgit2/src/oidmap.c', - 'deps/libgit2/src/oidmap.h', - 'deps/libgit2/src/pack-objects.c', - 'deps/libgit2/src/pack-objects.h', - 'deps/libgit2/src/pack.c', - 'deps/libgit2/src/pack.h', - 'deps/libgit2/src/parse.c', - 'deps/libgit2/src/parse.h', - 'deps/libgit2/src/patch.c', - 'deps/libgit2/src/patch.h', - 'deps/libgit2/src/patch_generate.c', - 'deps/libgit2/src/patch_generate.h', - 'deps/libgit2/src/patch_parse.c', - 'deps/libgit2/src/patch_parse.h', - 'deps/libgit2/src/path.c', - 'deps/libgit2/src/path.h', - 'deps/libgit2/src/pathspec.c', - 'deps/libgit2/src/pathspec.h', - 'deps/libgit2/src/pool.c', - 'deps/libgit2/src/pool.h', - 'deps/libgit2/src/posix.c', - 'deps/libgit2/src/posix.h', - 'deps/libgit2/src/pqueue.c', - 'deps/libgit2/src/pqueue.h', - 'deps/libgit2/src/proxy.c', - 'deps/libgit2/src/proxy.h', - 'deps/libgit2/src/push.c', - 'deps/libgit2/src/push.h', - 'deps/libgit2/src/rebase.c', - 'deps/libgit2/src/refdb.c', - 'deps/libgit2/src/refdb.h', - 'deps/libgit2/src/refdb_fs.c', - 'deps/libgit2/src/refdb_fs.h', - 'deps/libgit2/src/reflog.c', - 'deps/libgit2/src/reflog.h', - 'deps/libgit2/src/refs.c', - 'deps/libgit2/src/refs.h', - 'deps/libgit2/src/refspec.c', - 'deps/libgit2/src/refspec.h', - 'deps/libgit2/src/remote.c', - 'deps/libgit2/src/remote.h', - 'deps/libgit2/src/repo_template.h', - 'deps/libgit2/src/repository.c', - 'deps/libgit2/src/repository.h', - 'deps/libgit2/src/reset.c', - 'deps/libgit2/src/revert.c', - 'deps/libgit2/src/revparse.c', - 'deps/libgit2/src/revwalk.c', - 'deps/libgit2/src/revwalk.h', - 'deps/libgit2/src/settings.c', - 'deps/libgit2/src/sha1_lookup.c', - 'deps/libgit2/src/sha1_lookup.h', - 'deps/libgit2/src/signature.c', - 'deps/libgit2/src/signature.h', - 'deps/libgit2/src/sortedcache.c', - 'deps/libgit2/src/sortedcache.h', - 'deps/libgit2/src/stash.c', - 'deps/libgit2/src/status.c', - 'deps/libgit2/src/status.h', - 'deps/libgit2/src/allocators/stdalloc.c', - 'deps/libgit2/src/allocators/stdalloc.h', - 'deps/libgit2/src/stream.h', - 'deps/libgit2/src/strmap.c', - 'deps/libgit2/src/strmap.h', - 'deps/libgit2/src/strnlen.h', - 'deps/libgit2/src/submodule.c', - 'deps/libgit2/src/submodule.h', - 'deps/libgit2/src/sysdir.c', - 'deps/libgit2/src/sysdir.h', - 'deps/libgit2/src/tag.c', - 'deps/libgit2/src/tag.h', - 'deps/libgit2/src/thread-utils.c', - 'deps/libgit2/src/thread-utils.h', - 'deps/libgit2/src/trace.c', - 'deps/libgit2/src/trace.h', - 'deps/libgit2/src/trailer.c', - 'deps/libgit2/src/transaction.c', - 'deps/libgit2/src/transaction.h', - 'deps/libgit2/src/transport.c', - 'deps/libgit2/src/tree-cache.c', - 'deps/libgit2/src/tree-cache.h', - 'deps/libgit2/src/tree.c', - 'deps/libgit2/src/tree.h', - 'deps/libgit2/src/tsort.c', - 'deps/libgit2/src/userdiff.h', - 'deps/libgit2/src/util.c', - 'deps/libgit2/src/util.h', - 'deps/libgit2/src/varint.c', - 'deps/libgit2/src/varint.h', - 'deps/libgit2/src/vector.c', - 'deps/libgit2/src/vector.h', - 'deps/libgit2/src/worktree.c', - 'deps/libgit2/src/worktree.h', - 'deps/libgit2/src/zstream.c', - 'deps/libgit2/src/zstream.h', - 'deps/libgit2/src/streams/registry.c', - 'deps/libgit2/src/streams/registry.h', - 'deps/libgit2/src/streams/mbedtls.c', - 'deps/libgit2/src/streams/mbedtls.h', - 'deps/libgit2/src/streams/openssl.c', - 'deps/libgit2/src/streams/openssl.h', - 'deps/libgit2/src/streams/socket.c', - 'deps/libgit2/src/streams/socket.h', - 'deps/libgit2/src/streams/stransport.c', - 'deps/libgit2/src/streams/stransport.h', - 'deps/libgit2/src/streams/tls.c', - 'deps/libgit2/src/streams/tls.h', - 'deps/libgit2/src/transports/auth.c', - 'deps/libgit2/src/transports/auth.h', - 'deps/libgit2/src/transports/auth_negotiate.c', - 'deps/libgit2/src/transports/auth_negotiate.h', - 'deps/libgit2/src/transports/cred.c', - 'deps/libgit2/src/transports/cred.h', - 'deps/libgit2/src/transports/cred_helpers.c', - 'deps/libgit2/src/transports/git.c', - 'deps/libgit2/src/transports/http.c', - 'deps/libgit2/src/transports/http.h', - 'deps/libgit2/src/transports/local.c', - 'deps/libgit2/src/transports/smart.c', - 'deps/libgit2/src/transports/smart.h', - 'deps/libgit2/src/transports/smart_pkt.c', - 'deps/libgit2/src/transports/smart_protocol.c', - 'deps/libgit2/src/transports/ssh.c', - 'deps/libgit2/src/transports/ssh.h', - 'deps/libgit2/src/transports/winhttp.c', - 'deps/libgit2/src/xdiff/xdiff.h', - 'deps/libgit2/src/xdiff/xdiffi.c', - 'deps/libgit2/src/xdiff/xdiffi.h', - 'deps/libgit2/src/xdiff/xemit.c', - 'deps/libgit2/src/xdiff/xemit.h', - 'deps/libgit2/src/xdiff/xhistogram.c', - 'deps/libgit2/src/xdiff/xinclude.h', - 'deps/libgit2/src/xdiff/xmacros.h', - 'deps/libgit2/src/xdiff/xmerge.c', - 'deps/libgit2/src/xdiff/xpatience.c', - 'deps/libgit2/src/xdiff/xprepare.c', - 'deps/libgit2/src/xdiff/xprepare.h', - 'deps/libgit2/src/xdiff/xtypes.h', - 'deps/libgit2/src/xdiff/xutils.c', - 'deps/libgit2/src/xdiff/xutils.h', - 'deps/libgit2/src/hash/hash_generic.c', - 'deps/libgit2/src/hash/hash_generic.h', + './deps/libgit2/src/alloc.c', + './deps/libgit2/src/alloc.h', + './deps/libgit2/src/allocators/stdalloc.c', + './deps/libgit2/src/allocators/stdalloc.h', + './deps/libgit2/src/allocators/win32_crtdbg.c', + './deps/libgit2/src/allocators/win32_crtdbg.h', + './deps/libgit2/src/annotated_commit.c', + './deps/libgit2/src/annotated_commit.h', + './deps/libgit2/src/apply.c', + './deps/libgit2/src/apply.h', + './deps/libgit2/src/array.h', + './deps/libgit2/src/assert_safe.h', + './deps/libgit2/src/attr.c', + './deps/libgit2/src/attr.h', + './deps/libgit2/src/attrcache.c', + './deps/libgit2/src/attrcache.h', + './deps/libgit2/src/attr_file.c', + './deps/libgit2/src/attr_file.h', + './deps/libgit2/src/bitvec.h', + './deps/libgit2/src/blame.c', + './deps/libgit2/src/blame.h', + './deps/libgit2/src/blame_git.c', + './deps/libgit2/src/blame_git.h', + './deps/libgit2/src/blob.c', + './deps/libgit2/src/blob.h', + './deps/libgit2/src/branch.c', + './deps/libgit2/src/branch.h', + './deps/libgit2/src/buffer.c', + './deps/libgit2/src/buffer.h', + './deps/libgit2/src/buf_text.c', + './deps/libgit2/src/buf_text.h', + './deps/libgit2/src/cache.c', + './deps/libgit2/src/cache.h', + './deps/libgit2/src/cc-compat.h', + './deps/libgit2/src/checkout.c', + './deps/libgit2/src/checkout.h', + './deps/libgit2/src/cherrypick.c', + './deps/libgit2/src/clone.c', + './deps/libgit2/src/clone.h', + './deps/libgit2/src/CMakeLists.txt', + './deps/libgit2/src/commit.c', + './deps/libgit2/src/commit.h', + './deps/libgit2/src/commit_list.c', + './deps/libgit2/src/commit_list.h', + './deps/libgit2/src/common.h', + './deps/libgit2/src/config.c', + './deps/libgit2/src/config.h', + './deps/libgit2/src/config_backend.h', + './deps/libgit2/src/config_cache.c', + './deps/libgit2/src/config_entries.c', + './deps/libgit2/src/config_entries.h', + './deps/libgit2/src/config_file.c', + './deps/libgit2/src/config_mem.c', + './deps/libgit2/src/config_parse.c', + './deps/libgit2/src/config_parse.h', + './deps/libgit2/src/config_snapshot.c', + './deps/libgit2/src/crlf.c', + './deps/libgit2/src/date.c', + './deps/libgit2/src/delta.c', + './deps/libgit2/src/delta.h', + './deps/libgit2/src/describe.c', + './deps/libgit2/src/diff.c', + './deps/libgit2/src/diff.h', + './deps/libgit2/src/diff_driver.c', + './deps/libgit2/src/diff_driver.h', + './deps/libgit2/src/diff_file.c', + './deps/libgit2/src/diff_file.h', + './deps/libgit2/src/diff_generate.c', + './deps/libgit2/src/diff_generate.h', + './deps/libgit2/src/diff_parse.c', + './deps/libgit2/src/diff_parse.h', + './deps/libgit2/src/diff_print.c', + './deps/libgit2/src/diff_stats.c', + './deps/libgit2/src/diff_tform.c', + './deps/libgit2/src/diff_tform.h', + './deps/libgit2/src/diff_xdiff.c', + './deps/libgit2/src/diff_xdiff.h', + './deps/libgit2/src/errors.c', + './deps/libgit2/src/errors.h', + './deps/libgit2/src/features.h.in', + './deps/libgit2/src/fetch.c', + './deps/libgit2/src/fetch.h', + './deps/libgit2/src/fetchhead.c', + './deps/libgit2/src/fetchhead.h', + './deps/libgit2/src/filebuf.c', + './deps/libgit2/src/filebuf.h', + './deps/libgit2/src/filter.c', + './deps/libgit2/src/filter.h', + './deps/libgit2/src/futils.c', + './deps/libgit2/src/futils.h', + './deps/libgit2/src/global.c', + './deps/libgit2/src/global.h', + './deps/libgit2/src/graph.c', + './deps/libgit2/src/hash.c', + './deps/libgit2/src/hash.h', + './deps/libgit2/src/hashsig.c', + './deps/libgit2/src/ident.c', + './deps/libgit2/src/idxmap.c', + './deps/libgit2/src/idxmap.h', + './deps/libgit2/src/ignore.c', + './deps/libgit2/src/ignore.h', + './deps/libgit2/src/index.c', + './deps/libgit2/src/index.h', + './deps/libgit2/src/indexer.c', + './deps/libgit2/src/indexer.h', + './deps/libgit2/src/integer.h', + './deps/libgit2/src/iterator.c', + './deps/libgit2/src/iterator.h', + './deps/libgit2/src/khash.h', + './deps/libgit2/src/mailmap.c', + './deps/libgit2/src/mailmap.h', + './deps/libgit2/src/map.h', + './deps/libgit2/src/merge.c', + './deps/libgit2/src/merge.h', + './deps/libgit2/src/merge_driver.c', + './deps/libgit2/src/merge_driver.h', + './deps/libgit2/src/merge_file.c', + './deps/libgit2/src/message.c', + './deps/libgit2/src/message.h', + './deps/libgit2/src/midx.c', + './deps/libgit2/src/midx.h', + './deps/libgit2/src/mwindow.c', + './deps/libgit2/src/mwindow.h', + './deps/libgit2/src/net.c', + './deps/libgit2/src/net.h', + './deps/libgit2/src/netops.c', + './deps/libgit2/src/netops.h', + './deps/libgit2/src/notes.c', + './deps/libgit2/src/notes.h', + './deps/libgit2/src/object.c', + './deps/libgit2/src/object.h', + './deps/libgit2/src/object_api.c', + './deps/libgit2/src/odb.c', + './deps/libgit2/src/odb.h', + './deps/libgit2/src/odb_loose.c', + './deps/libgit2/src/odb_mempack.c', + './deps/libgit2/src/odb_pack.c', + './deps/libgit2/src/offmap.c', + './deps/libgit2/src/offmap.h', + './deps/libgit2/src/oid.c', + './deps/libgit2/src/oid.h', + './deps/libgit2/src/oidarray.c', + './deps/libgit2/src/oidarray.h', + './deps/libgit2/src/oidmap.c', + './deps/libgit2/src/oidmap.h', + './deps/libgit2/src/pack-objects.c', + './deps/libgit2/src/pack-objects.h', + './deps/libgit2/src/pack.c', + './deps/libgit2/src/pack.h', + './deps/libgit2/src/parse.c', + './deps/libgit2/src/parse.h', + './deps/libgit2/src/patch.c', + './deps/libgit2/src/patch.h', + './deps/libgit2/src/patch_generate.c', + './deps/libgit2/src/patch_generate.h', + './deps/libgit2/src/patch_parse.c', + './deps/libgit2/src/patch_parse.h', + './deps/libgit2/src/path.c', + './deps/libgit2/src/path.h', + './deps/libgit2/src/pathspec.c', + './deps/libgit2/src/pathspec.h', + './deps/libgit2/src/pool.c', + './deps/libgit2/src/pool.h', + './deps/libgit2/src/posix.c', + './deps/libgit2/src/posix.h', + './deps/libgit2/src/pqueue.c', + './deps/libgit2/src/pqueue.h', + './deps/libgit2/src/proxy.c', + './deps/libgit2/src/proxy.h', + './deps/libgit2/src/push.c', + './deps/libgit2/src/push.h', + './deps/libgit2/src/reader.c', + './deps/libgit2/src/reader.h', + './deps/libgit2/src/rebase.c', + './deps/libgit2/src/refdb.c', + './deps/libgit2/src/refdb.h', + './deps/libgit2/src/refdb_fs.c', + './deps/libgit2/src/reflog.c', + './deps/libgit2/src/reflog.h', + './deps/libgit2/src/refs.c', + './deps/libgit2/src/refs.h', + './deps/libgit2/src/refspec.c', + './deps/libgit2/src/refspec.h', + './deps/libgit2/src/regexp.c', + './deps/libgit2/src/regexp.h', + './deps/libgit2/src/remote.c', + './deps/libgit2/src/remote.h', + './deps/libgit2/src/repository.c', + './deps/libgit2/src/repository.h', + './deps/libgit2/src/repo_template.h', + './deps/libgit2/src/reset.c', + './deps/libgit2/src/revert.c', + './deps/libgit2/src/revparse.c', + './deps/libgit2/src/revwalk.c', + './deps/libgit2/src/revwalk.h', + './deps/libgit2/src/settings.c', + './deps/libgit2/src/signature.c', + './deps/libgit2/src/signature.h', + './deps/libgit2/src/sortedcache.c', + './deps/libgit2/src/sortedcache.h', + './deps/libgit2/src/stash.c', + './deps/libgit2/src/status.c', + './deps/libgit2/src/status.h', + './deps/libgit2/src/strarray.c', + './deps/libgit2/src/stream.h', + './deps/libgit2/src/streams/mbedtls.c', + './deps/libgit2/src/streams/mbedtls.h', + './deps/libgit2/src/streams/openssl.c', + './deps/libgit2/src/streams/openssl.h', + './deps/libgit2/src/streams/registry.c', + './deps/libgit2/src/streams/registry.h', + './deps/libgit2/src/streams/socket.c', + './deps/libgit2/src/streams/socket.h', + './deps/libgit2/src/streams/stransport.c', + './deps/libgit2/src/streams/stransport.h', + './deps/libgit2/src/streams/tls.c', + './deps/libgit2/src/streams/tls.h', + './deps/libgit2/src/strmap.c', + './deps/libgit2/src/strmap.h', + './deps/libgit2/src/strnlen.h', + './deps/libgit2/src/submodule.c', + './deps/libgit2/src/submodule.h', + './deps/libgit2/src/sysdir.c', + './deps/libgit2/src/sysdir.h', + './deps/libgit2/src/tag.c', + './deps/libgit2/src/tag.h', + './deps/libgit2/src/thread-utils.c', + './deps/libgit2/src/thread-utils.h', + './deps/libgit2/src/trace.c', + './deps/libgit2/src/trace.h', + './deps/libgit2/src/trailer.c', + './deps/libgit2/src/transaction.c', + './deps/libgit2/src/transaction.h', + './deps/libgit2/src/transport.c', + './deps/libgit2/src/transports/auth.c', + './deps/libgit2/src/transports/auth.h', + './deps/libgit2/src/transports/auth_negotiate.c', + './deps/libgit2/src/transports/auth_negotiate.h', + './deps/libgit2/src/transports/auth_ntlm.c', + './deps/libgit2/src/transports/auth_ntlm.h', + './deps/libgit2/src/transports/credential.c', + './deps/libgit2/src/transports/credential_helpers.c', + './deps/libgit2/src/transports/git.c', + './deps/libgit2/src/transports/http.c', + './deps/libgit2/src/transports/http.h', + './deps/libgit2/src/transports/httpclient.c', + './deps/libgit2/src/transports/httpclient.h', + './deps/libgit2/src/transports/local.c', + './deps/libgit2/src/transports/smart.c', + './deps/libgit2/src/transports/smart.h', + './deps/libgit2/src/transports/smart_pkt.c', + './deps/libgit2/src/transports/smart_protocol.c', + './deps/libgit2/src/transports/ssh.c', + './deps/libgit2/src/transports/ssh.h', + './deps/libgit2/src/transports/winhttp.c', + './deps/libgit2/src/tree-cache.c', + './deps/libgit2/src/tree-cache.h', + './deps/libgit2/src/tree.c', + './deps/libgit2/src/tree.h', + './deps/libgit2/src/tsort.c', + './deps/libgit2/src/userdiff.h', + './deps/libgit2/src/util.c', + './deps/libgit2/src/util.h', + './deps/libgit2/src/varint.c', + './deps/libgit2/src/varint.h', + './deps/libgit2/src/vector.c', + './deps/libgit2/src/vector.h', + './deps/libgit2/src/wildmatch.c', + './deps/libgit2/src/wildmatch.h', + './deps/libgit2/src/worktree.c', + './deps/libgit2/src/worktree.h', + './deps/libgit2/src/xdiff/xdiff.h', + './deps/libgit2/src/xdiff/xdiffi.c', + './deps/libgit2/src/xdiff/xdiffi.h', + './deps/libgit2/src/xdiff/xemit.c', + './deps/libgit2/src/xdiff/xemit.h', + './deps/libgit2/src/xdiff/xhistogram.c', + './deps/libgit2/src/xdiff/xinclude.h', + './deps/libgit2/src/xdiff/xmacros.h', + './deps/libgit2/src/xdiff/xmerge.c', + './deps/libgit2/src/xdiff/xpatience.c', + './deps/libgit2/src/xdiff/xprepare.c', + './deps/libgit2/src/xdiff/xprepare.h', + './deps/libgit2/src/xdiff/xtypes.h', + './deps/libgit2/src/xdiff/xutils.c', + './deps/libgit2/src/xdiff/xutils.h', + './deps/libgit2/src/zstream.c', + './deps/libgit2/src/zstream.h', ], 'conditions': [ ['OS=="mac"', { @@ -387,37 +402,40 @@ # find "./deps/libgit2/src/win32" -mindepth 1 -type f -print0 | xargs -0 -I {} echo " '{}'," # find "./deps/libgit2/src/hash/" -regex '.*win32.*' -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ - 'deps/libgit2/src/net.c', - 'deps/libgit2/src/win32/dir.c', - 'deps/libgit2/src/win32/dir.h', - 'deps/libgit2/src/win32/error.c', - 'deps/libgit2/src/win32/error.h', - 'deps/libgit2/src/win32/findfile.c', - 'deps/libgit2/src/win32/findfile.h', - 'deps/libgit2/src/win32/map.c', - 'deps/libgit2/src/win32/mingw-compat.h', - 'deps/libgit2/src/win32/msvc-compat.h', - 'deps/libgit2/src/win32/path_w32.c', - 'deps/libgit2/src/win32/path_w32.h', - 'deps/libgit2/src/win32/posix.h', - 'deps/libgit2/src/win32/posix_w32.c', - 'deps/libgit2/src/win32/precompiled.c', - 'deps/libgit2/src/win32/precompiled.h', - 'deps/libgit2/src/win32/reparse.h', - 'deps/libgit2/src/win32/thread.c', - 'deps/libgit2/src/win32/thread.h', - 'deps/libgit2/src/win32/utf-conv.c', - 'deps/libgit2/src/win32/utf-conv.h', - 'deps/libgit2/src/win32/version.h', - 'deps/libgit2/src/win32/w32_buffer.c', - 'deps/libgit2/src/win32/w32_buffer.h', - 'deps/libgit2/src/win32/w32_crtdbg_stacktrace.c', - 'deps/libgit2/src/win32/w32_crtdbg_stacktrace.h', - 'deps/libgit2/src/win32/w32_stack.c', - 'deps/libgit2/src/win32/w32_stack.h', - 'deps/libgit2/src/win32/w32_util.c', - 'deps/libgit2/src/win32/w32_util.h', - 'deps/libgit2/src/win32/win32-compat.h', + './deps/libgit2/src/win32/dir.c', + './deps/libgit2/src/win32/dir.h', + './deps/libgit2/src/win32/error.c', + './deps/libgit2/src/win32/error.h', + './deps/libgit2/src/win32/findfile.c', + './deps/libgit2/src/win32/findfile.h', + './deps/libgit2/src/win32/git2.rc', + './deps/libgit2/src/win32/map.c', + './deps/libgit2/src/win32/mingw-compat.h', + './deps/libgit2/src/win32/msvc-compat.h', + './deps/libgit2/src/win32/path_w32.c', + './deps/libgit2/src/win32/path_w32.h', + './deps/libgit2/src/win32/posix.h', + './deps/libgit2/src/win32/posix_w32.c', + './deps/libgit2/src/win32/precompiled.c', + './deps/libgit2/src/win32/precompiled.h', + './deps/libgit2/src/win32/reparse.h', + './deps/libgit2/src/win32/thread.c', + './deps/libgit2/src/win32/thread.h', + './deps/libgit2/src/win32/utf-conv.c', + './deps/libgit2/src/win32/utf-conv.h', + './deps/libgit2/src/win32/version.h', + './deps/libgit2/src/win32/w32_buffer.c', + './deps/libgit2/src/win32/w32_buffer.h', + './deps/libgit2/src/win32/w32_common.h', + './deps/libgit2/src/win32/w32_crtdbg_stacktrace.c', + './deps/libgit2/src/win32/w32_crtdbg_stacktrace.h', + './deps/libgit2/src/win32/w32_stack.c', + './deps/libgit2/src/win32/w32_stack.h', + './deps/libgit2/src/win32/w32_util.c', + './deps/libgit2/src/win32/w32_util.h', + './deps/libgit2/src/win32/win32-compat.h', + './deps/libgit2/src/hash/sha1/win32.c', + './deps/libgit2/src/hash/sha1/win32.h', ], }, { 'libraries': [ @@ -427,10 +445,12 @@ # find "./deps/libgit2/src/unix" -mindepth 1 -type f -print0 | xargs -0 -I {} echo " '{}'," # find "./deps/libgit2/src/hash/" -regex '.*generic.*' -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ - 'deps/libgit2/src/unix/map.c', - 'deps/libgit2/src/unix/posix.h', - 'deps/libgit2/src/unix/pthread.h', - 'deps/libgit2/src/unix/realpath.c', + './deps/libgit2/src/unix/map.c', + './deps/libgit2/src/unix/posix.h', + './deps/libgit2/src/unix/pthread.h', + './deps/libgit2/src/unix/realpath.c', + './deps/libgit2/src/hash/sha1/generic.c', + './deps/libgit2/src/hash/sha1/generic.h', ], 'cflags': [ '-Wno-missing-field-initializers', @@ -463,26 +483,26 @@ # Automatically generated by using the following command in bash: # find "./deps/libgit2/deps/zlib/" -regex ".*\.[h|c]" -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ - 'deps/libgit2/deps/zlib/adler32.c', - 'deps/libgit2/deps/zlib/crc32.c', - 'deps/libgit2/deps/zlib/crc32.h', - 'deps/libgit2/deps/zlib/deflate.c', - 'deps/libgit2/deps/zlib/deflate.h', - 'deps/libgit2/deps/zlib/gzguts.h', - 'deps/libgit2/deps/zlib/infback.c', - 'deps/libgit2/deps/zlib/inffast.c', - 'deps/libgit2/deps/zlib/inffast.h', - 'deps/libgit2/deps/zlib/inffixed.h', - 'deps/libgit2/deps/zlib/inflate.c', - 'deps/libgit2/deps/zlib/inflate.h', - 'deps/libgit2/deps/zlib/inftrees.c', - 'deps/libgit2/deps/zlib/inftrees.h', - 'deps/libgit2/deps/zlib/trees.c', - 'deps/libgit2/deps/zlib/trees.h', - 'deps/libgit2/deps/zlib/zconf.h', - 'deps/libgit2/deps/zlib/zlib.h', - 'deps/libgit2/deps/zlib/zutil.c', - 'deps/libgit2/deps/zlib/zutil.h', + './deps/libgit2/deps/zlib/adler32.c', + './deps/libgit2/deps/zlib/crc32.c', + './deps/libgit2/deps/zlib/crc32.h', + './deps/libgit2/deps/zlib/deflate.c', + './deps/libgit2/deps/zlib/deflate.h', + './deps/libgit2/deps/zlib/gzguts.h', + './deps/libgit2/deps/zlib/infback.c', + './deps/libgit2/deps/zlib/inffast.c', + './deps/libgit2/deps/zlib/inffast.h', + './deps/libgit2/deps/zlib/inffixed.h', + './deps/libgit2/deps/zlib/inflate.c', + './deps/libgit2/deps/zlib/inflate.h', + './deps/libgit2/deps/zlib/inftrees.c', + './deps/libgit2/deps/zlib/inftrees.h', + './deps/libgit2/deps/zlib/trees.c', + './deps/libgit2/deps/zlib/trees.h', + './deps/libgit2/deps/zlib/zconf.h', + './deps/libgit2/deps/zlib/zlib.h', + './deps/libgit2/deps/zlib/zutil.c', + './deps/libgit2/deps/zlib/zutil.h', ], 'defines': [ 'NO_VIZ', @@ -515,8 +535,8 @@ # Automatically generated by using the following command in bash: # find "./deps/libgit2/deps/http-parser" -regex ".*\.[h|c]" -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ - 'deps/libgit2/deps/http-parser/http_parser.c', - 'deps/libgit2/deps/http-parser/http_parser.h', + './deps/libgit2/deps/http-parser/http_parser.c', + './deps/libgit2/deps/http-parser/http_parser.h', ], 'direct_dependent_settings': { 'include_dirs': [ @@ -542,28 +562,34 @@ # Automatically generated by using the following command in bash: # find "./deps/libgit2/deps/pcre" -regex ".*\.[h|c]" -print0 | xargs -0 -I {} echo " '{}'," 'sources': [ - 'deps/libgit2/deps/pcre/pcre_byte_order.c', - 'deps/libgit2/deps/pcre/pcre_chartables.c', - 'deps/libgit2/deps/pcre/pcre_compile.c', - 'deps/libgit2/deps/pcre/pcre_config.c', - 'deps/libgit2/deps/pcre/pcre_dfa_exec.c', - 'deps/libgit2/deps/pcre/pcre_exec.c', - 'deps/libgit2/deps/pcre/pcre_fullinfo.c', - 'deps/libgit2/deps/pcre/pcre_get.c', - 'deps/libgit2/deps/pcre/pcre_globals.c', - 'deps/libgit2/deps/pcre/pcre_jit_compile.c', - 'deps/libgit2/deps/pcre/pcre_maketables.c', - 'deps/libgit2/deps/pcre/pcre_newline.c', - 'deps/libgit2/deps/pcre/pcre_ord2utf8.c', - 'deps/libgit2/deps/pcre/pcre_refcount.c', - 'deps/libgit2/deps/pcre/pcre_string_utils.c', - 'deps/libgit2/deps/pcre/pcre_study.c', - 'deps/libgit2/deps/pcre/pcre_tables.c', - 'deps/libgit2/deps/pcre/pcre_ucd.c', - 'deps/libgit2/deps/pcre/pcre_valid_utf8.c', - 'deps/libgit2/deps/pcre/pcre_version.c', - 'deps/libgit2/deps/pcre/pcre_xclass.c', - 'deps/libgit2/deps/pcre/pcreposix.c', + './deps/libgit2/deps/pcre/pcre.h', + './deps/libgit2/deps/pcre/pcreposix.c', + './deps/libgit2/deps/pcre/pcreposix.h', + './deps/libgit2/deps/pcre/pcre_byte_order.c', + './deps/libgit2/deps/pcre/pcre_chartables.c', + './deps/libgit2/deps/pcre/pcre_compile.c', + './deps/libgit2/deps/pcre/pcre_config.c', + './deps/libgit2/deps/pcre/pcre_dfa_exec.c', + './deps/libgit2/deps/pcre/pcre_exec.c', + './deps/libgit2/deps/pcre/pcre_fullinfo.c', + './deps/libgit2/deps/pcre/pcre_get.c', + './deps/libgit2/deps/pcre/pcre_globals.c', + './deps/libgit2/deps/pcre/pcre_internal.h', + './deps/libgit2/deps/pcre/pcre_jit_compile.c', + './deps/libgit2/deps/pcre/pcre_maketables.c', + './deps/libgit2/deps/pcre/pcre_newline.c', + './deps/libgit2/deps/pcre/pcre_ord2utf8.c', + './deps/libgit2/deps/pcre/pcre_printint.c', + './deps/libgit2/deps/pcre/pcre_refcount.c', + './deps/libgit2/deps/pcre/pcre_string_utils.c', + './deps/libgit2/deps/pcre/pcre_study.c', + './deps/libgit2/deps/pcre/pcre_tables.c', + './deps/libgit2/deps/pcre/pcre_ucd.c', + './deps/libgit2/deps/pcre/pcre_valid_utf8.c', + './deps/libgit2/deps/pcre/pcre_version.c', + './deps/libgit2/deps/pcre/pcre_xclass.c', + './deps/libgit2/deps/pcre/ucp.h', + ], 'defines': [ 'SUPPORT_PCRE8=1', From 1b15b305fe5445046733b91cc897e6d1a2617226 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 31 Dec 2020 09:20:27 -0600 Subject: [PATCH 06/18] Move pcre to common targets --- binding.gyp | 127 ++++++++++++++++++++++++---------------------------- 1 file changed, 58 insertions(+), 69 deletions(-) diff --git a/binding.gyp b/binding.gyp index de6f8309..617bbe87 100644 --- a/binding.gyp +++ b/binding.gyp @@ -43,10 +43,12 @@ # Node's util.h may be accidentally included so use this to guard # against compilation error. 'SRC_UTIL_H_', + 'GIT_REGEX_BUILTIN', ], 'dependencies': [ 'zlib', 'http_parser', + 'pcre' ], # Automatically generated by using the following command in bash: # find "./deps/libgit2/src" -mindepth 1 -type f ! -path "./deps/libgit2/src/win32/*" ! -path "./deps/libgit2/src/unix/*" ! -path "./deps/libgit2/src/hash/*" -print0 | xargs -0 -I {} echo " '{}'," @@ -357,12 +359,8 @@ ['OS=="win"', { 'defines': [ 'GIT_WINHTTP', - 'GIT_REGEX_BUILTIN', 'GIT_SHA1_WIN32' ], - 'dependencies': [ - 'pcre', - ], 'link_settings': { 'libraries': [ '-lcrypt32.lib', @@ -522,9 +520,6 @@ 'msvs_disabled_warnings': [ 4005, # macro redefinition ], - 'include_dirs': [ - 'deps/libgit2/deps/regex', - ], }], ], }, @@ -551,67 +546,61 @@ }], ], }, - ], - 'conditions': [ - ['OS=="win"', { - 'targets': [ - { - 'target_name': 'pcre', - 'win_delay_load_hook': 'false', - 'type': 'static_library', - # Automatically generated by using the following command in bash: - # find "./deps/libgit2/deps/pcre" -regex ".*\.[h|c]" -print0 | xargs -0 -I {} echo " '{}'," - 'sources': [ - './deps/libgit2/deps/pcre/pcre.h', - './deps/libgit2/deps/pcre/pcreposix.c', - './deps/libgit2/deps/pcre/pcreposix.h', - './deps/libgit2/deps/pcre/pcre_byte_order.c', - './deps/libgit2/deps/pcre/pcre_chartables.c', - './deps/libgit2/deps/pcre/pcre_compile.c', - './deps/libgit2/deps/pcre/pcre_config.c', - './deps/libgit2/deps/pcre/pcre_dfa_exec.c', - './deps/libgit2/deps/pcre/pcre_exec.c', - './deps/libgit2/deps/pcre/pcre_fullinfo.c', - './deps/libgit2/deps/pcre/pcre_get.c', - './deps/libgit2/deps/pcre/pcre_globals.c', - './deps/libgit2/deps/pcre/pcre_internal.h', - './deps/libgit2/deps/pcre/pcre_jit_compile.c', - './deps/libgit2/deps/pcre/pcre_maketables.c', - './deps/libgit2/deps/pcre/pcre_newline.c', - './deps/libgit2/deps/pcre/pcre_ord2utf8.c', - './deps/libgit2/deps/pcre/pcre_printint.c', - './deps/libgit2/deps/pcre/pcre_refcount.c', - './deps/libgit2/deps/pcre/pcre_string_utils.c', - './deps/libgit2/deps/pcre/pcre_study.c', - './deps/libgit2/deps/pcre/pcre_tables.c', - './deps/libgit2/deps/pcre/pcre_ucd.c', - './deps/libgit2/deps/pcre/pcre_valid_utf8.c', - './deps/libgit2/deps/pcre/pcre_version.c', - './deps/libgit2/deps/pcre/pcre_xclass.c', - './deps/libgit2/deps/pcre/ucp.h', + { + 'target_name': 'pcre', + 'win_delay_load_hook': 'false', + 'type': 'static_library', + # Automatically generated by using the following command in bash: + # find "./deps/libgit2/deps/pcre" -regex ".*\.[h|c]" -print0 | xargs -0 -I {} echo " '{}'," + 'sources': [ + './deps/libgit2/deps/pcre/pcre.h', + './deps/libgit2/deps/pcre/pcreposix.c', + './deps/libgit2/deps/pcre/pcreposix.h', + './deps/libgit2/deps/pcre/pcre_byte_order.c', + './deps/libgit2/deps/pcre/pcre_chartables.c', + './deps/libgit2/deps/pcre/pcre_compile.c', + './deps/libgit2/deps/pcre/pcre_config.c', + './deps/libgit2/deps/pcre/pcre_dfa_exec.c', + './deps/libgit2/deps/pcre/pcre_exec.c', + './deps/libgit2/deps/pcre/pcre_fullinfo.c', + './deps/libgit2/deps/pcre/pcre_get.c', + './deps/libgit2/deps/pcre/pcre_globals.c', + './deps/libgit2/deps/pcre/pcre_internal.h', + './deps/libgit2/deps/pcre/pcre_jit_compile.c', + './deps/libgit2/deps/pcre/pcre_maketables.c', + './deps/libgit2/deps/pcre/pcre_newline.c', + './deps/libgit2/deps/pcre/pcre_ord2utf8.c', + './deps/libgit2/deps/pcre/pcre_printint.c', + './deps/libgit2/deps/pcre/pcre_refcount.c', + './deps/libgit2/deps/pcre/pcre_string_utils.c', + './deps/libgit2/deps/pcre/pcre_study.c', + './deps/libgit2/deps/pcre/pcre_tables.c', + './deps/libgit2/deps/pcre/pcre_ucd.c', + './deps/libgit2/deps/pcre/pcre_valid_utf8.c', + './deps/libgit2/deps/pcre/pcre_version.c', + './deps/libgit2/deps/pcre/pcre_xclass.c', + './deps/libgit2/deps/pcre/ucp.h', - ], - 'defines': [ - 'SUPPORT_PCRE8=1', - 'LINK_SIZE=2', - 'PARENS_NEST_LIMIT=250', - 'MATCH_LIMIT=10000000', - 'MATCH_LIMIT_RECURSION="MATCH_LIMIT"', - 'NEWLINE="LF"', - 'NO_RECURSE=1', - 'POSIX_MALLOC_THRESHOLD=10', - 'BSR_ANYCRLF=0', - 'MAX_NAME_SIZE=32', - 'MAX_NAME_COUNT=10000', - ], - 'include_dirs': [], - 'direct_dependent_settings': { - 'include_dirs': [ - 'deps/libgit2/deps/pcre', - ], - }, - }, - ] - }] - ] + ], + 'defines': [ + 'SUPPORT_PCRE8=1', + 'LINK_SIZE=2', + 'PARENS_NEST_LIMIT=250', + 'MATCH_LIMIT=10000000', + 'MATCH_LIMIT_RECURSION="MATCH_LIMIT"', + 'NEWLINE="LF"', + 'NO_RECURSE=1', + 'POSIX_MALLOC_THRESHOLD=10', + 'BSR_ANYCRLF=0', + 'MAX_NAME_SIZE=32', + 'MAX_NAME_COUNT=10000', + ], + 'include_dirs': [], + 'direct_dependent_settings': { + 'include_dirs': [ + 'deps/libgit2/deps/pcre', + ], + }, + }, + ], } From bdfdd7d2f6b81cfb4775b0433fef062ee4739aba Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 31 Dec 2020 11:04:59 -0600 Subject: [PATCH 07/18] Update fs-plus --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 982c393c..60cdcfec 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ }, "dependencies": { "nan": "^2.14.0", - "fs-plus": "^3.0.0" + "fs-plus": "^3.1.1" }, "scripts": { "lint": "standard src spec", From cf1cb5793b83e64ad0d9e04c5f614930342f6334 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 31 Dec 2020 11:05:06 -0600 Subject: [PATCH 08/18] Update nan --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 60cdcfec..b80c2e7e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "wrench": "~1.4.4" }, "dependencies": { - "nan": "^2.14.0", + "nan": "^2.14.2", "fs-plus": "^3.1.1" }, "scripts": { From 587e896bdd2af891a4ddeca620614df291650cea Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 31 Dec 2020 11:05:23 -0600 Subject: [PATCH 09/18] Update test dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b80c2e7e..5afda0f9 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,10 @@ ], "main": "./src/git.js", "devDependencies": { - "jasmine-focused": "^1.0.4", "standard": "^10.0.3", + "jasmine-focused": "^1.0.7", "temp": "~0.9.4", - "underscore": "~1.5.2", + "underscore": "~1.12.0", "wrench": "~1.4.4" }, "dependencies": { From ef97d97e329b7cf6ce84c98e653ad0aed629a2d3 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 31 Dec 2020 11:07:04 -0600 Subject: [PATCH 10/18] Update package-lock file --- package-lock.json | 163 +++++----------------------------------------- 1 file changed, 17 insertions(+), 146 deletions(-) diff --git a/package-lock.json b/package-lock.json index 486677c4..de8d4505 100644 --- a/package-lock.json +++ b/package-lock.json @@ -89,8 +89,7 @@ "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "babel-code-frame": { "version": "6.26.0", @@ -106,14 +105,12 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -262,8 +259,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { "version": "1.6.2", @@ -841,134 +837,20 @@ } }, "fs-plus": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fs-plus/-/fs-plus-3.0.1.tgz", - "integrity": "sha1-VMFpxA4ohKZtNSeA0Y3TH5HToQ0=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fs-plus/-/fs-plus-3.1.1.tgz", + "integrity": "sha512-Se2PJdOWXqos1qVTkvqqjb0CSnfBnwwD+pq+z4ksT+e97mEShod/hrNg0TRCCsXPbJzcIq+NuzQhigunMWMJUA==", "requires": { "async": "^1.5.2", "mkdirp": "^0.5.1", "rimraf": "^2.5.2", "underscore-plus": "1.x" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "^7.0.5" - } - }, - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" - }, - "underscore-plus": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/underscore-plus/-/underscore-plus-1.6.6.tgz", - "integrity": "sha1-ZezeG9xEGjXYnmUP1w3PE65Dmn0=", - "requires": { - "underscore": "~1.6.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } } }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "function-bind": { "version": "1.1.1", @@ -1037,7 +919,6 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1099,7 +980,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -1108,8 +988,7 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "inquirer": { "version": "0.12.0", @@ -1376,7 +1255,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1390,7 +1268,6 @@ "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, "requires": { "minimist": "^1.2.5" } @@ -1408,9 +1285,9 @@ "dev": true }, "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" }, "natural-compare": { "version": "1.4.0", @@ -1464,7 +1341,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "requires": { "wrappy": "1" } @@ -1538,8 +1414,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-is-inside": { "version": "1.0.2", @@ -1739,7 +1614,6 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, "requires": { "glob": "^7.1.3" } @@ -2002,16 +1876,15 @@ "dev": true }, "underscore": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.5.2.tgz", - "integrity": "sha1-EzXF5PXm0zu7SwBrqMhqAPVW3gg=", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.0.tgz", + "integrity": "sha512-21rQzss/XPMjolTiIezSu3JAjgagXKROtNrYFEOWK109qY1Uv2tVjPTZ1ci2HgvQDA16gHYSthQIJfB+XId/rQ==", "dev": true }, "underscore-plus": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/underscore-plus/-/underscore-plus-1.7.0.tgz", "integrity": "sha512-A3BEzkeicFLnr+U/Q3EyWwJAQPbA19mtZZ4h+lLq3ttm9kn8WC4R3YpuJZEXmWdLjYP47Zc8aLZm9kwdv+zzvA==", - "dev": true, "requires": { "underscore": "^1.9.1" }, @@ -2019,8 +1892,7 @@ "underscore": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.0.tgz", - "integrity": "sha512-21rQzss/XPMjolTiIezSu3JAjgagXKROtNrYFEOWK109qY1Uv2tVjPTZ1ci2HgvQDA16gHYSthQIJfB+XId/rQ==", - "dev": true + "integrity": "sha512-21rQzss/XPMjolTiIezSu3JAjgagXKROtNrYFEOWK109qY1Uv2tVjPTZ1ci2HgvQDA16gHYSthQIJfB+XId/rQ==" } } }, @@ -2060,8 +1932,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "wrench": { "version": "1.4.4", From 28610dffca80a2e1c59268dbed38b1f66f6adaa6 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Wed, 13 Jan 2021 23:56:23 -0600 Subject: [PATCH 11/18] Remove excess condition syntax --- binding.gyp | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/binding.gyp b/binding.gyp index 617bbe87..f1349fe4 100644 --- a/binding.gyp +++ b/binding.gyp @@ -9,29 +9,24 @@ 'sources': [ 'src/repository.cc' ], - 'conditions': [ - ['OS=="win"', { - 'msvs_disabled_warnings': [ - 4244, # conversion from 'ssize_t' to 'int32_t', possible loss of data - 4530, # C++ exception handler used, but unwind semantics are not enabled. - 4506, # no definition for inline function - 4267, # conversion from 'size_t' to 'int', possible loss of data - 4344, # behavior change - ], - }, { - 'cflags': [ - '-Wno-missing-field-initializers', - ], - 'cflags_cc!': [ - '-fno-delete-null-pointer-checks', # clang-3.4 doesn't understand this flag and fails. - ], - 'xcode_settings': { - 'WARNING_CFLAGS': [ - '-Wno-missing-field-initializers', - ], - }, - }], + 'msvs_disabled_warnings': [ + 4244, # conversion from 'ssize_t' to 'int32_t', possible loss of data + 4530, # C++ exception handler used, but unwind semantics are not enabled. + 4506, # no definition for inline function + 4267, # conversion from 'size_t' to 'int', possible loss of data + 4344, # behavior change + ], + 'cflags': [ + '-Wno-missing-field-initializers', + ], + 'cflags_cc!': [ + '-fno-delete-null-pointer-checks', # clang-3.4 doesn't understand this flag and fails. ], + 'xcode_settings': { + 'WARNING_CFLAGS': [ + '-Wno-missing-field-initializers', + ], + }, }, { 'target_name': 'libgit2', From 63418c4a729b33982bbacf293f141f67e307c47b Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Wed, 13 Jan 2021 23:57:49 -0600 Subject: [PATCH 12/18] Remove old error suppression flag Clang supports this now --- binding.gyp | 3 --- 1 file changed, 3 deletions(-) diff --git a/binding.gyp b/binding.gyp index f1349fe4..86df522e 100644 --- a/binding.gyp +++ b/binding.gyp @@ -19,9 +19,6 @@ 'cflags': [ '-Wno-missing-field-initializers', ], - 'cflags_cc!': [ - '-fno-delete-null-pointer-checks', # clang-3.4 doesn't understand this flag and fails. - ], 'xcode_settings': { 'WARNING_CFLAGS': [ '-Wno-missing-field-initializers', From 0c3c1a6460df40414b2f442d370a5027aebfd10a Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 14 Jan 2021 00:07:22 -0600 Subject: [PATCH 13/18] Add no-unused-function to suppress internal pcre warnings --- binding.gyp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/binding.gyp b/binding.gyp index 86df522e..04dde817 100644 --- a/binding.gyp +++ b/binding.gyp @@ -593,6 +593,14 @@ 'deps/libgit2/deps/pcre', ], }, + "cflags": [ + "-Wno-unused-function" + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-Wno-unused-function' + ], + }, }, ], } From e9158290b35ea9c820441f0adfe562ea308605b6 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 14 Jan 2021 00:53:31 -0600 Subject: [PATCH 14/18] Fix NEWLINE value Based on cmake file --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index 04dde817..f4ff539d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -580,7 +580,7 @@ 'PARENS_NEST_LIMIT=250', 'MATCH_LIMIT=10000000', 'MATCH_LIMIT_RECURSION="MATCH_LIMIT"', - 'NEWLINE="LF"', + 'NEWLINE="10"', # LF 'NO_RECURSE=1', 'POSIX_MALLOC_THRESHOLD=10', 'BSR_ANYCRLF=0', From 6f97254911e11bd28c291ddcbe8f9a2decf44ef2 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 15 Jan 2021 10:55:02 -0600 Subject: [PATCH 15/18] Update PCRE flags basd on node-git https://github.com/nodegit/nodegit/blob/7df154a5eb9e93ad933f0a9864f06e2395d32d21/vendor/libgit2.gyp#L717 --- binding.gyp | 67 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 12 deletions(-) diff --git a/binding.gyp b/binding.gyp index f4ff539d..50e5e55f 100644 --- a/binding.gyp +++ b/binding.gyp @@ -574,18 +574,61 @@ './deps/libgit2/deps/pcre/ucp.h', ], - 'defines': [ - 'SUPPORT_PCRE8=1', - 'LINK_SIZE=2', - 'PARENS_NEST_LIMIT=250', - 'MATCH_LIMIT=10000000', - 'MATCH_LIMIT_RECURSION="MATCH_LIMIT"', - 'NEWLINE="10"', # LF - 'NO_RECURSE=1', - 'POSIX_MALLOC_THRESHOLD=10', - 'BSR_ANYCRLF=0', - 'MAX_NAME_SIZE=32', - 'MAX_NAME_COUNT=10000', + "conditions": [ + ["OS=='linux' or OS.endswith('bsd')", { + "defines": [ + "HAVE_DIRENT_H", + "HAVE_SYS_STAT_H", + "HAVE_SYS_TYPES_H", + "HAVE_UNISTD_H", + "HAVE_STDINT_H", + "HAVE_INTTYPES_H", + "HAVE_BCOPY", + "HAVE_MEMMOVE", + "HAVE_STRERROR", + "HAVE_STRTOLL", + "HAVE_STRTOQ", + "SUPPORT_PCRE8", + "NO_RECURSE", + "HAVE_LONG_LONG", + "HAVE_UNSIGNED_LONG_LONG", + "NEWLINE=10", + "POSIX_MALLOC_THRESHOLD=10", + "LINK_SIZE=2", + "PARENS_NEST_LIMIT=250", + "MATCH_LIMIT=10000000", + "MATCH_LIMIT_RECURSION=10000000", + "PCREGREP_BUFSIZE", + "MAX_NAME_SIZE=32", + "MAX_NAME_COUNT=10000" + ] + }], + ["OS=='win'", { + "defines": [ + "HAVE_SYS_STAT_H", + "HAVE_SYS_TYPES_H", + "HAVE_WINDOWS_H", + "HAVE_STDINT_H", + "HAVE_INTTYPES_H", + "HAVE_MEMMOVE", + "HAVE_STRERROR", + "HAVE_STRTOLL", + "HAVE__STRTOI64", + "SUPPORT_PCRE8", + "NO_RECURSE", + "HAVE_LONG_LONG", + "HAVE_UNSIGNED_LONG_LONG", + "NEWLINE=10", # LF + "POSIX_MALLOC_THRESHOLD=10", + "LINK_SIZE=2", + "PARENS_NEST_LIMIT=250", + "MATCH_LIMIT=10000000", + "MATCH_LIMIT_RECURSION=10000000", + "PCREGREP_BUFSIZE", + "MAX_NAME_SIZE=32", + "MAX_NAME_COUNT=10000" + ] + }] ], 'include_dirs': [], 'direct_dependent_settings': { From 83aee8a4075a238f04dd083d47c94c40e20cd327 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 15 Jan 2021 11:20:37 -0600 Subject: [PATCH 16/18] Add GIT_HTTPS --- binding.gyp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index 50e5e55f..d30606aa 100644 --- a/binding.gyp +++ b/binding.gyp @@ -31,7 +31,8 @@ 'type': 'static_library', 'defines': [ 'GIT_THREADS', - 'LIBGIT2_NO_FEATURES_H', + "LIBGIT2_NO_FEATURES_H", + "GIT_HTTPS", # Node's util.h may be accidentally included so use this to guard # against compilation error. 'SRC_UTIL_H_', From c2b232c3bf1e58d4155ae3281af70774dc74241d Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 15 Jan 2021 11:23:21 -0600 Subject: [PATCH 17/18] Add arch flags based on node-git https://github.com/nodegit/nodegit/blob/7df154a5eb9e93ad933f0a9864f06e2395d32d21/vendor/libgit2.gyp#L315 --- binding.gyp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/binding.gyp b/binding.gyp index d30606aa..47bc2c9d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -336,6 +336,15 @@ './deps/libgit2/src/zstream.h', ], 'conditions': [ + ["target_arch=='x64'", { + "defines": [ + "GIT_ARCH_64" + ] + }, { + "defines": [ + "GIT_ARCH_32" + ] + }], ['OS=="mac"', { 'defines': [ 'GIT_USE_STAT_MTIMESPEC' From 18d982e44967716bfdc8e33cd01a9d8b5b94ea18 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 15 Jan 2021 11:26:52 -0600 Subject: [PATCH 18/18] Add GIT_USE_FUTIMENS based on node-git https://github.com/nodegit/nodegit/blob/7df154a5eb9e93ad933f0a9864f06e2395d32d21/vendor/libgit2.gyp#L394 --- binding.gyp | 1 + 1 file changed, 1 insertion(+) diff --git a/binding.gyp b/binding.gyp index 47bc2c9d..a3d9e1b9 100644 --- a/binding.gyp +++ b/binding.gyp @@ -355,6 +355,7 @@ '-w', ], 'defines': [ + "GIT_USE_FUTIMENS", 'GIT_USE_STAT_MTIM' ] }],