gutenprint: fix host build when libusb found
PATCH 1/1 gutenprint: fix host build when libusb found
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/
--- .../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
package/gutenprint/0004-build-usb-backends-conditional.patch new file +23 -0
@@ -0,0 +1,23 @@ +Allow to disable USB backend + +Signed-off-by: Waldemar Brodkorb <[email protected]> + +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
package/gutenprint/gutenprint.mk +1 -0
@@ -67,6 +67,7 @@ HOST_GUTENPRINT_CONF_OPTS = \ --disable-escputil \ --disable-test \ --disable-testpattern \ + --without-libusb \ --without-cups # Needed by autoreconf
Signature · 1 line
2.1.4
Hi Waldemar,
Quoted 6 lines · Waldemar Brodkorb
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 <[email protected]>
Quoted 12 lines
--- .../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.patchpackage/gutenprint/0004-build-usb-backends-conditional.patch new file +0
-0
package/gutenprint/0004-build-usb-backends-conditional.patch line 3
Quoted 3 lines
package/gutenprint/0004-build-usb-backends-conditional.patch new file +3
-0@@ -0,0 +1,23 @@ +Allow to disable USB backend + +Signed-off-by: Waldemar Brodkorb <[email protected]>
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
Signature · 3 lines
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 -PATCH 1/1 gutenprint: fix host build when libusb found
In reply to Waldemar BrodkorbQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Waldemar" == Waldemar Brodkorb <[email protected]> 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?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 gutenprint: fix host build when libusb found
Hi Peter,
Peter Korsgaard wrote,
Quoted 10 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Waldemar" == Waldemar Brodkorb <[email protected]> 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
PATCH 1/1 gutenprint: fix host build when libusb found
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Waldemar" == Waldemar Brodkorb <[email protected]> writes:
Hi Peter,
Peter Korsgaard wrote,Quoted 10 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Waldemar" == Waldemar Brodkorb <[email protected]> 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?
Quoted 5 lines
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.
Signature · 2 lines
Venlig hilsen, Peter Korsgaard