app-text/poppler: Subslot bump, README->README.md
[gentoo.git] / media-video / pipewire / pipewire-0.2.6.ebuild
1 # Copyright 1999-2019 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         EGIT_REPO_URI="https://github.com/PipeWire/pipewire.git"
10         inherit git-r3
11 else
12         SRC_URI="https://github.com/PipeWire/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
13         KEYWORDS="~amd64"
14 fi
15
16 DESCRIPTION="Multimedia processing graphs"
17 HOMEPAGE="https://pipewire.org/"
18
19 LICENSE="LGPL-2.1"
20 SLOT="0"
21 IUSE="bluetooth doc ffmpeg libav gstreamer sdl systemd vaapi X"
22
23 BDEPEND="
24         app-doc/xmltoman
25         doc? (
26                 app-doc/doxygen
27                 media-gfx/graphviz
28         )
29 "
30 DEPEND="
31         media-libs/alsa-lib
32         sys-apps/dbus
33         virtual/libudev
34         bluetooth? ( media-libs/sbc )
35         ffmpeg? (
36                 !libav? ( media-video/ffmpeg:= )
37                 libav? ( media-video/libav:= )
38         )
39         gstreamer? (
40                 media-libs/gstreamer:1.0
41                 media-libs/gst-plugins-base:1.0
42         )
43         sdl? ( media-libs/libsdl2 )
44         systemd? ( sys-apps/systemd )
45         vaapi? ( x11-libs/libva )
46         X? ( x11-libs/libX11 )
47 "
48 RDEPEND="${DEPEND}"
49
50 PATCHES=(
51         "${FILESDIR}"/${P}-alsa-lib-1.1.9.patch
52         "${FILESDIR}"/${P}-reuse-fd-in-pipewiresrc.patch
53         "${FILESDIR}"/${P}-fix-probing-without-starting.patch
54         "${FILESDIR}"/${P}-revert-combine-all-perms.patch
55 )
56
57 src_prepare() {
58         spa_use() {
59                 if ! use ${1}; then
60                         sed -e "/.*dependency.*'${2-$1}'/s/'${2-$1}'/'${2-$1}-disabled-by-USE-no-${1}'/" \
61                                 -i spa/meson.build || die
62                 fi
63         }
64
65         default
66         spa_use bluetooth sbc
67         spa_use ffmpeg libavcodec
68         spa_use ffmpeg libavformat
69         spa_use ffmpeg libavfilter
70         spa_use vaapi libva
71         spa_use sdl sdl2
72         spa_use X x11
73 }
74
75 src_configure() {
76         local emesonargs=(
77                 -Dman=true
78                 $(meson_use doc docs)
79                 $(meson_feature gstreamer)
80                 $(meson_use systemd)
81         )
82         meson_src_configure
83 }
84
85 pkg_postinst() {
86         elog "Package has optional sys-auth/rtkit RUNTIME support that may be"
87         elog "disabled by setting DISABLE_RTKIT env var."
88 }