1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
Index: kcontrol/usbview/usbdb.cpp
===================================================================
--- kcontrol/usbview/usbdb.cpp (revision 492938)
+++ kcontrol/usbview/usbdb.cpp (working copy)
@@ -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;
Index: kcontrol/usbview/Makefile.am
===================================================================
--- kcontrol/usbview/Makefile.am (revision 492938)
+++ kcontrol/usbview/Makefile.am (working copy)
@@ -14,6 +14,8 @@
xdg_apps_DATA = kcmusb.desktop
+if install_usbids
usb_DATA = usb.ids
usbdir = $(kde_datadir)/kcmusb
+endif
Index: kcontrol/usbview/configure.in.in
===================================================================
--- kcontrol/usbview/configure.in.in (revision 492938)
+++ kcontrol/usbview/configure.in.in (working copy)
@@ -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")
|