libupm: support node.js v12
authorHirokazu MORIKAWA <redacted>
Tue, 25 Aug 2020 08:41:41 +0000 (17:41 +0900)
committerHirokazu MORIKAWA <redacted>
Tue, 25 Aug 2020 09:50:16 +0000 (18:50 +0900)
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.

Signed-off-by: Hirokazu MORIKAWA <redacted>
libs/libupm/Makefile
libs/libupm/patches/005-support_v12.patch [new file with mode: 0644]

index 7a2b8a2d2092bb0e8209cd63afeef92b8d857b37..7d37d583e9ce325383e507494f56f41999b42d3c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupm
 PKG_VERSION:=2.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/intel-iot-devkit/upm/tar.gz/v$(PKG_VERSION)?
diff --git a/libs/libupm/patches/005-support_v12.patch b/libs/libupm/patches/005-support_v12.patch
new file mode 100644 (file)
index 0000000..c9d9c66
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/carrays_uint32_t.i
++++ b/src/carrays_uint32_t.i
+@@ -24,7 +24,7 @@
+ %typemap(in) uint32_t {
+   int ecode2 = 0 ;
+   if (($input)->IsInt32())
+-    $1 = ($input)->Uint32Value();
++    $1 = ($input)->Uint32Value(SWIGV8_CURRENT_CONTEXT()).FromJust();
+   else
+     SWIG_exception_fail(SWIG_ArgError(ecode2), "failed to convert uint32");
+ }
git clone https://git.99rst.org/PROJECT