From 814f4cf860e299a046b649eaee5463427984c09c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 8 Jul 2021 15:03:58 +0100 Subject: gentoo resync : 08.07.2021 --- media-video/pipewire/Manifest | 6 +- media-video/pipewire/pipewire-0.3.30-r1.ebuild | 274 +++++++++++++++++++++++++ media-video/pipewire/pipewire-0.3.30.ebuild | 274 ------------------------- media-video/pipewire/pipewire-0.3.31.ebuild | 274 +++++++++++++++++++++++++ media-video/pipewire/pipewire-9999.ebuild | 26 +-- 5 files changed, 565 insertions(+), 289 deletions(-) create mode 100644 media-video/pipewire/pipewire-0.3.30-r1.ebuild delete mode 100644 media-video/pipewire/pipewire-0.3.30.ebuild create mode 100644 media-video/pipewire/pipewire-0.3.31.ebuild (limited to 'media-video/pipewire') diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest index 78d485107ebc..7088edeeb42d 100644 --- a/media-video/pipewire/Manifest +++ b/media-video/pipewire/Manifest @@ -14,12 +14,14 @@ DIST pipewire-0.3.27.tar.gz 1459913 BLAKE2B b6db73de85c41932b630e62b3dcc589529ae DIST pipewire-0.3.28.tar.gz 1474219 BLAKE2B d20b39c8ed49cd44f2109aab6453aac547ff66dc2ef4a52fb71fea27eb07920efc58498e5ddd82e9f6d86981185e37313748d9157c9a09a3ae1e8ae48d5d45d6 SHA512 f2ed23609c6a45fb80f54caabaa304ba4f318c905a28350c89c65f179a95cc2022f1acbb0c2ec558baf4dc6bcc5623b8daa6678d52cdb9179a88c67b6c1fe0ff DIST pipewire-0.3.29.tar.gz 1504935 BLAKE2B fe3984ec4b02fe91683d382e3891e174748b52c5e2f609dc838837f1ac0fea736e06395a022b8ec152fe015cca24c54d4c1896acde3a2ac66eb700dc2336fe4f SHA512 bc163ad3e2d7696295fd3720e8f9cc4d478a55c0694c0faa03a40333e3b65fcbff27e4e296eb9dd0191ca2782e04934915c46e04a2444b458491cd2905823ddd DIST pipewire-0.3.30.tar.gz 1540950 BLAKE2B 69b35743e3ad9a8caf68d9bb16cf395203efed6c3046b3f4ea33bbcdd6649f5d425d813042c12396a7cd5ff4e8ed91dbc395a96fe55935ad50f9c3f3918b0407 SHA512 ec525e0fb7e5c5313245fcc745b971fd7d4a1caa7ab9fe1fa38dc20d50f03e5969197e86b60659971676bec0f79aa7b7951c8209bfe9565a3fd1dcac1b8535b3 +DIST pipewire-0.3.31.tar.gz 1594284 BLAKE2B 0ff358c53ea4357a72ac58ee45ccac792161d3ddd7a9dbcd6933be88e0ddc5d9c49468a3b1eb0cdf9ea81ec4272ad53078f6cae1fd20358bbeed108139e217ce SHA512 ff21e281bb3e5f6da1001e0c64b33368e96d31f0ec2d395cdfcfac105b0442d8fedd2225e6e5d1c93fdbd5e0108accecebbb7c294c55803a4ea853f1efa0c069 EBUILD pipewire-0.3.22.ebuild 3177 BLAKE2B 712e773c42b0a89d482a1c38f1d5b2ad73bd9790173093813f257378e5bcda3aaaeedb2d215812637d14dccc4c57cb25ba3d4574d579821f7c09f8a110cac8ac SHA512 89583f0495c8a12598c829de80d2b515a1a37aecf51b4cb54c4988f0fc3aff2f5d9b7f4d23621678d5f1b2e67f145d941eacc0d9eca0281d9cf202ff109a7195 EBUILD pipewire-0.3.25.ebuild 8586 BLAKE2B b1e467d7e9352a510239d1aee632e4fe6704811cf89d8add118757b6d38240bc0b44f1501db416c1f2c693846667a953826cef6bec8e32bf9362b9c07b804138 SHA512 f16b4f5b1dbfea605f628941edb3931c315854f99a242f63ec6d1b7b1bd2754bb27e417215d02e57b1a7980db8660616cf54dcf4aa12b077a847c9136c73c735 EBUILD pipewire-0.3.26.ebuild 8737 BLAKE2B d739d6931d1a2b4a12b011abefcac40d9cf81a363ad1897967cf12c33c346ca0b7c217d5ce8e2433b601fd698f74361a5719d667aa6bc45253d8003f14b5076d SHA512 e782ffc242bb437d8a5f465321ece26c86bfc40e65b7beb9ad4ff89fb4edbb1c7458dbe9ea6ce1568ae092747c56226adab568b694c176cea1bf99b137647ee5 EBUILD pipewire-0.3.27-r1.ebuild 9298 BLAKE2B 92e91609706d83720cd6aefd0afa5d3f06a543d98c783ccf92e562eeb7f4bd07e3de54c6834116f62952c6d83b0dc19a759ec14712d076dc327999aecbfd2f18 SHA512 0584ba24a57f4227b550943a09793846192820f898a7ff71ddd391447059bda83b250aa209efa74d6482dd7055617f815a35960a625c5bdb05151548106507be EBUILD pipewire-0.3.28.ebuild 9370 BLAKE2B 305b012d603420eb7c6c8bd70747889a89b2321649f43d3108eb21cf8046ddc64b7884045656793a9787bcd45973698aa61351c0930d4181cdecc34ebcda3388 SHA512 904e6c09d47ee6198bfcb6c3a8d3f1edf9eb69af5676f6401e1e54509ac8d510c33d62d146c3104e5c7ff571e08db50bfc6568e8cf269b654c4fefef3330019b EBUILD pipewire-0.3.29.ebuild 9389 BLAKE2B 3809e908b15e24a41137880a37c2e4eec2fbbb8c03387131bf3b7a57dbde220980480156843565134f29c9ae0d21a038dd9be55c681a92b689e1d6e12210f070 SHA512 822b0134c90bdb01b7019b94b5676e149fb8d6801a47ddfee831288a6e6139334308302b5654b49469dee07f1f52701a3b021aebf40d4c49acc6278955c82bf8 -EBUILD pipewire-0.3.30.ebuild 9454 BLAKE2B f6a4987ff7159f3039e1bc4a1f96ab5d74eab65d15a610283e940fd4a25d4a9c95f876bfc3cf2337a8b07725304b8446715abb0f892b8d2c3cae8e11fee0bdab SHA512 fbee1686d182adb55675f02de39a6bd7a4e9213e93d7b352facea92f676535f36052db31a1c93480bc995f159290ae3608a688bacc9750eb37469b0c5af64cee -EBUILD pipewire-9999.ebuild 9454 BLAKE2B fb9441155d5f40abbab3b0587c1732e071f4ec20bf7f2997cb7b613ac2e77b865dd547a50012357884f60f0a674529d93fefd7309315b29ae6da33cb5ee089af SHA512 3b6c5b8b27de1f5c8e0a7569a1d8b614561ff46f5ded1f79e3f9c94e9a366dbf15cc2620c6dc46321580d8646cb6fa7980c7b23da625276ec220631e80141d39 +EBUILD pipewire-0.3.30-r1.ebuild 9676 BLAKE2B a5c13a3301a7088e4de9510af0bca868c8691f0c59f9e5aa516ac45de8ea24c141a232ee3a7cb6b34bd0c822864ccf9dea42a81a0b5dc5d86bcb34689197f83d SHA512 a62258a7e3612d85db36a2ed1b28ae7f0649a3331447e7010a8bef1e2f0a7228a2d9456a6a13733be81f4e5303772966917b40a5f4716ba745930c2f8b61576f +EBUILD pipewire-0.3.31.ebuild 9676 BLAKE2B 9629c2dd52835484d9dc6ea149213ba832a76f03344a6098a4207a2e501d5066b2872c6adcde9d0f1dd937f7dafa1f37fba85a974d72b69777f720d15be9b02b SHA512 29f4cdb87ca7f3acf8474c4b86b30ed1db065d5071eb50aafb5f48d490180e8875b8008d168ec8e6f03ed465a90fbb79d9bfc81159c3650ea7d5d305baa7a485 +EBUILD pipewire-9999.ebuild 9676 BLAKE2B 9629c2dd52835484d9dc6ea149213ba832a76f03344a6098a4207a2e501d5066b2872c6adcde9d0f1dd937f7dafa1f37fba85a974d72b69777f720d15be9b02b SHA512 29f4cdb87ca7f3acf8474c4b86b30ed1db065d5071eb50aafb5f48d490180e8875b8008d168ec8e6f03ed465a90fbb79d9bfc81159c3650ea7d5d305baa7a485 MISC metadata.xml 1600 BLAKE2B 1138c789841fae8ea509ba2becdfef8376b87525b5b1822854ca083ab49e63124cbde6d8064849e0114a0e39269f63cf76d63f49396d709f6b3da865cf539487 SHA512 5ca5105edecf2515049b61e71327236c3e0fd949a25e91a9ed9dc0a9ad5d9d66f0b99329276c824e8840352b699bb9995b9ae073b43f30f87f4a8cc4bc4237a5 diff --git a/media-video/pipewire/pipewire-0.3.30-r1.ebuild b/media-video/pipewire/pipewire-0.3.30-r1.ebuild new file mode 100644 index 000000000000..6e42e81459eb --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.30-r1.ebuild @@ -0,0 +1,274 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7..10} ) + +inherit meson-multilib optfeature python-any-r1 udev + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" + inherit git-r3 +else + SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +fi + +DESCRIPTION="Multimedia processing graphs" +HOMEPAGE="https://pipewire.org/" + +LICENSE="MIT LGPL-2.1+ GPL-2" +SLOT="0/0.3" +IUSE="bluetooth doc extra gstreamer jack-client jack-sdk pipewire-alsa systemd test v4l" + +# Once replacing system JACK libraries is possible, it's likely that +# jack-client IUSE will need blocking to avoid users accidentally +# configuring their systems to send PW sink output to the emulated +# JACK's sink - doing so is likely to yield no audio, cause a CPU +# cycles consuming loop (and may even cause GUI crashes)! + +REQUIRED_USE="jack-sdk? ( !jack-client )" + +RESTRICT="!test? ( test )" + +BDEPEND=" + app-doc/xmltoman + virtual/pkgconfig + ${PYTHON_DEPS} + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) +" +RDEPEND=" + acct-group/audio + media-libs/alsa-lib + sys-apps/dbus[${MULTILIB_USEDEP}] + sys-libs/ncurses[unicode] + virtual/libintl[${MULTILIB_USEDEP}] + virtual/libudev[${MULTILIB_USEDEP}] + bluetooth? ( + media-libs/fdk-aac + media-libs/libldac + media-libs/libopenaptx + media-libs/sbc + >=net-wireless/bluez-4.101:= + ) + extra? ( + >=media-libs/libsndfile-1.0.20 + ) + gstreamer? ( + >=dev-libs/glib-2.32.0:2 + >=media-libs/gstreamer-1.10.0:1.0 + media-libs/gst-plugins-base:1.0 + ) + jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] ) + jack-sdk? ( + !media-sound/jack-audio-connection-kit + !media-sound/jack2 + ) + pipewire-alsa? ( + >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}] + || ( + media-plugins/alsa-plugins[-pulseaudio] + !media-plugins/alsa-plugins + ) + ) + !pipewire-alsa? ( media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] ) + systemd? ( sys-apps/systemd ) + v4l? ( media-libs/libv4l ) +" + +DEPEND="${RDEPEND}" + +# Present RDEPEND that are currently always disabled due to the PW +# code using them being required to be disabled by Gentoo guidelines +# (i.e. developer binaries not meant for users) and unready code +# media-video/ffmpeg:= +# media-libs/libsdl2 +# >=media-libs/vulkan-loader-1.1.69 +# +# Ditto for DEPEND +# >=dev-util/vulkan-headers-1.1.69 + +DOCS=( {README,INSTALL}.md NEWS ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch + "${FILESDIR}"/${PN}-0.3.29-revert-openaptx-restriction.patch +) + +# limitsdfile related code taken from =sys-auth/realtime-base-0.1 +# with changes as necessary. +limitsdfile=40-${PN}.conf + +src_prepare() { + default + + if ! use systemd; then + # This can be applied non-conditionally but would make for a + # significantly worse user experience on systemd then. + eapply "${FILESDIR}"/${PN}-0.3.25-non-systemd-integration.patch + fi + + einfo "Generating ${limitsdfile}" + cat > ${limitsdfile} <<- EOF || die + # Start of ${limitsdfile} from ${P} + + @audio - memlock 256 + + # End of ${limitsdfile} from ${P} + EOF +} + +multilib_src_configure() { + local emesonargs=( + -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} + $(meson_native_use_feature doc docs) + $(meson_native_enabled examples) # Disabling this implicitly disables -Dmedia-session + $(meson_native_enabled media-session) + $(meson_native_enabled man) + $(meson_feature test tests) + -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests + $(meson_native_use_feature gstreamer) + $(meson_native_use_feature gstreamer gstreamer-device-provider) + $(meson_native_use_feature systemd) + -Dsystemd-system-service=disabled # Matches upstream + $(meson_native_use_feature systemd systemd-user-service) + $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph + -Dspa-plugins=enabled + -Dalsa=enabled # Allows using kernel ALSA for sound I/O (-Dmedia-session depends on this) + -Daudiomixer=enabled # Matches upstream + -Daudioconvert=enabled # Matches upstream + $(meson_native_use_feature bluetooth bluez5) + $(meson_native_use_feature bluetooth bluez5-backend-hsp-native) + $(meson_native_use_feature bluetooth bluez5-backend-hfp-native) + $(meson_native_use_feature bluetooth bluez5-backend-ofono) + $(meson_native_use_feature bluetooth bluez5-backend-hsphfpd) + $(meson_native_use_feature bluetooth bluez5-codec-aac) + $(meson_native_use_feature bluetooth bluez5-codec-aptx) + $(meson_native_use_feature bluetooth bluez5-codec-ldac) + -Dcontrol=enabled # Matches upstream + -Daudiotestsrc=enabled # Matches upstream + -Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020 + -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph + $(meson_native_use_feature jack-client jack) # Allows PW to act as a JACK client + $(meson_feature jack-sdk jack-devel) + $(usex jack-sdk "-Dlibjack-path=${EPREFIX}/usr/$(get_libdir)" '') + -Dsupport=enabled # Miscellaneous/common plugins, such as null sink + -Devl=disabled # Matches upstream + -Dtest=disabled # fakesink and fakesource plugins + $(meson_native_use_feature v4l v4l2) + -Dlibcamera=disabled # libcamera is not in Portage tree + -Dvideoconvert=enabled # Matches upstream + -Dvideotestsrc=enabled # Matches upstream + -Dvolume=enabled # Matches upstream + -Dvulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream) + $(meson_native_use_feature extra pw-cat) + -Dudev=enabled + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + -Dsdl2=disabled # Controls SDL2 dependent code (currently only examples when -Dinstalled_tests=enabled which we never install) + $(meson_native_use_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) + ) + + meson_src_configure +} + +multilib_src_install() { + # Our customs DOCS do not exist in multilib source directory + DOCS= meson_src_install +} + +multilib_src_install_all() { + einstalldocs + + insinto /etc/security/limits.d + doins ${limitsdfile} + + if use pipewire-alsa; then + dodir /etc/alsa/conf.d + # These will break if someone has /etc that is a symbol link to a subfolder! See #724222 + # And the current dosym8 -r implementation is likely affected by the same issue, too. + dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf + dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/99-pipewire-default.conf + fi + + if ! use systemd; then + insinto /etc/xdg/autostart + newins "${FILESDIR}"/pipewire.desktop pipewire.desktop + + exeinto /usr/libexec + newexe "${FILESDIR}"/pipewire-launcher.sh pipewire-launcher + fi +} + +pkg_postinst() { + elog "It is recommended to raise RLIMIT_MEMLOCK to 256 for users" + elog "using PipeWire. Do it either manually or add yourself" + elog "to the 'audio' group:" + elog + elog " usermod -aG audio " + elog + + if ! use jack-sdk; then + elog "JACK emulation is incomplete and not all programs will work. PipeWire's" + elog "alternative libraries have been installed to a non-default location." + elog "To use them, put pw-jack before every JACK application." + elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack" + elog "provider is still needed to compile the JACK applications themselves." + elog + fi + + if use systemd; then + elog "To use PipeWire for audio, the user units must be manually enabled:" + elog + elog " systemctl --user enable pipewire.socket pipewire-pulse.socket" + elog + elog "When switching from PulseAudio, do not forget to disable PulseAudio:" + elog + elog " systemctl --user disable pulseaudio.service pulseaudio.socket" + elog + elog "A reboot is recommended to avoid interferences from still running" + elog "PulseAudio daemon." + elog + elog "Both, new users and those upgrading, need to enable pipewire-media-session:" + elog + elog " systemctl --user enable pipewire-media-session.service" + elog + elog "NOTE: This is not required when using PipeWire only for screencasting." + elog + else + elog "This ebuild auto-enables PulseAudio replacement. Because of that, users" + elog "are recommended to edit: ${EROOT}/etc/pulse/client.conf and disable " + elog "autospawn'ing of the original daemon by setting:" + elog + elog " autospawn = no" + elog + elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!" + elog + elog "Alternatively, if replacing PulseAudio daemon is not desired, edit" + elog "${EROOT}/etc/pipewire/pipewire.conf by commenting out the relevant" + elog "command near the end of the file:" + elog + elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }" + elog + elog "NOTE:" + elog "Starting with PipeWire-0.3.30, package is no longer installing config" + elog "into ${EROOT}/etc/pipewire by default. In case you need to change" + elog "config, please start by copying default config from ${EROOT}/usr/share/pipewire" + elog "and just override sections you want to change." + fi + + elog "For latest tips and tricks, troubleshooting information and documentation" + elog "in general, please refer to https://wiki.gentoo.org/wiki/PipeWire" + elog + + optfeature_header "The following can be installed for optional runtime features:" + optfeature "restricted realtime capabilities vai D-Bus" sys-auth/rtkit + # Once hsphfpd lands in tree, both it and ofono will need to be checked for presence here! + if use bluetooth; then + optfeature "better BT headset support (daemon startup required)" net-misc/ofono + #optfeature "an oFono alternative (not packaged)" foo-bar/hsphfpd + fi +} diff --git a/media-video/pipewire/pipewire-0.3.30.ebuild b/media-video/pipewire/pipewire-0.3.30.ebuild deleted file mode 100644 index d2c5423d5e5d..000000000000 --- a/media-video/pipewire/pipewire-0.3.30.ebuild +++ /dev/null @@ -1,274 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PYTHON_COMPAT=( python3_{7..10} ) - -inherit meson-multilib optfeature python-any-r1 udev - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" - inherit git-r3 -else - SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" -fi - -DESCRIPTION="Multimedia processing graphs" -HOMEPAGE="https://pipewire.org/" - -LICENSE="MIT LGPL-2.1+ GPL-2" -SLOT="0/0.3" -IUSE="aac aptx bluetooth doc extra gstreamer jack-client jack-sdk ldac pipewire-alsa systemd test v4l" - -# Once replacing system JACK libraries is possible, it's likely that -# jack-client IUSE will need blocking to avoid users accidentally -# configuring their systems to send PW sink output to the emulated -# JACK's sink - doing so is likely to yield no audio, cause a CPU -# cycles consuming loop (and may even cause GUI crashes)! - -REQUIRED_USE=" - aac? ( bluetooth ) - aptx? ( bluetooth ) - jack-sdk? ( !jack-client ) - ldac? ( bluetooth ) -" - -RESTRICT="!test? ( test )" - -BDEPEND=" - app-doc/xmltoman - virtual/pkgconfig - ${PYTHON_DEPS} - doc? ( - app-doc/doxygen - media-gfx/graphviz - ) -" -RDEPEND=" - acct-group/audio - media-libs/alsa-lib - sys-apps/dbus[${MULTILIB_USEDEP}] - sys-libs/ncurses[unicode] - virtual/libintl[${MULTILIB_USEDEP}] - virtual/libudev[${MULTILIB_USEDEP}] - bluetooth? ( - aac? ( media-libs/fdk-aac ) - aptx? ( media-libs/libopenaptx ) - ldac? ( media-libs/libldac ) - media-libs/sbc - >=net-wireless/bluez-4.101:= - ) - extra? ( - >=media-libs/libsndfile-1.0.20 - ) - gstreamer? ( - >=dev-libs/glib-2.32.0:2 - >=media-libs/gstreamer-1.10.0:1.0 - media-libs/gst-plugins-base:1.0 - ) - jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] ) - jack-sdk? ( - !media-sound/jack-audio-connection-kit - !media-sound/jack2 - ) - pipewire-alsa? ( - >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}] - || ( - media-plugins/alsa-plugins[-pulseaudio] - !media-plugins/alsa-plugins - ) - ) - !pipewire-alsa? ( media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] ) - systemd? ( sys-apps/systemd ) - v4l? ( media-libs/libv4l ) -" - -DEPEND="${RDEPEND}" - -# Present RDEPEND that are currently always disabled due to the PW -# code using them being required to be disabled by Gentoo guidelines -# (i.e. developer binaries not meant for users) and unready code -# media-video/ffmpeg:= -# media-libs/libsdl2 -# >=media-libs/vulkan-loader-1.1.69 -# -# Ditto for DEPEND -# >=dev-util/vulkan-headers-1.1.69 - -DOCS=( {README,INSTALL}.md NEWS ) - -PATCHES=( - "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch - "${FILESDIR}"/${PN}-0.3.29-revert-openaptx-restriction.patch -) - -# limitsdfile related code taken from =sys-auth/realtime-base-0.1 -# with changes as necessary. -limitsdfile=40-${PN}.conf - -src_prepare() { - default - - if ! use systemd; then - # This can be applied non-conditionally but would make for a - # significantly worse user experience on systemd then. - eapply "${FILESDIR}"/${PN}-0.3.25-non-systemd-integration.patch - fi - - einfo "Generating ${limitsdfile}" - cat > ${limitsdfile} <<- EOF || die - # Start of ${limitsdfile} from ${P} - - @audio - memlock 256 - - # End of ${limitsdfile} from ${P} - EOF -} - -multilib_src_configure() { - local emesonargs=( - -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} - $(meson_native_use_feature doc docs) - $(meson_native_enabled examples) # Disabling this implicitly disables -Dmedia-session - $(meson_native_enabled media-session) - $(meson_native_enabled man) - $(meson_feature test tests) - -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests - $(meson_native_use_feature gstreamer) - $(meson_native_use_feature gstreamer gstreamer-device-provider) - $(meson_native_use_feature systemd) - -Dsystemd-system-service=disabled # Matches upstream - $(meson_native_use_feature systemd systemd-user-service) - $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph - -Dspa-plugins=enabled - -Dalsa=enabled # Allows using kernel ALSA for sound I/O (-Dmedia-session depends on this) - -Daudiomixer=enabled # Matches upstream - -Daudioconvert=enabled # Matches upstream - $(meson_native_use_feature bluetooth bluez5) - $(meson_native_use_feature bluetooth bluez5-backend-hsp-native) - $(meson_native_use_feature bluetooth bluez5-backend-hfp-native) - $(meson_native_use_feature bluetooth bluez5-backend-ofono) - $(meson_native_use_feature bluetooth bluez5-backend-hsphfpd) - $(meson_native_use_feature aac bluez5-codec-aac) - $(meson_native_use_feature aptx bluez5-codec-aptx) - $(meson_native_use_feature ldac bluez5-codec-ldac) - -Dcontrol=enabled # Matches upstream - -Daudiotestsrc=enabled # Matches upstream - -Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020 - -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph - $(meson_native_use_feature jack-client jack) # Allows PW to act as a JACK client - $(meson_feature jack-sdk jack-devel) - $(usex jack-sdk "-Dlibjack-path=${EPREFIX}/usr/$(get_libdir)" '') - -Dsupport=enabled # Miscellaneous/common plugins, such as null sink - -Devl=disabled # Matches upstream - -Dtest=disabled # fakesink and fakesource plugins - $(meson_native_use_feature v4l v4l2) - -Dlibcamera=disabled # libcamera is not in Portage tree - -Dvideoconvert=enabled # Matches upstream - -Dvideotestsrc=enabled # Matches upstream - -Dvolume=enabled # Matches upstream - -Dvulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream) - $(meson_native_use_feature extra pw-cat) - -Dudev=enabled - -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" - -Dsdl2=disabled # Controls SDL2 dependent code (currently only examples when -Dinstalled_tests=enabled which we never install) - $(meson_native_use_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) - ) - - meson_src_configure -} - -multilib_src_install() { - # Our customs DOCS do not exist in multilib source directory - DOCS= meson_src_install -} - -multilib_src_install_all() { - einstalldocs - - insinto /etc/security/limits.d - doins ${limitsdfile} - - if use pipewire-alsa; then - dodir /etc/alsa/conf.d - # These will break if someone has /etc that is a symbol link to a subfolder! See #724222 - # And the current dosym8 -r implementation is likely affected by the same issue, too. - dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf - dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/99-pipewire-default.conf - fi - - if ! use systemd; then - insinto /etc/xdg/autostart - newins "${FILESDIR}"/pipewire.desktop pipewire.desktop - - exeinto /usr/libexec - newexe "${FILESDIR}"/pipewire-launcher.sh pipewire-launcher - fi -} - -pkg_postinst() { - elog "It is recommended to raise RLIMIT_MEMLOCK to 256 for users" - elog "using PipeWire. Do it either manually or add yourself" - elog "to the 'audio' group:" - elog - elog " usermod -aG audio " - elog - - if ! use jack-sdk; then - elog "JACK emulation is incomplete and not all programs will work. PipeWire's" - elog "alternative libraries have been installed to a non-default location." - elog "To use them, put pw-jack before every JACK application." - elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack" - elog "provider is still needed to compile the JACK applications themselves." - elog - fi - - if use systemd; then - elog "To use PipeWire for audio, the user units must be manually enabled:" - elog - elog " systemctl --user enable pipewire.socket pipewire-pulse.socket" - elog - elog "When switching from PulseAudio, do not forget to disable PulseAudio:" - elog - elog " systemctl --user disable pulseaudio.service pulseaudio.socket" - elog - elog "A reboot is recommended to avoid interferences from still running" - elog "PulseAudio daemon." - elog - elog "Both, new users and those upgrading, need to enable pipewire-media-session:" - elog - elog " systemctl --user enable pipewire-media-session.service" - elog - elog "NOTE: This is not required when using PipeWire only for screencasting." - elog - else - elog "This ebuild auto-enables PulseAudio replacement. Because of that, users" - elog "are recommended to edit: ${EROOT}/etc/pulse/client.conf and disable " - elog "autospawn'ing of the original daemon by setting:" - elog - elog " autospawn = no" - elog - elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!" - elog - elog "Alternatively, if replacing PulseAudio daemon is not desired, edit" - elog "${EROOT}/etc/pipewire/pipewire.conf by commenting out the relevant" - elog "command near the end of the file:" - elog - elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }" - elog - fi - - elog "For latest tips and tricks, troubleshooting information and documentation" - elog "in general, please refer to https://wiki.gentoo.org/wiki/PipeWire" - elog - - optfeature_header "The following can be installed for optional runtime features:" - optfeature "restricted realtime capabilities vai D-Bus" sys-auth/rtkit - # Once hsphfpd lands in tree, both it and ofono will need to be checked for presence here! - if use bluetooth; then - optfeature "better BT headset support (daemon startup required)" net-misc/ofono - #optfeature "an oFono alternative (not packaged)" foo-bar/hsphfpd - fi -} diff --git a/media-video/pipewire/pipewire-0.3.31.ebuild b/media-video/pipewire/pipewire-0.3.31.ebuild new file mode 100644 index 000000000000..29da21cf2dc0 --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.31.ebuild @@ -0,0 +1,274 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7..10} ) + +inherit meson-multilib optfeature python-any-r1 udev + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" + inherit git-r3 +else + SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +fi + +DESCRIPTION="Multimedia processing graphs" +HOMEPAGE="https://pipewire.org/" + +LICENSE="MIT LGPL-2.1+ GPL-2" +SLOT="0/0.3" +IUSE="bluetooth doc extra gstreamer jack-client jack-sdk pipewire-alsa systemd test v4l" + +# Once replacing system JACK libraries is possible, it's likely that +# jack-client IUSE will need blocking to avoid users accidentally +# configuring their systems to send PW sink output to the emulated +# JACK's sink - doing so is likely to yield no audio, cause a CPU +# cycles consuming loop (and may even cause GUI crashes)! + +REQUIRED_USE="jack-sdk? ( !jack-client )" + +RESTRICT="!test? ( test )" + +BDEPEND=" + app-doc/xmltoman + virtual/pkgconfig + ${PYTHON_DEPS} + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) +" +RDEPEND=" + acct-group/audio + media-libs/alsa-lib + sys-apps/dbus[${MULTILIB_USEDEP}] + sys-libs/ncurses[unicode] + virtual/libintl[${MULTILIB_USEDEP}] + virtual/libudev[${MULTILIB_USEDEP}] + bluetooth? ( + media-libs/fdk-aac + media-libs/libldac + media-libs/libopenaptx + media-libs/sbc + >=net-wireless/bluez-4.101:= + ) + extra? ( + >=media-libs/libsndfile-1.0.20 + ) + gstreamer? ( + >=dev-libs/glib-2.32.0:2 + >=media-libs/gstreamer-1.10.0:1.0 + media-libs/gst-plugins-base:1.0 + ) + jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] ) + jack-sdk? ( + !media-sound/jack-audio-connection-kit + !media-sound/jack2 + ) + pipewire-alsa? ( + >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}] + || ( + media-plugins/alsa-plugins[-pulseaudio] + !media-plugins/alsa-plugins + ) + ) + !pipewire-alsa? ( media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] ) + systemd? ( sys-apps/systemd ) + v4l? ( media-libs/libv4l ) +" + +DEPEND="${RDEPEND}" + +# Present RDEPEND that are currently always disabled due to the PW +# code using them being required to be disabled by Gentoo guidelines +# (i.e. developer binaries not meant for users) and unready code +# media-video/ffmpeg:= +# media-libs/libsdl2 +# >=media-libs/vulkan-loader-1.1.69 +# +# Ditto for DEPEND +# >=dev-util/vulkan-headers-1.1.69 + +DOCS=( {README,INSTALL}.md NEWS ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch + "${FILESDIR}"/${PN}-0.3.31-revert-openaptx-restriction.patch +) + +# limitsdfile related code taken from =sys-auth/realtime-base-0.1 +# with changes as necessary. +limitsdfile=40-${PN}.conf + +src_prepare() { + default + + if ! use systemd; then + # This can be applied non-conditionally but would make for a + # significantly worse user experience on systemd then. + eapply "${FILESDIR}"/${PN}-0.3.31-non-systemd-integration.patch + fi + + einfo "Generating ${limitsdfile}" + cat > ${limitsdfile} <<- EOF || die + # Start of ${limitsdfile} from ${P} + + @audio - memlock 256 + + # End of ${limitsdfile} from ${P} + EOF +} + +multilib_src_configure() { + local emesonargs=( + -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} + $(meson_native_use_feature doc docs) + $(meson_native_enabled examples) # Disabling this implicitly disables -Dmedia-session + $(meson_native_enabled media-session) + $(meson_native_enabled man) + $(meson_feature test tests) + -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests + $(meson_native_use_feature gstreamer) + $(meson_native_use_feature gstreamer gstreamer-device-provider) + $(meson_native_use_feature systemd) + -Dsystemd-system-service=disabled # Matches upstream + $(meson_native_use_feature systemd systemd-user-service) + $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph + -Dspa-plugins=enabled + -Dalsa=enabled # Allows using kernel ALSA for sound I/O (-Dmedia-session depends on this) + -Daudiomixer=enabled # Matches upstream + -Daudioconvert=enabled # Matches upstream + $(meson_native_use_feature bluetooth bluez5) + $(meson_native_use_feature bluetooth bluez5-backend-hsp-native) + $(meson_native_use_feature bluetooth bluez5-backend-hfp-native) + $(meson_native_use_feature bluetooth bluez5-backend-ofono) + $(meson_native_use_feature bluetooth bluez5-backend-hsphfpd) + $(meson_native_use_feature bluetooth bluez5-codec-aac) + $(meson_native_use_feature bluetooth bluez5-codec-aptx) + $(meson_native_use_feature bluetooth bluez5-codec-ldac) + -Dcontrol=enabled # Matches upstream + -Daudiotestsrc=enabled # Matches upstream + -Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020 + -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph + $(meson_native_use_feature jack-client jack) # Allows PW to act as a JACK client + $(meson_feature jack-sdk jack-devel) + $(usex jack-sdk "-Dlibjack-path=${EPREFIX}/usr/$(get_libdir)" '') + -Dsupport=enabled # Miscellaneous/common plugins, such as null sink + -Devl=disabled # Matches upstream + -Dtest=disabled # fakesink and fakesource plugins + $(meson_native_use_feature v4l v4l2) + -Dlibcamera=disabled # libcamera is not in Portage tree + -Dvideoconvert=enabled # Matches upstream + -Dvideotestsrc=enabled # Matches upstream + -Dvolume=enabled # Matches upstream + -Dvulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream) + $(meson_native_use_feature extra pw-cat) + -Dudev=enabled + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + -Dsdl2=disabled # Controls SDL2 dependent code (currently only examples when -Dinstalled_tests=enabled which we never install) + $(meson_native_use_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) + ) + + meson_src_configure +} + +multilib_src_install() { + # Our customs DOCS do not exist in multilib source directory + DOCS= meson_src_install +} + +multilib_src_install_all() { + einstalldocs + + insinto /etc/security/limits.d + doins ${limitsdfile} + + if use pipewire-alsa; then + dodir /etc/alsa/conf.d + # These will break if someone has /etc that is a symbol link to a subfolder! See #724222 + # And the current dosym8 -r implementation is likely affected by the same issue, too. + dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf + dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/99-pipewire-default.conf + fi + + if ! use systemd; then + insinto /etc/xdg/autostart + newins "${FILESDIR}"/pipewire.desktop pipewire.desktop + + exeinto /usr/libexec + newexe "${FILESDIR}"/pipewire-launcher.sh pipewire-launcher + fi +} + +pkg_postinst() { + elog "It is recommended to raise RLIMIT_MEMLOCK to 256 for users" + elog "using PipeWire. Do it either manually or add yourself" + elog "to the 'audio' group:" + elog + elog " usermod -aG audio " + elog + + if ! use jack-sdk; then + elog "JACK emulation is incomplete and not all programs will work. PipeWire's" + elog "alternative libraries have been installed to a non-default location." + elog "To use them, put pw-jack before every JACK application." + elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack" + elog "provider is still needed to compile the JACK applications themselves." + elog + fi + + if use systemd; then + elog "To use PipeWire for audio, the user units must be manually enabled:" + elog + elog " systemctl --user enable pipewire.socket pipewire-pulse.socket" + elog + elog "When switching from PulseAudio, do not forget to disable PulseAudio:" + elog + elog " systemctl --user disable pulseaudio.service pulseaudio.socket" + elog + elog "A reboot is recommended to avoid interferences from still running" + elog "PulseAudio daemon." + elog + elog "Both, new users and those upgrading, need to enable pipewire-media-session:" + elog + elog " systemctl --user enable pipewire-media-session.service" + elog + elog "NOTE: This is not required when using PipeWire only for screencasting." + elog + else + elog "This ebuild auto-enables PulseAudio replacement. Because of that, users" + elog "are recommended to edit: ${EROOT}/etc/pulse/client.conf and disable " + elog "autospawn'ing of the original daemon by setting:" + elog + elog " autospawn = no" + elog + elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!" + elog + elog "Alternatively, if replacing PulseAudio daemon is not desired, edit" + elog "${EROOT}/etc/pipewire/pipewire.conf by commenting out the relevant" + elog "command near the end of the file:" + elog + elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }" + elog + elog "NOTE:" + elog "Starting with PipeWire-0.3.30, package is no longer installing config" + elog "into ${EROOT}/etc/pipewire by default. In case you need to change" + elog "config, please start by copying default config from ${EROOT}/usr/share/pipewire" + elog "and just override sections you want to change." + fi + + elog "For latest tips and tricks, troubleshooting information and documentation" + elog "in general, please refer to https://wiki.gentoo.org/wiki/PipeWire" + elog + + optfeature_header "The following can be installed for optional runtime features:" + optfeature "restricted realtime capabilities vai D-Bus" sys-auth/rtkit + # Once hsphfpd lands in tree, both it and ofono will need to be checked for presence here! + if use bluetooth; then + optfeature "better BT headset support (daemon startup required)" net-misc/ofono + #optfeature "an oFono alternative (not packaged)" foo-bar/hsphfpd + fi +} diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-9999.ebuild index 4520c8074913..29da21cf2dc0 100644 --- a/media-video/pipewire/pipewire-9999.ebuild +++ b/media-video/pipewire/pipewire-9999.ebuild @@ -20,7 +20,7 @@ HOMEPAGE="https://pipewire.org/" LICENSE="MIT LGPL-2.1+ GPL-2" SLOT="0/0.3" -IUSE="aac aptx bluetooth doc extra gstreamer jack-client jack-sdk ldac pipewire-alsa systemd test v4l" +IUSE="bluetooth doc extra gstreamer jack-client jack-sdk pipewire-alsa systemd test v4l" # Once replacing system JACK libraries is possible, it's likely that # jack-client IUSE will need blocking to avoid users accidentally @@ -28,12 +28,7 @@ IUSE="aac aptx bluetooth doc extra gstreamer jack-client jack-sdk ldac pipewire- # JACK's sink - doing so is likely to yield no audio, cause a CPU # cycles consuming loop (and may even cause GUI crashes)! -REQUIRED_USE=" - aac? ( bluetooth ) - aptx? ( bluetooth ) - jack-sdk? ( !jack-client ) - ldac? ( bluetooth ) -" +REQUIRED_USE="jack-sdk? ( !jack-client )" RESTRICT="!test? ( test )" @@ -54,9 +49,9 @@ RDEPEND=" virtual/libintl[${MULTILIB_USEDEP}] virtual/libudev[${MULTILIB_USEDEP}] bluetooth? ( - aac? ( media-libs/fdk-aac ) - aptx? ( media-libs/libopenaptx ) - ldac? ( media-libs/libldac ) + media-libs/fdk-aac + media-libs/libldac + media-libs/libopenaptx media-libs/sbc >=net-wireless/bluez-4.101:= ) @@ -151,9 +146,9 @@ multilib_src_configure() { $(meson_native_use_feature bluetooth bluez5-backend-hfp-native) $(meson_native_use_feature bluetooth bluez5-backend-ofono) $(meson_native_use_feature bluetooth bluez5-backend-hsphfpd) - $(meson_native_use_feature aac bluez5-codec-aac) - $(meson_native_use_feature aptx bluez5-codec-aptx) - $(meson_native_use_feature ldac bluez5-codec-ldac) + $(meson_native_use_feature bluetooth bluez5-codec-aac) + $(meson_native_use_feature bluetooth bluez5-codec-aptx) + $(meson_native_use_feature bluetooth bluez5-codec-ldac) -Dcontrol=enabled # Matches upstream -Daudiotestsrc=enabled # Matches upstream -Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020 @@ -258,6 +253,11 @@ pkg_postinst() { elog elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }" elog + elog "NOTE:" + elog "Starting with PipeWire-0.3.30, package is no longer installing config" + elog "into ${EROOT}/etc/pipewire by default. In case you need to change" + elog "config, please start by copying default config from ${EROOT}/usr/share/pipewire" + elog "and just override sections you want to change." fi elog "For latest tips and tricks, troubleshooting information and documentation" -- cgit v1.2.3