1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools multilib-minimal systemd
7 DESCRIPTION="Bluetooth Audio ALSA Backend"
8 HOMEPAGE="https://github.com/Arkq/bluez-alsa"
10 if [[ ${PV} == "9999" ]] ; then
12 EGIT_REPO_URI="https://github.com/Arkq/${PN}"
14 SRC_URI="https://github.com/Arkq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15 KEYWORDS="~amd64 ~x86"
20 IUSE="aac debug hcitop ldac ofono static-libs test upower"
21 RESTRICT="!test? ( test )"
23 # bluez-alsa does not directly link to upower but
24 # is using the upower interface via dbus calls.
26 >=dev-libs/glib-2.26[dbus,${MULTILIB_USEDEP}]
27 >=media-libs/alsa-lib-1.1.2[${MULTILIB_USEDEP}]
28 >=media-libs/sbc-1.2[${MULTILIB_USEDEP}]
29 >=net-wireless/bluez-5.0[${MULTILIB_USEDEP}]
30 sys-apps/dbus[${MULTILIB_USEDEP}]
32 aac? ( >=media-libs/fdk-aac-0.1.1:=[${MULTILIB_USEDEP}] )
37 ldac? ( >=media-libs/libldac-2.0.0 )
38 upower? ( sys-power/upower )
41 BDEPEND="virtual/pkgconfig"
48 multilib_src_configure() {
54 $(use_enable static-libs static)
56 $(multilib_native_use_enable hcitop)
57 $(multilib_native_use_enable ldac)
58 $(multilib_native_use_enable upower)
60 ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
63 multilib_src_install_all() {
65 find "${ED}" -type f -name "*.la" -delete || die
67 newinitd "${FILESDIR}"/bluealsa-init.d bluealsa
68 newconfd "${FILESDIR}"/bluealsa-conf.d-2 bluealsa
69 systemd_dounit "${FILESDIR}"/bluealsa.service
73 elog "Users can use this service when they are members of the \"audio\" group."