node-hid: update to 2.1.1

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
This commit is contained in:
Hirokazu MORIKAWA 2020-12-28 13:30:49 +09:00
parent 4b96bbfacc
commit e55bb25508
2 changed files with 9 additions and 12 deletions

View File

@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
PKG_NPM_NAME:=node-hid PKG_NPM_NAME:=node-hid
PKG_NAME:=$(PKG_NPM_NAME) PKG_NAME:=$(PKG_NPM_NAME)
PKG_VERSION:=1.3.2 PKG_VERSION:=2.1.1
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
PKG_HASH:=dce3ff3380d2ad66078ba77498e49693582437ba94bb84229f146e893fa4ed9a PKG_HASH:=6c1f05935215feed4e8d2f4aecf31abbad8fa783d252b0bd6041ed2f2e96e9ba
PKG_BUILD_DEPENDS:=node/host PKG_BUILD_DEPENDS:=node/host
PKG_USE_MIPS16:=0 PKG_USE_MIPS16:=0
@ -31,8 +31,8 @@ define Package/node-hid
SECTION:=lang SECTION:=lang
CATEGORY:=Languages CATEGORY:=Languages
TITLE:=Node.js package to access HID devices TITLE:=Node.js package to access HID devices
URL:=https://github.com/node-hid/node-hid URL:=https://www.npmjs.com/package/node-hid
DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libudev $(ICONV_DEPENDS) DEPENDS:=+node +node-npm +libusb-1.0 +libudev $(ICONV_DEPENDS)
endef endef
define Package/node-hid/description 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) TARGET_LDFLAGS+=$(if $(ICONV_FULL),-liconv)
define Build/Compile define Build/Compile
git init $(PKG_BUILD_DIR) GYP_DEFINES='driver="hidraw"' \
$(MAKE_VARS) \ $(MAKE_VARS) \
$(MAKE_FLAGS) \ $(MAKE_FLAGS) \
npm_config_arch=$(NODEJS_CPU) \ npm_config_arch=$(NODEJS_CPU) \
@ -66,9 +66,7 @@ endef
define Package/node-hid/install define Package/node-hid/install
$(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME) $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md} \ $(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)/{binding.gyp,*.js} \
$(1)/usr/lib/node/$(PKG_NPM_NAME)/ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \
$(1)/usr/lib/node/$(PKG_NPM_NAME)/ $(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 \ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/build/Release/HID*.node \
$(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/ $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/
$(INSTALL_DIR) $(1)/usr/bin $(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 endef
$(eval $(call BuildPackage,node-hid)) $(eval $(call BuildPackage,node-hid))

View File

@ -1,6 +1,5 @@
diff -urN a/hidapi/linux/hid.c b/hidapi/linux/hid.c --- a/hidapi/linux/hid.c
--- a/hidapi/linux/hid.c 1985-10-26 17:15:00.000000000 +0900 +++ b/hidapi/linux/hid.c
+++ b/hidapi/linux/hid.c 2019-12-12 11:15:11.164454207 +0900
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
/* C */ /* C */
#include <stdio.h> #include <stdio.h>