xref: /OK3568_Linux_fs/buildroot/package/pipewire/pipewire.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# pipewire
4#
5################################################################################
6
7PIPEWIRE_VERSION = 0.3.52
8PIPEWIRE_SOURCE = pipewire-$(PIPEWIRE_VERSION).tar.bz2
9PIPEWIRE_SITE = https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/$(PIPEWIRE_VERSION)
10PIPEWIRE_LICENSE = MIT, LGPL-2.1+ (libspa-alsa), GPL-2.0 (libjackserver)
11PIPEWIRE_LICENSE_FILES = COPYING LICENSE
12PIPEWIRE_INSTALL_STAGING = YES
13PIPEWIRE_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
14PIPEWIRE_LDFLAGS = $(TARGET_NLS_LIBS)
15
16PIPEWIRE_CONF_OPTS += \
17	-Ddocs=disabled \
18	-Dman=disabled \
19	-Dtests=disabled \
20	-Dspa-plugins=enabled \
21	-Daudiomixer=enabled \
22	-Daudioconvert=enabled \
23	-Dbluez5-codec-lc3plus=disabled \
24	-Dcontrol=enabled \
25	-Daudiotestsrc=enabled \
26	-Dsupport=enabled \
27	-Devl=disabled \
28	-Dtest=disabled \
29	-Dvideoconvert=enabled \
30	-Dvideotestsrc=enabled \
31	-Dvolume=enabled \
32	-Dsession-managers=[] \
33	-Dlegacy-rtkit=false \
34	-Dlibcanberra=disabled
35
36ifeq ($(BR2_PACKAGE_DBUS),y)
37PIPEWIRE_CONF_OPTS += -Ddbus=enabled
38PIPEWIRE_DEPENDENCIES += dbus
39else
40PIPEWIRE_CONF_OPTS += -Ddbus=disabled
41endif
42
43ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
44PIPEWIRE_CONF_OPTS += -Dudev=enabled
45PIPEWIRE_DEPENDENCIES += udev
46else
47PIPEWIRE_CONF_OPTS += -Dudev=disabled
48endif
49
50ifeq ($(BR2_PACKAGE_PIPEWIRE_EXAMPLES),y)
51PIPEWIRE_CONF_OPTS += -Dexamples=enabled
52else
53PIPEWIRE_CONF_OPTS += -Dexamples=disabled
54endif
55
56ifeq ($(BR2_PACKAGE_PIPEWIRE_GSTREAMER),y)
57PIPEWIRE_CONF_OPTS += -Dgstreamer=enabled
58PIPEWIRE_DEPENDENCIES += libglib2 gstreamer1 gst1-plugins-base
59else
60PIPEWIRE_CONF_OPTS += -Dgstreamer=disabled
61endif
62
63ifeq ($(BR2_PACKAGE_SYSTEMD),y)
64PIPEWIRE_CONF_OPTS += \
65	-Dsystemd=enabled \
66	-Dsystemd-system-service=enabled \
67	-Dsystemd-user-service=enabled
68PIPEWIRE_DEPENDENCIES += systemd
69else
70PIPEWIRE_CONF_OPTS += \
71	-Dsystemd=disabled \
72	-Dsystemd-system-service=disabled \
73	-Dsystemd-user-service=disabled
74endif
75
76ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
77PIPEWIRE_CONF_OPTS += -Dpipewire-alsa=enabled
78PIPEWIRE_DEPENDENCIES += alsa-lib
79ifeq ($(BR2_PACKAGE_ALSA_LIB_SEQ)$(BR2_PACKAGE_ALSA_LIB_UCM)$(BR2_PACKAGE_HAS_UDEV),yyy)
80PIPEWIRE_CONF_OPTS += -Dalsa=enabled
81else
82PIPEWIRE_CONF_OPTS += -Dalsa=disabled
83endif
84else
85PIPEWIRE_CONF_OPTS += -Dalsa=disabled -Dpipewire-alsa=disabled
86endif
87
88ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
89PIPEWIRE_CONF_OPTS += -Davahi=enabled
90PIPEWIRE_DEPENDENCIES += avahi
91else
92PIPEWIRE_CONF_OPTS += -Davahi=disabled
93endif
94
95ifeq ($(BR2_PACKAGE_JACK2),y)
96PIPEWIRE_CONF_OPTS += -Dpipewire-jack=enabled -Djack=enabled
97PIPEWIRE_DEPENDENCIES += jack2
98else
99PIPEWIRE_CONF_OPTS += -Dpipewire-jack=disabled -Djack=disabled
100endif
101
102ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS)$(BR2_PACKAGE_SBC),yy)
103PIPEWIRE_CONF_OPTS += -Dbluez5=enabled
104PIPEWIRE_DEPENDENCIES += bluez5_utils sbc
105else
106PIPEWIRE_CONF_OPTS += -Dbluez5=disabled
107endif
108
109ifeq ($(BR2_PACKAGE_FFMPEG),y)
110PIPEWIRE_CONF_OPTS += -Dffmpeg=enabled
111PIPEWIRE_DEPENDENCIES += ffmpeg
112else
113PIPEWIRE_CONF_OPTS += -Dffmpeg=disabled
114endif
115
116ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
117PIPEWIRE_DEPENDENCIES += ncurses
118endif
119
120ifeq ($(BR2_PACKAGE_PIPEWIRE_V4L2),y)
121PIPEWIRE_CONF_OPTS += -Dpipewire-v4l2=enabled -Dv4l2=enabled
122else
123PIPEWIRE_CONF_OPTS += -Dpipewire-v4l2=disabled -Dv4l2=disabled
124endif
125
126ifeq ($(BR2_PACKAGE_LIBCAMERA)$(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_HAS_UDEV),yyy)
127PIPEWIRE_CONF_OPTS += -Dlibcamera=enabled
128PIPEWIRE_DEPENDENCIES += libcamera libdrm
129else
130PIPEWIRE_CONF_OPTS += -Dlibcamera=disabled
131endif
132
133ifeq ($(BR2_PACKAGE_LILV),y)
134PIPEWIRE_CONF_OPTS += -Dlv2=enabled
135PIPEWIRE_DEPENDENCIES += lilv
136else
137PIPEWIRE_CONF_OPTS += -Dlv2=disabled
138endif
139
140ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
141PIPEWIRE_CONF_OPTS += -Dx11=enabled
142PIPEWIRE_DEPENDENCIES += xlib_libX11
143else
144PIPEWIRE_CONF_OPTS += -Dx11=disabled
145endif
146
147ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y)
148PIPEWIRE_CONF_OPTS += -Dx11-xfixes=enabled
149PIPEWIRE_DEPENDENCIES += xlib_libXfixes
150else
151PIPEWIRE_CONF_OPTS += -Dx11-xfixes=disabled
152endif
153
154ifeq ($(BR2_PACKAGE_LIBUSB),y)
155PIPEWIRE_CONF_OPTS += -Dlibusb=enabled
156PIPEWIRE_DEPENDENCIES += libusb
157else
158PIPEWIRE_CONF_OPTS += -Dlibusb=disabled
159endif
160
161ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),y)
162PIPEWIRE_CONF_OPTS += -Dvulkan=enabled
163PIPEWIRE_DEPENDENCIES += mesa3d
164else
165PIPEWIRE_CONF_OPTS += -Dvulkan=disabled
166endif
167
168ifeq ($(BR2_PACKAGE_LIBSNDFILE),y)
169PIPEWIRE_CONF_OPTS += -Dpw-cat=enabled -Dsndfile=enabled
170PIPEWIRE_DEPENDENCIES += libsndfile
171else
172PIPEWIRE_CONF_OPTS += -Dpw-cat=disabled -Dsndfile=disabled
173endif
174
175ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
176PIPEWIRE_CONF_OPTS += -Dlibpulse=enabled
177PIPEWIRE_DEPENDENCIES += pulseaudio
178else
179PIPEWIRE_CONF_OPTS += -Dlibpulse=disabled
180endif
181
182ifeq ($(BR2_PACKAGE_READLINE),y)
183PIPEWIRE_DEPENDENCIES += readline
184endif
185
186ifeq ($(BR2_PACKAGE_SDL2),y)
187PIPEWIRE_DEPENDENCIES += sdl2
188PIPEWIRE_CONF_OPTS += -Dsdl2=enabled
189else
190PIPEWIRE_CONF_OPTS += -Dsdl2=disabled
191endif
192
193ifeq ($(WEBRTC_AUDIO_PROCESSING),y)
194PIPEWIRE_CONF_OPTS += -Decho-cancel-webrtc=enabled
195PIPEWIRE_DEPENDENCIES += webrtc-audio-processing
196else
197PIPEWIRE_CONF_OPTS += -Decho-cancel-webrtc=disabled
198endif
199
200ifeq ($(BR2_PACKAGE_OPENSSL),y)
201PIPEWIRE_CONF_OPTS += -Draop=enabled
202PIPEWIRE_DEPENDENCIES += openssl
203else
204PIPEWIRE_CONF_OPTS += -Draop=disabled
205endif
206
207define PIPEWIRE_USERS
208	pipewire -1 pipewire -1 * - - audio,video PipeWire System Daemon
209endef
210
211$(eval $(meson-package))
212