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/files/, net-wireless/bluez/
Date: Tue, 19 Oct 2021 21:19:57
Message-Id: 1634678384.7514a3c027e281871fc86a27f7660016016b4023.pacho@gentoo
1 commit: 7514a3c027e281871fc86a27f7660016016b4023
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 19 21:19:44 2021 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 19 21:19:44 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7514a3c0
7
8 net-wireless/bluez: Drop old
9
10 Package-Manager: Portage-3.0.24, Repoman-3.0.3
11 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
12
13 net-wireless/bluez/Manifest | 2 -
14 net-wireless/bluez/bluez-5.58-r1.ebuild | 292 -----------------------
15 net-wireless/bluez/bluez-5.60.ebuild | 292 -----------------------
16 net-wireless/bluez/files/bluez-5.58-rfkill.patch | 84 -------
17 4 files changed, 670 deletions(-)
18
19 diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest
20 index 56ab750524f..471eb8b4602 100644
21 --- a/net-wireless/bluez/Manifest
22 +++ b/net-wireless/bluez/Manifest
23 @@ -1,4 +1,2 @@
24 -DIST bluez-5.58.tar.xz 2060368 BLAKE2B 157780f83181d89fb126face5e9794bc0de8196f43d57d079fc09ae7e45e7ef21bf404e834d844da28d06f9a29cb92f11c310dbbcb7f60e845a335a558d7190c SHA512 159b554e0afd56af5da6f8333383f2fdf96d77a0e82d762bf4b37786e7312b7e61fbbae0f18b26442a606e0a232f48e0f45a4b38b95de36c7daf384f582315a3
25 -DIST bluez-5.60.tar.xz 2124312 BLAKE2B 52cd08192cbfb7adc2e11f270442af62307dbf3cb940554f77e1ec4c30036ca1c05970d7d48719d3036173135f2b14123f2d0aad8147f0a919773d211238a11e SHA512 069e054360b4ab72f1daa033572f0fd822fb0f47e52069f4f3dcdfecfa312b9a5366cc04967e639aef39b980c0e1007389f1ee757e7c3bae43a5e66f8ed21a6b
26 DIST bluez-5.61.tar.xz 2137412 BLAKE2B 2fc1b44f726d48b4a0e8bbecc664077db1db69bbc87c66e9d7ac85d7b2e066de8b349c18597a5ba140c5fcb1ef867ee3980ebdd839ded69ae30491fb7b836940 SHA512 a2318637258f9db0bf05fecbfbea2c3ca5e21867378e28ab4c77f658fe42f10c8c607939f2b437ec40d1ceb00b99f7916c0275faaedd9edd247f7dc91329937a
27 DIST bluez-5.62.tar.xz 2149348 BLAKE2B db99b36a230fc0be15275d2eda9864b686326ba50648f66b19087ea4309a76d234ab4f1dcb6975f1513a898978b1d5b9332542f5dcee22efd898b79658434a70 SHA512 8fb0b81e1d929d3eee3d70f457ce75dbcff4c2a8a728247fc950bbe11e84d83582345bfd433d2e2df7b5588eb0e42f286658a83c7332be84819d9df49a5707e8
28
29 diff --git a/net-wireless/bluez/bluez-5.58-r1.ebuild b/net-wireless/bluez/bluez-5.58-r1.ebuild
30 deleted file mode 100644
31 index 18c11b1754e..00000000000
32 --- a/net-wireless/bluez/bluez-5.58-r1.ebuild
33 +++ /dev/null
34 @@ -1,292 +0,0 @@
35 -# Copyright 1999-2021 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI=7
39 -PYTHON_COMPAT=( python3_{8..9} )
40 -
41 -inherit autotools linux-info python-single-r1 readme.gentoo-r1 systemd udev multilib-minimal
42 -
43 -DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
44 -HOMEPAGE="http://www.bluez.org"
45 -SRC_URI="https://www.kernel.org/pub/linux/bluetooth/${P}.tar.xz"
46 -
47 -LICENSE="GPL-2+ LGPL-2.1+"
48 -SLOT="0/3"
49 -KEYWORDS="amd64 arm arm64 ~hppa ~mips ppc ppc64 x86"
50 -IUSE="btpclient cups doc debug deprecated extra-tools experimental +mesh midi +obex +readline selinux systemd test test-programs +udev user-session"
51 -
52 -# Since this release all remaining extra-tools need readline support, but this could
53 -# change in the future, hence, this REQUIRED_USE constraint could be dropped
54 -# again in the future.
55 -REQUIRED_USE="
56 - extra-tools? ( deprecated readline )
57 - test? ( ${PYTHON_REQUIRED_USE} )
58 - test-programs? ( ${PYTHON_REQUIRED_USE} )
59 -"
60 -
61 -TEST_DEPS="${PYTHON_DEPS}
62 - $(python_gen_cond_dep '
63 - >=dev-python/dbus-python-1[${PYTHON_USEDEP}]
64 - dev-python/pygobject:3[${PYTHON_USEDEP}]
65 - ')
66 -"
67 -BDEPEND="
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 - # rfkill: Fix reading from rfkill socket
100 - "${FILESDIR}"/${P}-rfkill.patch
101 -
102 - # Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844)
103 - # http://www.spinics.net/lists/linux-bluetooth/msg58739.html
104 - # https://bugs.gentoo.org/539844
105 - "${FILESDIR}"/${PN}-udevadm-path-r1.patch
106 -
107 - # Fedora patches
108 - # http://www.spinics.net/lists/linux-bluetooth/msg40136.html
109 - "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
110 -)
111 -
112 -pkg_setup() {
113 - # From http://www.linuxfromscratch.org/blfs/view/svn/general/bluez.html
114 - # to prevent bugs like:
115 - # https://bugzilla.kernel.org/show_bug.cgi?id=196621
116 - CONFIG_CHECK="~NET ~BT ~BT_RFCOMM ~BT_RFCOMM_TTY ~BT_BNEP ~BT_BNEP_MC_FILTER
117 - ~BT_BNEP_PROTO_FILTER ~BT_HIDP ~RFKILL ~CRYPTO_USER_API_HASH ~CRYPTO_USER_API_SKCIPHER"
118 - # https://bugzilla.kernel.org/show_bug.cgi?id=196621
119 - # https://bugzilla.kernel.org/show_bug.cgi?id=206815
120 - if use mesh || use test; then
121 - CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_USER
122 - ~CRYPTO_USER_API ~CRYPTO_USER_API_AEAD ~CRYPTO_USER_API_HASH
123 - ~CRYPTO_AES ~CRYPTO_CCM ~CRYPTO_AEAD ~CRYPTO_CMAC"
124 - fi
125 - linux-info_pkg_setup
126 -
127 - if use test || use test-programs; then
128 - python-single-r1_pkg_setup
129 - fi
130 -
131 - if ! use udev; then
132 - ewarn
133 - ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth"
134 - ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work,"
135 - ewarn "and hid2hci will not be available."
136 - ewarn
137 - fi
138 -}
139 -
140 -src_prepare() {
141 - default
142 -
143 - # http://www.spinics.net/lists/linux-bluetooth/msg38490.html
144 - if ! use user-session || ! use systemd; then
145 - eapply "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch
146 - fi
147 -
148 - eautoreconf
149 -
150 - if use cups; then
151 - # Only not .am to not need to run eautoreconf only because of this
152 - sed -i \
153 - -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \
154 - Makefile.{in,tools} || die
155 - fi
156 -
157 - multilib_copy_sources
158 -}
159 -
160 -multilib_src_configure() {
161 - local myconf=(
162 - # readline is automagic when client is enabled
163 - # --enable-client always needs readline, bug #504038
164 - # --enable-mesh is handled in the same way
165 - ac_cv_header_readline_readline_h=$(multilib_native_usex readline)
166 - ac_cv_header_readline_readline_h=$(multilib_native_usex mesh)
167 - )
168 -
169 - if ! multilib_is_native_abi; then
170 - myconf+=(
171 - # deps not used for the library
172 - {DBUS,GLIB}_{CFLAGS,LIBS}=' '
173 - )
174 - fi
175 -
176 - econf \
177 - --localstatedir=/var \
178 - --disable-android \
179 - --enable-datafiles \
180 - --enable-optimization \
181 - $(use_enable debug) \
182 - --enable-pie \
183 - --enable-threads \
184 - --enable-library \
185 - --enable-tools \
186 - --enable-manpages \
187 - --enable-monitor \
188 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
189 - --with-systemduserunitdir="$(systemd_get_userunitdir)" \
190 - $(multilib_native_use_enable btpclient) \
191 - $(multilib_native_use_enable btpclient external-ell) \
192 - $(multilib_native_use_enable cups) \
193 - $(multilib_native_use_enable deprecated) \
194 - $(multilib_native_use_enable experimental) \
195 - $(multilib_native_use_enable mesh) \
196 - $(multilib_native_use_enable mesh external-ell) \
197 - $(multilib_native_use_enable midi) \
198 - $(multilib_native_use_enable obex) \
199 - $(multilib_native_use_enable readline client) \
200 - $(multilib_native_use_enable systemd) \
201 - $(multilib_native_use_enable test-programs test) \
202 - $(multilib_native_use_enable udev) \
203 - $(multilib_native_use_enable udev hid2hci) \
204 - $(multilib_native_use_enable udev sixaxis)
205 -}
206 -
207 -multilib_src_compile() {
208 - if multilib_is_native_abi; then
209 - default
210 - else
211 - emake -f Makefile -f - libs \
212 - <<<'libs: $(lib_LTLIBRARIES)'
213 - fi
214 -}
215 -
216 -multilib_src_test() {
217 - multilib_is_native_abi && default
218 -}
219 -
220 -multilib_src_install() {
221 - if multilib_is_native_abi; then
222 - emake DESTDIR="${D}" install
223 -
224 - # Only install extra-tools when relevant USE flag is enabled
225 - if use extra-tools; then
226 - ewarn "Upstream doesn't support using this tools and their bugs are"
227 - ewarn "likely to be ignored forever, also they can break without"
228 - ewarn "previous announcement."
229 - ewarn "Upstream also states all this tools are not really needed,"
230 - ewarn "then, if you still need to rely on them, you must ask them"
231 - ewarn "to either install that tool by default or add the needed"
232 - ewarn "functionality to the existing 'official' tools."
233 - ewarn "Please report this issues to:"
234 - ewarn "http://www.bluez.org/development/lists/"
235 -
236 - # Upstream doesn't install this, bug #524640
237 - # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115
238 - # http://comments.gmane.org/gmane.linux.bluez.kernel/54564
239 - dobin tools/btmgmt
240 - # gatttool is only built with readline, bug #530776
241 - # https://bugzilla.redhat.com/show_bug.cgi?id=1141909
242 - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720486
243 - # https://bugs.archlinux.org/task/37686
244 - dobin attrib/gatttool
245 - # https://bugzilla.redhat.com/show_bug.cgi?id=1699680
246 - dobin tools/avinfo
247 - fi
248 -
249 - # Not installed by default after being built, bug #666756
250 - use btpclient && dobin tools/btpclient
251 -
252 - # Unittests are not that useful once installed, so make them optional
253 - if use test-programs; then
254 - # Drop python2 only test tools
255 - # https://bugzilla.kernel.org/show_bug.cgi?id=206819
256 - rm "${ED}"/usr/$(get_libdir)/bluez/test/simple-player || die
257 - # https://bugzilla.kernel.org/show_bug.cgi?id=206821
258 - rm "${ED}"/usr/$(get_libdir)/bluez/test/test-hfp || die
259 - # https://bugzilla.kernel.org/show_bug.cgi?id=206823
260 - rm "${ED}"/usr/$(get_libdir)/bluez/test/test-sap-server || die
261 -
262 - python_fix_shebang "${ED}"/usr/$(get_libdir)/bluez/test
263 -
264 - for i in $(find "${ED}"/usr/$(get_libdir)/bluez/test -maxdepth 1 -type f ! -name "*.*"); do
265 - dosym "${i}" /usr/bin/bluez-"${i##*/}"
266 - done
267 - fi
268 - else
269 - emake DESTDIR="${D}" \
270 - install-pkgincludeHEADERS \
271 - install-libLTLIBRARIES \
272 - install-pkgconfigDATA
273 - fi
274 -}
275 -
276 -multilib_src_install_all() {
277 - # We need to ensure obexd can be spawned automatically by systemd
278 - # when user-session is enabled:
279 - # http://marc.info/?l=linux-bluetooth&m=148096094716386&w=2
280 - # https://bugs.gentoo.org/show_bug.cgi?id=577842
281 - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804908
282 - # https://bugs.archlinux.org/task/45816
283 - # https://bugzilla.redhat.com/show_bug.cgi?id=1318441
284 - # https://bugzilla.redhat.com/show_bug.cgi?id=1389347
285 - if use user-session && use systemd; then
286 - ln -s "${ED}"/usr/lib/systemd/user/obex.service "${ED}"/usr/lib/systemd/user/dbus-org.bluez.obex.service
287 - fi
288 -
289 - find "${D}" -name '*.la' -type f -delete || die
290 -
291 - keepdir /var/lib/bluetooth
292 -
293 - # Upstream don't want people to play with them
294 - # But we keep installing them due to 'historical' reasons
295 - insinto /etc/bluetooth
296 - local d
297 - for d in input network; do
298 - doins profiles/${d}/${d}.conf
299 - done
300 - # Setup auto enable as Fedora does for allowing to use
301 - # keyboards/mouse as soon as possible
302 - sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' src/main.conf || die
303 - doins src/main.conf
304 -
305 - newinitd "${FILESDIR}"/bluetooth-init.d-r5 bluetooth
306 - newconfd "${FILESDIR}"/bluetooth-conf.d bluetooth
307 -
308 - einstalldocs
309 - use doc && dodoc doc/*.txt
310 - # Install .json files as examples to be used by meshctl
311 - if use mesh; then
312 - dodoc tools/mesh-gatt/*.json
313 - local DOC_CONTENTS="Some example .json files were installed into
314 - /usr/share/doc/${PF} to be used with meshctl. Feel free to
315 - uncompress and copy them to ~/.config/meshctl to use them."
316 - readme.gentoo_create_doc
317 - fi
318 -}
319 -
320 -pkg_postinst() {
321 - use udev && udev_reload
322 - systemd_reenable bluetooth.service
323 -
324 - has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp"
325 - use mesh && readme.gentoo_print_elog
326 -}
327
328 diff --git a/net-wireless/bluez/bluez-5.60.ebuild b/net-wireless/bluez/bluez-5.60.ebuild
329 deleted file mode 100644
330 index a86c0dde25a..00000000000
331 --- a/net-wireless/bluez/bluez-5.60.ebuild
332 +++ /dev/null
333 @@ -1,292 +0,0 @@
334 -# Copyright 1999-2021 Gentoo Authors
335 -# Distributed under the terms of the GNU General Public License v2
336 -
337 -EAPI=7
338 -PYTHON_COMPAT=( python3_{8..10} )
339 -
340 -inherit autotools linux-info python-single-r1 readme.gentoo-r1 systemd udev multilib-minimal
341 -
342 -DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
343 -HOMEPAGE="http://www.bluez.org"
344 -SRC_URI="https://www.kernel.org/pub/linux/bluetooth/${P}.tar.xz"
345 -
346 -LICENSE="GPL-2+ LGPL-2.1+"
347 -SLOT="0/3"
348 -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~x86"
349 -IUSE="btpclient cups doc debug deprecated extra-tools experimental +mesh midi +obex +readline selinux systemd test test-programs +udev user-session"
350 -
351 -# Since this release all remaining extra-tools need readline support, but this could
352 -# change in the future, hence, this REQUIRED_USE constraint could be dropped
353 -# again in the future.
354 -REQUIRED_USE="
355 - extra-tools? ( deprecated readline )
356 - test? ( ${PYTHON_REQUIRED_USE} )
357 - test-programs? ( ${PYTHON_REQUIRED_USE} )
358 -"
359 -
360 -TEST_DEPS="${PYTHON_DEPS}
361 - $(python_gen_cond_dep '
362 - >=dev-python/dbus-python-1[${PYTHON_USEDEP}]
363 - dev-python/pygobject:3[${PYTHON_USEDEP}]
364 - ')
365 -"
366 -BDEPEND="
367 - dev-python/docutils
368 - virtual/pkgconfig
369 - test? ( ${TEST_DEPS} )
370 -"
371 -DEPEND="
372 - >=dev-libs/glib-2.28:2[${MULTILIB_USEDEP}]
373 - >=sys-apps/hwids-20121202.2
374 - btpclient? ( >=dev-libs/ell-0.39 )
375 - cups? ( net-print/cups:= )
376 - mesh? (
377 - >=dev-libs/ell-0.39
378 - >=dev-libs/json-c-0.13:=
379 - sys-libs/readline:0=
380 - )
381 - midi? ( media-libs/alsa-lib )
382 - obex? ( dev-libs/libical:= )
383 - readline? ( sys-libs/readline:0= )
384 - systemd? (
385 - >=sys-apps/dbus-1.6:=[user-session=]
386 - sys-apps/systemd
387 - )
388 - !systemd? ( >=sys-apps/dbus-1.6:= )
389 - udev? ( >=virtual/udev-172 )
390 -"
391 -RDEPEND="${DEPEND}
392 - selinux? ( sec-policy/selinux-bluetooth )
393 - test-programs? ( ${TEST_DEPS} )
394 -"
395 -
396 -RESTRICT="!test? ( test )"
397 -
398 -PATCHES=(
399 - # Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844)
400 - # http://www.spinics.net/lists/linux-bluetooth/msg58739.html
401 - # https://bugs.gentoo.org/539844
402 - "${FILESDIR}"/${PN}-udevadm-path-r1.patch
403 -
404 - # Fedora patches
405 - # http://www.spinics.net/lists/linux-bluetooth/msg40136.html
406 - "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
407 -
408 - # https://marc.info/?l=linux-bluetooth&m=161498090629584&w=2
409 - "${FILESDIR}"/${PN}-5.60-glibc-2.34.patch
410 -)
411 -
412 -pkg_setup() {
413 - # From http://www.linuxfromscratch.org/blfs/view/svn/general/bluez.html
414 - # to prevent bugs like:
415 - # https://bugzilla.kernel.org/show_bug.cgi?id=196621
416 - CONFIG_CHECK="~NET ~BT ~BT_RFCOMM ~BT_RFCOMM_TTY ~BT_BNEP ~BT_BNEP_MC_FILTER
417 - ~BT_BNEP_PROTO_FILTER ~BT_HIDP ~CRYPTO_USER_API_HASH ~CRYPTO_USER_API_SKCIPHER ~RFKILL"
418 - # https://bugzilla.kernel.org/show_bug.cgi?id=196621
419 - # https://bugzilla.kernel.org/show_bug.cgi?id=206815
420 - if use mesh || use test; then
421 - CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_USER
422 - ~CRYPTO_USER_API ~CRYPTO_USER_API_AEAD ~CRYPTO_AES ~CRYPTO_CCM ~CRYPTO_AEAD ~CRYPTO_CMAC"
423 - fi
424 - linux-info_pkg_setup
425 -
426 - if use test || use test-programs; then
427 - python-single-r1_pkg_setup
428 - fi
429 -
430 - if ! use udev; then
431 - ewarn
432 - ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth"
433 - ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work,"
434 - ewarn "and hid2hci will not be available."
435 - ewarn
436 - fi
437 -}
438 -
439 -src_prepare() {
440 - default
441 -
442 - # http://www.spinics.net/lists/linux-bluetooth/msg38490.html
443 - if ! use user-session || ! use systemd; then
444 - eapply "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch
445 - fi
446 -
447 - eautoreconf
448 -
449 - if use cups; then
450 - # Only not .am to not need to run eautoreconf only because of this
451 - sed -i \
452 - -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \
453 - Makefile.{in,tools} || die
454 - fi
455 -
456 - multilib_copy_sources
457 -}
458 -
459 -multilib_src_configure() {
460 - local myconf=(
461 - # readline is automagic when client is enabled
462 - # --enable-client always needs readline, bug #504038
463 - # --enable-mesh is handled in the same way
464 - ac_cv_header_readline_readline_h=$(multilib_native_usex readline)
465 - ac_cv_header_readline_readline_h=$(multilib_native_usex mesh)
466 - )
467 -
468 - if ! multilib_is_native_abi; then
469 - myconf+=(
470 - # deps not used for the library
471 - {DBUS,GLIB}_{CFLAGS,LIBS}=' '
472 - )
473 - fi
474 -
475 - econf \
476 - --localstatedir=/var \
477 - --disable-android \
478 - --enable-datafiles \
479 - --enable-optimization \
480 - $(use_enable debug) \
481 - --enable-pie \
482 - --enable-threads \
483 - --enable-library \
484 - --enable-tools \
485 - --enable-manpages \
486 - --enable-monitor \
487 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
488 - --with-systemduserunitdir="$(systemd_get_userunitdir)" \
489 - $(multilib_native_use_enable btpclient) \
490 - $(multilib_native_use_enable btpclient external-ell) \
491 - $(multilib_native_use_enable cups) \
492 - $(multilib_native_use_enable deprecated) \
493 - $(multilib_native_use_enable experimental) \
494 - $(multilib_native_use_enable mesh) \
495 - $(multilib_native_use_enable mesh external-ell) \
496 - $(multilib_native_use_enable midi) \
497 - $(multilib_native_use_enable obex) \
498 - $(multilib_native_use_enable readline client) \
499 - $(multilib_native_use_enable systemd) \
500 - $(multilib_native_use_enable test-programs test) \
501 - $(multilib_native_use_enable udev) \
502 - $(multilib_native_use_enable udev hid2hci) \
503 - $(multilib_native_use_enable udev sixaxis)
504 -}
505 -
506 -multilib_src_compile() {
507 - if multilib_is_native_abi; then
508 - default
509 - else
510 - emake -f Makefile -f - libs \
511 - <<<'libs: $(lib_LTLIBRARIES)'
512 - fi
513 -}
514 -
515 -multilib_src_test() {
516 - multilib_is_native_abi && default
517 -}
518 -
519 -multilib_src_install() {
520 - if multilib_is_native_abi; then
521 - emake DESTDIR="${D}" install
522 -
523 - # Only install extra-tools when relevant USE flag is enabled
524 - if use extra-tools; then
525 - ewarn "Upstream doesn't support using this tools and their bugs are"
526 - ewarn "likely to be ignored forever, also they can break without"
527 - ewarn "previous announcement."
528 - ewarn "Upstream also states all this tools are not really needed,"
529 - ewarn "then, if you still need to rely on them, you must ask them"
530 - ewarn "to either install that tool by default or add the needed"
531 - ewarn "functionality to the existing 'official' tools."
532 - ewarn "Please report this issues to:"
533 - ewarn "http://www.bluez.org/development/lists/"
534 -
535 - # Upstream doesn't install this, bug #524640
536 - # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115
537 - # http://comments.gmane.org/gmane.linux.bluez.kernel/54564
538 - dobin tools/btmgmt
539 - # gatttool is only built with readline, bug #530776
540 - # https://bugzilla.redhat.com/show_bug.cgi?id=1141909
541 - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720486
542 - # https://bugs.archlinux.org/task/37686
543 - dobin attrib/gatttool
544 - # https://bugzilla.redhat.com/show_bug.cgi?id=1699680
545 - dobin tools/avinfo
546 - fi
547 -
548 - # Not installed by default after being built, bug #666756
549 - use btpclient && dobin tools/btpclient
550 -
551 - # Unittests are not that useful once installed, so make them optional
552 - if use test-programs; then
553 - # Drop python2 only test tools
554 - # https://bugzilla.kernel.org/show_bug.cgi?id=206819
555 - rm "${ED}"/usr/$(get_libdir)/bluez/test/simple-player || die
556 - # https://bugzilla.kernel.org/show_bug.cgi?id=206821
557 - rm "${ED}"/usr/$(get_libdir)/bluez/test/test-hfp || die
558 - # https://bugzilla.kernel.org/show_bug.cgi?id=206823
559 - rm "${ED}"/usr/$(get_libdir)/bluez/test/test-sap-server || die
560 -
561 - python_fix_shebang "${ED}"/usr/$(get_libdir)/bluez/test
562 -
563 - for i in $(find "${ED}"/usr/$(get_libdir)/bluez/test -maxdepth 1 -type f ! -name "*.*"); do
564 - dosym "${i}" /usr/bin/bluez-"${i##*/}"
565 - done
566 - fi
567 - else
568 - emake DESTDIR="${D}" \
569 - install-pkgincludeHEADERS \
570 - install-libLTLIBRARIES \
571 - install-pkgconfigDATA
572 - fi
573 -}
574 -
575 -multilib_src_install_all() {
576 - # We need to ensure obexd can be spawned automatically by systemd
577 - # when user-session is enabled:
578 - # http://marc.info/?l=linux-bluetooth&m=148096094716386&w=2
579 - # https://bugs.gentoo.org/show_bug.cgi?id=577842
580 - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804908
581 - # https://bugs.archlinux.org/task/45816
582 - # https://bugzilla.redhat.com/show_bug.cgi?id=1318441
583 - # https://bugzilla.redhat.com/show_bug.cgi?id=1389347
584 - if use user-session && use systemd; then
585 - ln -s "${ED}"/usr/lib/systemd/user/obex.service "${ED}"/usr/lib/systemd/user/dbus-org.bluez.obex.service
586 - fi
587 -
588 - find "${D}" -name '*.la' -type f -delete || die
589 -
590 - keepdir /var/lib/bluetooth
591 -
592 - # Upstream don't want people to play with them
593 - # But we keep installing them due to 'historical' reasons
594 - insinto /etc/bluetooth
595 - local d
596 - for d in input network; do
597 - doins profiles/${d}/${d}.conf
598 - done
599 - # Setup auto enable as Fedora does for allowing to use
600 - # keyboards/mouse as soon as possible
601 - sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' src/main.conf || die
602 - doins src/main.conf
603 -
604 - newinitd "${FILESDIR}"/bluetooth-init.d-r5 bluetooth
605 - newconfd "${FILESDIR}"/bluetooth-conf.d bluetooth
606 -
607 - einstalldocs
608 - use doc && dodoc doc/*.txt
609 - # Install .json files as examples to be used by meshctl
610 - if use mesh; then
611 - dodoc tools/mesh-gatt/*.json
612 - local DOC_CONTENTS="Some example .json files were installed into
613 - /usr/share/doc/${PF} to be used with meshctl. Feel free to
614 - uncompress and copy them to ~/.config/meshctl to use them."
615 - readme.gentoo_create_doc
616 - fi
617 -}
618 -
619 -pkg_postinst() {
620 - use udev && udev_reload
621 - systemd_reenable bluetooth.service
622 -
623 - has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp"
624 - use mesh && readme.gentoo_print_elog
625 -}
626
627 diff --git a/net-wireless/bluez/files/bluez-5.58-rfkill.patch b/net-wireless/bluez/files/bluez-5.58-rfkill.patch
628 deleted file mode 100644
629 index dd7f2f978e7..00000000000
630 --- a/net-wireless/bluez/files/bluez-5.58-rfkill.patch
631 +++ /dev/null
632 @@ -1,84 +0,0 @@
633 -From 382646b490c1c336dd32f9186293616ceb4d808b Mon Sep 17 00:00:00 2001
634 -From: Benjamin Berg <bberg@××××××.com>
635 -Date: Mon, 3 May 2021 14:45:00 +0200
636 -Subject: [PATCH 1/2] rfkill: Fix reading from rfkill socket
637 -
638 -The kernel will always send exactly one event, but the size of the
639 -passed struct will depend on the length of the submitted read() and the
640 -kernel version. i.e. the interface can be extended and we need to expect
641 -for a read to be longer than expected if we ask for it.
642 -
643 -Fix this by only requesting the needed length and explicitly check the
644 -length against the V1 version of the structure to make the code a bit
645 -more future proof in case the internal copy of the struct is updated to
646 -contain new fields.
647 ----
648 - src/rfkill.c | 24 +++++++++++-------------
649 - 1 file changed, 11 insertions(+), 13 deletions(-)
650 -
651 -diff --git a/src/rfkill.c b/src/rfkill.c
652 -index ec9fcdfdd..2099c5ac5 100644
653 ---- a/src/rfkill.c
654 -+++ b/src/rfkill.c
655 -@@ -53,12 +53,12 @@ struct rfkill_event {
656 - uint8_t soft;
657 - uint8_t hard;
658 - };
659 -+#define RFKILL_EVENT_SIZE_V1 8
660 -
661 - static gboolean rfkill_event(GIOChannel *chan,
662 - GIOCondition cond, gpointer data)
663 - {
664 -- unsigned char buf[32];
665 -- struct rfkill_event *event = (void *) buf;
666 -+ struct rfkill_event event = { 0 };
667 - struct btd_adapter *adapter;
668 - char sysname[PATH_MAX];
669 - ssize_t len;
670 -@@ -69,34 +69,32 @@ static gboolean rfkill_event(GIOChannel *chan,
671 -
672 - fd = g_io_channel_unix_get_fd(chan);
673 -
674 -- memset(buf, 0, sizeof(buf));
675 --
676 -- len = read(fd, buf, sizeof(buf));
677 -+ len = read(fd, &event, sizeof(event));
678 - if (len < 0) {
679 - if (errno == EAGAIN)
680 - return TRUE;
681 - return FALSE;
682 - }
683 -
684 -- if (len != sizeof(struct rfkill_event))
685 -+ if (len < RFKILL_EVENT_SIZE_V1)
686 - return TRUE;
687 -
688 - DBG("RFKILL event idx %u type %u op %u soft %u hard %u",
689 -- event->idx, event->type, event->op,
690 -- event->soft, event->hard);
691 -+ event.idx, event.type, event.op,
692 -+ event.soft, event.hard);
693 -
694 -- if (event->soft || event->hard)
695 -+ if (event.soft || event.hard)
696 - return TRUE;
697 -
698 -- if (event->op != RFKILL_OP_CHANGE)
699 -+ if (event.op != RFKILL_OP_CHANGE)
700 - return TRUE;
701 -
702 -- if (event->type != RFKILL_TYPE_BLUETOOTH &&
703 -- event->type != RFKILL_TYPE_ALL)
704 -+ if (event.type != RFKILL_TYPE_BLUETOOTH &&
705 -+ event.type != RFKILL_TYPE_ALL)
706 - return TRUE;
707 -
708 - snprintf(sysname, sizeof(sysname) - 1,
709 -- "/sys/class/rfkill/rfkill%u/name", event->idx);
710 -+ "/sys/class/rfkill/rfkill%u/name", event.idx);
711 -
712 - fd = open(sysname, O_RDONLY);
713 - if (fd < 0)
714 ---
715 -2.31.1
716 -