* [Buildroot] [PATCH] gutenprint: fix host build when libusb found
@ 2016-04-02 18:47 Waldemar Brodkorb
2016-04-15 4:49 ` [Buildroot] " Baruch Siach
2016-04-15 9:31 ` [Buildroot] [PATCH] " Peter Korsgaard
0 siblings, 2 replies; 5+ messages in thread
From: Waldemar Brodkorb @ 2016-04-02 18:47 UTC (permalink / raw)
To: buildroot
Allow to disable USB support, otherwise host build breaks when
libusb is found as installation tries to install to /usr.
Fixes following autobuild error:
http://autobuild.buildroot.net/results/081b3be918ac1eaa8cfbc5919e00bc1ea267c1df/
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
.../0004-build-usb-backends-conditional.patch | 23 ++++++++++++++++++++++
package/gutenprint/gutenprint.mk | 1 +
2 files changed, 24 insertions(+)
create mode 100644 package/gutenprint/0004-build-usb-backends-conditional.patch
diff --git a/package/gutenprint/0004-build-usb-backends-conditional.patch b/package/gutenprint/0004-build-usb-backends-conditional.patch
new file mode 100644
index 0000000..db44a12
--- /dev/null
+++ b/package/gutenprint/0004-build-usb-backends-conditional.patch
@@ -0,0 +1,23 @@
+Allow to disable USB backend
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur gutenprint-5.2.11.orig/configure.ac gutenprint-5.2.11/configure.ac
+--- gutenprint-5.2.11.orig/configure.ac 2016-01-14 04:02:49.000000000 +0100
++++ gutenprint-5.2.11/configure.ac 2016-04-02 20:07:54.649589473 +0200
+@@ -442,12 +442,15 @@
+ dnl [EXTRA_LIBREADLINE_DEPS]=""
+ dnl fi
+
++AC_ARG_WITH([libusb], AS_HELP_STRING([--with-libusb], [Build with USB backend support]))
+ # libusb-1.0 (For CUPS backends)
++AS_IF([test "x$with_libusb" = "xyes"], [
+ PKG_CHECK_MODULES([LIBUSB], [libusb-1.0],
+ [HAVE_LIBUSB=yes
+ BUILD_LIBUSB_BACKENDS=yes],
+ [HAVE_LIBUSB=no
+ BUILD_LIBUSB_BACKENDS=no])
++])
+
+ AC_PATH_PROGS([GIMPTOOL2_CHECK], [gimptool-2.0 gimptool])
+ if test -z "${GIMPTOOL2_CHECK}" ; then
diff --git a/package/gutenprint/gutenprint.mk b/package/gutenprint/gutenprint.mk
index 7e3024d..2a5fc95 100644
--- a/package/gutenprint/gutenprint.mk
+++ b/package/gutenprint/gutenprint.mk
@@ -67,6 +67,7 @@ HOST_GUTENPRINT_CONF_OPTS = \
--disable-escputil \
--disable-test \
--disable-testpattern \
+ --without-libusb \
--without-cups
# Needed by autoreconf
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [Buildroot] gutenprint: fix host build when libusb found
2016-04-02 18:47 [Buildroot] [PATCH] gutenprint: fix host build when libusb found Waldemar Brodkorb
@ 2016-04-15 4:49 ` Baruch Siach
2016-04-15 9:31 ` [Buildroot] [PATCH] " Peter Korsgaard
1 sibling, 0 replies; 5+ messages in thread
From: Baruch Siach @ 2016-04-15 4:49 UTC (permalink / raw)
To: buildroot
Hi Waldemar,
On Sat, Apr 02, 2016 at 08:47:33PM +0200, Waldemar Brodkorb wrote:
> Allow to disable USB support, otherwise host build breaks when
> libusb is found as installation tries to install to /usr.
> Fixes following autobuild error:
> http://autobuild.buildroot.net/results/081b3be918ac1eaa8cfbc5919e00bc1ea267c1df/
>
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Tested-by: Baruch Siach <baruch@tkos.co.il>
> ---
> .../0004-build-usb-backends-conditional.patch | 23 ++++++++++++++++++++++
> package/gutenprint/gutenprint.mk | 1 +
> 2 files changed, 24 insertions(+)
> create mode 100644 package/gutenprint/0004-build-usb-backends-conditional.patch
>
> diff --git a/package/gutenprint/0004-build-usb-backends-conditional.patch b/package/gutenprint/0004-build-usb-backends-conditional.patch
> new file mode 100644
> index 0000000..db44a12
> --- /dev/null
> +++ b/package/gutenprint/0004-build-usb-backends-conditional.patch
> @@ -0,0 +1,23 @@
> +Allow to disable USB backend
> +
> +Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Have you tried to upstream this patch?
Since we would now be patching also configure.ac, please updated the
AUTORECONF comment in gutenprint.mk.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [PATCH] gutenprint: fix host build when libusb found
2016-04-02 18:47 [Buildroot] [PATCH] gutenprint: fix host build when libusb found Waldemar Brodkorb
2016-04-15 4:49 ` [Buildroot] " Baruch Siach
@ 2016-04-15 9:31 ` Peter Korsgaard
2016-04-15 17:50 ` Waldemar Brodkorb
1 sibling, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2016-04-15 9:31 UTC (permalink / raw)
To: buildroot
>>>>> "Waldemar" == Waldemar Brodkorb <wbx@openadk.org> writes:
> Allow to disable USB support, otherwise host build breaks when
> libusb is found as installation tries to install to /usr.
> Fixes following autobuild error:
> http://autobuild.buildroot.net/results/081b3be918ac1eaa8cfbc5919e00bc1ea267c1df/
Hmm, but why does that end up with /usr and not $(HOST_DIR)/usr? Is it
picking up a libusb.pc from your host or is our host-libusb .pc file
wrong?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] gutenprint: fix host build when libusb found
2016-04-15 9:31 ` [Buildroot] [PATCH] " Peter Korsgaard
@ 2016-04-15 17:50 ` Waldemar Brodkorb
2016-04-15 22:07 ` Peter Korsgaard
0 siblings, 1 reply; 5+ messages in thread
From: Waldemar Brodkorb @ 2016-04-15 17:50 UTC (permalink / raw)
To: buildroot
Hi Peter,
Peter Korsgaard wrote,
> >>>>> "Waldemar" == Waldemar Brodkorb <wbx@openadk.org> writes:
>
> > Allow to disable USB support, otherwise host build breaks when
> > libusb is found as installation tries to install to /usr.
> > Fixes following autobuild error:
> > http://autobuild.buildroot.net/results/081b3be918ac1eaa8cfbc5919e00bc1ea267c1df/
>
> Hmm, but why does that end up with /usr and not $(HOST_DIR)/usr? Is it
> picking up a libusb.pc from your host or is our host-libusb .pc file
> wrong?
It is picking up libusb.pc from the host and I don't think
gutenprint-print will build host libusb at all. As cups support
is disabled anyway for the host, I don't think installing any USB
backends for the hosttools is strictly necessary and might be better
avoided.
best regards
Waldemar
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] gutenprint: fix host build when libusb found
2016-04-15 17:50 ` Waldemar Brodkorb
@ 2016-04-15 22:07 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2016-04-15 22:07 UTC (permalink / raw)
To: buildroot
>>>>> "Waldemar" == Waldemar Brodkorb <wbx@openadk.org> writes:
> Hi Peter,
> Peter Korsgaard wrote,
>> >>>>> "Waldemar" == Waldemar Brodkorb <wbx@openadk.org> writes:
>>
>> > Allow to disable USB support, otherwise host build breaks when
>> > libusb is found as installation tries to install to /usr.
>> > Fixes following autobuild error:
>> > http://autobuild.buildroot.net/results/081b3be918ac1eaa8cfbc5919e00bc1ea267c1df/
>>
>> Hmm, but why does that end up with /usr and not $(HOST_DIR)/usr? Is it
>> picking up a libusb.pc from your host or is our host-libusb .pc file
>> wrong?
> It is picking up libusb.pc from the host and I don't think
> gutenprint-print will build host libusb at all. As cups support
> is disabled anyway for the host, I don't think installing any USB
> backends for the hosttools is strictly necessary and might be better
> avoided.
I had a closer look, and it actually isn't libusb.pc from the build host
(or directly anything to do with libusb).
The problem is really that the --without-cups option doesn't really
work. We already have a related workaround for this where we
ac_cv_path_CUPS_CONFIG='', but more is needed. When we pass
--without-cups the configure script hardcodes cups_prefix to "/usr".
host-gutenprint itself doesn't depend on host-libusb, but other packages
do so it might be built before host-gutenprint. If the configure script
detects libusb support (using pkg-config), then it will build a cups
backend using libusb (even though cups support is disabled) and intall
it into $cups_prefix/share/cups/usb, breaking the build :/
So either we fix the configure script to really disable the cups support
when configured with --without-cups, we add your patch as a workaround
or we simply add PKG_CONFIG=false to HOST_GUTENPRINT_CONF_ENV to make
sure the configure script doesn't find libusb. We can do that as
pkg-config is only used to check for libusb and gtk2, neither of which
we need for host-gutenprint.
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-15 22:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-02 18:47 [Buildroot] [PATCH] gutenprint: fix host build when libusb found Waldemar Brodkorb
2016-04-15 4:49 ` [Buildroot] " Baruch Siach
2016-04-15 9:31 ` [Buildroot] [PATCH] " Peter Korsgaard
2016-04-15 17:50 ` Waldemar Brodkorb
2016-04-15 22:07 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox