[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdebase/kcontrol/usbview
From:       Diego Pettenò <dgp85 () users ! sourceforge ! net>
Date:       2005-12-31 21:36:49
Message-ID: 1136065009.285460.13859.nullmailer () svn ! kde ! org
[Download RAW message or body]

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 <config.h>
 
 #include <iostream>
 
@@ -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;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic