From 633933ee0b516c31ba533fb9619b3fb39aa0d6bd Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 19 Apr 2017 13:23:06 -0700 Subject: [PATCH 1/2] Node: Don't depend on cares npm package --- binding.gyp | 3 --- package.json | 3 +-- templates/binding.gyp.template | 7 ------- templates/package.json.template | 3 +-- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/binding.gyp b/binding.gyp index 16334a22a7f..d5942a05ceb 100644 --- a/binding.gyp +++ b/binding.gyp @@ -569,7 +569,6 @@ }] ], 'targets': [ - { 'cflags': [ '-std=c99', @@ -648,7 +647,6 @@ 'type': 'static_library', 'dependencies': [ 'gpr', - 'node_modules/cares/deps/cares/cares.gyp:cares', ], 'sources': [ 'src/core/lib/surface/init.c', @@ -951,7 +949,6 @@ "dependencies": [ "grpc", "gpr", - "node_modules/cares/deps/cares/cares.gyp:cares", ] }, { diff --git a/package.json b/package.json index d4f7b56b6a9..38312731c23 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,7 @@ "lodash": "^4.15.0", "nan": "^2.0.0", "node-pre-gyp": "^0.6.0", - "protobufjs": "^6.7.0", - "cares": "^1.1.5" + "protobufjs": "^6.7.0" }, "devDependencies": { "async": "^2.0.1", diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index a2e8c588920..062900de144 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -264,13 +264,6 @@ }] ], 'targets': [ - <% - for lib in libs: - if 'grpc' in lib.transitive_deps or lib.name == 'grpc': - lib.deps.append('node_modules/cares/deps/cares/cares.gyp:cares') - for module in node_modules: - module.deps.append('node_modules/cares/deps/cares/cares.gyp:cares') - %> % for module in node_modules: % for lib in libs: % if lib.name in module.transitive_deps and lib.name not in ('boringssl', 'z'): diff --git a/templates/package.json.template b/templates/package.json.template index b69fd28d2ab..3bae8fde430 100644 --- a/templates/package.json.template +++ b/templates/package.json.template @@ -36,8 +36,7 @@ "lodash": "^4.15.0", "nan": "^2.0.0", "node-pre-gyp": "^0.6.0", - "protobufjs": "^6.7.0", - "cares": "^1.1.5" + "protobufjs": "^6.7.0" }, "devDependencies": { "async": "^2.0.1", From 652210ac2b5ec0b93d9a57bbeb275c334c2b29c9 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 19 Apr 2017 13:46:32 -0700 Subject: [PATCH 2/2] Node: fix the cases where zlib is built --- binding.gyp | 4 ++++ templates/binding.gyp.template | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/binding.gyp b/binding.gyp index d5942a05ceb..9794c87343b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -535,6 +535,10 @@ } ] }, + ] + }], + ['OS == "win"', { + 'targets': [ # Only want to compile zlib under Windows { 'cflags': [ diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index 062900de144..c08c100fd5d 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -233,6 +233,10 @@ } ] }, + ] + }], + ['OS == "win"', { + 'targets': [ # Only want to compile zlib under Windows % for module in node_modules: % for lib in libs: