logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

pipewire-0.3.10.ebuild (3497B)


  1. # Copyright 1999-2020 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit meson
  5. if [[ ${PV} == 9999 ]]; then
  6. EGIT_REPO_URI="https://github.com/PipeWire/pipewire.git"
  7. EGIT_BRANCH="work"
  8. inherit git-r3
  9. else
  10. SRC_URI="https://github.com/PipeWire/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
  11. KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
  12. fi
  13. DESCRIPTION="Multimedia processing graphs"
  14. HOMEPAGE="https://pipewire.org/"
  15. LICENSE="LGPL-2.1+"
  16. SLOT="0/0.3"
  17. IUSE="bluetooth +dbus debug doc ffmpeg gstreamer jack pulseaudio systemd test vulkan X"
  18. BDEPEND="
  19. app-doc/xmltoman
  20. doc? (
  21. app-doc/doxygen
  22. media-gfx/graphviz
  23. )
  24. "
  25. RDEPEND="
  26. >=media-libs/alsa-lib-1.1.7
  27. media-libs/libsdl2
  28. >=media-libs/libsndfile-1.0.20
  29. virtual/libudev
  30. dbus? ( sys-apps/dbus )
  31. bluetooth? (
  32. media-libs/sbc
  33. net-wireless/bluez:=
  34. )
  35. ffmpeg? ( media-video/ffmpeg:= )
  36. gstreamer? (
  37. >=dev-libs/glib-2.32.0:2
  38. >=media-libs/gstreamer-1.10.0:1.0
  39. media-libs/gst-plugins-base:1.0
  40. )
  41. jack? ( >=media-sound/jack2-1.9.10:2 )
  42. pulseaudio? (
  43. dev-libs/glib:2
  44. >=media-sound/pulseaudio-11.1
  45. )
  46. systemd? ( sys-apps/systemd )
  47. vulkan? ( media-libs/vulkan-loader )
  48. X? ( x11-libs/libX11 )
  49. "
  50. DEPEND="${RDEPEND}
  51. vulkan? ( dev-util/vulkan-headers )
  52. "
  53. DOCS=( {README,INSTALL}.md NEWS )
  54. PATCHES=( "${FILESDIR}/pipewire-0.3.10_pipewire_optionnal.patch" )
  55. RESTRICT="!test? ( test )"
  56. src_prepare() {
  57. spa_use() {
  58. if ! in_iuse ${1} || ! use ${1}; then
  59. sed -e "/^add-spa-lib.*${1}/s/^/#${2-$1}-disabled-by-USE-no-${1}\:/" \
  60. -e "/^load-module.*${1}/s/^/#${2-$1}-disabled-by-USE-no-${1}\:/" \
  61. -i src/daemon/pipewire.conf.in || die
  62. fi
  63. }
  64. default
  65. spa_use libcamera
  66. spa_use rtkit
  67. spa_use bluetooth bluez5
  68. spa_use jack
  69. spa_use vulkan
  70. }
  71. src_configure() {
  72. local emesonargs=(
  73. -Dexamples=true # contains required pipewire-media-session
  74. -Dman=true
  75. -Dspa=true
  76. -Dspa-plugins=true
  77. $(meson_use dbus dbus)
  78. --buildtype=$(usex debug debugoptimized plain)
  79. # alsa plugin and jack/pulseaudio emulation
  80. -Dpipewire-alsa=true
  81. $(meson_use jack pipewire-jack)
  82. $(meson_use pulseaudio pipewire-pulseaudio)
  83. # spa-plugins
  84. # we install alsa support unconditionally
  85. $(meson_use bluetooth bluez5)
  86. $(meson_use ffmpeg)
  87. $(meson_use jack)
  88. $(meson_use vulkan)
  89. # libcamera is not packaged
  90. # misc
  91. $(meson_use doc docs)
  92. $(meson_use gstreamer)
  93. $(meson_use systemd)
  94. $(meson_use test test)
  95. $(meson_use test tests)
  96. )
  97. meson_src_configure
  98. }
  99. src_install() {
  100. meson_src_install
  101. dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf
  102. # # TODO: this breaks alsa users
  103. # if use alsa; then
  104. # dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/99-pipewire-default.conf
  105. # fi
  106. }
  107. pkg_postinst() {
  108. elog "Package has optional sys-auth/rtkit RUNTIME support that may be disabled"
  109. elog "by setting DISABLE_RTKIT env var."
  110. elog "To enable rtkit, uncomment the load-module line in /etc/pipewire/pipewire.conf"
  111. elog
  112. if use jack; then
  113. elog "Please note that even though the libraries for JACK emulation have"
  114. elog "been installed, this ebuild is not yet wired up to replace a JACK server."
  115. elog
  116. fi
  117. if use pulseaudio; then
  118. elog "Please note that even though the libraries for PulseAudio emulation have"
  119. elog "been installed, this ebuild is not yet wired up to replace PulseAudio."
  120. elog
  121. fi
  122. elog "Read INSTALL.md for information about ALSA plugin or JACK/PulseAudio emulation."
  123. }