sys-apps/fd: bump to 8.1.1
[gentoo.git] / sys-apps / dbus-broker / dbus-broker-9999.ebuild
1 # Copyright 2017-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit meson
7
8 if [[ ${PV} == 9999 ]]; then
9         inherit git-r3
10         EGIT_REPO_URI="https://github.com/bus1/dbus-broker.git"
11 else
12         KEYWORDS="~amd64"
13         SRC_URI="https://github.com/bus1/dbus-broker/archive/v${PV}/${P}.tar.gz"
14         declare -Ag SUBPROJECTS=(
15                 [c-dvar]=9e1a5b4363aaece7169df2b2852944a1434b2df5
16                 [c-ini]=43f379396a320940d0661c15780f618f84d29348
17                 [c-list]=b1cd4dbf967d73b24dfe6cc56aaf3fdd668692e3
18                 [c-rbtree]=fa97402c3faa18c2ddd8325eb66e2bd58a224477
19                 [c-shquote]=1d171fe52c23944c3c0be1f2603595f2488a9ff8
20                 [c-stdaux]=d6ecce8afbb7703e1469cc5e7a59a8bd32e2d4a4
21                 [c-utf8]=1f7e2ff1164bd2161cb480532b2b34cb2074bde1
22         )
23         for sp in "${!SUBPROJECTS[@]}"; do
24                 commit=${SUBPROJECTS[${sp}]}
25                 SRC_URI+=" https://github.com/c-util/${sp}/archive/${commit}/${sp}-${commit}.tar.gz"
26         done
27         unset sp commit
28 fi
29
30 DESCRIPTION="Linux D-Bus Message Broker"
31 HOMEPAGE="https://github.com/bus1/dbus-broker/wiki"
32
33 LICENSE="Apache-2.0"
34 SLOT="0"
35 IUSE="audit doc +launcher selinux"
36
37 DEPEND="
38         audit? (
39                 >=sys-process/audit-2.7
40                 >=sys-libs/libcap-ng-0.6
41         )
42         launcher? (
43                 >=dev-libs/expat-2.2
44                 >=sys-apps/systemd-230:0=
45         )
46         selinux? ( sys-libs/libselinux )
47 "
48 RDEPEND="${DEPEND}
49         launcher? ( sys-apps/dbus )"
50 BDEPEND="
51         doc? ( dev-python/docutils )
52         virtual/pkgconfig
53 "
54
55 src_prepare() {
56         if [[ ${PV} != 9999 ]]; then
57                 local sp commit
58                 for sp in "${!SUBPROJECTS[@]}"; do
59                         commit=${SUBPROJECTS[${sp}]}
60                         rmdir "subprojects/${sp}" || die
61                         mv "${WORKDIR}/${sp}-${commit}" "subprojects/${sp}" || die
62                 done
63         fi
64         default
65 }
66
67 src_configure() {
68         local emesonargs=(
69                 -Daudit=$(usex audit true false)
70                 -Ddocs=$(usex doc true false)
71                 -Dlauncher=$(usex launcher true false)
72                 -Dselinux=$(usex selinux true false)
73         )
74         meson_src_configure
75 }