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