1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-23 16:17:36 +02:00
openwrt-packages/utils/hplip/patches/010-libusb_fix.patch
Rosen Penev 1f7d8f2c40 hplip: update to 3.21.6
Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-15 18:31:40 -07:00

34 lines
1.1 KiB
Diff

--- a/Makefile.am
+++ b/Makefile.am
@@ -110,7 +110,7 @@ libhpmud_la_SOURCES += io/hpmud/musb_lib
libhpmud_la_LDFLAGS += -lusb
else
libhpmud_la_SOURCES += io/hpmud/musb.c
-libhpmud_la_CFLAGS += -I/usr/include/libusb-1.0
+libhpmud_la_CFLAGS += ${LIBUSB_1_0_CFLAGS}
libhpmud_la_LDFLAGS += -lusb-1.0
endif
@@ -363,7 +363,7 @@ hpmudext_la_CFLAGS += -Iprotocol/discove
endif
if !LIBUSB01_BUILD
-hpmudext_la_CFLAGS +=-I/usr/include/libusb-1.0
+hpmudext_la_CFLAGS += ${LIBUSB_1_0_CFLAGS}
endif
endif #!HPLIP_CLASS_DRIVER
# ui (qt3)
--- a/configure.in
+++ b/configure.in
@@ -625,6 +625,10 @@ if test "$class_driver" = "no" && test "
else
AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
+ PKG_CHECK_MODULES(LIBUSB_1_0, [ libusb-1.0 >= 1.0.0 ], have_libusb_1_0=yes, have_libusb_1_0=no)
+ if test "$have_libusb_1_0" = "yes"; then
+ CFLAGS="$CFLAGS $LIBUSB_1_0_CFLAGS"
+ fi
fi
fi