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: Tue, 22 Jun 2021 12:44:40
Message-Id: 1624365870.a108a9116addaef580896d39e11b9e5d0ae3bed4.pacho@gentoo
1 commit: a108a9116addaef580896d39e11b9e5d0ae3bed4
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 22 12:44:30 2021 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 22 12:44:30 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a108a911
7
8 net-wireless/bluez: Bump to 5.59
9
10 Closes: https://bugs.gentoo.org/785424
11 Package-Manager: Portage-3.0.19, Repoman-3.0.3
12 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
13
14 net-wireless/bluez/Manifest | 1 +
15 net-wireless/bluez/bluez-5.59.ebuild | 289 +++++++++++++++++++++++++++++++++++
16 2 files changed, 290 insertions(+)
17
18 diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest
19 index 7234d84746b..30a5ca30ec7 100644
20 --- a/net-wireless/bluez/Manifest
21 +++ b/net-wireless/bluez/Manifest
22 @@ -1,3 +1,4 @@
23 DIST bluez-5.55.tar.xz 2041428 BLAKE2B 7eee44063ea53188d35324bcc5b5f0539cf92a5934632743677bbf41822b8b79a899a82a93fd79887fe058e6f0c0e66ed8d5da46e5585682613bc1847cb009a8 SHA512 9423cb60d15a6f068838497a1eaea9f5a32d70c07191c313ba821a6919d6e0c436ada4f547cc5f2db5eacc0123429ad54851f57df2554f61fa293743ec14a033
24 DIST bluez-5.56.tar.xz 2053080 BLAKE2B b901deae4047ebe96c034c20c9d7e6c275d3c1fd311dc57ed2f1f927d6e778b213af3e09caaeebbb11110f1733fc9bf341cf8f7c63a37aaa6b896607c0026d92 SHA512 b320ee9d49a516f5cecb5fbc410ba42e9127f44ebcfb95647f68bd5d300147d0eaf633f8e8d0678631a2184ea3afae7b01b5f228157328874fa2a87832ed0ae1
25 DIST bluez-5.58.tar.xz 2060368 BLAKE2B 157780f83181d89fb126face5e9794bc0de8196f43d57d079fc09ae7e45e7ef21bf404e834d844da28d06f9a29cb92f11c310dbbcb7f60e845a335a558d7190c SHA512 159b554e0afd56af5da6f8333383f2fdf96d77a0e82d762bf4b37786e7312b7e61fbbae0f18b26442a606e0a232f48e0f45a4b38b95de36c7daf384f582315a3
26 +DIST bluez-5.59.tar.xz 2123104 BLAKE2B 59e063ffc0cd810a151f49c2d8b3e1dca46eef038dfe112bfc0524e111e00cfea78557f3d1ccf657882b76158ee9249291f9fc6e6a4cce851e0e6dc43f707398 SHA512 506ce28459a82614e5f6c55235b84e5780a9bfa821904fd40ee2928a503978248368069c57a283db9dd81f48d78f45e00d95a7c52d1538d3f5c858a29424304f
27
28 diff --git a/net-wireless/bluez/bluez-5.59.ebuild b/net-wireless/bluez/bluez-5.59.ebuild
29 new file mode 100644
30 index 00000000000..9f2c32a2449
31 --- /dev/null
32 +++ b/net-wireless/bluez/bluez-5.59.ebuild
33 @@ -0,0 +1,289 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +PYTHON_COMPAT=( python3_{7..10} )
39 +
40 +inherit autotools linux-info python-single-r1 readme.gentoo-r1 systemd udev multilib-minimal
41 +
42 +DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
43 +HOMEPAGE="http://www.bluez.org"
44 +SRC_URI="https://www.kernel.org/pub/linux/bluetooth/${P}.tar.xz"
45 +
46 +LICENSE="GPL-2+ LGPL-2.1+"
47 +SLOT="0/3"
48 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~x86"
49 +IUSE="btpclient cups doc debug deprecated extra-tools experimental +mesh midi +obex +readline selinux systemd test test-programs +udev user-session"
50 +
51 +# Since this release all remaining extra-tools need readline support, but this could
52 +# change in the future, hence, this REQUIRED_USE constraint could be dropped
53 +# again in the future.
54 +REQUIRED_USE="
55 + extra-tools? ( deprecated readline )
56 + test? ( ${PYTHON_REQUIRED_USE} )
57 + test-programs? ( ${PYTHON_REQUIRED_USE} )
58 +"
59 +
60 +TEST_DEPS="${PYTHON_DEPS}
61 + $(python_gen_cond_dep '
62 + >=dev-python/dbus-python-1[${PYTHON_MULTI_USEDEP}]
63 + dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
64 + ')
65 +"
66 +BDEPEND="
67 + dev-python/docutils
68 + virtual/pkgconfig
69 + test? ( ${TEST_DEPS} )
70 +"
71 +DEPEND="
72 + >=dev-libs/glib-2.28:2[${MULTILIB_USEDEP}]
73 + >=sys-apps/hwids-20121202.2
74 + btpclient? ( >=dev-libs/ell-0.39 )
75 + cups? ( net-print/cups:= )
76 + mesh? (
77 + >=dev-libs/ell-0.39
78 + >=dev-libs/json-c-0.13:=
79 + sys-libs/readline:0=
80 + )
81 + midi? ( media-libs/alsa-lib )
82 + obex? ( dev-libs/libical:= )
83 + readline? ( sys-libs/readline:0= )
84 + systemd? (
85 + >=sys-apps/dbus-1.6:=[user-session=]
86 + sys-apps/systemd
87 + )
88 + !systemd? ( >=sys-apps/dbus-1.6:= )
89 + udev? ( >=virtual/udev-172 )
90 +"
91 +RDEPEND="${DEPEND}
92 + selinux? ( sec-policy/selinux-bluetooth )
93 + test-programs? ( ${TEST_DEPS} )
94 +"
95 +
96 +RESTRICT="!test? ( test )"
97 +
98 +PATCHES=(
99 + # Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844)
100 + # http://www.spinics.net/lists/linux-bluetooth/msg58739.html
101 + # https://bugs.gentoo.org/539844
102 + "${FILESDIR}"/${PN}-udevadm-path-r1.patch
103 +
104 + # Fedora patches
105 + # http://www.spinics.net/lists/linux-bluetooth/msg40136.html
106 + "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
107 +)
108 +
109 +pkg_setup() {
110 + # From http://www.linuxfromscratch.org/blfs/view/svn/general/bluez.html
111 + # to prevent bugs like:
112 + # https://bugzilla.kernel.org/show_bug.cgi?id=196621
113 + CONFIG_CHECK="~NET ~BT ~BT_RFCOMM ~BT_RFCOMM_TTY ~BT_BNEP ~BT_BNEP_MC_FILTER
114 + ~BT_BNEP_PROTO_FILTER ~BT_HIDP ~CRYPTO_USER_API_HASH ~CRYPTO_USER_API_SKCIPHER ~RFKILL"
115 + # https://bugzilla.kernel.org/show_bug.cgi?id=196621
116 + # https://bugzilla.kernel.org/show_bug.cgi?id=206815
117 + if use mesh || use test; then
118 + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_USER
119 + ~CRYPTO_USER_API ~CRYPTO_USER_API_AEAD ~CRYPTO_AES ~CRYPTO_CCM ~CRYPTO_AEAD ~CRYPTO_CMAC"
120 + fi
121 + linux-info_pkg_setup
122 +
123 + if use test || use test-programs; then
124 + python-single-r1_pkg_setup
125 + fi
126 +
127 + if ! use udev; then
128 + ewarn
129 + ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth"
130 + ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work,"
131 + ewarn "and hid2hci will not be available."
132 + ewarn
133 + fi
134 +}
135 +
136 +src_prepare() {
137 + default
138 +
139 + # http://www.spinics.net/lists/linux-bluetooth/msg38490.html
140 + if ! use user-session || ! use systemd; then
141 + eapply "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch
142 + fi
143 +
144 + eautoreconf
145 +
146 + if use cups; then
147 + # Only not .am to not need to run eautoreconf only because of this
148 + sed -i \
149 + -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \
150 + Makefile.{in,tools} || die
151 + fi
152 +
153 + multilib_copy_sources
154 +}
155 +
156 +multilib_src_configure() {
157 + local myconf=(
158 + # readline is automagic when client is enabled
159 + # --enable-client always needs readline, bug #504038
160 + # --enable-mesh is handled in the same way
161 + ac_cv_header_readline_readline_h=$(multilib_native_usex readline)
162 + ac_cv_header_readline_readline_h=$(multilib_native_usex mesh)
163 + )
164 +
165 + if ! multilib_is_native_abi; then
166 + myconf+=(
167 + # deps not used for the library
168 + {DBUS,GLIB}_{CFLAGS,LIBS}=' '
169 + )
170 + fi
171 +
172 + econf \
173 + --localstatedir=/var \
174 + --disable-android \
175 + --enable-datafiles \
176 + --enable-optimization \
177 + $(use_enable debug) \
178 + --enable-pie \
179 + --enable-threads \
180 + --enable-library \
181 + --enable-tools \
182 + --enable-manpages \
183 + --enable-monitor \
184 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
185 + --with-systemduserunitdir="$(systemd_get_userunitdir)" \
186 + $(multilib_native_use_enable btpclient) \
187 + $(multilib_native_use_enable btpclient external-ell) \
188 + $(multilib_native_use_enable cups) \
189 + $(multilib_native_use_enable deprecated) \
190 + $(multilib_native_use_enable experimental) \
191 + $(multilib_native_use_enable mesh) \
192 + $(multilib_native_use_enable mesh external-ell) \
193 + $(multilib_native_use_enable midi) \
194 + $(multilib_native_use_enable obex) \
195 + $(multilib_native_use_enable readline client) \
196 + $(multilib_native_use_enable systemd) \
197 + $(multilib_native_use_enable test-programs test) \
198 + $(multilib_native_use_enable udev) \
199 + $(multilib_native_use_enable udev hid2hci) \
200 + $(multilib_native_use_enable udev sixaxis)
201 +}
202 +
203 +multilib_src_compile() {
204 + if multilib_is_native_abi; then
205 + default
206 + else
207 + emake -f Makefile -f - libs \
208 + <<<'libs: $(lib_LTLIBRARIES)'
209 + fi
210 +}
211 +
212 +multilib_src_test() {
213 + multilib_is_native_abi && default
214 +}
215 +
216 +multilib_src_install() {
217 + if multilib_is_native_abi; then
218 + emake DESTDIR="${D}" install
219 +
220 + # Only install extra-tools when relevant USE flag is enabled
221 + if use extra-tools; then
222 + ewarn "Upstream doesn't support using this tools and their bugs are"
223 + ewarn "likely to be ignored forever, also they can break without"
224 + ewarn "previous announcement."
225 + ewarn "Upstream also states all this tools are not really needed,"
226 + ewarn "then, if you still need to rely on them, you must ask them"
227 + ewarn "to either install that tool by default or add the needed"
228 + ewarn "functionality to the existing 'official' tools."
229 + ewarn "Please report this issues to:"
230 + ewarn "http://www.bluez.org/development/lists/"
231 +
232 + # Upstream doesn't install this, bug #524640
233 + # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115
234 + # http://comments.gmane.org/gmane.linux.bluez.kernel/54564
235 + dobin tools/btmgmt
236 + # gatttool is only built with readline, bug #530776
237 + # https://bugzilla.redhat.com/show_bug.cgi?id=1141909
238 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720486
239 + # https://bugs.archlinux.org/task/37686
240 + dobin attrib/gatttool
241 + # https://bugzilla.redhat.com/show_bug.cgi?id=1699680
242 + dobin tools/avinfo
243 + fi
244 +
245 + # Not installed by default after being built, bug #666756
246 + use btpclient && dobin tools/btpclient
247 +
248 + # Unittests are not that useful once installed, so make them optional
249 + if use test-programs; then
250 + # Drop python2 only test tools
251 + # https://bugzilla.kernel.org/show_bug.cgi?id=206819
252 + rm "${ED}"/usr/$(get_libdir)/bluez/test/simple-player || die
253 + # https://bugzilla.kernel.org/show_bug.cgi?id=206821
254 + rm "${ED}"/usr/$(get_libdir)/bluez/test/test-hfp || die
255 + # https://bugzilla.kernel.org/show_bug.cgi?id=206823
256 + rm "${ED}"/usr/$(get_libdir)/bluez/test/test-sap-server || die
257 +
258 + python_fix_shebang "${ED}"/usr/$(get_libdir)/bluez/test
259 +
260 + for i in $(find "${ED}"/usr/$(get_libdir)/bluez/test -maxdepth 1 -type f ! -name "*.*"); do
261 + dosym "${i}" /usr/bin/bluez-"${i##*/}"
262 + done
263 + fi
264 + else
265 + emake DESTDIR="${D}" \
266 + install-pkgincludeHEADERS \
267 + install-libLTLIBRARIES \
268 + install-pkgconfigDATA
269 + fi
270 +}
271 +
272 +multilib_src_install_all() {
273 + # We need to ensure obexd can be spawned automatically by systemd
274 + # when user-session is enabled:
275 + # http://marc.info/?l=linux-bluetooth&m=148096094716386&w=2
276 + # https://bugs.gentoo.org/show_bug.cgi?id=577842
277 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804908
278 + # https://bugs.archlinux.org/task/45816
279 + # https://bugzilla.redhat.com/show_bug.cgi?id=1318441
280 + # https://bugzilla.redhat.com/show_bug.cgi?id=1389347
281 + if use user-session && use systemd; then
282 + ln -s "${ED}"/usr/lib/systemd/user/obex.service "${ED}"/usr/lib/systemd/user/dbus-org.bluez.obex.service
283 + fi
284 +
285 + find "${D}" -name '*.la' -type f -delete || die
286 +
287 + keepdir /var/lib/bluetooth
288 +
289 + # Upstream don't want people to play with them
290 + # But we keep installing them due to 'historical' reasons
291 + insinto /etc/bluetooth
292 + local d
293 + for d in input network; do
294 + doins profiles/${d}/${d}.conf
295 + done
296 + # Setup auto enable as Fedora does for allowing to use
297 + # keyboards/mouse as soon as possible
298 + sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' src/main.conf || die
299 + doins src/main.conf
300 +
301 + newinitd "${FILESDIR}"/bluetooth-init.d-r5 bluetooth
302 + newconfd "${FILESDIR}"/bluetooth-conf.d bluetooth
303 +
304 + einstalldocs
305 + use doc && dodoc doc/*.txt
306 + # Install .json files as examples to be used by meshctl
307 + if use mesh; then
308 + dodoc tools/mesh-gatt/*.json
309 + local DOC_CONTENTS="Some example .json files were installed into
310 + /usr/share/doc/${PF} to be used with meshctl. Feel free to
311 + uncompress and copy them to ~/.config/meshctl to use them."
312 + readme.gentoo_create_doc
313 + fi
314 +}
315 +
316 +pkg_postinst() {
317 + use udev && udev_reload
318 + systemd_reenable bluetooth.service
319 +
320 + has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp"
321 + use mesh && readme.gentoo_print_elog
322 +}