pipewire.mk 6.2 KB

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