From 16e275634999cbae979355a263508e311c7ca618 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 1 Sep 2020 17:39:01 -0700 Subject: [PATCH] hidapi: update to 0.9.0 Upstream moved. Massive Makefile cleanup to simplify everything. Added libudev-fbsd dependency. Removed now obsolete patch. Signed-off-by: Rosen Penev --- libs/hidapi/Makefile | 55 ++++++++----------- .../patches/010-add-iconv-linkage.patch | 22 -------- 2 files changed, 22 insertions(+), 55 deletions(-) delete mode 100644 libs/hidapi/patches/010-add-iconv-linkage.patch diff --git a/libs/hidapi/Makefile b/libs/hidapi/Makefile index 87249a296..9a7518f38 100644 --- a/libs/hidapi/Makefile +++ b/libs/hidapi/Makefile @@ -8,19 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hidapi -PKG_VERSION:=0.8.0-rc1 -PKG_RELEASE:=2 +PKG_VERSION:=0.9.0 +PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/signal11/hidapi.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=hidapi-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=95b39035f94c35b0c360ec2e02a01fe25e971490135d7137f163974d4a88471f +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/libusb/hidapi/tar.gz/$(PKG_NAME)-$(PKG_VERSION)? +PKG_HASH:=630ee1834bdd5c5761ab079fd04f463a89585df8fcae51a7bfe4229b1e02a652 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION) + +PKG_MAINTAINER:=Paul Fertser PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE-bsd.txt -PKG_MAINTAINER:=Paul Fertser +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -28,9 +30,9 @@ include $(INCLUDE_DIR)/nls.mk define Package/hidapi SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libusb-1.0 +librt $(ICONV_DEPENDS) + DEPENDS:=+libusb-1.0 +librt +libudev-fbsd $(ICONV_DEPENDS) TITLE:=Library to talk to HID devices - URL:=http://www.signal11.us/oss/hidapi/ + URL:=https://github.com/libusb/hidapi endef define Package/hidapi/description @@ -41,38 +43,25 @@ can be embedded directly into a target application by adding a single source file (per platform) and a single header. endef -define Build/Configure -endef - -MAKE_PATH=libusb -MAKE_FLAGS+=-f Makefile.linux -TARGET_CFLAGS+=$(FPIC) +CONFIGURE_ARGS += \ + --disable-static -define Build/Compile - $(call Build/Compile/Default, libhidapi-libusb.so) - mv $(PKG_BUILD_DIR)/libusb/libhidapi-libusb.so \ - $(PKG_BUILD_DIR)/libusb/libhidapi-libusb.so.0 - ln -s libhidapi-libusb.so.0 $(PKG_BUILD_DIR)/libusb/libhidapi-libusb.so - sed 's^@prefix@^/usr^; \ - s^@exec_prefix@^/usr^; \ - s^@libdir@^$$$${exec_prefix}/lib^; \ - s^@includedir@^$$$${prefix}/include^' \ - < $(PKG_BUILD_DIR)/pc/hidapi-libusb.pc.in \ - > $(PKG_BUILD_DIR)/pc/hidapi-libusb.pc -endef +TARGET_LDFLAGS += -liconv define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/hidapi - $(CP) $(PKG_BUILD_DIR)/hidapi/hidapi.h $(1)/usr/include/hidapi/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/hidapi/hidapi.h $(1)/usr/include/hidapi/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/libusb/libhidapi-libusb.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhidapi-hidraw.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib//libhidapi-libusb.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_BUILD_DIR)/pc/hidapi-libusb.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/hidapi-libusb.pc $(1)/usr/lib/pkgconfig/ endef define Package/hidapi/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/libusb/libhidapi-libusb.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhidapi-hidraw.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhidapi-libusb.so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,hidapi)) diff --git a/libs/hidapi/patches/010-add-iconv-linkage.patch b/libs/hidapi/patches/010-add-iconv-linkage.patch deleted file mode 100644 index d942d5061..000000000 --- a/libs/hidapi/patches/010-add-iconv-linkage.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: hidapi-0.8.0-rc1/libusb/Makefile.linux -=================================================================== ---- hidapi-0.8.0-rc1.orig/libusb/Makefile.linux -+++ hidapi-0.8.0-rc1/libusb/Makefile.linux -@@ -22,7 +22,7 @@ COBJS_LIBUSB = hid.o - COBJS = $(COBJS_LIBUSB) - CPPOBJS = ../hidtest/hidtest.o - OBJS = $(COBJS) $(CPPOBJS) --LIBS_USB = `pkg-config libusb-1.0 --libs` -lrt -lpthread -+LIBS_USB = `pkg-config libusb-1.0 --libs` -lrt -lpthread -liconv - LIBS = $(LIBS_USB) - INCLUDES ?= -I../hidapi `pkg-config libusb-1.0 --cflags` - -@@ -33,7 +33,7 @@ hidtest-libusb: $(COBJS_LIBUSB) $(CPPOBJ - - # Shared Libs - libhidapi-libusb.so: $(COBJS_LIBUSB) -- $(CC) $(LDFLAGS) $(LIBS_USB) -shared -fpic -Wl,-soname,$@.0 $^ -o $@ -+ $(CC) $(LDFLAGS) $^ $(LIBS_USB) -shared -fpic -Wl,-soname,$@.0 -o $@ - - # Objects - $(COBJS): %.o: %.c