1 |
commit: 0a3d67960f40f73fa795be05164da8737c00d6a4 |
2 |
Author: Zero_Chaos <zerochaos <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 23 21:03:35 2015 +0000 |
4 |
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 23 21:05:06 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a3d6796 |
7 |
|
8 |
net-wireless/bluez: reintroduce test-programs use flag. keywords removed pending python team review |
9 |
|
10 |
Package-Manager: portage-2.2.23 |
11 |
|
12 |
net-wireless/bluez/bluez-5.35-r1.ebuild | 219 ++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 219 insertions(+) |
14 |
|
15 |
diff --git a/net-wireless/bluez/bluez-5.35-r1.ebuild b/net-wireless/bluez/bluez-5.35-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..b5b5c97 |
18 |
--- /dev/null |
19 |
+++ b/net-wireless/bluez/bluez-5.35-r1.ebuild |
20 |
@@ -0,0 +1,219 @@ |
21 |
+# Copyright 1999-2015 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=5 |
26 |
+PYTHON_COMPAT="python2_7" |
27 |
+ |
28 |
+inherit autotools eutils multilib python-single-r1 python-utils-r1 readme.gentoo systemd udev user multilib-minimal |
29 |
+ |
30 |
+DESCRIPTION="Bluetooth Tools and System Daemons for Linux" |
31 |
+HOMEPAGE="http://www.bluez.org" |
32 |
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz" |
33 |
+ |
34 |
+LICENSE="GPL-2+ LGPL-2.1+" |
35 |
+SLOT="0/3" |
36 |
+KEYWORDS="" |
37 |
+#KEYWORDS="amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86" |
38 |
+IUSE="cups doc debug +obex +readline selinux systemd test test-programs +udev" |
39 |
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} ) test-programs? ( ${PYTHON_REQUIRED_USE} )" |
40 |
+ |
41 |
+CDEPEND=" |
42 |
+ >=dev-libs/glib-2.28:2 |
43 |
+ >=sys-apps/dbus-1.6:= |
44 |
+ >=sys-apps/hwids-20121202.2 |
45 |
+ cups? ( net-print/cups:= ) |
46 |
+ obex? ( dev-libs/libical:= ) |
47 |
+ readline? ( sys-libs/readline:= ) |
48 |
+ systemd? ( sys-apps/systemd ) |
49 |
+ udev? ( >=virtual/udev-172 ) |
50 |
+ abi_x86_32? ( |
51 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140406-r1 |
52 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32] |
53 |
+ ) |
54 |
+" |
55 |
+TEST_DEPS="${PYTHON_DEPS} |
56 |
+ >=dev-python/dbus-python-1[${PYTHON_USEDEP}] |
57 |
+ || ( |
58 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
59 |
+ dev-python/pygobject:2[${PYTHON_USEDEP}] |
60 |
+ ) |
61 |
+" |
62 |
+ |
63 |
+DEPEND="${CDEPEND} |
64 |
+ app-arch/xz-utils |
65 |
+ virtual/pkgconfig |
66 |
+ test? ( |
67 |
+ ${TEST_DEPS} |
68 |
+ ) |
69 |
+" |
70 |
+RDEPEND="${CDEPEND} |
71 |
+ selinux? ( sec-policy/selinux-bluetooth ) |
72 |
+ test-programs? ( ${TEST_DEPS} ) |
73 |
+" |
74 |
+DOC_CONTENTS=" |
75 |
+ If you want to use rfcomm as a normal user, you need to add the user |
76 |
+ to the uucp group. |
77 |
+" |
78 |
+ |
79 |
+pkg_setup() { |
80 |
+ enewgroup plugdev |
81 |
+ use test && python-single-r1_pkg_setup |
82 |
+ use test-programs && python-single-r1_pkg_setup |
83 |
+ |
84 |
+ if ! use udev; then |
85 |
+ ewarn |
86 |
+ ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth" |
87 |
+ ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work," |
88 |
+ ewarn "and hid2hci will not be available." |
89 |
+ ewarn |
90 |
+ fi |
91 |
+} |
92 |
+ |
93 |
+src_prepare() { |
94 |
+ # Use static group "plugdev" if there is no ConsoleKit (or systemd logind) |
95 |
+ epatch "${FILESDIR}"/bluez-plugdev.patch |
96 |
+ |
97 |
+ # Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844) |
98 |
+ # http://www.spinics.net/lists/linux-bluetooth/msg58739.html |
99 |
+ epatch "${FILESDIR}"/bluez-udevadm-path.patch |
100 |
+ |
101 |
+ # Fedora patches |
102 |
+ # http://www.spinics.net/lists/linux-bluetooth/msg38490.html |
103 |
+ epatch "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch |
104 |
+ |
105 |
+ # http://www.spinics.net/lists/linux-bluetooth/msg40136.html |
106 |
+ epatch "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch |
107 |
+ |
108 |
+ # http://www.spinics.net/lists/linux-bluetooth/msg41264.html |
109 |
+ epatch "${FILESDIR}"/0002-autopair-Don-t-handle-the-iCade.patch |
110 |
+ |
111 |
+ # ??? |
112 |
+ epatch "${FILESDIR}"/0004-agent-Assert-possible-infinite-loop.patch |
113 |
+ |
114 |
+ if use cups; then |
115 |
+ sed -i \ |
116 |
+ -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \ |
117 |
+ Makefile.{in,tools} || die |
118 |
+ fi |
119 |
+ |
120 |
+ eautoreconf |
121 |
+ |
122 |
+ multilib_copy_sources |
123 |
+} |
124 |
+ |
125 |
+multilib_src_configure() { |
126 |
+ local myconf=( |
127 |
+ # readline is automagic when client is enabled |
128 |
+ # --enable-client always needs readline, bug #504038 |
129 |
+ ac_cv_header_readline_readline_h=$(multilib_native_usex readline) |
130 |
+ ) |
131 |
+ |
132 |
+ if ! multilib_is_native_abi; then |
133 |
+ myconf+=( |
134 |
+ # deps not used for the library |
135 |
+ {DBUS,GLIB}_{CFLAGS,LIBS}=' ' |
136 |
+ ) |
137 |
+ fi |
138 |
+ |
139 |
+ econf \ |
140 |
+ --localstatedir=/var \ |
141 |
+ --disable-android \ |
142 |
+ --enable-datafiles \ |
143 |
+ --enable-experimental \ |
144 |
+ --enable-optimization \ |
145 |
+ $(use_enable debug) \ |
146 |
+ --enable-pie \ |
147 |
+ --enable-threads \ |
148 |
+ --enable-library \ |
149 |
+ $(multilib_native_use_enable test) \ |
150 |
+ --enable-tools \ |
151 |
+ --enable-manpages \ |
152 |
+ --enable-monitor \ |
153 |
+ $(multilib_native_use_enable cups) \ |
154 |
+ $(multilib_native_use_enable obex) \ |
155 |
+ $(multilib_native_use_enable readline client) \ |
156 |
+ $(multilib_native_use_enable systemd) \ |
157 |
+ $(multilib_native_use_enable test-programs test) |
158 |
+ $(systemd_with_unitdir) \ |
159 |
+ $(multilib_native_use_enable udev) \ |
160 |
+ $(multilib_native_use_enable udev sixaxis) |
161 |
+} |
162 |
+ |
163 |
+multilib_src_compile() { |
164 |
+ if multilib_is_native_abi; then |
165 |
+ default |
166 |
+ else |
167 |
+ emake -f Makefile -f - libs \ |
168 |
+ <<<'libs: $(lib_LTLIBRARIES)' |
169 |
+ fi |
170 |
+} |
171 |
+ |
172 |
+multilib_src_test() { |
173 |
+ multilib_is_native_abi && default |
174 |
+} |
175 |
+ |
176 |
+multilib_src_install() { |
177 |
+ if multilib_is_native_abi; then |
178 |
+ emake DESTDIR="${D}" install |
179 |
+ |
180 |
+ # Upstream doesn't install this, bug #524640 |
181 |
+ # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115 |
182 |
+ # http://comments.gmane.org/gmane.linux.bluez.kernel/54564 |
183 |
+ # gatttool is only built with readline, bug #530776 |
184 |
+ use readline && dobin attrib/gatttool |
185 |
+ dobin tools/hex2hcd |
186 |
+ |
187 |
+ # Unittests are not that useful once installed, so make them optional |
188 |
+ if use test && ! use test-programs; then |
189 |
+ rm -r "${ED}"/usr/$(get_libdir)/bluez/test || die |
190 |
+ fi |
191 |
+ if use test-programs; then |
192 |
+ #EPYTHON=python2.7 python_fix_shebang "${ED}"/usr/$(get_libdir)/bluez/test |
193 |
+ python_fix_shebang "${ED}"/usr/$(get_libdir)/bluez/test |
194 |
+ for i in $(find "${ED}"/usr/$(get_libdir)/bluez/test -maxdepth 1 -type f ! -name "*.*"); do |
195 |
+ dosym "${i}" /usr/bin/bluez-"${i##*/}" |
196 |
+ done |
197 |
+ fi |
198 |
+ else |
199 |
+ emake DESTDIR="${D}" \ |
200 |
+ install-includeHEADERS \ |
201 |
+ install-libLTLIBRARIES \ |
202 |
+ install-pkgconfigDATA |
203 |
+ fi |
204 |
+} |
205 |
+ |
206 |
+multilib_src_install_all() { |
207 |
+ prune_libtool_files --modules |
208 |
+ |
209 |
+ keepdir /var/lib/bluetooth |
210 |
+ |
211 |
+ # Upstream don't want people to play with them |
212 |
+ # But we keep installing them due to 'historical' reasons |
213 |
+ insinto /etc/bluetooth |
214 |
+ local d |
215 |
+ for d in input network proximity; do |
216 |
+ doins profiles/${d}/${d}.conf |
217 |
+ done |
218 |
+ doins src/main.conf |
219 |
+ |
220 |
+ newinitd "${FILESDIR}"/bluetooth-init.d-r3 bluetooth |
221 |
+ newinitd "${FILESDIR}"/rfcomm-init.d-r2 rfcomm |
222 |
+ |
223 |
+ einstalldocs |
224 |
+ use doc && dodoc doc/*.txt |
225 |
+ readme.gentoo_create_doc |
226 |
+} |
227 |
+ |
228 |
+pkg_postinst() { |
229 |
+ readme.gentoo_print_elog |
230 |
+ |
231 |
+ use udev && udev_reload |
232 |
+ |
233 |
+ has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp." |
234 |
+ |
235 |
+ if ! has_version sys-auth/consolekit && ! has_version sys-apps/systemd; then |
236 |
+ elog "Since you don't have sys-auth/consolekit neither sys-apps/systemd, you will" |
237 |
+ elog "need to add the user to the plugdev group." |
238 |
+ fi |
239 |
+} |