1 |
commit: 8a99ee12f6dd8c3d3e45c636b96015ff64e9d0d5 |
2 |
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 12 17:19:03 2021 +0000 |
4 |
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 12 17:19:03 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=8a99ee12 |
7 |
|
8 |
net-wireless/bluez: fix missing include for musl users |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org> |
12 |
|
13 |
net-wireless/bluez/Manifest | 1 + |
14 |
net-wireless/bluez/bluez-5.61.ebuild | 295 +++++++++++++++++++++ |
15 |
...xd-without-systemd-in-the-user-session-r2.patch | 58 ++++ |
16 |
...de-limits.h-for-PATH_MAX-for-musl-support.patch | 24 ++ |
17 |
...-GLib-helper-function-to-manipulate-paths.patch | 38 +++ |
18 |
net-wireless/bluez/files/bluetooth-conf.d | 1 + |
19 |
net-wireless/bluez/files/bluetooth-init.d-r5 | 13 + |
20 |
.../bluez/files/bluez-5.60-glibc-2.34.patch | 42 +++ |
21 |
.../bluez/files/bluez-udevadm-path-r1.patch | 10 + |
22 |
net-wireless/bluez/metadata.xml | 26 ++ |
23 |
10 files changed, 508 insertions(+) |
24 |
|
25 |
diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest |
26 |
new file mode 100644 |
27 |
index 0000000..a788677 |
28 |
--- /dev/null |
29 |
+++ b/net-wireless/bluez/Manifest |
30 |
@@ -0,0 +1 @@ |
31 |
+DIST bluez-5.61.tar.xz 2137412 BLAKE2B 2fc1b44f726d48b4a0e8bbecc664077db1db69bbc87c66e9d7ac85d7b2e066de8b349c18597a5ba140c5fcb1ef867ee3980ebdd839ded69ae30491fb7b836940 SHA512 a2318637258f9db0bf05fecbfbea2c3ca5e21867378e28ab4c77f658fe42f10c8c607939f2b437ec40d1ceb00b99f7916c0275faaedd9edd247f7dc91329937a |
32 |
|
33 |
diff --git a/net-wireless/bluez/bluez-5.61.ebuild b/net-wireless/bluez/bluez-5.61.ebuild |
34 |
new file mode 100644 |
35 |
index 0000000..1d4400f |
36 |
--- /dev/null |
37 |
+++ b/net-wireless/bluez/bluez-5.61.ebuild |
38 |
@@ -0,0 +1,295 @@ |
39 |
+# Copyright 1999-2021 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=7 |
43 |
+PYTHON_COMPAT=( python3_{8..10} ) |
44 |
+ |
45 |
+inherit autotools linux-info python-single-r1 readme.gentoo-r1 systemd udev multilib-minimal |
46 |
+ |
47 |
+DESCRIPTION="Bluetooth Tools and System Daemons for Linux" |
48 |
+HOMEPAGE="http://www.bluez.org" |
49 |
+SRC_URI="https://www.kernel.org/pub/linux/bluetooth/${P}.tar.xz" |
50 |
+ |
51 |
+LICENSE="GPL-2+ LGPL-2.1+" |
52 |
+SLOT="0/3" |
53 |
+KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86" |
54 |
+IUSE="btpclient cups doc debug deprecated extra-tools experimental +mesh midi +obex +readline selinux systemd test test-programs +udev user-session" |
55 |
+ |
56 |
+# Since this release all remaining extra-tools need readline support, but this could |
57 |
+# change in the future, hence, this REQUIRED_USE constraint could be dropped |
58 |
+# again in the future. |
59 |
+REQUIRED_USE=" |
60 |
+ extra-tools? ( deprecated readline ) |
61 |
+ test? ( ${PYTHON_REQUIRED_USE} ) |
62 |
+ test-programs? ( ${PYTHON_REQUIRED_USE} ) |
63 |
+" |
64 |
+ |
65 |
+TEST_DEPS="${PYTHON_DEPS} |
66 |
+ $(python_gen_cond_dep ' |
67 |
+ >=dev-python/dbus-python-1[${PYTHON_USEDEP}] |
68 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
69 |
+ ') |
70 |
+" |
71 |
+BDEPEND=" |
72 |
+ dev-python/docutils |
73 |
+ virtual/pkgconfig |
74 |
+ test? ( ${TEST_DEPS} ) |
75 |
+" |
76 |
+DEPEND=" |
77 |
+ >=dev-libs/glib-2.28:2[${MULTILIB_USEDEP}] |
78 |
+ >=sys-apps/hwids-20121202.2 |
79 |
+ btpclient? ( >=dev-libs/ell-0.39 ) |
80 |
+ cups? ( net-print/cups:= ) |
81 |
+ mesh? ( |
82 |
+ >=dev-libs/ell-0.39 |
83 |
+ >=dev-libs/json-c-0.13:= |
84 |
+ sys-libs/readline:0= |
85 |
+ ) |
86 |
+ midi? ( media-libs/alsa-lib ) |
87 |
+ obex? ( dev-libs/libical:= ) |
88 |
+ readline? ( sys-libs/readline:0= ) |
89 |
+ systemd? ( |
90 |
+ >=sys-apps/dbus-1.6:=[user-session=] |
91 |
+ sys-apps/systemd |
92 |
+ ) |
93 |
+ !systemd? ( >=sys-apps/dbus-1.6:= ) |
94 |
+ udev? ( >=virtual/udev-172 ) |
95 |
+" |
96 |
+RDEPEND="${DEPEND} |
97 |
+ selinux? ( sec-policy/selinux-bluetooth ) |
98 |
+ test-programs? ( ${TEST_DEPS} ) |
99 |
+" |
100 |
+ |
101 |
+RESTRICT="!test? ( test )" |
102 |
+ |
103 |
+PATCHES=( |
104 |
+ # Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844) |
105 |
+ # http://www.spinics.net/lists/linux-bluetooth/msg58739.html |
106 |
+ # https://bugs.gentoo.org/539844 |
107 |
+ "${FILESDIR}"/${PN}-udevadm-path-r1.patch |
108 |
+ |
109 |
+ # Fedora patches |
110 |
+ # http://www.spinics.net/lists/linux-bluetooth/msg40136.html |
111 |
+ "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch |
112 |
+ |
113 |
+ # https://marc.info/?l=linux-bluetooth&m=161498090629584&w=2 |
114 |
+ "${FILESDIR}"/${PN}-5.60-glibc-2.34.patch |
115 |
+ |
116 |
+ # Required for musl support |
117 |
+ "${FILESDIR}"/0001-include-limits.h-for-PATH_MAX-for-musl-support.patch |
118 |
+) |
119 |
+ |
120 |
+pkg_setup() { |
121 |
+ # From http://www.linuxfromscratch.org/blfs/view/svn/general/bluez.html |
122 |
+ # to prevent bugs like: |
123 |
+ # https://bugzilla.kernel.org/show_bug.cgi?id=196621 |
124 |
+ CONFIG_CHECK="~NET ~BT ~BT_RFCOMM ~BT_RFCOMM_TTY ~BT_BNEP ~BT_BNEP_MC_FILTER |
125 |
+ ~BT_BNEP_PROTO_FILTER ~BT_HIDP ~CRYPTO_USER_API_HASH ~CRYPTO_USER_API_SKCIPHER ~RFKILL" |
126 |
+ # https://bugzilla.kernel.org/show_bug.cgi?id=196621 |
127 |
+ # https://bugzilla.kernel.org/show_bug.cgi?id=206815 |
128 |
+ if use mesh || use test; then |
129 |
+ CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_USER |
130 |
+ ~CRYPTO_USER_API ~CRYPTO_USER_API_AEAD ~CRYPTO_AES ~CRYPTO_CCM ~CRYPTO_AEAD ~CRYPTO_CMAC" |
131 |
+ fi |
132 |
+ linux-info_pkg_setup |
133 |
+ |
134 |
+ if use test || use test-programs; then |
135 |
+ python-single-r1_pkg_setup |
136 |
+ fi |
137 |
+ |
138 |
+ if ! use udev; then |
139 |
+ ewarn |
140 |
+ ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth" |
141 |
+ ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work," |
142 |
+ ewarn "and hid2hci will not be available." |
143 |
+ ewarn |
144 |
+ fi |
145 |
+} |
146 |
+ |
147 |
+src_prepare() { |
148 |
+ default |
149 |
+ |
150 |
+ # http://www.spinics.net/lists/linux-bluetooth/msg38490.html |
151 |
+ if ! use user-session || ! use systemd; then |
152 |
+ eapply "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch |
153 |
+ fi |
154 |
+ |
155 |
+ eautoreconf |
156 |
+ |
157 |
+ if use cups; then |
158 |
+ # Only not .am to not need to run eautoreconf only because of this |
159 |
+ sed -i \ |
160 |
+ -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \ |
161 |
+ Makefile.{in,tools} || die |
162 |
+ fi |
163 |
+ |
164 |
+ multilib_copy_sources |
165 |
+} |
166 |
+ |
167 |
+multilib_src_configure() { |
168 |
+ local myconf=( |
169 |
+ # readline is automagic when client is enabled |
170 |
+ # --enable-client always needs readline, bug #504038 |
171 |
+ # --enable-mesh is handled in the same way |
172 |
+ ac_cv_header_readline_readline_h=$(multilib_native_usex readline) |
173 |
+ ac_cv_header_readline_readline_h=$(multilib_native_usex mesh) |
174 |
+ ) |
175 |
+ |
176 |
+ if ! multilib_is_native_abi; then |
177 |
+ myconf+=( |
178 |
+ # deps not used for the library |
179 |
+ {DBUS,GLIB}_{CFLAGS,LIBS}=' ' |
180 |
+ ) |
181 |
+ fi |
182 |
+ |
183 |
+ econf \ |
184 |
+ --localstatedir=/var \ |
185 |
+ --disable-android \ |
186 |
+ --enable-datafiles \ |
187 |
+ --enable-optimization \ |
188 |
+ $(use_enable debug) \ |
189 |
+ --enable-pie \ |
190 |
+ --enable-threads \ |
191 |
+ --enable-library \ |
192 |
+ --enable-tools \ |
193 |
+ --enable-manpages \ |
194 |
+ --enable-monitor \ |
195 |
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
196 |
+ --with-systemduserunitdir="$(systemd_get_userunitdir)" \ |
197 |
+ $(multilib_native_use_enable btpclient) \ |
198 |
+ $(multilib_native_use_enable btpclient external-ell) \ |
199 |
+ $(multilib_native_use_enable cups) \ |
200 |
+ $(multilib_native_use_enable deprecated) \ |
201 |
+ $(multilib_native_use_enable experimental) \ |
202 |
+ $(multilib_native_use_enable mesh) \ |
203 |
+ $(multilib_native_use_enable mesh external-ell) \ |
204 |
+ $(multilib_native_use_enable midi) \ |
205 |
+ $(multilib_native_use_enable obex) \ |
206 |
+ $(multilib_native_use_enable readline client) \ |
207 |
+ $(multilib_native_use_enable systemd) \ |
208 |
+ $(multilib_native_use_enable test-programs test) \ |
209 |
+ $(multilib_native_use_enable udev) \ |
210 |
+ $(multilib_native_use_enable udev hid2hci) \ |
211 |
+ $(multilib_native_use_enable udev sixaxis) |
212 |
+} |
213 |
+ |
214 |
+multilib_src_compile() { |
215 |
+ if multilib_is_native_abi; then |
216 |
+ default |
217 |
+ else |
218 |
+ emake -f Makefile -f - libs \ |
219 |
+ <<<'libs: $(lib_LTLIBRARIES)' |
220 |
+ fi |
221 |
+} |
222 |
+ |
223 |
+multilib_src_test() { |
224 |
+ multilib_is_native_abi && default |
225 |
+} |
226 |
+ |
227 |
+multilib_src_install() { |
228 |
+ if multilib_is_native_abi; then |
229 |
+ emake DESTDIR="${D}" install |
230 |
+ |
231 |
+ # Only install extra-tools when relevant USE flag is enabled |
232 |
+ if use extra-tools; then |
233 |
+ ewarn "Upstream doesn't support using this tools and their bugs are" |
234 |
+ ewarn "likely to be ignored forever, also they can break without" |
235 |
+ ewarn "previous announcement." |
236 |
+ ewarn "Upstream also states all this tools are not really needed," |
237 |
+ ewarn "then, if you still need to rely on them, you must ask them" |
238 |
+ ewarn "to either install that tool by default or add the needed" |
239 |
+ ewarn "functionality to the existing 'official' tools." |
240 |
+ ewarn "Please report this issues to:" |
241 |
+ ewarn "http://www.bluez.org/development/lists/" |
242 |
+ |
243 |
+ # Upstream doesn't install this, bug #524640 |
244 |
+ # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115 |
245 |
+ # http://comments.gmane.org/gmane.linux.bluez.kernel/54564 |
246 |
+ dobin tools/btmgmt |
247 |
+ # gatttool is only built with readline, bug #530776 |
248 |
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1141909 |
249 |
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720486 |
250 |
+ # https://bugs.archlinux.org/task/37686 |
251 |
+ dobin attrib/gatttool |
252 |
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1699680 |
253 |
+ dobin tools/avinfo |
254 |
+ fi |
255 |
+ |
256 |
+ # Not installed by default after being built, bug #666756 |
257 |
+ use btpclient && dobin tools/btpclient |
258 |
+ |
259 |
+ # Unittests are not that useful once installed, so make them optional |
260 |
+ if use test-programs; then |
261 |
+ # Drop python2 only test tools |
262 |
+ # https://bugzilla.kernel.org/show_bug.cgi?id=206819 |
263 |
+ rm "${ED}"/usr/$(get_libdir)/bluez/test/simple-player || die |
264 |
+ # https://bugzilla.kernel.org/show_bug.cgi?id=206821 |
265 |
+ rm "${ED}"/usr/$(get_libdir)/bluez/test/test-hfp || die |
266 |
+ # https://bugzilla.kernel.org/show_bug.cgi?id=206823 |
267 |
+ rm "${ED}"/usr/$(get_libdir)/bluez/test/test-sap-server || die |
268 |
+ |
269 |
+ python_fix_shebang "${ED}"/usr/$(get_libdir)/bluez/test |
270 |
+ |
271 |
+ for i in $(find "${ED}"/usr/$(get_libdir)/bluez/test -maxdepth 1 -type f ! -name "*.*"); do |
272 |
+ dosym "${i}" /usr/bin/bluez-"${i##*/}" |
273 |
+ done |
274 |
+ fi |
275 |
+ else |
276 |
+ emake DESTDIR="${D}" \ |
277 |
+ install-pkgincludeHEADERS \ |
278 |
+ install-libLTLIBRARIES \ |
279 |
+ install-pkgconfigDATA |
280 |
+ fi |
281 |
+} |
282 |
+ |
283 |
+multilib_src_install_all() { |
284 |
+ # We need to ensure obexd can be spawned automatically by systemd |
285 |
+ # when user-session is enabled: |
286 |
+ # http://marc.info/?l=linux-bluetooth&m=148096094716386&w=2 |
287 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=577842 |
288 |
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804908 |
289 |
+ # https://bugs.archlinux.org/task/45816 |
290 |
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1318441 |
291 |
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1389347 |
292 |
+ if use user-session && use systemd; then |
293 |
+ ln -s "${ED}"/usr/lib/systemd/user/obex.service "${ED}"/usr/lib/systemd/user/dbus-org.bluez.obex.service |
294 |
+ fi |
295 |
+ |
296 |
+ find "${D}" -name '*.la' -type f -delete || die |
297 |
+ |
298 |
+ keepdir /var/lib/bluetooth |
299 |
+ |
300 |
+ # Upstream don't want people to play with them |
301 |
+ # But we keep installing them due to 'historical' reasons |
302 |
+ insinto /etc/bluetooth |
303 |
+ local d |
304 |
+ for d in input network; do |
305 |
+ doins profiles/${d}/${d}.conf |
306 |
+ done |
307 |
+ # Setup auto enable as Fedora does for allowing to use |
308 |
+ # keyboards/mouse as soon as possible |
309 |
+ sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' src/main.conf || die |
310 |
+ doins src/main.conf |
311 |
+ |
312 |
+ newinitd "${FILESDIR}"/bluetooth-init.d-r5 bluetooth |
313 |
+ newconfd "${FILESDIR}"/bluetooth-conf.d bluetooth |
314 |
+ |
315 |
+ einstalldocs |
316 |
+ use doc && dodoc doc/*.txt |
317 |
+ # Install .json files as examples to be used by meshctl |
318 |
+ if use mesh; then |
319 |
+ dodoc tools/mesh-gatt/*.json |
320 |
+ local DOC_CONTENTS="Some example .json files were installed into |
321 |
+ /usr/share/doc/${PF} to be used with meshctl. Feel free to |
322 |
+ uncompress and copy them to ~/.config/meshctl to use them." |
323 |
+ readme.gentoo_create_doc |
324 |
+ fi |
325 |
+} |
326 |
+ |
327 |
+pkg_postinst() { |
328 |
+ use udev && udev_reload |
329 |
+ systemd_reenable bluetooth.service |
330 |
+ |
331 |
+ has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp" |
332 |
+ use mesh && readme.gentoo_print_elog |
333 |
+} |
334 |
|
335 |
diff --git a/net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch b/net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch |
336 |
new file mode 100644 |
337 |
index 0000000..dcebaa0 |
338 |
--- /dev/null |
339 |
+++ b/net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch |
340 |
@@ -0,0 +1,58 @@ |
341 |
+From 3027cb7141fb65cf3eeda69c688db8c4045e2d3f Mon Sep 17 00:00:00 2001 |
342 |
+From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@××××××××××××.org> |
343 |
+Date: Sat, 12 Oct 2013 17:45:25 +0200 |
344 |
+Subject: [PATCH] Allow using obexd without systemd in the user session |
345 |
+ |
346 |
+Not all sessions run systemd --user (actually, the majority |
347 |
+doesn't), so the dbus daemon must be able to spawn obexd |
348 |
+directly, and to do so it needs the full path of the daemon. |
349 |
+--- |
350 |
+ Makefile.obexd | 4 ++-- |
351 |
+ obexd/src/org.bluez.obex.service | 4 ---- |
352 |
+ obexd/src/org.bluez.obex.service.in | 4 ++++ |
353 |
+ 3 files changed, 6 insertions(+), 6 deletions(-) |
354 |
+ delete mode 100644 obexd/src/org.bluez.obex.service |
355 |
+ create mode 100644 obexd/src/org.bluez.obex.service.in |
356 |
+ |
357 |
+diff --git a/Makefile.obexd b/Makefile.obexd |
358 |
+index 3760867..142e7c3 100644 |
359 |
+--- a/Makefile.obexd |
360 |
++++ b/Makefile.obexd |
361 |
+@@ -2,12 +2,12 @@ |
362 |
+ if SYSTEMD |
363 |
+ systemduserunitdir = $(SYSTEMD_USERUNITDIR) |
364 |
+ systemduserunit_DATA = obexd/src/obex.service |
365 |
++endif |
366 |
+ |
367 |
+ dbussessionbusdir = $(DBUS_SESSIONBUSDIR) |
368 |
+ dbussessionbus_DATA = obexd/src/org.bluez.obex.service |
369 |
+-endif |
370 |
+ |
371 |
+-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service |
372 |
++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in |
373 |
+ |
374 |
+ obex_plugindir = $(libdir)/obex/plugins |
375 |
+ |
376 |
+diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service |
377 |
+deleted file mode 100644 |
378 |
+index a538088..0000000 |
379 |
+--- a/obexd/src/org.bluez.obex.service |
380 |
++++ /dev/null |
381 |
+@@ -1,4 +0,0 @@ |
382 |
+-[D-BUS Service] |
383 |
+-Name=org.bluez.obex |
384 |
+-Exec=/bin/false |
385 |
+-SystemdService=dbus-org.bluez.obex.service |
386 |
+diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in |
387 |
+new file mode 100644 |
388 |
+index 0000000..9c815f2 |
389 |
+--- /dev/null |
390 |
++++ b/obexd/src/org.bluez.obex.service.in |
391 |
+@@ -0,0 +1,4 @@ |
392 |
++[D-BUS Service] |
393 |
++Name=org.bluez.obex |
394 |
++Exec=@pkglibexecdir@/obexd |
395 |
++SystemdService=dbus-org.bluez.obex.service |
396 |
+-- |
397 |
+1.8.3.1 |
398 |
+ |
399 |
|
400 |
diff --git a/net-wireless/bluez/files/0001-include-limits.h-for-PATH_MAX-for-musl-support.patch b/net-wireless/bluez/files/0001-include-limits.h-for-PATH_MAX-for-musl-support.patch |
401 |
new file mode 100644 |
402 |
index 0000000..ebdffc3 |
403 |
--- /dev/null |
404 |
+++ b/net-wireless/bluez/files/0001-include-limits.h-for-PATH_MAX-for-musl-support.patch |
405 |
@@ -0,0 +1,24 @@ |
406 |
+From e5dcac6abd6129829c4983d6635916cee8f1a627 Mon Sep 17 00:00:00 2001 |
407 |
+From: Jory Pratt <anarchy@g.o> |
408 |
+Date: Sun, 12 Sep 2021 09:46:11 -0500 |
409 |
+Subject: [PATCH] include limits.h for PATH_MAX for musl support |
410 |
+ |
411 |
+--- |
412 |
+ tools/mesh-cfgtest.c | 1 + |
413 |
+ 1 file changed, 1 insertion(+) |
414 |
+ |
415 |
+diff --git a/tools/mesh-cfgtest.c b/tools/mesh-cfgtest.c |
416 |
+index fa0474f..bfc8e1b 100644 |
417 |
+--- a/tools/mesh-cfgtest.c |
418 |
++++ b/tools/mesh-cfgtest.c |
419 |
+@@ -26,6 +26,7 @@ |
420 |
+ #include <time.h> |
421 |
+ #include <unistd.h> |
422 |
+ #include <sys/stat.h> |
423 |
++#include <limits.h> |
424 |
+ |
425 |
+ #include <ell/ell.h> |
426 |
+ |
427 |
+-- |
428 |
+2.32.0 |
429 |
+ |
430 |
|
431 |
diff --git a/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch b/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch |
432 |
new file mode 100644 |
433 |
index 0000000..004a389 |
434 |
--- /dev/null |
435 |
+++ b/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch |
436 |
@@ -0,0 +1,38 @@ |
437 |
+From f7861d27fbcbc519f57d8496aa9486f487908821 Mon Sep 17 00:00:00 2001 |
438 |
+From: Bastien Nocera <hadess@××××××.net> |
439 |
+Date: Sat, 9 Nov 2013 18:13:43 +0100 |
440 |
+Subject: [PATCH 1/5] obex: Use GLib helper function to manipulate paths |
441 |
+ |
442 |
+Instead of trying to do it by hand. This also makes sure that |
443 |
+relative paths aren't used by the agent. |
444 |
+--- |
445 |
+ obexd/src/manager.c | 10 +++++----- |
446 |
+ 1 file changed, 5 insertions(+), 5 deletions(-) |
447 |
+ |
448 |
+diff --git a/obexd/src/manager.c b/obexd/src/manager.c |
449 |
+index cec8a39..f18896e 100644 |
450 |
+--- a/obexd/src/manager.c |
451 |
++++ b/obexd/src/manager.c |
452 |
+@@ -651,14 +651,14 @@ static void agent_reply(DBusPendingCall *call, void *user_data) |
453 |
+ DBUS_TYPE_STRING, &name, |
454 |
+ DBUS_TYPE_INVALID)) { |
455 |
+ /* Splits folder and name */ |
456 |
+- const char *slash = strrchr(name, '/'); |
457 |
++ gboolean is_relative = !g_path_is_absolute(name); |
458 |
+ DBG("Agent replied with %s", name); |
459 |
+- if (!slash) { |
460 |
+- agent->new_name = g_strdup(name); |
461 |
++ if (is_relative) { |
462 |
++ agent->new_name = g_path_get_basename(name); |
463 |
+ agent->new_folder = NULL; |
464 |
+ } else { |
465 |
+- agent->new_name = g_strdup(slash + 1); |
466 |
+- agent->new_folder = g_strndup(name, slash - name); |
467 |
++ agent->new_name = g_path_get_basename(name); |
468 |
++ agent->new_folder = g_path_get_dirname(name); |
469 |
+ } |
470 |
+ } |
471 |
+ |
472 |
+-- |
473 |
+1.8.4.2 |
474 |
+ |
475 |
|
476 |
diff --git a/net-wireless/bluez/files/bluetooth-conf.d b/net-wireless/bluez/files/bluetooth-conf.d |
477 |
new file mode 100644 |
478 |
index 0000000..d5b5005 |
479 |
--- /dev/null |
480 |
+++ b/net-wireless/bluez/files/bluetooth-conf.d |
481 |
@@ -0,0 +1 @@ |
482 |
+#BLUETOOTH_OPTS="-E" |
483 |
|
484 |
diff --git a/net-wireless/bluez/files/bluetooth-init.d-r5 b/net-wireless/bluez/files/bluetooth-init.d-r5 |
485 |
new file mode 100644 |
486 |
index 0000000..4d60234 |
487 |
--- /dev/null |
488 |
+++ b/net-wireless/bluez/files/bluetooth-init.d-r5 |
489 |
@@ -0,0 +1,13 @@ |
490 |
+#!/sbin/openrc-run |
491 |
+# Copyright 1999-2021 Gentoo Authors |
492 |
+# Distributed under the terms of the GNU General Public License v2 |
493 |
+ |
494 |
+pidfile="/run/bluetoothd.pid" |
495 |
+command="/usr/libexec/bluetooth/bluetoothd" |
496 |
+command_args="${BLUETOOTH_OPTS}" |
497 |
+command_background=1 |
498 |
+ |
499 |
+depend() { |
500 |
+ after coldplug |
501 |
+ need dbus localmount hostname |
502 |
+} |
503 |
|
504 |
diff --git a/net-wireless/bluez/files/bluez-5.60-glibc-2.34.patch b/net-wireless/bluez/files/bluez-5.60-glibc-2.34.patch |
505 |
new file mode 100644 |
506 |
index 0000000..1e84610 |
507 |
--- /dev/null |
508 |
+++ b/net-wireless/bluez/files/bluez-5.60-glibc-2.34.patch |
509 |
@@ -0,0 +1,42 @@ |
510 |
+From 124dee151746b4a8a2e8a7194af78f2c82f75d79 Mon Sep 17 00:00:00 2001 |
511 |
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@××××××.pl> |
512 |
+Date: Wed, 3 Mar 2021 08:57:36 +0100 |
513 |
+Subject: [PATCH] media: rename local function conflicting with pause(2) |
514 |
+ |
515 |
+profiles/audio/media.c:1284:13: error: conflicting types for 'pause'; have '_Bool(void *)' |
516 |
+ 1284 | static bool pause(void *user_data) |
517 |
+ | ^~~~~ |
518 |
+In file included from /usr/include/bits/sigstksz.h:24, |
519 |
+ from /usr/include/signal.h:315, |
520 |
+ from /usr/include/glib-2.0/glib/gbacktrace.h:36, |
521 |
+ from /usr/include/glib-2.0/glib.h:34, |
522 |
+ from profiles/audio/media.c:21: |
523 |
+/usr/include/unistd.h:478:12: note: previous declaration of 'pause' with type 'int(void)' |
524 |
+ 478 | extern int pause (void); |
525 |
+ | ^~~~~ |
526 |
+--- |
527 |
+ profiles/audio/media.c | 4 ++-- |
528 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
529 |
+ |
530 |
+diff --git a/profiles/audio/media.c b/profiles/audio/media.c |
531 |
+index c84bbe22dc..3d8c4b69c3 100644 |
532 |
+--- a/profiles/audio/media.c |
533 |
++++ b/profiles/audio/media.c |
534 |
+@@ -1281,7 +1281,7 @@ static bool stop(void *user_data) |
535 |
+ return media_player_send(mp, "Stop"); |
536 |
+ } |
537 |
+ |
538 |
+-static bool pause(void *user_data) |
539 |
++static bool pause_play(void *user_data) |
540 |
+ { |
541 |
+ struct media_player *mp = user_data; |
542 |
+ |
543 |
+@@ -1331,7 +1331,7 @@ static struct avrcp_player_cb player_cb = { |
544 |
+ .set_volume = set_volume, |
545 |
+ .play = play, |
546 |
+ .stop = stop, |
547 |
+- .pause = pause, |
548 |
++ .pause = pause_play, |
549 |
+ .next = next, |
550 |
+ .previous = previous, |
551 |
+ }; |
552 |
|
553 |
diff --git a/net-wireless/bluez/files/bluez-udevadm-path-r1.patch b/net-wireless/bluez/files/bluez-udevadm-path-r1.patch |
554 |
new file mode 100644 |
555 |
index 0000000..ac1c94c |
556 |
--- /dev/null |
557 |
+++ b/net-wireless/bluez/files/bluez-udevadm-path-r1.patch |
558 |
@@ -0,0 +1,10 @@ |
559 |
+--- a/tools/hid2hci.rules |
560 |
++++ b/tools/hid2hci.rules |
561 |
+@@ -20,6 +20,7 @@ |
562 |
+ # Unfortunately the only event seen is the BT device disappearing, so the mouse |
563 |
+ # device needs to be chased down on the USB bus. |
564 |
+ ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c", \ |
565 |
++ ENV{REMOVE_CMD}="/bin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" \ |
566 |
+ ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" |
567 |
+ |
568 |
+ # CSR devices |
569 |
|
570 |
diff --git a/net-wireless/bluez/metadata.xml b/net-wireless/bluez/metadata.xml |
571 |
new file mode 100644 |
572 |
index 0000000..60e3ee7 |
573 |
--- /dev/null |
574 |
+++ b/net-wireless/bluez/metadata.xml |
575 |
@@ -0,0 +1,26 @@ |
576 |
+<?xml version="1.0" encoding="UTF-8"?> |
577 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
578 |
+<pkgmetadata> |
579 |
+<maintainer type="person"> |
580 |
+ <email>pacho@g.o</email> |
581 |
+ <name>Pacho Ramos</name> |
582 |
+ </maintainer> |
583 |
+<use> |
584 |
+ <flag name="btpclient">Enable BTP client</flag> |
585 |
+ <flag name="deprecated">Build deprecated plugins</flag> |
586 |
+ <flag name="experimental">Build experimental plugins</flag> |
587 |
+ <flag name="extra-tools">Install tools that upstream doesn't install on |
588 |
+ purpose by default. All this tools shouldn't be used. Then, please |
589 |
+ notify upstream about you still need them to let them know the |
590 |
+ situation.</flag> |
591 |
+ <flag name="mesh">Add support for Bluetooth Mesh control application and advertising bearer.</flag> |
592 |
+ <flag name="midi">Enable MIDI support</flag> |
593 |
+ <flag name="obex">Enable OBEX transfer support</flag> |
594 |
+ <flag name="test-programs">Install tools for testing of various Bluetooth functions</flag> |
595 |
+ <flag name="user-session">Allow compatibility with user-session semantics for session bus under systemd</flag> |
596 |
+</use> |
597 |
+<upstream> |
598 |
+ <remote-id type="cpe">cpe:/a:bluez:bluez</remote-id> |
599 |
+ <remote-id type="cpe">cpe:/a:bluez:bluez-libs</remote-id> |
600 |
+</upstream> |
601 |
+</pkgmetadata> |