Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/bluez/
Date: Sun, 09 Oct 2016 19:07:42
Message-Id: 1476040036.4a287d008b4feb1268d81a6d8f94de05d225a61e.pacho@gentoo
1 commit: 4a287d008b4feb1268d81a6d8f94de05d225a61e
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 9 19:04:42 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 9 19:07:16 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a287d00
7
8 net-wireless/bluez: Version bump, force python2 as all tests but two are needing it (don't install the two test apps needing python3 until we see how to pull in python2 and 3 at the same time for RDEPEND with python eclasses)
9
10 Package-Manager: portage-2.3.1
11
12 net-wireless/bluez/Manifest | 1 +
13 net-wireless/bluez/bluez-5.42.ebuild | 241 +++++++++++++++++++++++++++++++++++
14 2 files changed, 242 insertions(+)
15
16 diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest
17 index 9041f40..aa2352c 100644
18 --- a/net-wireless/bluez/Manifest
19 +++ b/net-wireless/bluez/Manifest
20 @@ -4,3 +4,4 @@ DIST bluez-5.35.tar.xz 1643068 SHA256 1afee054644a8b1753ac98d7ad5cd95681a38f5c4c
21 DIST bluez-5.37.tar.xz 1657760 SHA256 c14ba9ddcb0055522073477b8fd8bf1ddf5d219e75fdfd4699b7e0ce5350d6b0 SHA512 e9af3b1dd079185425db10630fefbb66c26f398f21edb0c213baba9599f73715ca36f405a3f9d9572e6c55b7d3d25a4cdc18668c6eb439422f637e64798a28e9 WHIRLPOOL 1697a379d944978193db51a50c19a10fb27aa4e57ee9793563ba59b25de6388dfb4847c1a851fe1467d2521f14b2b9655208b8cef0cd5e44604bc0b26beb0c2b
22 DIST bluez-5.39.tar.xz 1659576 SHA256 21d1bc9150d3576296595217efb98a746b592389d25d5637e8bee5da7272593b SHA512 a0c43d0de4dcbfa20bbfe34e805a60703f4b94d0aa6c1d128a0917dfaa490593b26eb555b0a343ff44d1f94349b61776189438039e489ddcf8fe107354740230 WHIRLPOOL da299f8556418cf38d5a05b91079fdb6ff85761127d4708783bcd97fa4502e208187c013b1d8622688b438308506fbb06732426c35f6fedc2fe25cfd68a93486
23 DIST bluez-5.41.tar.xz 1665948 SHA256 df7dc4462494dad4e60a2943240d584f6e760235dca64f5f10eba46dbab7f5f0 SHA512 0cf96514362573a3c2cd500d427ea58373de0d1348ac43d61fff295ca5df8305668ef2f82913681779aa3506917aabf47983e07f47b4586573c8ad567a9863af WHIRLPOOL aa48649a0b0b79aeea1c2703cd98f13f69c8efe8a187f094bae8e059452c2cc1a862a8113cd6f3e141c684ad2158eaba43cdd908bbc1aa7dbee67ca578d80869
24 +DIST bluez-5.42.tar.xz 1678324 SHA256 4f166fed80fc017396d6f2b3cae5185520875ab456d1c74d6b4eaa4da0e16109 SHA512 aec0433d3dd7d0be243ebddd5685eee2b40511bab90a9c1da50cb237ca485651325b8b91c4d38546a17ca861e9b8b24d7e3f50545cc8b5276735557e7189f457 WHIRLPOOL 5014a619d168ddce17b77d5a467f99780f080fb5fd84e7927e87098d8bfe7a70896336ed56f9f7e9650faaeaa97aedae456cc01158d6798491a30c8db3f376d4
25
26 diff --git a/net-wireless/bluez/bluez-5.42.ebuild b/net-wireless/bluez/bluez-5.42.ebuild
27 new file mode 100644
28 index 00000000..5d99295
29 --- /dev/null
30 +++ b/net-wireless/bluez/bluez-5.42.ebuild
31 @@ -0,0 +1,241 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=6
37 +PYTHON_COMPAT=( python2_7 )
38 +
39 +inherit autotools eutils multilib python-single-r1 readme.gentoo-r1 systemd udev user multilib-minimal
40 +
41 +DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
42 +HOMEPAGE="http://www.bluez.org"
43 +SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz"
44 +
45 +LICENSE="GPL-2+ LGPL-2.1+"
46 +SLOT="0/3"
47 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~x86"
48 +
49 +IUSE="cups doc debug deprecated extra-tools experimental +obex +readline selinux systemd test test-programs +udev"
50 +REQUIRED_USE="
51 + test? ( ${PYTHON_REQUIRED_USE} )
52 + test-programs? ( ${PYTHON_REQUIRED_USE} )
53 +"
54 +
55 +CDEPEND="
56 + >=dev-libs/glib-2.28:2
57 + >=sys-apps/dbus-1.6:=
58 + >=sys-apps/hwids-20121202.2
59 + cups? ( net-print/cups:= )
60 + obex? ( dev-libs/libical:= )
61 + readline? ( sys-libs/readline:= )
62 + systemd? ( sys-apps/systemd )
63 + udev? ( >=virtual/udev-172 )
64 +"
65 +TEST_DEPS="${PYTHON_DEPS}
66 + >=dev-python/dbus-python-1[${PYTHON_USEDEP}]
67 + dev-python/pygobject:3[${PYTHON_USEDEP}]
68 +"
69 +
70 +DEPEND="${CDEPEND}
71 + virtual/pkgconfig
72 + test? ( ${TEST_DEPS} )
73 +"
74 +RDEPEND="${CDEPEND}
75 + selinux? ( sec-policy/selinux-bluetooth )
76 + test-programs? ( ${TEST_DEPS} )
77 +"
78 +DOC_CONTENTS="
79 + If you want to use rfcomm as a normal user, you need to add the user
80 + to the uucp group.
81 +"
82 +
83 +PATCHES=(
84 + # Use static group "plugdev" if there is no ConsoleKit (or systemd logind)
85 + "${FILESDIR}"/bluez-plugdev.patch
86 +
87 + # Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844)
88 + # http://www.spinics.net/lists/linux-bluetooth/msg58739.html
89 + "${FILESDIR}"/bluez-udevadm-path.patch
90 +
91 + # build: Quote systemd variable names, bug #527432
92 + "${FILESDIR}"/bluez-5.39-systemd-quote.patch
93 +
94 + # http://article.gmane.org/gmane.linux.bluez.kernel/67230
95 + # Fedora patches
96 + # http://www.spinics.net/lists/linux-bluetooth/msg38490.html
97 + "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
98 +
99 + # http://www.spinics.net/lists/linux-bluetooth/msg40136.html
100 + "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
101 +
102 + # http://www.spinics.net/lists/linux-bluetooth/msg41264.html
103 + "${FILESDIR}"/0002-autopair-Don-t-handle-the-iCade.patch
104 +
105 + # ???
106 + "${FILESDIR}"/0004-agent-Assert-possible-infinite-loop.patch
107 +)
108 +
109 +pkg_setup() {
110 + enewgroup plugdev
111 +
112 + if use test || use test-programs; then
113 + python-single-r1_pkg_setup
114 + fi
115 +
116 + if ! use udev; then
117 + ewarn
118 + ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth"
119 + ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work,"
120 + ewarn "and hid2hci will not be available."
121 + ewarn
122 + fi
123 +}
124 +
125 +src_prepare() {
126 + default
127 +
128 + if use cups; then
129 + sed -i \
130 + -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \
131 + Makefile.{in,tools} || die
132 + fi
133 +
134 + eautoreconf
135 +
136 + multilib_copy_sources
137 +}
138 +
139 +multilib_src_configure() {
140 + local myconf=(
141 + # readline is automagic when client is enabled
142 + # --enable-client always needs readline, bug #504038
143 + ac_cv_header_readline_readline_h=$(multilib_native_usex readline)
144 + )
145 +
146 + if ! multilib_is_native_abi; then
147 + myconf+=(
148 + # deps not used for the library
149 + {DBUS,GLIB}_{CFLAGS,LIBS}=' '
150 + )
151 + fi
152 +
153 + econf \
154 + --localstatedir=/var \
155 + --disable-android \
156 + --enable-datafiles \
157 + --enable-experimental \
158 + --enable-optimization \
159 + $(use_enable debug) \
160 + --enable-pie \
161 + --enable-threads \
162 + --enable-library \
163 + --enable-tools \
164 + --enable-manpages \
165 + --enable-monitor \
166 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
167 + $(multilib_native_use_enable cups) \
168 + $(multilib_native_use_enable deprecated) \
169 + $(multilib_native_use_enable experimental) \
170 + $(multilib_native_use_enable obex) \
171 + $(multilib_native_use_enable readline client) \
172 + $(multilib_native_use_enable systemd) \
173 + $(multilib_native_use_enable test-programs test) \
174 + $(multilib_native_use_enable udev) \
175 + $(multilib_native_use_enable udev sixaxis)
176 +}
177 +
178 +multilib_src_compile() {
179 + if multilib_is_native_abi; then
180 + default
181 + else
182 + emake -f Makefile -f - libs \
183 + <<<'libs: $(lib_LTLIBRARIES)'
184 + fi
185 +}
186 +
187 +multilib_src_test() {
188 + multilib_is_native_abi && default
189 +}
190 +
191 +multilib_src_install() {
192 + if multilib_is_native_abi; then
193 + emake DESTDIR="${D}" install
194 +
195 + # Only install extra-tools when relevant USE flag is enabled
196 + if use extra-tools; then
197 + ewarn "Upstream doesn't support using this tools and their bugs are"
198 + ewarn "likely to be ignored forever, also that tools can break"
199 + ewarn "without previous announcement."
200 + ewarn "Upstream also states all this tools are not really needed,"
201 + ewarn "then, if you still need to rely on them, you must ask them"
202 + ewarn "to either install that tool by default or add the needed"
203 + ewarn "functionality to the existing 'official' tools."
204 + ewarn "Please report this issues to:"
205 + ewarn "http://www.bluez.org/development/lists/"
206 +
207 + # Upstream doesn't install this, bug #524640
208 + # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115
209 + # http://comments.gmane.org/gmane.linux.bluez.kernel/54564
210 + # gatttool is only built with readline, bug #530776
211 + if use readline; then
212 + dobin attrib/gatttool
213 + dobin tools/btmgmt
214 + fi
215 + dobin tools/hex2hcd
216 + fi
217 +
218 + # Unittests are not that useful once installed, so make them optional
219 + if use test-programs; then
220 + # example-gatt-client is the only one needing
221 + # python3, the others are python2 only. Remove
222 + # until we see how to pull in python2 and python3
223 + # for runtime
224 + rm "${ED}"/usr/$(get_libdir)/bluez/test/example-gatt-server || die
225 + rm "${ED}"/usr/$(get_libdir)/bluez/test/example-gatt-client || die
226 + python_fix_shebang "${ED}"/usr/$(get_libdir)/bluez/test
227 + for i in $(find "${ED}"/usr/$(get_libdir)/bluez/test -maxdepth 1 -type f ! -name "*.*"); do
228 + dosym "${i}" /usr/bin/bluez-"${i##*/}"
229 + done
230 + fi
231 + else
232 + emake DESTDIR="${D}" \
233 + install-includeHEADERS \
234 + install-libLTLIBRARIES \
235 + install-pkgconfigDATA
236 + fi
237 +}
238 +
239 +multilib_src_install_all() {
240 + prune_libtool_files --modules
241 +
242 + keepdir /var/lib/bluetooth
243 +
244 + # Upstream don't want people to play with them
245 + # But we keep installing them due to 'historical' reasons
246 + insinto /etc/bluetooth
247 + local d
248 + for d in input network proximity; do
249 + doins profiles/${d}/${d}.conf
250 + done
251 + doins src/main.conf
252 +
253 + newinitd "${FILESDIR}"/bluetooth-init.d-r3 bluetooth
254 + newinitd "${FILESDIR}"/rfcomm-init.d-r2 rfcomm
255 +
256 + einstalldocs
257 + use doc && dodoc doc/*.txt
258 + readme.gentoo_create_doc
259 +}
260 +
261 +pkg_postinst() {
262 + readme.gentoo_print_elog
263 +
264 + use udev && udev_reload
265 +
266 + has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp."
267 +
268 + if ! has_version sys-auth/consolekit && ! has_version sys-apps/systemd; then
269 + elog "Since you don't have sys-auth/consolekit neither sys-apps/systemd, you will"
270 + elog "need to add the user to the plugdev group."
271 + fi
272 +}