Browse Source

Merge pull request #13203 from nxhack/mraa_node_v12

libmraa: support node.js v12
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by GitHub
parent
commit
79fd505592
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 4 deletions
  1. +3
    -4
      libs/libmraa/Makefile
  2. +14
    -0
      libs/libmraa/patches/020-support_v12.patch

+ 3
- 4
libs/libmraa/Makefile View File

@ -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


+ 14
- 0
libs/libmraa/patches/020-support_v12.patch View File

@ -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

Loading…
Cancel
Save