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