Update node-pre-gyp patch and move it to another folder

To prevent the apply-patches script from doing stuff

Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2019-01-21 16:47:14 +01:00
parent 3e0062621b
commit 1d77b8dae7
2 changed files with 11 additions and 11 deletions

View File

@ -92,21 +92,22 @@ TARGET_ARCH ?= $(HOST_ARCH)
# ---------------------------------------------------------------------
# Electron
# ---------------------------------------------------------------------
patches:
# patch from https://github.com/mapbox/node-pre-gyp/pull/279/files , required for lzma-native in electron child processes
# we only apply the patch if it hasn't been applied
if ! [ -f node_modules/node-pre-gyp/lib/util/versioning.js.orig ]; \
then patch --backup --force --strip=1 --ignore-whitespace < node_modules_patches/allow-electron-forks-of-modules-that-use-pre-gyp.patch; \
fi;
electron-develop: | $(BUILD_TEMPORARY_DIRECTORY)
electron-develop: patches | $(BUILD_TEMPORARY_DIRECTORY)
$(RESIN_SCRIPTS)/electron/install.sh \
-b $(shell pwd) \
-r $(TARGET_ARCH) \
-s $(PLATFORM) \
-n $(BUILD_TEMPORARY_DIRECTORY)/npm \
-a $(S3_BUCKET)
# patch from https://github.com/mapbox/node-pre-gyp/pull/279/files , required for lzma-native in electron child processes
# we only apply the patch if it hasn't been applied
if ! [ -f node_modules/node-pre-gyp/lib/util/versioning.js.orig ]; \
then patch --backup --force --strip=1 --ignore-whitespace < patches/allow-electron-forks-of-modules-that-use-pre-gyp.patch; \
fi;
electron-test:
electron-test: patches
$(RESIN_SCRIPTS)/electron/test.sh \
-b $(shell pwd) \
-s $(PLATFORM)
@ -114,7 +115,7 @@ electron-test:
assets/dmg/background.tiff: assets/dmg/background.png assets/dmg/background@2x.png
tiffutil -cathidpicheck $^ -out $@
electron-build: assets/dmg/background.tiff | $(BUILD_TEMPORARY_DIRECTORY)
electron-build: patches assets/dmg/background.tiff | $(BUILD_TEMPORARY_DIRECTORY)
$(RESIN_SCRIPTS)/electron/build.sh \
-b $(shell pwd) \
-r $(TARGET_ARCH) \

View File

@ -1,6 +1,6 @@
--- a/node_modules/node-pre-gyp/lib/util/versioning.js
+++ b/node_modules/node-pre-gyp/lib/util/versioning.js
@@ -70,7 +70,14 @@ function get_runtime_abi(runtime, target_version) {
@@ -80,7 +80,14 @@ function get_runtime_abi(runtime, target_version) {
if (runtime === 'node-webkit') {
return get_node_webkit_abi(runtime, target_version || process.versions['node-webkit']);
} else if (runtime === 'electron') {
@ -16,7 +16,7 @@
} else {
if (runtime != 'node') {
throw new Error("Unknown Runtime: '" + runtime + "'");
@@ -245,7 +252,8 @@ function get_process_runtime(versions) {
@@ -263,7 +270,8 @@ function get_process_runtime(versions) {
var runtime = 'node';
if (versions['node-webkit']) {
runtime = 'node-webkit';
@ -26,4 +26,3 @@
runtime = 'electron';
}
return runtime;