media-sound/ncmpcpp: fix build with GCC 10
[gentoo.git] / media-sound / bluez-alsa / bluez-alsa-2.0.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit autotools multilib-minimal systemd
6
7 DESCRIPTION="Bluetooth Audio ALSA Backend"
8 HOMEPAGE="https://github.com/Arkq/bluez-alsa"
9
10 if [[ ${PV} == "9999" ]] ; then
11         inherit git-r3
12         EGIT_REPO_URI="https://github.com/Arkq/${PN}"
13 else
14         SRC_URI="https://github.com/Arkq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15         KEYWORDS="~amd64 ~x86"
16 fi
17
18 LICENSE="MIT"
19 SLOT="0"
20 IUSE="aac debug hcitop ldac ofono static-libs test"
21 RESTRICT="!test? ( test )"
22
23 RDEPEND=">=dev-libs/glib-2.26[dbus,${MULTILIB_USEDEP}]
24         >=media-libs/alsa-lib-1.1.2[${MULTILIB_USEDEP}]
25         >=media-libs/sbc-1.2[${MULTILIB_USEDEP}]
26         >=net-wireless/bluez-5.0[${MULTILIB_USEDEP}]
27         sys-apps/dbus[${MULTILIB_USEDEP}]
28         sys-libs/readline:0=
29         aac? ( >=media-libs/fdk-aac-0.1.1:=[${MULTILIB_USEDEP}] )
30         hcitop? (
31                 dev-libs/libbsd
32                 sys-libs/ncurses:0=
33         )
34         ldac? ( >=media-libs/libldac-2.0.0 )"
35 DEPEND="${RDEPEND}"
36 BDEPEND="virtual/pkgconfig"
37
38 src_prepare() {
39         default
40         eautoreconf
41 }
42
43 multilib_src_configure() {
44         local myeconfargs=(
45                 --enable-rfcomm
46                 $(use_enable aac)
47                 $(use_enable debug)
48                 $(use_enable ofono)
49                 $(use_enable static-libs static)
50                 $(use_enable test)
51                 $(multilib_native_use_enable hcitop)
52                 $(multilib_native_use_enable ldac)
53         )
54         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
55 }
56
57 multilib_src_install_all() {
58         default
59         find "${ED}" -name "*.la" -delete || die
60
61         newinitd "${FILESDIR}"/bluealsa-init.d bluealsa
62         newconfd "${FILESDIR}"/bluealsa-conf.d-2 bluealsa
63         systemd_dounit "${FILESDIR}"/bluealsa.service
64 }
65
66 pkg_postinst() {
67         elog "Users can use this service when they are members of the \"audio\" group."
68 }