From a3c9a41462a9a2a614978157ae4f2cbd26d66b21 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Tue, 28 Apr 2020 03:31:39 -0600 Subject: [PATCH] package/apcupsd: pass additional libusb libs for static build By default apcupsd only passes libs for libusb-compat, this is not sufficient for static builds which also require libusb libs. Fixes: http://autobuild.buildroot.net/results/747/7472fec82983f5b9c2f92578b2b20b746a8d20ae/build-end.log Signed-off-by: James Hilliard Signed-off-by: Thomas Petazzoni --- package/apcupsd/apcupsd.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package/apcupsd/apcupsd.mk b/package/apcupsd/apcupsd.mk index ff9cc9242f..410bce9aec 100644 --- a/package/apcupsd/apcupsd.mk +++ b/package/apcupsd/apcupsd.mk @@ -10,8 +10,12 @@ APCUPSD_LICENSE = GPL-2.0 APCUPSD_LICENSE_FILES = COPYING APCUPSD_CONF_OPTS = --disable-test -ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y) -APCUPSD_CONF_ENV = ac_cv_path_usbcfg=$(STAGING_DIR)/usr/bin/libusb-config +ifneq ($(BR2_PACKAGE_APCUPSD_MODBUS_USB)$(BR2_PACKAGE_APCUPSD_USB),) +APCUPSD_CONF_ENV += ac_cv_path_usbcfg=$(STAGING_DIR)/usr/bin/libusb-config +ifeq ($(BR2_STATIC_LIBS),y) +APCUPSD_DEPENDENCIES += host-pkgconf +APCUPSD_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libusb`" +endif endif ifeq ($(BR2_PACKAGE_APCUPSD_APCSMART),y) -- 2.30.2