Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 270859 | Differences between
and this patch

Collapse All | Expand All

(-)bluez-4.39-r2.ebuild (-50 / +34 lines)
Lines 11-19 Link Here
11
SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.gz"
11
SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.gz"
12
LICENSE="GPL-2 LGPL-2.1"
12
LICENSE="GPL-2 LGPL-2.1"
13
SLOT="0"
13
SLOT="0"
14
KEYWORDS="amd64 arm ~hppa ~ppc ~ppc64 ~sh ~sparc x86"
14
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sh ~sparc ~x86"
15
15
16
IUSE="alsa +consolekit cups debug doc gstreamer old-daemons test-programs usb"
16
IUSE="alsa +consolekit cups debug gstreamer old-daemons pcmcia test-programs usb"
17
17
18
CDEPEND="alsa? ( media-libs/alsa-lib )
18
CDEPEND="alsa? ( media-libs/alsa-lib )
19
	gstreamer? (
19
	gstreamer? (
Lines 30-52 Link Here
30
	!net-wireless/bluez-utils"
30
	!net-wireless/bluez-utils"
31
DEPEND="sys-devel/flex
31
DEPEND="sys-devel/flex
32
	>=dev-util/pkgconfig-0.20
32
	>=dev-util/pkgconfig-0.20
33
	doc? ( dev-util/gtk-doc )
34
	${CDEPEND}"
33
	${CDEPEND}"
35
RDEPEND="${CDEPEND}
34
RDEPEND="${CDEPEND}
36
	consolekit? ( sys-auth/pambase[consolekit] )"
35
	consolekit? ( sys-auth/pambase[consolekit] )
36
	test-programs? (
37
		dev-python/dbus-python
38
		dev-python/pygobject )"
37
39
38
src_prepare() {
40
src_prepare() {
39
	epatch \
40
		"${FILESDIR}/4.31-as_needed.patch" \
41
		"${FILESDIR}/4.34-conditional_libsbc.patch"
42
43
	if ! use consolekit; then
41
	if ! use consolekit; then
44
		# No consolekit for at_console etc, so we grant plugdev the rights
42
		# No consolekit for at_console etc, so we grant plugdev the rights
45
		epatch	"${FILESDIR}/bluez-plugdev.patch"
43
		epatch	"${FILESDIR}/bluez-plugdev.patch"
46
	fi
44
	fi
47
45
48
	if use cups; then
46
	if use cups; then
49
		epatch "${FILESDIR}/4.18/cups-location.patch"
47
		epatch "${FILESDIR}/4.50-cups-location.patch"
50
	fi
48
	fi
51
49
52
	# needed for both patches
50
	# needed for both patches
Lines 54-66 Link Here
54
}
52
}
55
53
56
src_configure() {
54
src_configure() {
57
	# the order is the same as ./configure --help
58
59
	# we don't need the other daemons either with the new
60
	# service architechture
61
62
	econf \
55
	econf \
63
		$(use_enable doc gtk-doc) \
64
		--enable-network \
56
		--enable-network \
65
		--enable-serial \
57
		--enable-serial \
66
		--enable-input \
58
		--enable-input \
Lines 79-88 Link Here
79
		$(use_enable old-daemons dund) \
71
		$(use_enable old-daemons dund) \
80
		$(use_enable cups) \
72
		$(use_enable cups) \
81
		$(use_enable test-programs test) \
73
		$(use_enable test-programs test) \
82
		--enable-manpages \
74
		--enable-udevrules \
83
		--enable-configfiles \
75
		--enable-configfiles \
84
		--disable-initscripts \
76
		$(use_enable pcmcia) \
85
		--disable-pcmciarules \
86
		$(use_enable debug) \
77
		$(use_enable debug) \
87
		--localstatedir=/var
78
		--localstatedir=/var
88
}
79
}
Lines 92-97 Link Here
92
83
93
	dodoc AUTHORS ChangeLog README || die
84
	dodoc AUTHORS ChangeLog README || die
94
85
86
	# don't install useless .la files
87
	find "${D}" -type f -name '*.la' -delete || die "failed to remove .la files"
88
95
	if use test-programs ; then
89
	if use test-programs ; then
96
		cd "${S}/test"
90
		cd "${S}/test"
97
		dobin simple-agent simple-service monitor-bluetooth
91
		dobin simple-agent simple-service monitor-bluetooth
Lines 105-151 Link Here
105
		cd "${S}"
99
		cd "${S}"
106
	fi
100
	fi
107
101
108
	newinitd "${FILESDIR}/4.18/bluetooth-init.d" bluetooth || die
109
	newconfd "${FILESDIR}/4.18/bluetooth-conf.d" bluetooth || die
110
111
	if use old-daemons; then
102
	if use old-daemons; then
112
		newconfd "${FILESDIR}/4.18/conf.d-hidd" hidd || die
103
		newconfd "${FILESDIR}/4.18/conf.d-hidd" hidd || die
113
		newinitd "${FILESDIR}/4.18/init.d-hidd" hidd || die
104
		newinitd "${FILESDIR}/4.18/init.d-hidd" hidd || die
114
	fi
105
	fi
115
106
116
	# bug #84431
117
	insinto /etc/udev/rules.d/
118
	newins "${FILESDIR}/${PN}-4.18-udev.rules" 70-bluetooth.rules || die
119
	newins "${S}/scripts/bluetooth.rules" 70-bluetooth-pcmcia.rules || die
120
121
	exeinto /$(get_libdir)/udev/
122
	newexe "${FILESDIR}/${PN}-4.18-udev.script" bluetooth.sh || die
123
	doexe  "${S}/scripts/bluetooth_serial" || die
124
125
	insinto /etc/bluetooth
107
	insinto /etc/bluetooth
126
	doins \
108
	doins \
127
		input/input.conf \
109
		input/input.conf \
128
		audio/audio.conf \
110
		audio/audio.conf \
129
		network/network.conf
111
		network/network.conf \
112
		serial/serial.conf \
113
		|| die
130
}
114
}
131
115
132
pkg_postinst() {
116
pkg_postinst() {
133
	udevadm control --reload_rules && udevadm trigger
117
	udevadm control --reload-rules && udevadm trigger --subsystem-match=bluetooth
134
118
135
	elog
119
	elog
136
	elog "To use dial up networking you must install net-dialup/ppp."
120
	elog "To use dial up networking you must install net-dialup/ppp."
137
	elog ""
121
	elog ""
138
	elog "Since 3.0 bluez has changed the passkey handling to use a dbus based"
122
	elog "For a password agent, there is for example net-wireless/bluez-gnome"
139
	elog "API so please remember to update your /etc/bluetooth/hcid.conf."
123
	elog "for gnome and net-wireless/kdebluetooth for kde."
140
	elog "For a password agent, there are for example net-wireless/bluez-gnome"
141
	elog "and net-wireless/gnome-bluetooth:2 for GNOME. For KDE, see bug 246381"
142
	elog ""
143
	elog "Since 3.10.1 we don't install the old style daemons any more but rely"
144
	elog "on the new service architechture:"
145
	elog "	http://wiki.bluez.org/wiki/Services"
146
	elog ""
124
	elog ""
147
	elog "3.15 adds support for the audio service. See"
125
	elog "For registering devices that don't pair, use net-wireless/blueman"
148
	elog "http://wiki.bluez.org/wiki/HOWTO/AudioDevices for configuration help."
149
	elog ""
126
	elog ""
150
	elog "Use the old-daemons use flag to get the old daemons like hidd"
127
	elog "Use the old-daemons use flag to get the old daemons like hidd"
151
	elog "installed. Please note that the init script doesn't stop the old"
128
	elog "installed. Please note that the init script doesn't stop the old"
Lines 153-173 Link Here
153
	elog "  /etc/init.d/bluetooth stop"
130
	elog "  /etc/init.d/bluetooth stop"
154
	elog "before updating your configuration files or you can manually kill"
131
	elog "before updating your configuration files or you can manually kill"
155
	elog "the extra daemons you previously enabled in /etc/conf.d/bluetooth."
132
	elog "the extra daemons you previously enabled in /etc/conf.d/bluetooth."
156
	elog ""
133
157
	elog "If you want to use rfcomm as a normal user, you need to add the user"
134
	if use consolekit; then
158
	elog "to the uucp group."
135
		elog ""
159
	elog ""
136
		elog "If you want to use rfcomm as a normal user, you need to add the user"
137
		elog "to the uucp group."
138
	else
139
		elog ""
140
		ewarn "Since you have the consolekit use flag disabled for this package, you will only be "
141
		ewarn "able to run bluetooth clients as root.  If you want to be able to run bluetooth "
142
		ewarn "clients as a regular user, you must enable the consolekit use flag for this package."
143
	fi
144
160
	if use old-daemons; then
145
	if use old-daemons; then
146
		elog ""
161
		elog "The hidd init script was installed because you have the old-daemons"
147
		elog "The hidd init script was installed because you have the old-daemons"
162
		elog "use flag on. It is not started by default via udev so please add it"
148
		elog "use flag on. It is not started by default via udev so please add it"
163
		elog "to the required runleves using rc-update <runlevel> add hidd. If"
149
		elog "to the required runlevels using rc-update <runlevel> add hidd. If"
164
		elog "you need init scripts for the other daemons, please file requests"
150
		elog "you need init scripts for the other daemons, please file requests"
165
		elog "to https://bugs.gentoo.org."
151
		elog "to https://bugs.gentoo.org."
166
	else
152
	else
153
		elog ""
167
		elog "The bluetooth service should be started automatically by udev"
154
		elog "The bluetooth service should be started automatically by udev"
168
		elog "when the required hardware is inserted next time."
155
		elog "when the required hardware is inserted next time."
169
	fi
156
	fi
170
	elog
171
	ewarn "On first install you need to run /etc/init.d/dbus reload or hcid"
172
	ewarn "will fail to start."
173
}
157
}

Return to bug 270859