1 |
On Mon, 2014-03-10 at 01:45 -0400, Alexandre Rostovtsev wrote: |
2 |
> On Sun, 2014-03-09 at 23:22 -0400, Joshua Kinard wrote: |
3 |
> > On 03/08/2014 9:55 PM, Alexandre Rostovtsev wrote: |
4 |
> > > On Sat, 2014-03-08 at 21:23 -0500, Joshua Kinard wrote: |
5 |
> > >> So I want to try and play around with a particular network domination tool |
6 |
> > >> on my home network, Omphalos. However, its current configure script has a |
7 |
> > >> hard dependency on bluetooth.h, part of the net-wireless/bluez package. |
8 |
> > >> |
9 |
> > >> Currently, net-wireless/bluez has a harddep on virtual/udev, which works |
10 |
> > >> great if you use either udev or eudev. I'm using busybox's mdev instead, so |
11 |
> > >> the logic of the bluez ebuild needs some changes: |
12 |
> > > [...] |
13 |
> > >> Thoughts on this? |
14 |
> > > |
15 |
> > > Does mdev have any API which is equivalent to libudev's hwdb? See |
16 |
> > > http://www.freedesktop.org/software/systemd/libudev/libudev-udev-hwdb.html |
17 |
> > > |
18 |
> > > If yes, then optimal solution would be to patch bluez to allow using |
19 |
> > > mdev's hwdb support, and get the patch upstreamed :) |
20 |
> > |
21 |
> > It's actually not a matter of the hwdb support, it's just the fact that |
22 |
> > bluez currently has a harddep on a specific device manager, either udev or |
23 |
> > eudev. |
24 |
> |
25 |
> Bluez does not require an abstract device manager. It requires the |
26 |
> libudev library. Or rather, it requires some kind of library which |
27 |
> provides the following API: |
28 |
> |
29 |
> 1. querying hwdb (given a kernel modalias for a device, retrieve |
30 |
> corresponding oui, vendor, and model data); and |
31 |
> 2. querying the device tree (manually traversing /sys is of course |
32 |
> possible, but not very easy to do correctly, so bluez developers are |
33 |
> relying on libudev). |
34 |
|
35 |
And by "requires", I mean that without libudev, a variety of bluetooth |
36 |
devices and adapters will simply fail to work. |
37 |
|
38 |
So if mdev does not have some equivalent of libudev, a reasonable |
39 |
solution would probably be the following: |
40 |
|
41 |
@@ -14,19 +14,19 @@ |
42 |
LICENSE="GPL-2+ LGPL-2.1+" |
43 |
SLOT="0/3" |
44 |
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" |
45 |
-IUSE="cups debug +obex readline selinux systemd test" |
46 |
+IUSE="cups debug +obex readline selinux systemd test +udev" |
47 |
REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" |
48 |
|
49 |
RDEPEND=" |
50 |
>=dev-libs/glib-2.28:2 |
51 |
>=sys-apps/dbus-1.6:= |
52 |
>=sys-apps/hwids-20121202.2 |
53 |
- >=virtual/udev-171 |
54 |
cups? ( net-print/cups:= ) |
55 |
obex? ( dev-libs/libical ) |
56 |
readline? ( sys-libs/readline:= ) |
57 |
selinux? ( sec-policy/selinux-bluetooth ) |
58 |
systemd? ( sys-apps/systemd ) |
59 |
+ udev? ( >=virtual/udev-171 ) |
60 |
" |
61 |
DEPEND="${RDEPEND} |
62 |
virtual/pkgconfig |
63 |
@@ -46,6 +46,11 @@ |
64 |
pkg_setup() { |
65 |
enewgroup plugdev |
66 |
use test && python-any-r1_pkg_setup |
67 |
+ |
68 |
+ if ! use udev; then |
69 |
+ ewarn "You are installing ${P} with USE=-udev. This means various bluetooth" |
70 |
+ ewarn "devices and adapters from Apple, Dell, Logitech etc. will fail to work." |
71 |
+ fi |
72 |
} |
73 |
|
74 |
src_prepare() { |
75 |
@@ -92,13 +97,13 @@ |
76 |
$(use_enable test) \ |
77 |
--enable-tools \ |
78 |
--enable-monitor \ |
79 |
- --enable-udev \ |
80 |
+ $(use_enable udev) \ |
81 |
$(use_enable cups) \ |
82 |
$(use_enable obex) \ |
83 |
--enable-client \ |
84 |
$(use_enable systemd) \ |
85 |
$(systemd_with_unitdir) \ |
86 |
- --enable-sixaxis |
87 |
+ $(use_enable udev sixaxis) |
88 |
} |
89 |
|
90 |
src_install() { |
91 |
@@ -134,7 +139,7 @@ |
92 |
pkg_postinst() { |
93 |
readme.gentoo_print_elog |
94 |
|
95 |
- udev_reload |
96 |
+ use udev && udev_reload |
97 |
|
98 |
has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp." |