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