aboutsummaryrefslogtreecommitdiff
path: root/libs/libmraa/patches
diff options
context:
space:
mode:
authorHirokazu MORIKAWA <morikw2@gmail.com>2020-08-25 17:39:31 +0900
committerHirokazu MORIKAWA <morikw2@gmail.com>2020-08-25 18:49:13 +0900
commit0e9db80f0e864c5d1c6964c37b78780c1c78382e (patch)
treeba43733ee14460530637155fec03ef0d8f88ef4f /libs/libmraa/patches
parent786253f2144094edfbd42065c0eebffba83b1944 (diff)
libmraa: support node.js v12
Maintainer: @blogic me Compile tested: head r14241-ba2ddba, x86_64 Run tested: x86_64 (VirtualBox) Description: Addressed the build failure with node.js version 12. Re-enable swig. https://github.com/openwrt/packages/issues/11977 https://github.com/openwrt/packages/pull/12225 Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
Diffstat (limited to 'libs/libmraa/patches')
-rw-r--r--libs/libmraa/patches/020-support_v12.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/libmraa/patches/020-support_v12.patch b/libs/libmraa/patches/020-support_v12.patch
new file mode 100644
index 000000000..cc70d5ba6
--- /dev/null
+++ b/libs/libmraa/patches/020-support_v12.patch
@@ -0,0 +1,14 @@
+--- a/api/mraa/gpio.hpp
++++ b/api/mraa/gpio.hpp
+@@ -175,7 +175,11 @@
+ v8::Local<v8::Value> argv[] = { SWIGV8_INTEGER_NEW(-1) };
+ #if NODE_MODULE_VERSION >= 0x000D
+ v8::Local<v8::Function> f = v8::Local<v8::Function>::New(v8::Isolate::GetCurrent(), This->m_v8isr);
++#if NODE_MODULE_VERSION >= 72
++ f->Call(SWIGV8_CURRENT_CONTEXT(), SWIGV8_CURRENT_CONTEXT()->Global(), argc, argv);
++#else
+ f->Call(SWIGV8_CURRENT_CONTEXT()->Global(), argc, argv);
++#endif
+ #else
+ This->m_v8isr->Call(SWIGV8_CURRENT_CONTEXT()->Global(), argc, argv);
+ #endif