diff options
author | Hirokazu MORIKAWA <morikw2@gmail.com> | 2020-08-25 17:39:31 +0900 |
---|---|---|
committer | Hirokazu MORIKAWA <morikw2@gmail.com> | 2020-08-25 18:49:13 +0900 |
commit | 0e9db80f0e864c5d1c6964c37b78780c1c78382e (patch) | |
tree | ba43733ee14460530637155fec03ef0d8f88ef4f | |
parent | 786253f2144094edfbd42065c0eebffba83b1944 (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>
-rw-r--r-- | libs/libmraa/Makefile | 7 | ||||
-rw-r--r-- | libs/libmraa/patches/020-support_v12.patch | 14 |
2 files changed, 17 insertions, 4 deletions
diff --git a/libs/libmraa/Makefile b/libs/libmraa/Makefile index 18515ce8a..ff3311c9f 100644 --- a/libs/libmraa/Makefile +++ b/libs/libmraa/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmraa PKG_VERSION:=2.1.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/eclipse/mraa/tar.gz/v$(PKG_VERSION)? @@ -30,8 +30,7 @@ include $(INCLUDE_DIR)/cmake.mk include ../../lang/python/python3-package.mk CMAKE_OPTIONS=-DENABLEEXAMPLES=0 \ - -DFIRMATA=ON \ - -DBUILDSWIG=OFF + -DFIRMATA=ON TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/node @@ -78,7 +77,7 @@ endef define Package/libmraa-python3 $(call Package/libmraa/Default) TITLE:=Eclipse MRAA lowlevel IO Python3 library - DEPENDS:=+libmraa +python3-light @BROKEN + DEPENDS:=+libmraa +python3-light endef define Package/libmraa-python3/description 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 |