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