* [Buildroot] [PATCH 1/1] package/apcupsd: pass additional libusb libs for static build
@ 2020-04-28 9:31 James Hilliard
2020-04-29 21:20 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: James Hilliard @ 2020-04-28 9:31 UTC (permalink / raw)
To: buildroot
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 <james.hilliard1@gmail.com>
---
package/apcupsd/apcupsd.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/apcupsd/apcupsd.mk b/package/apcupsd/apcupsd.mk
index ff9cc9242f..a0fda19cf3 100644
--- a/package/apcupsd/apcupsd.mk
+++ b/package/apcupsd/apcupsd.mk
@@ -10,8 +10,11 @@ APCUPSD_LICENSE = GPL-2.0
APCUPSD_LICENSE_FILES = COPYING
APCUPSD_CONF_OPTS = --disable-test
-ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
+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_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libusb`"
+endif
endif
ifeq ($(BR2_PACKAGE_APCUPSD_APCSMART),y)
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/apcupsd: pass additional libusb libs for static build
2020-04-28 9:31 [Buildroot] [PATCH 1/1] package/apcupsd: pass additional libusb libs for static build James Hilliard
@ 2020-04-29 21:20 ` Thomas Petazzoni
2020-04-29 21:25 ` James Hilliard
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2020-04-29 21:20 UTC (permalink / raw)
To: buildroot
On Tue, 28 Apr 2020 03:31:39 -0600
James Hilliard <james.hilliard1@gmail.com> wrote:
> 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 <james.hilliard1@gmail.com>
> ---
> package/apcupsd/apcupsd.mk | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/package/apcupsd/apcupsd.mk b/package/apcupsd/apcupsd.mk
> index ff9cc9242f..a0fda19cf3 100644
> --- a/package/apcupsd/apcupsd.mk
> +++ b/package/apcupsd/apcupsd.mk
> @@ -10,8 +10,11 @@ APCUPSD_LICENSE = GPL-2.0
> APCUPSD_LICENSE_FILES = COPYING
> APCUPSD_CONF_OPTS = --disable-test
>
> -ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
> +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_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libusb`"
You're using pkg-config here, but the package didn't had any dependency
on host-pkgconf, so I've added that, and applied.
However, could you tweak the upstream configure.in to directly use
pkg-config to detect libusb ? It already uses pkg-config to detect
another library. This would simplify things quite a bit.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/apcupsd: pass additional libusb libs for static build
2020-04-29 21:20 ` Thomas Petazzoni
@ 2020-04-29 21:25 ` James Hilliard
0 siblings, 0 replies; 3+ messages in thread
From: James Hilliard @ 2020-04-29 21:25 UTC (permalink / raw)
To: buildroot
On Wed, Apr 29, 2020 at 3:20 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Tue, 28 Apr 2020 03:31:39 -0600
> James Hilliard <james.hilliard1@gmail.com> wrote:
>
> > 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 <james.hilliard1@gmail.com>
> > ---
> > package/apcupsd/apcupsd.mk | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/package/apcupsd/apcupsd.mk b/package/apcupsd/apcupsd.mk
> > index ff9cc9242f..a0fda19cf3 100644
> > --- a/package/apcupsd/apcupsd.mk
> > +++ b/package/apcupsd/apcupsd.mk
> > @@ -10,8 +10,11 @@ APCUPSD_LICENSE = GPL-2.0
> > APCUPSD_LICENSE_FILES = COPYING
> > APCUPSD_CONF_OPTS = --disable-test
> >
> > -ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
> > +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_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libusb`"
>
> You're using pkg-config here, but the package didn't had any dependency
> on host-pkgconf, so I've added that, and applied.
>
> However, could you tweak the upstream configure.in to directly use
> pkg-config to detect libusb ? It already uses pkg-config to detect
> another library. This would simplify things quite a bit.
I'll give it a shot, upstream doesn't seem to be super active though.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-29 21:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 9:31 [Buildroot] [PATCH 1/1] package/apcupsd: pass additional libusb libs for static build James Hilliard
2020-04-29 21:20 ` Thomas Petazzoni
2020-04-29 21:25 ` James Hilliard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.