From kde-commits Sat Dec 31 21:36:49 2005 From: =?utf-8?q?Diego=20Petten=C3=B2?= Date: Sat, 31 Dec 2005 21:36:49 +0000 To: kde-commits Subject: branches/KDE/3.5/kdebase/kcontrol/usbview Message-Id: <1136065009.285460.13859.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=113606501726192 SVN commit 492985 by dgp: Add configure option to use a global usb.ids file instead of the provided one (shared with usbutils). M +2 -0 Makefile.am M +10 -4 configure.in.in M +5 -0 usbdb.cpp --- branches/KDE/3.5/kdebase/kcontrol/usbview/Makefile.am #492984:492985 @@ -14,6 +14,8 @@ xdg_apps_DATA = kcmusb.desktop +if install_usbids usb_DATA = usb.ids usbdir = $(kde_datadir)/kcmusb +endif --- branches/KDE/3.5/kdebase/kcontrol/usbview/configure.in.in #492984:492985 @@ -1,10 +1,16 @@ case "$host" in - *-*-linux*) + *-*-linux*|*-*-freebsd*) FOUND_USBVIEW=yes ;; - *-*-freebsd*) - FOUND_USBVIEW=yes - ;; esac AM_CONDITIONAL(include_kcontrol_usbview, test "$FOUND_USBVIEW" = "yes") + +AC_ARG_WITH([usbids], AC_HELP_STRING([--with-usbids=PATH], [Use the usb.ids file at the specified path, instead of the local copy])) + +if test "x$with_usbids" != "x" && test "x$with_usbids" != "xno"; then + AC_DEFINE_UNQUOTED(USBIDS_FILE, "$with_usbids", [Path for the usb.ids file to use]) + dont_install_usbids="yes" +fi + +AM_CONDITIONAL(install_usbids, test "x$dont_install_usbids" != "xyes") --- branches/KDE/3.5/kdebase/kcontrol/usbview/usbdb.cpp #492984:492985 @@ -8,6 +8,7 @@ * * ***************************************************************************/ +#include #include @@ -24,7 +25,11 @@ USBDB::USBDB() { +#ifndef USBIDS_FILE QString db = locate("data", "kcmusb/usb.ids"); +#else + QString db = USBIDS_FILE; +#endif if (db.isEmpty()) return;