Browse Source

Merge pull request #14351 from nxhack/hid_211

node-hid: update to 2.1.1
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by GitHub
parent
commit
b131a78fc7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 12 deletions
  1. +7
    -9
      lang/node-hid/Makefile
  2. +2
    -3
      lang/node-hid/patches/000-support_musl.patch

+ 7
- 9
lang/node-hid/Makefile View File

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

+ 2
- 3
lang/node-hid/patches/000-support_musl.patch View File

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


Loading…
Cancel
Save