From b49088575eb777ced2551f484da86317332d6087 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 24 Jul 2021 02:11:45 +0100 Subject: gentoo resync : 24.07.2021 --- media-video/pipewire/Manifest | 18 +- media-video/pipewire/pipewire-0.3.25-r1.ebuild | 236 +++++++++++++++++++++ media-video/pipewire/pipewire-0.3.25.ebuild | 236 --------------------- media-video/pipewire/pipewire-0.3.26-r1.ebuild | 243 ++++++++++++++++++++++ media-video/pipewire/pipewire-0.3.26.ebuild | 243 ---------------------- media-video/pipewire/pipewire-0.3.27-r1.ebuild | 269 ------------------------ media-video/pipewire/pipewire-0.3.27-r2.ebuild | 269 ++++++++++++++++++++++++ media-video/pipewire/pipewire-0.3.28-r1.ebuild | 270 ++++++++++++++++++++++++ media-video/pipewire/pipewire-0.3.28.ebuild | 270 ------------------------ media-video/pipewire/pipewire-0.3.29-r1.ebuild | 271 ++++++++++++++++++++++++ media-video/pipewire/pipewire-0.3.29.ebuild | 271 ------------------------ media-video/pipewire/pipewire-0.3.30-r1.ebuild | 274 ------------------------- media-video/pipewire/pipewire-0.3.30-r2.ebuild | 274 +++++++++++++++++++++++++ media-video/pipewire/pipewire-0.3.31-r1.ebuild | 274 +++++++++++++++++++++++++ media-video/pipewire/pipewire-0.3.31.ebuild | 274 ------------------------- media-video/pipewire/pipewire-0.3.32.ebuild | 272 ++++++++++++++++++++++++ media-video/pipewire/pipewire-9999.ebuild | 4 +- 17 files changed, 2120 insertions(+), 1848 deletions(-) create mode 100644 media-video/pipewire/pipewire-0.3.25-r1.ebuild delete mode 100644 media-video/pipewire/pipewire-0.3.25.ebuild create mode 100644 media-video/pipewire/pipewire-0.3.26-r1.ebuild delete mode 100644 media-video/pipewire/pipewire-0.3.26.ebuild delete mode 100644 media-video/pipewire/pipewire-0.3.27-r1.ebuild create mode 100644 media-video/pipewire/pipewire-0.3.27-r2.ebuild create mode 100644 media-video/pipewire/pipewire-0.3.28-r1.ebuild delete mode 100644 media-video/pipewire/pipewire-0.3.28.ebuild create mode 100644 media-video/pipewire/pipewire-0.3.29-r1.ebuild delete mode 100644 media-video/pipewire/pipewire-0.3.29.ebuild delete mode 100644 media-video/pipewire/pipewire-0.3.30-r1.ebuild create mode 100644 media-video/pipewire/pipewire-0.3.30-r2.ebuild create mode 100644 media-video/pipewire/pipewire-0.3.31-r1.ebuild delete mode 100644 media-video/pipewire/pipewire-0.3.31.ebuild create mode 100644 media-video/pipewire/pipewire-0.3.32.ebuild (limited to 'media-video/pipewire') diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest index 1786062e4d25..3c49aa49dfe9 100644 --- a/media-video/pipewire/Manifest +++ b/media-video/pipewire/Manifest @@ -15,13 +15,15 @@ DIST pipewire-0.3.28.tar.gz 1474219 BLAKE2B d20b39c8ed49cd44f2109aab6453aac547ff 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 +DIST pipewire-0.3.32.tar.gz 1604622 BLAKE2B cab83a17a2b27f710e1377a2ad2ad7003053ef3e8b55423362f0b428e22d52c2ce564da00aab71cc93262d4cb21f239fffea195d05937fdf3489dc540b77d58d SHA512 8a7fe26a78071fdd8d4c9e2d9bf3791af8e0cb53b976b45d39dcab4ad08196808f416911fb1b366cc85e3fa80592ec79c4e4556bb3a390f4a10229b4bf9893f7 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-r1.ebuild 9672 BLAKE2B 7ce9271b57e764142166d4a527d2bdf19152d940bcb06761d4e3da38451c356f246186f82a2448f3b9d35b71e6ea3abb5c0acfbddbf39b0fb32258899cceddf2 SHA512 50a032216f076ed6341ac10b4ccf13565047cb28da54d2f32d4e7d7b87e2a0915ac0ccb8601f9f1cbab3f023f4f2dea5a18c5a494a6813f40c79da44870cac97 -EBUILD pipewire-0.3.31.ebuild 9676 BLAKE2B 9629c2dd52835484d9dc6ea149213ba832a76f03344a6098a4207a2e501d5066b2872c6adcde9d0f1dd937f7dafa1f37fba85a974d72b69777f720d15be9b02b SHA512 29f4cdb87ca7f3acf8474c4b86b30ed1db065d5071eb50aafb5f48d490180e8875b8008d168ec8e6f03ed465a90fbb79d9bfc81159c3650ea7d5d305baa7a485 -EBUILD pipewire-9999.ebuild 9676 BLAKE2B 9629c2dd52835484d9dc6ea149213ba832a76f03344a6098a4207a2e501d5066b2872c6adcde9d0f1dd937f7dafa1f37fba85a974d72b69777f720d15be9b02b SHA512 29f4cdb87ca7f3acf8474c4b86b30ed1db065d5071eb50aafb5f48d490180e8875b8008d168ec8e6f03ed465a90fbb79d9bfc81159c3650ea7d5d305baa7a485 +EBUILD pipewire-0.3.25-r1.ebuild 8591 BLAKE2B 4ed730cd42404fc94e7665c6ee07e9548e1d5e363f74af0a52ff488e005d6f582081f6ceef383f84e8c378c833f2406646c7b3b84e50074a9519ffeb49912b8a SHA512 5541d51a4888f753f0c463fb54009b5aabe45047df2b7b53c6016abc2481be589067bb0ecf4ee79c64a1ae2d4b06254e6b61f210a9737ee57a159da332bc3820 +EBUILD pipewire-0.3.26-r1.ebuild 8742 BLAKE2B 112df615c5e4549c2d3d44e19f45d48eb1787d4570c6e4ec5041775b3e67c2c010586ffdcccd29a8a8fd521a1b73303ab3086aaa3c5d7b6a11b4db67063fba71 SHA512 20d607009548c323e704cd33b07e0437b9ad9d1ec8a7eff895b558d1825b596550c78a956dbf7ddb9bd7e8aa312271f04c7969577180151d00e27b5128f62317 +EBUILD pipewire-0.3.27-r2.ebuild 9303 BLAKE2B 692ca1e00160f1c07f9962e1b9c22ba6185e4d97298084ef295b5688b79fa1d9b573f675c7d2a25e28001cd0ca6becba2da4e71243354dfdd41b3f97d364bc18 SHA512 128349b662a3f25159f072d998f14291db8185e3d39dfd1c5f081eb54b55bb96204cb34ad478e6f4568df3ea86b0ad68f1fd4673ab776dd49a85351bfa4cb7f4 +EBUILD pipewire-0.3.28-r1.ebuild 9375 BLAKE2B 8c48d0a74514ffb887696a078c20f8c52f583b7ad376b8493b796a5a173bf179c2927f7c04ada6a37a1e8708e3137680b958779652b475b43ae26e56d8adf98f SHA512 7961c80768d42f41a18c814cac91b36504a68f21940b30795e3eaf26b49039f43a64a30855b1789cd35f04fe89ed337fa0828f68dad68e1a9b5d67ec7c3bc1fd +EBUILD pipewire-0.3.29-r1.ebuild 9394 BLAKE2B f14cffd0a50e2405795c56ad277c53e52e1b2b0121f4c0c207246b69f0a3029c67632b664438f15c34cc2f71681d9f8083e2a420d2c2018198d3b61eb127cc43 SHA512 b32f48d64b899a99a6fef1c7fd8045ffda792588950607c568ad14df18ae52731f001bc96c88c6da66e7c8d3ec3615a15f3da4136fc166e2958633514fdbe9aa +EBUILD pipewire-0.3.30-r2.ebuild 9677 BLAKE2B 62e6ec28bf67661acc51f067e298f451ec6331a445ff8963307ea85c08b87dbb596ae16432405d5273bf561f2ed3afe87164070a5ec36dfd7cb16e0d1b6f3c4d SHA512 5075db1140d524776ae7e8503298c10eaea0bf3e5b8bf81dd9c7f34a142072d7c294363eb67f21481697c6487ebaeb6c45882bb25f9d73b7ff363a50cfc46711 +EBUILD pipewire-0.3.31-r1.ebuild 9681 BLAKE2B 539e8528f06605c1874194f9e01d92e6a1e35550c9f177964010a5b39a80ffb027adba89b2aa6ca8a2f59c419e0ed383c96102e62368fa1a9402dfa55a70dabf SHA512 595f83d2f06fc36d5fe83cbc054da9c20f555a28eb443ae40d0b49ba07ad73b0608abfa638285b015117c09d0024760b6493a6c7b2dc435e17412d8326dfbdd8 +EBUILD pipewire-0.3.32.ebuild 9594 BLAKE2B 3e0195e9aeb8e4c2d8c9258d3597c575eb4e7d4a6812fc5479ffd8007bf3eaf8faccd58013fa3e59ba23d7843094e2ab72feb89ce2c4ced6f24ac8e1b887ab2d SHA512 829cbdde885e5d0a72f2a30f2d69058308bdee8ac79c0b001775d36efcbf616c347c0c7b555c5966883fd5fdc4a60303d0ff6ba42f0026eaeabde509a4fc6ba7 +EBUILD pipewire-9999.ebuild 9594 BLAKE2B 3e0195e9aeb8e4c2d8c9258d3597c575eb4e7d4a6812fc5479ffd8007bf3eaf8faccd58013fa3e59ba23d7843094e2ab72feb89ce2c4ced6f24ac8e1b887ab2d SHA512 829cbdde885e5d0a72f2a30f2d69058308bdee8ac79c0b001775d36efcbf616c347c0c7b555c5966883fd5fdc4a60303d0ff6ba42f0026eaeabde509a4fc6ba7 MISC metadata.xml 1600 BLAKE2B 1138c789841fae8ea509ba2becdfef8376b87525b5b1822854ca083ab49e63124cbde6d8064849e0114a0e39269f63cf76d63f49396d709f6b3da865cf539487 SHA512 5ca5105edecf2515049b61e71327236c3e0fd949a25e91a9ed9dc0a9ad5d9d66f0b99329276c824e8840352b699bb9995b9ae073b43f30f87f4a8cc4bc4237a5 diff --git a/media-video/pipewire/pipewire-0.3.25-r1.ebuild b/media-video/pipewire/pipewire-0.3.25-r1.ebuild new file mode 100644 index 000000000000..83afc679686b --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.25-r1.ebuild @@ -0,0 +1,236 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit meson optfeature udev + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" +# EGIT_BRANCH="master" + 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="LGPL-2.1+" +SLOT="0/0.3" +IUSE="aac aptx bluetooth doc extra gstreamer jack-client 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 ) + ldac? ( bluetooth ) +" + +BDEPEND=" + app-doc/xmltoman + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) +" +RDEPEND=" + media-libs/alsa-lib + sys-apps/dbus + sys-libs/ncurses:=[unicode(+)] + virtual/libudev + 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] ) + pipewire-alsa? ( + >=media-libs/alsa-lib-1.1.7 + || ( + media-plugins/alsa-plugins[-pulseaudio] + !media-plugins/alsa-plugins + ) + ) + !pipewire-alsa? ( media-plugins/alsa-plugins[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 ) + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.3.25-fix-docdir-path.patch + "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.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 +} + +src_configure() { + local emesonargs=( + -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} + $(meson_feature doc docs) + -Dexamples=enabled # Disabling this implicitly disables -Dmedia-session (not good) + -Dmedia-session=enabled + -Dman=enabled + $(meson_feature test tests) + -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests + $(meson_feature gstreamer) + $(meson_feature gstreamer gstreamer-device-provider) + $(meson_feature systemd) # Also covers logind integration + -Dsystemd-system-service=disabled # Matches upstream + $(meson_feature systemd systemd-user-service) + $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph + -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph + #-Dlibjack-path="" # Where to install libjack.so et al (if an absolute path is used, remember to prefix it with ${EROOT} or similar!); setting this will also break pw-jack's multilib support (but presumably that's okay as the intended use would be to replace system's libraries making the loader irrelevant) + -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_feature bluetooth bluez5) + $(meson_feature bluetooth bluez5-backend-hsp-native) + $(meson_feature bluetooth bluez5-backend-hfp-native) + $(meson_feature bluetooth bluez5-backend-ofono) + $(meson_feature bluetooth bluez5-backend-hsphfpd) + $(meson_feature aac bluez5-codec-aac) + $(meson_feature aptx bluez5-codec-aptx) + $(meson_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 + $(meson_feature jack-client jack) # Allows PW to act as a JACK client + -Dsupport=enabled # Miscellaneous/common plugins, such as null sink + -Devl=disabled # Matches upstream + -Dtest=disabled # fakesink and fakesource plugins + $(meson_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_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_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) + ) + meson_src_configure +} + +src_compile() { + meson_src_compile + + einfo "Generating ${limitsdfile}" + cat > ${limitsdfile} <<- EOF || die + # Start of ${limitsdfile} from ${P} + + 1000:60000 - memlock 256 + + # End of ${limitsdfile} from ${P} + EOF +} + +src_install() { + meson_src_install + + 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 +} + +pkg_postinst() { + if ! use pipewire-alsa; then + elog "Contrary to what some online resources may suggest, avoid setting" + elog "PULSE_LATENCY_MSEC environment variable since it may break ALSA clients." + elog + fi + + 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 + + if use systemd; then + elog "Per Gentoo policy installed systemd units must be manually enabled:" + elog "systemctl --user disable pulseaudio.service pulseaudio.socket" + elog "systemctl --user enable pipewire.socket pipewire-pulse.socket" + elog "Rebooting is strongly recommended to avoid surprises from" + elog "remnant PulseAudio daemon auto-spawning and surviving logouts." + elog + ewarn "Both new users and those upgrading need to enable pipewire-media-session:" + ewarn "systemctl --user enable pipewire-media-session.service" + 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 "autospawn = no" + 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" + elog "by commenting out the relevant command near the end of the file:" + elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }" + elog + elog "It is still necessary to manually enable PipeWire startup. Setup specific" + elog "instructions can be found at: https://wiki.gentoo.org/wiki/PipeWire" + fi + + 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.25.ebuild b/media-video/pipewire/pipewire-0.3.25.ebuild deleted file mode 100644 index 92606ca61dec..000000000000 --- a/media-video/pipewire/pipewire-0.3.25.ebuild +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit meson optfeature udev - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" -# EGIT_BRANCH="master" - 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="LGPL-2.1+" -SLOT="0/0.3" -IUSE="aac aptx bluetooth doc extra gstreamer jack-client 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 ) - ldac? ( bluetooth ) -" - -BDEPEND=" - app-doc/xmltoman - doc? ( - app-doc/doxygen - media-gfx/graphviz - ) -" -RDEPEND=" - media-libs/alsa-lib - sys-apps/dbus - sys-libs/ncurses[unicode] - virtual/libudev - 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] ) - pipewire-alsa? ( - >=media-libs/alsa-lib-1.1.7 - || ( - media-plugins/alsa-plugins[-pulseaudio] - !media-plugins/alsa-plugins - ) - ) - !pipewire-alsa? ( media-plugins/alsa-plugins[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 ) - -RESTRICT="!test? ( test )" - -PATCHES=( - "${FILESDIR}"/${PN}-0.3.25-fix-docdir-path.patch - "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.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 -} - -src_configure() { - local emesonargs=( - -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} - $(meson_feature doc docs) - -Dexamples=enabled # Disabling this implicitly disables -Dmedia-session (not good) - -Dmedia-session=enabled - -Dman=enabled - $(meson_feature test tests) - -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests - $(meson_feature gstreamer) - $(meson_feature gstreamer gstreamer-device-provider) - $(meson_feature systemd) # Also covers logind integration - -Dsystemd-system-service=disabled # Matches upstream - $(meson_feature systemd systemd-user-service) - $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph - -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph - #-Dlibjack-path="" # Where to install libjack.so et al (if an absolute path is used, remember to prefix it with ${EROOT} or similar!); setting this will also break pw-jack's multilib support (but presumably that's okay as the intended use would be to replace system's libraries making the loader irrelevant) - -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_feature bluetooth bluez5) - $(meson_feature bluetooth bluez5-backend-hsp-native) - $(meson_feature bluetooth bluez5-backend-hfp-native) - $(meson_feature bluetooth bluez5-backend-ofono) - $(meson_feature bluetooth bluez5-backend-hsphfpd) - $(meson_feature aac bluez5-codec-aac) - $(meson_feature aptx bluez5-codec-aptx) - $(meson_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 - $(meson_feature jack-client jack) # Allows PW to act as a JACK client - -Dsupport=enabled # Miscellaneous/common plugins, such as null sink - -Devl=disabled # Matches upstream - -Dtest=disabled # fakesink and fakesource plugins - $(meson_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_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_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) - ) - meson_src_configure -} - -src_compile() { - meson_src_compile - - einfo "Generating ${limitsdfile}" - cat > ${limitsdfile} <<- EOF || die - # Start of ${limitsdfile} from ${P} - - 1000:60000 - memlock 256 - - # End of ${limitsdfile} from ${P} - EOF -} - -src_install() { - meson_src_install - - 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 -} - -pkg_postinst() { - if ! use pipewire-alsa; then - elog "Contrary to what some online resources may suggest, avoid setting" - elog "PULSE_LATENCY_MSEC environment variable since it may break ALSA clients." - elog - fi - - 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 - - if use systemd; then - elog "Per Gentoo policy installed systemd units must be manually enabled:" - elog "systemctl --user disable pulseaudio.service pulseaudio.socket" - elog "systemctl --user enable pipewire.socket pipewire-pulse.socket" - elog "Rebooting is strongly recommended to avoid surprises from" - elog "remnant PulseAudio daemon auto-spawning and surviving logouts." - elog - ewarn "Both new users and those upgrading need to enable pipewire-media-session:" - ewarn "systemctl --user enable pipewire-media-session.service" - 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 "autospawn = no" - 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" - elog "by commenting out the relevant command near the end of the file:" - elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }" - elog - elog "It is still necessary to manually enable PipeWire startup. Setup specific" - elog "instructions can be found at: https://wiki.gentoo.org/wiki/PipeWire" - fi - - 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.26-r1.ebuild b/media-video/pipewire/pipewire-0.3.26-r1.ebuild new file mode 100644 index 000000000000..56accd5f5077 --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.26-r1.ebuild @@ -0,0 +1,243 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit meson optfeature udev + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" +# EGIT_BRANCH="master" + 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="LGPL-2.1+" +SLOT="0/0.3" +IUSE="aac aptx bluetooth doc extra gstreamer jack-client 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 ) + ldac? ( bluetooth ) +" + +BDEPEND=" + app-doc/xmltoman + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) +" +RDEPEND=" + media-libs/alsa-lib + sys-apps/dbus + sys-libs/ncurses:=[unicode(+)] + virtual/libudev + 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] ) + pipewire-alsa? ( + >=media-libs/alsa-lib-1.1.7 + || ( + media-plugins/alsa-plugins[-pulseaudio] + !media-plugins/alsa-plugins + ) + ) + !pipewire-alsa? ( media-plugins/alsa-plugins[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 ) + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.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 +} + +src_configure() { + local emesonargs=( + -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} + $(meson_feature doc docs) + -Dexamples=enabled # Disabling this implicitly disables -Dmedia-session (not good) + -Dmedia-session=enabled + -Dman=enabled + $(meson_feature test tests) + -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests + $(meson_feature gstreamer) + $(meson_feature gstreamer gstreamer-device-provider) + $(meson_feature systemd) # Also covers logind integration + -Dsystemd-system-service=disabled # Matches upstream + $(meson_feature systemd systemd-user-service) + $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph + -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph + #-Dlibjack-path="" # Where to install libjack.so et al (if an absolute path is used, remember to prefix it with ${EROOT} or similar!); setting this will also break pw-jack's multilib support (but presumably that's okay as the intended use would be to replace system's libraries making the loader irrelevant) + -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_feature bluetooth bluez5) + $(meson_feature bluetooth bluez5-backend-hsp-native) + $(meson_feature bluetooth bluez5-backend-hfp-native) + $(meson_feature bluetooth bluez5-backend-ofono) + $(meson_feature bluetooth bluez5-backend-hsphfpd) + $(meson_feature aac bluez5-codec-aac) + $(meson_feature aptx bluez5-codec-aptx) + $(meson_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 + $(meson_feature jack-client jack) # Allows PW to act as a JACK client + -Dsupport=enabled # Miscellaneous/common plugins, such as null sink + -Devl=disabled # Matches upstream + -Dtest=disabled # fakesink and fakesource plugins + $(meson_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_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_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) + ) + meson_src_configure +} + +src_compile() { + meson_src_compile + + einfo "Generating ${limitsdfile}" + cat > ${limitsdfile} <<- EOF || die + # Start of ${limitsdfile} from ${P} + + 1000:60000 - memlock 256 + + # End of ${limitsdfile} from ${P} + EOF +} + +src_install() { + meson_src_install + + 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() { + if ! use pipewire-alsa; then + elog "Contrary to what some online resources may suggest, avoid setting" + elog "PULSE_LATENCY_MSEC environment variable since it may break ALSA clients." + elog + fi + + 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 + + if use systemd; then + elog "Per Gentoo policy installed systemd units must be manually enabled:" + elog "systemctl --user disable pulseaudio.service pulseaudio.socket" + elog "systemctl --user enable pipewire.socket pipewire-pulse.socket" + elog "Rebooting is strongly recommended to avoid surprises from" + elog "remnant PulseAudio daemon auto-spawning and surviving logouts." + elog + ewarn "Both new users and those upgrading need to enable pipewire-media-session:" + ewarn "systemctl --user enable pipewire-media-session.service" + 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 "autospawn = no" + 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" + elog "by commenting out the relevant command near the end of the file:" + elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }" + elog + elog "It is still necessary to manually enable PipeWire startup. Setup specific" + elog "instructions can be found at: https://wiki.gentoo.org/wiki/PipeWire" + fi + + 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.26.ebuild b/media-video/pipewire/pipewire-0.3.26.ebuild deleted file mode 100644 index 932a2e4cc0b6..000000000000 --- a/media-video/pipewire/pipewire-0.3.26.ebuild +++ /dev/null @@ -1,243 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit meson optfeature udev - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" -# EGIT_BRANCH="master" - 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="LGPL-2.1+" -SLOT="0/0.3" -IUSE="aac aptx bluetooth doc extra gstreamer jack-client 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 ) - ldac? ( bluetooth ) -" - -BDEPEND=" - app-doc/xmltoman - doc? ( - app-doc/doxygen - media-gfx/graphviz - ) -" -RDEPEND=" - media-libs/alsa-lib - sys-apps/dbus - sys-libs/ncurses[unicode] - virtual/libudev - 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] ) - pipewire-alsa? ( - >=media-libs/alsa-lib-1.1.7 - || ( - media-plugins/alsa-plugins[-pulseaudio] - !media-plugins/alsa-plugins - ) - ) - !pipewire-alsa? ( media-plugins/alsa-plugins[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 ) - -RESTRICT="!test? ( test )" - -PATCHES=( - "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.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 -} - -src_configure() { - local emesonargs=( - -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} - $(meson_feature doc docs) - -Dexamples=enabled # Disabling this implicitly disables -Dmedia-session (not good) - -Dmedia-session=enabled - -Dman=enabled - $(meson_feature test tests) - -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests - $(meson_feature gstreamer) - $(meson_feature gstreamer gstreamer-device-provider) - $(meson_feature systemd) # Also covers logind integration - -Dsystemd-system-service=disabled # Matches upstream - $(meson_feature systemd systemd-user-service) - $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph - -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph - #-Dlibjack-path="" # Where to install libjack.so et al (if an absolute path is used, remember to prefix it with ${EROOT} or similar!); setting this will also break pw-jack's multilib support (but presumably that's okay as the intended use would be to replace system's libraries making the loader irrelevant) - -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_feature bluetooth bluez5) - $(meson_feature bluetooth bluez5-backend-hsp-native) - $(meson_feature bluetooth bluez5-backend-hfp-native) - $(meson_feature bluetooth bluez5-backend-ofono) - $(meson_feature bluetooth bluez5-backend-hsphfpd) - $(meson_feature aac bluez5-codec-aac) - $(meson_feature aptx bluez5-codec-aptx) - $(meson_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 - $(meson_feature jack-client jack) # Allows PW to act as a JACK client - -Dsupport=enabled # Miscellaneous/common plugins, such as null sink - -Devl=disabled # Matches upstream - -Dtest=disabled # fakesink and fakesource plugins - $(meson_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_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_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) - ) - meson_src_configure -} - -src_compile() { - meson_src_compile - - einfo "Generating ${limitsdfile}" - cat > ${limitsdfile} <<- EOF || die - # Start of ${limitsdfile} from ${P} - - 1000:60000 - memlock 256 - - # End of ${limitsdfile} from ${P} - EOF -} - -src_install() { - meson_src_install - - 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() { - if ! use pipewire-alsa; then - elog "Contrary to what some online resources may suggest, avoid setting" - elog "PULSE_LATENCY_MSEC environment variable since it may break ALSA clients." - elog - fi - - 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 - - if use systemd; then - elog "Per Gentoo policy installed systemd units must be manually enabled:" - elog "systemctl --user disable pulseaudio.service pulseaudio.socket" - elog "systemctl --user enable pipewire.socket pipewire-pulse.socket" - elog "Rebooting is strongly recommended to avoid surprises from" - elog "remnant PulseAudio daemon auto-spawning and surviving logouts." - elog - ewarn "Both new users and those upgrading need to enable pipewire-media-session:" - ewarn "systemctl --user enable pipewire-media-session.service" - 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 "autospawn = no" - 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" - elog "by commenting out the relevant command near the end of the file:" - elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }" - elog - elog "It is still necessary to manually enable PipeWire startup. Setup specific" - elog "instructions can be found at: https://wiki.gentoo.org/wiki/PipeWire" - fi - - 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.27-r1.ebuild b/media-video/pipewire/pipewire-0.3.27-r1.ebuild deleted file mode 100644 index b3b112d4c875..000000000000 --- a/media-video/pipewire/pipewire-0.3.27-r1.ebuild +++ /dev/null @@ -1,269 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit meson-multilib optfeature 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="LGPL-2.1+" -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 - 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 -) - -# 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.27-r2.ebuild b/media-video/pipewire/pipewire-0.3.27-r2.ebuild new file mode 100644 index 000000000000..990c290d7d21 --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.27-r2.ebuild @@ -0,0 +1,269 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit meson-multilib optfeature 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="LGPL-2.1+" +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 + 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 +) + +# 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.28-r1.ebuild b/media-video/pipewire/pipewire-0.3.28-r1.ebuild new file mode 100644 index 000000000000..e45f023b6a0e --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.28-r1.ebuild @@ -0,0 +1,270 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit meson-multilib optfeature 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 + 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.28-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.28.ebuild b/media-video/pipewire/pipewire-0.3.28.ebuild deleted file mode 100644 index af219402bdc9..000000000000 --- a/media-video/pipewire/pipewire-0.3.28.ebuild +++ /dev/null @@ -1,270 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit meson-multilib optfeature 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 - 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.28-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.29-r1.ebuild b/media-video/pipewire/pipewire-0.3.29-r1.ebuild new file mode 100644 index 000000000000..94c7194ef130 --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.29-r1.ebuild @@ -0,0 +1,271 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit meson-multilib optfeature 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 + 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.29.ebuild b/media-video/pipewire/pipewire-0.3.29.ebuild deleted file mode 100644 index 80f6797bd0b5..000000000000 --- a/media-video/pipewire/pipewire-0.3.29.ebuild +++ /dev/null @@ -1,271 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit meson-multilib optfeature 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 - 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.30-r1.ebuild b/media-video/pipewire/pipewire-0.3.30-r1.ebuild deleted file mode 100644 index cd67e12343ca..000000000000 --- a/media-video/pipewire/pipewire-0.3.30-r1.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="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-r2.ebuild b/media-video/pipewire/pipewire-0.3.30-r2.ebuild new file mode 100644 index 000000000000..4017b4dbc693 --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.30-r2.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.31-r1.ebuild b/media-video/pipewire/pipewire-0.3.31-r1.ebuild new file mode 100644 index 000000000000..a4448bb20cdc --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.31-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.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-0.3.31.ebuild b/media-video/pipewire/pipewire-0.3.31.ebuild deleted file mode 100644 index 29da21cf2dc0..000000000000 --- a/media-video/pipewire/pipewire-0.3.31.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="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-0.3.32.ebuild b/media-video/pipewire/pipewire-0.3.32.ebuild new file mode 100644 index 000000000000..ca8a33f0f304 --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.32.ebuild @@ -0,0 +1,272 @@ +# 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 + 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 29da21cf2dc0..ca8a33f0f304 100644 --- a/media-video/pipewire/pipewire-9999.ebuild +++ b/media-video/pipewire/pipewire-9999.ebuild @@ -45,7 +45,7 @@ RDEPEND=" acct-group/audio media-libs/alsa-lib sys-apps/dbus[${MULTILIB_USEDEP}] - sys-libs/ncurses[unicode] + sys-libs/ncurses:=[unicode(+)] virtual/libintl[${MULTILIB_USEDEP}] virtual/libudev[${MULTILIB_USEDEP}] bluetooth? ( @@ -236,8 +236,6 @@ pkg_postinst() { 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 " -- cgit v1.2.3