configure: allow usb.ids location to be specified
PATCH 1/1 configure: allow usb.ids location to be specified
We already allow the pci.ids location to be specified, so add a patch doing the same for usb.ids. Please don't make me explain why this is necessary, it will only make you cry.
--- configure.ac | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-)
configure.ac +12 -2
@@ -93,8 +93,18 @@ if test "x$enable_hwdb" = xyes; then AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids]) fi - PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82) - AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)]) + AC_ARG_WITH(usb-ids-path, + [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])], + [USB_DATABASE=${withval}], + [if test -n "$usbids" ; then + PCI_DATABASE="$usbids" + else + PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82) + AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)]) + fi]) + AC_MSG_CHECKING([for USB database location]) + AC_MSG_RESULT([$USB_DATABASE]) + AC_SUBST(USB_DATABASE) AC_ARG_WITH(pci-ids-path, [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])],
Signature · 1 line
1.7.3.1
Quoted 5 lines · Scott James Remnant
We already allow the pci.ids location to be specified, so add a patch doing the same for usb.ids. Please don't make me explain why this is necessary, it will only make you cry.
Signed-off-by Scott James Remnant <[email protected]>
As the maintainer of the usbutils package, I too cry when I see where this file ends up :(
Quoted 3 lines · Scott James Remnant
We already allow the pci.ids location to be specified, so add a patch doing the same for usb.ids. Please don't make me explain why this is necessary, it will only make you cry.
I'll not ask. :) Sure, go ahead.
Kay
Pushed with the C&P fix.
Quoted 9 lines · Kay Sievers
Quoted 3 lines · Scott James Remnant
We already allow the pci.ids location to be specified, so add a patch doing the same for usb.ids. Please don't make me explain why this is necessary, it will only make you cry.
I'll not ask. :) Sure, go ahead.
Kay
Quoted 1 line · Scott James Remnant
Pushed with the C&P fix ;-)
Btw, why doesn't your system find out where it is installed by asking pkgconfig? That's why nobody else needs it, unlike they do for pci.
Kay
Because it's a cross-compiled Gentoo.
So pkg-config reports the location inside the cross-compiled $ROOT, rather than the runtime location. The designers of pkg-config forgot about host vs. build vs. target *sigh*
Quoted 8 lines · Kay Sievers
Quoted 1 line · Scott James Remnant
Pushed with the C&P fix ;-)
Btw, why doesn't your system find out where it is installed by asking pkgconfig? That's why nobody else needs it, unlike they do for pci.
Kay