From 2ae31d17881e5b078522764b378494511758846f Mon Sep 17 00:00:00 2001 From: Hirokazu MORIKAWA Date: Thu, 12 Dec 2019 15:00:02 +0900 Subject: [PATCH] node-hid: update to 1.1.0 Up to Node v12, v13 Signed-off-by: Hirokazu MORIKAWA --- lang/node-hid/Makefile | 10 ++++++---- lang/node-hid/patches/000-support_musl.patch | 11 +++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 lang/node-hid/patches/000-support_musl.patch diff --git a/lang/node-hid/Makefile b/lang/node-hid/Makefile index 72881b72c..c5b24de53 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:=0.7.9 +PKG_VERSION:=1.1.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=a13710ebff0a2d0e60e08442db192a4e891db89d535306d461b8a95ede7dbd90 +PKG_HASH:=a128331388b9a0ac443fb55493e37a9b8043f34699c60453f395ad37b7d5f145 PKG_BUILD_DEPENDS:=node/host PKG_USE_MIPS16:=0 @@ -24,6 +24,7 @@ PKG_LICENSE:=MIT or X11 PKG_LICENSE_FILES:= include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk define Package/node-hid SUBMENU:=Node.js @@ -31,7 +32,7 @@ define Package/node-hid 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-fbsd + DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libudev-fbsd $(ICONV_DEPENDS) endef define Package/node-hid/description @@ -45,6 +46,7 @@ NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst TMPNPM:=$(shell mktemp -u XXXXXXXXXX) 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) @@ -71,7 +73,7 @@ define Package/node-hid/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \ $(1)/usr/lib/node/$(PKG_NPM_NAME)/ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release - $(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/ $(INSTALL_DIR) $(1)/usr/bin $(LN) ../lib/node/node-hid/src/show-devices.js $(1)/usr/bin/hid-showdevices diff --git a/lang/node-hid/patches/000-support_musl.patch b/lang/node-hid/patches/000-support_musl.patch new file mode 100644 index 000000000..9f1d04497 --- /dev/null +++ b/lang/node-hid/patches/000-support_musl.patch @@ -0,0 +1,11 @@ +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 +@@ -24,6 +24,7 @@ + /* C */ + #include + #include ++#include + #include + #include + #include