aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorHirokazu MORIKAWA <morikw2@gmail.com>2020-12-28 13:30:49 +0900
committerHirokazu MORIKAWA <morikw2@gmail.com>2020-12-28 13:30:49 +0900
commite55bb25508da607e25de27090f2922cd09700536 (patch)
treeff717326000986bb1eba8886bc3655860a7c6e4b /lang
parent4b96bbfaccce1dc8a1229ac2d5679d9bf2cb2944 (diff)
node-hid: update to 2.1.1
Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
Diffstat (limited to 'lang')
-rw-r--r--lang/node-hid/Makefile16
-rw-r--r--lang/node-hid/patches/000-support_musl.patch5
2 files changed, 9 insertions, 12 deletions
diff --git a/lang/node-hid/Makefile b/lang/node-hid/Makefile
index e2590d8c3..008eac69f 100644
--- a/lang/node-hid/Makefile
+++ b/lang/node-hid/Makefile
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
PKG_NPM_NAME:=node-hid
PKG_NAME:=$(PKG_NPM_NAME)
-PKG_VERSION:=1.3.2
+PKG_VERSION:=2.1.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=dce3ff3380d2ad66078ba77498e49693582437ba94bb84229f146e893fa4ed9a
+PKG_HASH:=6c1f05935215feed4e8d2f4aecf31abbad8fa783d252b0bd6041ed2f2e96e9ba
PKG_BUILD_DEPENDS:=node/host
PKG_USE_MIPS16:=0
@@ -31,8 +31,8 @@ define Package/node-hid
SECTION:=lang
CATEGORY:=Languages
TITLE:=Node.js package to access HID devices
- URL:=https://github.com/node-hid/node-hid
- DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libudev $(ICONV_DEPENDS)
+ URL:=https://www.npmjs.com/package/node-hid
+ DEPENDS:=+node +node-npm +libusb-1.0 +libudev $(ICONV_DEPENDS)
endef
define Package/node-hid/description
@@ -49,7 +49,7 @@ TARGET_CFLAGS+=$(FPIC) -I$(STAGING_DIR)/usr/include/libusb-1.0
TARGET_LDFLAGS+=$(if $(ICONV_FULL),-liconv)
define Build/Compile
- git init $(PKG_BUILD_DIR)
+ GYP_DEFINES='driver="hidraw"' \
$(MAKE_VARS) \
$(MAKE_FLAGS) \
npm_config_arch=$(NODEJS_CPU) \
@@ -66,9 +66,7 @@ endef
define Package/node-hid/install
$(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md} \
- $(1)/usr/lib/node/$(PKG_NPM_NAME)/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{binding.gyp,*.js} \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md,*.js} \
$(1)/usr/lib/node/$(PKG_NPM_NAME)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \
$(1)/usr/lib/node/$(PKG_NPM_NAME)/
@@ -76,7 +74,7 @@ define Package/node-hid/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/build/Release/HID*.node \
$(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/
$(INSTALL_DIR) $(1)/usr/bin
- $(LN) ../lib/node/node-hid/src/show-devices.js $(1)/usr/bin/hid-showdevices
+ $(LN) ../lib/node/$(PKG_NPM_NAME)/src/show-devices.js $(1)/usr/bin/hid-showdevices
endef
$(eval $(call BuildPackage,node-hid))
diff --git a/lang/node-hid/patches/000-support_musl.patch b/lang/node-hid/patches/000-support_musl.patch
index 9f1d04497..89b35691c 100644
--- a/lang/node-hid/patches/000-support_musl.patch
+++ b/lang/node-hid/patches/000-support_musl.patch
@@ -1,6 +1,5 @@
-diff -urN a/hidapi/linux/hid.c b/hidapi/linux/hid.c
---- a/hidapi/linux/hid.c 1985-10-26 17:15:00.000000000 +0900
-+++ b/hidapi/linux/hid.c 2019-12-12 11:15:11.164454207 +0900
+--- a/hidapi/linux/hid.c
++++ b/hidapi/linux/hid.c
@@ -24,6 +24,7 @@
/* C */
#include <stdio.h>