diff options
17 files changed, 2007 insertions, 3 deletions
diff --git a/app-editors/vscodium/Manifest b/app-editors/vscodium/Manifest index d34ed97e7e56..dbbfaa2b5077 100644 --- a/app-editors/vscodium/Manifest +++ b/app-editors/vscodium/Manifest @@ -4,3 +4,6 @@ DIST vscodium-1.82.1.23255-arm64.tar.gz 122773280 BLAKE2B b07573a00a5d151e195fe7 DIST vscodium-1.82.2.23257-amd64.tar.gz 122400212 BLAKE2B 89fc60f5e0497c9cca3addd24ba93a2d693aa5b32af07c5c4024cc5bf5aa7a7cc7edeb834d496ad213ffe1de74ed88d72d178957f43a1643bd12908179dd6597 SHA512 93dae286a111b9b2d38c845f261da49c3bddfc9276694259a2e39442fb703ba85393dd432d0a284c807bc0688735923bd5f9e797e7bc8487533b4d1503c09861 DIST vscodium-1.82.2.23257-arm.tar.gz 111018269 BLAKE2B cb46eb4754f68e4118bda7a123896b095cc3b745fa7607209d86446d7748735e854716f84932740f315469b4a09a63832c3e69e36d18c5df9b7cb3796a03d4f9 SHA512 952e19703abd7636640334fb9cc031c0d1dad3469b046bc7c4722ea9cd60617059319ef765f48b200b772e65dfcd4a19aa78c2b8d763722ab0d1a89099b990b1 DIST vscodium-1.82.2.23257-arm64.tar.gz 122786317 BLAKE2B bf89a52ec44a8fc01305adefeaadbcd3fc11029b18b994633d408389b31545c10ccbfac1e18c93e1ad9e59c7d0a17cf3eca0486c149714515a7a086262e32764 SHA512 d747679f34cad51c44a2acd55aa0a23fb0fbe1a33e017e398b5becf36d4bcc438f82fc24845977a2d3836f5bae5d10dabfaa4ba878cd86991282d18053593694 +DIST vscodium-1.83.0.23277-amd64.tar.gz 122376313 BLAKE2B 98c36ce5d49e74397b96589bbe2993e213c584a4d71a01050b15cd78b1bd103af9ed743b7c383ee85d892623ddfbc1d082d26251b3a44bb462f2033fb4ddcd22 SHA512 baea03240a667689aba508a96a482877974e2cc1c7c1ab60b5e47867f21f69921113743d31dcbcdd158755123f59b0730d2454be3b86e8af2cccd734651f08a2 +DIST vscodium-1.83.0.23277-arm.tar.gz 111010787 BLAKE2B 3a55d6f3824b5f8eedd3fa493a2db99eee490503ce97c1081deef1fe5b9dd4dadce0603cf166647a876b7db0af31145a2c8882798feff951ea1981943fa99756 SHA512 e3c8be1195576b75d6f8243d75b2c11e677f10888d8aea74025032fd7f785433987b146817fd2c8a7f52823bed3c3de4de53552403c8054c9ab4588bd685067e +DIST vscodium-1.83.0.23277-arm64.tar.gz 122765714 BLAKE2B 99a5ea23beb57f7e3383fa8af862f11d01cdf79efe6d2bea33a18267ef59f89de83262ee0e39f501525b68cb417bda2647f2a1531643dba2f1234629ff3197bb SHA512 2bec58bceb156c8ae7af2656c3b2954579ba42aea7c7a59ffbb98570046549a3b4d63395c729f5a7e223de880a4df539b2e5afcaf7508e7106f7b6af34a9cca3 diff --git a/app-editors/vscodium/vscodium-1.83.0.23277.ebuild b/app-editors/vscodium/vscodium-1.83.0.23277.ebuild new file mode 100644 index 000000000000..a5fc09b2ca4c --- /dev/null +++ b/app-editors/vscodium/vscodium-1.83.0.23277.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop pax-utils xdg optfeature + +# Usage: arch_src_uri <gentoo arch> <upstream arch> +arch_src_uri() { + echo "${1}? ( + https://github.com/VSCodium/${PN}/releases/download/${PV}/VSCodium-linux-${2}-${PV}.tar.gz + -> ${P}-${1}.tar.gz + )" +} + +DESCRIPTION="A community-driven, freely-licensed binary distribution of Microsoft's VSCode" +HOMEPAGE="https://vscodium.com/" +SRC_URI=" + $(arch_src_uri amd64 x64) + $(arch_src_uri arm armhf) + $(arch_src_uri arm64 arm64) +" +S="${WORKDIR}" + +RESTRICT="strip bindist" + +LICENSE=" + Apache-2.0 + BSD + BSD-1 + BSD-2 + BSD-4 + CC-BY-4.0 + ISC + LGPL-2.1+ + MIT + MPL-2.0 + openssl + PYTHON + TextMate-bundle + Unlicense + UoI-NCSA + W3C +" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64" +IUSE="kerberos" + +RDEPEND=" + >=app-accessibility/at-spi2-core-2.46.0:2 + app-crypt/libsecret[crypt] + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + media-libs/alsa-lib + media-libs/mesa + net-print/cups + sys-apps/util-linux + sys-apps/dbus + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3 + x11-libs/libdrm + x11-libs/libX11 + x11-libs/libxcb + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libxkbcommon + x11-libs/libxkbfile + x11-libs/libXrandr + x11-libs/libxshmfence + x11-libs/pango + kerberos? ( app-crypt/mit-krb5 ) +" + +QA_PREBUILT="*" + +src_install() { + # Cleanup + rm "${S}/resources/app/LICENSE.txt" || die + + if ! use kerberos; then + rm -r "${S}/resources/app/node_modules.asar.unpacked/kerberos" || die + fi + + # Install + pax-mark m codium + mkdir -p "${ED}/opt/${PN}" || die + cp -r . "${ED}/opt/${PN}" || die + fperms 4711 /opt/${PN}/chrome-sandbox + + dosym -r "/opt/${PN}/bin/codium" "usr/bin/vscodium" + dosym -r "/opt/${PN}/bin/codium" "usr/bin/codium" + domenu "${FILESDIR}/vscodium.desktop" + domenu "${FILESDIR}/vscodium-url-handler.desktop" + domenu "${FILESDIR}/vscodium-wayland.desktop" + domenu "${FILESDIR}/vscodium-url-handler-wayland.desktop" + newicon "resources/app/resources/linux/code.png" "vscodium.png" +} + +pkg_postinst() { + xdg_pkg_postinst + elog "When compared to the regular VSCode, VSCodium has a few quirks" + elog "More information at: https://github.com/VSCodium/vscodium/blob/master/DOCS.md" + optfeature "keyring support inside vscode" "virtual/secret-service" +} diff --git a/app-emacs/eldev/eldev-1.6.ebuild b/app-emacs/eldev/eldev-1.6.ebuild index 413e8c727a11..60daff744a6e 100644 --- a/app-emacs/eldev/eldev-1.6.ebuild +++ b/app-emacs/eldev/eldev-1.6.ebuild @@ -14,7 +14,7 @@ if [[ ${PV} == *9999* ]] ; then else SRC_URI="https://github.com/doublep/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~ppc64 ~riscv ~x86" + KEYWORDS="amd64 ~arm ~ppc64 ~riscv ~x86" fi LICENSE="GPL-3+" diff --git a/dev-python/jupyter-events/jupyter-events-0.7.0.ebuild b/dev-python/jupyter-events/jupyter-events-0.7.0.ebuild index cb204f2c91e2..7faae7d04b77 100644 --- a/dev-python/jupyter-events/jupyter-events-0.7.0.ebuild +++ b/dev-python/jupyter-events/jupyter-events-0.7.0.ebuild @@ -17,7 +17,7 @@ HOMEPAGE=" LICENSE="BSD" SLOT="0" -KEYWORDS="amd64 arm arm64 ~loong ppc ~ppc64 ~riscv ~s390 sparc ~x86" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~s390 sparc x86" # jsonschema[format-nongpl] deps are always on in our ebuild RDEPEND=" diff --git a/media-libs/libpulse/files/pulseaudio-16.1-add-more-standard-samplerates.patch b/media-libs/libpulse/files/pulseaudio-16.1-add-more-standard-samplerates.patch new file mode 100644 index 000000000000..e1ea200c4c4c --- /dev/null +++ b/media-libs/libpulse/files/pulseaudio-16.1-add-more-standard-samplerates.patch @@ -0,0 +1,35 @@ +commit 86c5fbab5778685e19b5a4a9b8eb04ca90dff780 +Author: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> +Date: Sun Feb 5 19:49:10 2023 +0300 + + alsa-util: Add more standard sample rates. + + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/776> + +diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c +index 9f35cb20f..fd30f18bd 100644 +--- a/src/modules/alsa/alsa-util.c ++++ b/src/modules/alsa/alsa-util.c +@@ -1430,7 +1430,8 @@ unsigned int *pa_alsa_get_supported_rates(snd_pcm_t *pcm, unsigned int fallback_ + 32000, 44100, 48000, + 64000, 88200, 96000, + 128000, 176400, 192000, +- 384000 }; ++ 352800, 384000, ++ 705600, 768000 }; + bool supported[PA_ELEMENTSOF(all_rates)] = { false, }; + snd_pcm_hw_params_t *hwparams; + unsigned int i, j, n, *rates = NULL; +diff --git a/src/pulse/sample.h b/src/pulse/sample.h +index 35346a865..65c0c5d6b 100644 +--- a/src/pulse/sample.h ++++ b/src/pulse/sample.h +@@ -128,7 +128,7 @@ PA_C_DECL_BEGIN + #define PA_CHANNELS_MAX 32U + + /** Maximum allowed sample rate */ +-#define PA_RATE_MAX (48000U*8U) ++#define PA_RATE_MAX (48000U*16U) + + /** Sample format */ + typedef enum pa_sample_format { diff --git a/media-libs/libpulse/files/pulseaudio-16.1-fix-memblock-alignment.patch b/media-libs/libpulse/files/pulseaudio-16.1-fix-memblock-alignment.patch new file mode 100644 index 000000000000..b05e530ac89d --- /dev/null +++ b/media-libs/libpulse/files/pulseaudio-16.1-fix-memblock-alignment.patch @@ -0,0 +1,122 @@ +commit 300db779224625144d6279d230c2daa857c967d8 +Author: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> +Date: Thu Feb 9 13:28:29 2023 +0300 + + pstream: Pass frame size to keep split memblock parts aligned + + `pa_pstream_send_memblock()` would split incoming memblock into parts not + exceeding maximum pool block size. + + To make sure split parts of memblock are still frame-aligned add new `align` arg + to `pa_pstream_send_memblock`, find out required alignment from stream sample + format and pass it there. Bump default alignment to 256 which is good up to + 32bit 64ch frames. + + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/780> + +diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c +index 61f427bd3..ab094ba4e 100644 +--- a/src/modules/module-tunnel.c ++++ b/src/modules/module-tunnel.c +@@ -676,7 +676,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse + * IO thread context where the rest of the messages are + * dispatched. Yeah, ugly, but I am a lazy bastard. */ + +- pa_pstream_send_memblock(u->pstream, u->channel, 0, PA_SEEK_RELATIVE, chunk); ++ pa_pstream_send_memblock(u->pstream, u->channel, 0, PA_SEEK_RELATIVE, chunk, pa_frame_size(&u->sink->sample_spec)); + + u->receive_counter += chunk->length; + +diff --git a/src/pulse/stream.c b/src/pulse/stream.c +index 0aa627396..3585b27e8 100644 +--- a/src/pulse/stream.c ++++ b/src/pulse/stream.c +@@ -1535,7 +1535,7 @@ int pa_stream_write_ext_free( + s->write_memblock = NULL; + s->write_data = NULL; + +- pa_pstream_send_memblock(s->context->pstream, s->channel, offset, seek, &chunk); ++ pa_pstream_send_memblock(s->context->pstream, s->channel, offset, seek, &chunk, pa_frame_size(&s->sample_spec)); + pa_memblock_unref(chunk.memblock); + + } else { +@@ -1569,7 +1569,7 @@ int pa_stream_write_ext_free( + pa_memblock_release(chunk.memblock); + } + +- pa_pstream_send_memblock(s->context->pstream, s->channel, t_offset, t_seek, &chunk); ++ pa_pstream_send_memblock(s->context->pstream, s->channel, t_offset, t_seek, &chunk, pa_frame_size(&s->sample_spec)); + + t_offset = 0; + t_seek = PA_SEEK_RELATIVE; +diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c +index 672182fbc..1342dee10 100644 +--- a/src/pulsecore/protocol-native.c ++++ b/src/pulsecore/protocol-native.c +@@ -1260,7 +1260,7 @@ static void native_connection_send_memblock(pa_native_connection *c) { + if (schunk.length > r->buffer_attr.fragsize) + schunk.length = r->buffer_attr.fragsize; + +- pa_pstream_send_memblock(c->pstream, r->index, 0, PA_SEEK_RELATIVE, &schunk); ++ pa_pstream_send_memblock(c->pstream, r->index, 0, PA_SEEK_RELATIVE, &schunk, pa_memblockq_get_base(r->memblockq)); + + pa_memblockq_drop(r->memblockq, schunk.length); + pa_memblock_unref(schunk.memblock); +@@ -2535,7 +2535,7 @@ static void setup_srbchannel(pa_native_connection *c, pa_mem_type_t shm_type) { + mc.memblock = srbt.memblock; + mc.index = 0; + mc.length = pa_memblock_get_length(srbt.memblock); +- pa_pstream_send_memblock(c->pstream, 0, 0, 0, &mc); ++ pa_pstream_send_memblock(c->pstream, 0, 0, 0, &mc, 0); + + c->srbpending = srb; + return; +diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c +index 7147b776a..ff62f464b 100644 +--- a/src/pulsecore/pstream.c ++++ b/src/pulsecore/pstream.c +@@ -82,6 +82,10 @@ typedef uint32_t pa_pstream_descriptor[PA_PSTREAM_DESCRIPTOR_MAX]; + */ + #define FRAME_SIZE_MAX_ALLOW (1024*1024*16) + ++/* Default memblock alignment used with pa_pstream_send_memblock() ++ */ ++#define DEFAULT_PSTREAM_MEMBLOCK_ALIGN (256) ++ + PA_STATIC_FLIST_DECLARE(items, 0, pa_xfree); + + struct item_info { +@@ -475,7 +479,7 @@ void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, pa_cmsg_ancil_data + p->mainloop->defer_enable(p->defer_event, 1); + } + +-void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek_mode, const pa_memchunk *chunk) { ++void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek_mode, const pa_memchunk *chunk, size_t align) { + size_t length, idx; + size_t bsm; + +@@ -492,6 +496,11 @@ void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa + + bsm = pa_mempool_block_size_max(p->mempool); + ++ if (align == 0) ++ align = DEFAULT_PSTREAM_MEMBLOCK_ALIGN; ++ ++ bsm = (bsm / align) * align; ++ + while (length > 0) { + struct item_info *i; + size_t n; +diff --git a/src/pulsecore/pstream.h b/src/pulsecore/pstream.h +index 2bff270ad..88bdca4cc 100644 +--- a/src/pulsecore/pstream.h ++++ b/src/pulsecore/pstream.h +@@ -51,7 +51,7 @@ void pa_pstream_unlink(pa_pstream *p); + int pa_pstream_attach_memfd_shmid(pa_pstream *p, unsigned shm_id, int memfd_fd); + + void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, pa_cmsg_ancil_data *ancil_data); +-void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk); ++void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, size_t align); + void pa_pstream_send_release(pa_pstream *p, uint32_t block_id); + void pa_pstream_send_revoke(pa_pstream *p, uint32_t block_id); + diff --git a/media-libs/libpulse/files/pulseaudio-16.1-smoother-start-paused.patch b/media-libs/libpulse/files/pulseaudio-16.1-smoother-start-paused.patch new file mode 100644 index 000000000000..3f0acbc8f95e --- /dev/null +++ b/media-libs/libpulse/files/pulseaudio-16.1-smoother-start-paused.patch @@ -0,0 +1,26 @@ +commit 8fe50bbc31e11abf2f30864f1e2dbdaa16d0e1c3 +Author: Georg Chini <georg@chini.tk> +Date: Thu Aug 25 08:11:04 2022 +0200 + + time-smoother-2: Fix stream time when stream starts paused + + When a stream is started but has not yet called smoother_2_put(), pa_smoother_2_get() + returns the time since the start of the stream even if the stream was started paused. + When the stream is started paused, pa_smoother_2_get() should return 0 instead. This + patch fixes the problem. + + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/745> + +diff --git a/src/pulsecore/time-smoother_2.c b/src/pulsecore/time-smoother_2.c +index e14b52f72..ea7ec1b36 100644 +--- a/src/pulsecore/time-smoother_2.c ++++ b/src/pulsecore/time-smoother_2.c +@@ -295,7 +295,7 @@ pa_usec_t pa_smoother_2_get(pa_smoother_2 *s, pa_usec_t time_stamp) { + + /* If the smoother has not started, just return system time since resume */ + if (!s->start_time) { +- if (time_stamp >= s->resume_time) ++ if (time_stamp >= s->resume_time && !s->paused) + current_time = time_stamp - s->resume_time; + else + current_time = 0; diff --git a/media-libs/libpulse/files/pulseaudio-16.1-smoother-time-calculation.patch b/media-libs/libpulse/files/pulseaudio-16.1-smoother-time-calculation.patch new file mode 100644 index 000000000000..9d976e5be984 --- /dev/null +++ b/media-libs/libpulse/files/pulseaudio-16.1-smoother-time-calculation.patch @@ -0,0 +1,27 @@ +commit c3eae5d00cb79bd897049483126e75bb48a69cd1 +Author: flyingOwl <ofenfisch@googlemail.com> +Date: Fri Dec 30 00:16:03 2022 +0100 + + time-smoother-2: Fix time calculation by comparing timestamps + + This fixes the rare case of resume_time being bigger than time_stamp. Which + happens sometimes when a gstreamer client is quickly seeking through a + media file. The resulting integer underflow then causes a huge value in + current_time which will break the playback. + + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/764> + +diff --git a/src/pulsecore/time-smoother_2.c b/src/pulsecore/time-smoother_2.c +index ea7ec1b36..46cc5e9cc 100644 +--- a/src/pulsecore/time-smoother_2.c ++++ b/src/pulsecore/time-smoother_2.c +@@ -307,7 +307,8 @@ pa_usec_t pa_smoother_2_get(pa_smoother_2 *s, pa_usec_t time_stamp) { + /* If we are initializing, add the time since resume to the card time at pause_time */ + else if (s->init) { + current_time += (s->pause_time - s->start_time - s->time_offset - s->fixup_time) * s->time_factor; +- current_time += (time_stamp - s->resume_time) * s->time_factor; ++ if (time_stamp > s->resume_time) ++ current_time += (time_stamp - s->resume_time) * s->time_factor; + + /* Smoother is running, calculate current sound card time */ + } else diff --git a/media-libs/libpulse/libpulse-16.1-r3.ebuild b/media-libs/libpulse/libpulse-16.1-r3.ebuild new file mode 100644 index 000000000000..a67865f3948a --- /dev/null +++ b/media-libs/libpulse/libpulse-16.1-r3.ebuild @@ -0,0 +1,219 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +MY_PV="${PV/_pre*}" +MY_P="pulseaudio-${MY_PV}" +inherit bash-completion-r1 flag-o-matic gnome2-utils meson-multilib optfeature systemd toolchain-funcs udev + +DESCRIPTION="Libraries for PulseAudio clients" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/" + +if [[ ${PV} = 9999 ]]; then + inherit git-r3 + EGIT_BRANCH="master" + EGIT_REPO_URI="https://gitlab.freedesktop.org/pulseaudio/pulseaudio" +else + SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${MY_P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-2.1+" + +SLOT="0" +IUSE="+asyncns dbus doc +glib gtk selinux systemd test valgrind X" +RESTRICT="!test? ( test )" + +# NOTE: libpcre needed in some cases, bug #472228 +# TODO: libatomic_ops is only needed on some architectures and conditions, and then at runtime too +RDEPEND=" + dev-libs/libatomic_ops + >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}] + asyncns? ( >=net-libs/libasyncns-0.1[${MULTILIB_USEDEP}] ) + dbus? ( >=sys-apps/dbus-1.4.12[${MULTILIB_USEDEP}] ) + elibc_mingw? ( dev-libs/libpcre:3 ) + glib? ( >=dev-libs/glib-2.28.0:2[${MULTILIB_USEDEP}] ) + gtk? ( x11-libs/gtk+:3 ) + selinux? ( sec-policy/selinux-pulseaudio ) + systemd? ( sys-apps/systemd:= ) + valgrind? ( dev-util/valgrind ) + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}] + ) + !<media-sound/pulseaudio-15.0-r100 +" + +DEPEND="${RDEPEND} + test? ( >=dev-libs/check-0.9.10 ) + X? ( x11-base/xorg-proto ) +" + +# pulseaudio ships a bundled xmltoman, which uses XML::Parser +BDEPEND=" + dev-lang/perl + dev-perl/XML-Parser + sys-devel/gettext + sys-devel/m4 + virtual/libiconv + virtual/libintl + virtual/pkgconfig + doc? ( app-doc/doxygen ) +" +PDEPEND=" + || ( + media-video/pipewire[sound-server(+)] + >=media-sound/pulseaudio-daemon-16.1-r8 + media-sound/pulseaudio[daemon(+)] + ) +" + +DOCS=( NEWS README ) + +# patches merged upstream, to be removed with 16.2 or later bump +PATCHES=( + "${FILESDIR}"/pulseaudio-16.1-memfd-cleanup.patch + "${FILESDIR}"/pulseaudio-16.1-proplist-util-without-gdkx.patch + "${FILESDIR}"/pulseaudio-16.1-smoother-start-paused.patch + "${FILESDIR}"/pulseaudio-16.1-smoother-time-calculation.patch + "${FILESDIR}"/pulseaudio-16.1-fix-memblock-alignment.patch + "${FILESDIR}"/pulseaudio-16.1-add-more-standard-samplerates.patch +) + +src_prepare() { + default + + # disable autospawn by client + sed -i -e 's:; autospawn = yes:autospawn = no:g' src/pulse/client.conf.in || die + + gnome2_environment_reset +} + +multilib_src_configure() { + # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs + # https://github.com/gentoo/gentoo/pull/28355 + # mold needs this too but right now tc-ld-is-mold is also not available + if tc-ld-is-lld; then + append-ldflags -Wl,--undefined-version + fi + + local emesonargs=( + --localstatedir="${EPREFIX}"/var + + -Ddaemon=false + -Dclient=true + $(meson_native_use_bool doc doxygen) + -Dgcov=false + # tests involve random modules, so just do them for the native # TODO: tests should run always + $(meson_native_use_bool test tests) + -Ddatabase=simple # Not used for non-daemon, simple database avoids external dep checks + -Dstream-restore-clear-old-devices=true + -Drunning-from-build-tree=false + + # Paths + -Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/pulseaudio/modules" # Was $(get_libdir)/${P} + -Dsystemduserunitdir=$(systemd_get_userunitdir) + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + -Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value + + # Optional features + -Dalsa=disabled + $(meson_feature asyncns) + -Davahi=disabled + -Dbluez5=disabled + -Dbluez5-gstreamer=disabled + -Dbluez5-native-headset=false + -Dbluez5-ofono-headset=false + $(meson_feature dbus) + -Delogind=disabled + -Dfftw=disabled + $(meson_feature glib) # WARNING: toggling this likely changes ABI + -Dgsettings=disabled + -Dgstreamer=disabled + $(meson_native_use_feature gtk) + -Dhal-compat=false + -Dipv6=true + -Djack=disabled + -Dlirc=disabled + -Dopenssl=disabled + -Dorc=disabled + -Doss-output=disabled + -Dsamplerate=disabled # Matches upstream + -Dsoxr=disabled + -Dspeex=disabled + $(meson_native_use_feature systemd) + -Dtcpwrap=disabled + -Dudev=disabled + $(meson_native_use_feature valgrind) + $(meson_feature X x11) + + # Echo cancellation + -Dadrian-aec=false + -Dwebrtc-aec=disabled + ) + + if multilib_is_native_abi; then + # Make padsp work for non-native ABI, supposedly only possible with glibc; + # this is used by /usr/bin/padsp that comes from native build, thus we need + # this argument for native build + if use elibc_glibc; then + emesonargs+=( -Dpulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' ) + fi + else + emesonargs+=( -Dman=false ) + if ! use elibc_glibc; then + # Non-glibc multilib is probably non-existent but just in case: + ewarn "padsp wrapper for OSS emulation will only work with native ABI applications!" + fi + fi + + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile + + if multilib_is_native_abi; then + if use doc; then + einfo "Generating documentation ..." + meson_src_compile doxygen + fi + fi +} + +multilib_src_install() { + # The files referenced in the DOCS array do not exist in the multilib source directory, + # therefore clear the variable when calling the function that will access it. + DOCS= meson_src_install + + # Upstream installs 'pactl' if client is built, with all symlinks except for + # 'pulseaudio', 'pacmd' and 'pasuspender' which are installed if server is built. + # This trips QA warning, workaround: + # - install missing aliases in media-libs/libpulse (client build) + # - remove corresponding symlinks in media-sound/pulseaudio-daemonclient (server build) + bashcomp_alias pactl pulseaudio + bashcomp_alias pactl pacmd + bashcomp_alias pactl pasuspender + + if multilib_is_native_abi; then + if use doc; then + einfo "Installing documentation ..." + docinto html + dodoc -r doxygen/html/. + fi + fi +} + +multilib_src_install_all() { + einstalldocs + + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die +} + +pkg_postinst() { + optfeature_header "PulseAudio can be enhanced by installing the following:" + use dbus && optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit +} diff --git a/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-add-more-standard-samplerates.patch b/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-add-more-standard-samplerates.patch new file mode 100644 index 000000000000..e1ea200c4c4c --- /dev/null +++ b/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-add-more-standard-samplerates.patch @@ -0,0 +1,35 @@ +commit 86c5fbab5778685e19b5a4a9b8eb04ca90dff780 +Author: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> +Date: Sun Feb 5 19:49:10 2023 +0300 + + alsa-util: Add more standard sample rates. + + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/776> + +diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c +index 9f35cb20f..fd30f18bd 100644 +--- a/src/modules/alsa/alsa-util.c ++++ b/src/modules/alsa/alsa-util.c +@@ -1430,7 +1430,8 @@ unsigned int *pa_alsa_get_supported_rates(snd_pcm_t *pcm, unsigned int fallback_ + 32000, 44100, 48000, + 64000, 88200, 96000, + 128000, 176400, 192000, +- 384000 }; ++ 352800, 384000, ++ 705600, 768000 }; + bool supported[PA_ELEMENTSOF(all_rates)] = { false, }; + snd_pcm_hw_params_t *hwparams; + unsigned int i, j, n, *rates = NULL; +diff --git a/src/pulse/sample.h b/src/pulse/sample.h +index 35346a865..65c0c5d6b 100644 +--- a/src/pulse/sample.h ++++ b/src/pulse/sample.h +@@ -128,7 +128,7 @@ PA_C_DECL_BEGIN + #define PA_CHANNELS_MAX 32U + + /** Maximum allowed sample rate */ +-#define PA_RATE_MAX (48000U*8U) ++#define PA_RATE_MAX (48000U*16U) + + /** Sample format */ + typedef enum pa_sample_format { diff --git a/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-fix-memblock-alignment.patch b/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-fix-memblock-alignment.patch new file mode 100644 index 000000000000..b05e530ac89d --- /dev/null +++ b/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-fix-memblock-alignment.patch @@ -0,0 +1,122 @@ +commit 300db779224625144d6279d230c2daa857c967d8 +Author: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> +Date: Thu Feb 9 13:28:29 2023 +0300 + + pstream: Pass frame size to keep split memblock parts aligned + + `pa_pstream_send_memblock()` would split incoming memblock into parts not + exceeding maximum pool block size. + + To make sure split parts of memblock are still frame-aligned add new `align` arg + to `pa_pstream_send_memblock`, find out required alignment from stream sample + format and pass it there. Bump default alignment to 256 which is good up to + 32bit 64ch frames. + + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/780> + +diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c +index 61f427bd3..ab094ba4e 100644 +--- a/src/modules/module-tunnel.c ++++ b/src/modules/module-tunnel.c +@@ -676,7 +676,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse + * IO thread context where the rest of the messages are + * dispatched. Yeah, ugly, but I am a lazy bastard. */ + +- pa_pstream_send_memblock(u->pstream, u->channel, 0, PA_SEEK_RELATIVE, chunk); ++ pa_pstream_send_memblock(u->pstream, u->channel, 0, PA_SEEK_RELATIVE, chunk, pa_frame_size(&u->sink->sample_spec)); + + u->receive_counter += chunk->length; + +diff --git a/src/pulse/stream.c b/src/pulse/stream.c +index 0aa627396..3585b27e8 100644 +--- a/src/pulse/stream.c ++++ b/src/pulse/stream.c +@@ -1535,7 +1535,7 @@ int pa_stream_write_ext_free( + s->write_memblock = NULL; + s->write_data = NULL; + +- pa_pstream_send_memblock(s->context->pstream, s->channel, offset, seek, &chunk); ++ pa_pstream_send_memblock(s->context->pstream, s->channel, offset, seek, &chunk, pa_frame_size(&s->sample_spec)); + pa_memblock_unref(chunk.memblock); + + } else { +@@ -1569,7 +1569,7 @@ int pa_stream_write_ext_free( + pa_memblock_release(chunk.memblock); + } + +- pa_pstream_send_memblock(s->context->pstream, s->channel, t_offset, t_seek, &chunk); ++ pa_pstream_send_memblock(s->context->pstream, s->channel, t_offset, t_seek, &chunk, pa_frame_size(&s->sample_spec)); + + t_offset = 0; + t_seek = PA_SEEK_RELATIVE; +diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c +index 672182fbc..1342dee10 100644 +--- a/src/pulsecore/protocol-native.c ++++ b/src/pulsecore/protocol-native.c +@@ -1260,7 +1260,7 @@ static void native_connection_send_memblock(pa_native_connection *c) { + if (schunk.length > r->buffer_attr.fragsize) + schunk.length = r->buffer_attr.fragsize; + +- pa_pstream_send_memblock(c->pstream, r->index, 0, PA_SEEK_RELATIVE, &schunk); ++ pa_pstream_send_memblock(c->pstream, r->index, 0, PA_SEEK_RELATIVE, &schunk, pa_memblockq_get_base(r->memblockq)); + + pa_memblockq_drop(r->memblockq, schunk.length); + pa_memblock_unref(schunk.memblock); +@@ -2535,7 +2535,7 @@ static void setup_srbchannel(pa_native_connection *c, pa_mem_type_t shm_type) { + mc.memblock = srbt.memblock; + mc.index = 0; + mc.length = pa_memblock_get_length(srbt.memblock); +- pa_pstream_send_memblock(c->pstream, 0, 0, 0, &mc); ++ pa_pstream_send_memblock(c->pstream, 0, 0, 0, &mc, 0); + + c->srbpending = srb; + return; +diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c +index 7147b776a..ff62f464b 100644 +--- a/src/pulsecore/pstream.c ++++ b/src/pulsecore/pstream.c +@@ -82,6 +82,10 @@ typedef uint32_t pa_pstream_descriptor[PA_PSTREAM_DESCRIPTOR_MAX]; + */ + #define FRAME_SIZE_MAX_ALLOW (1024*1024*16) + ++/* Default memblock alignment used with pa_pstream_send_memblock() ++ */ ++#define DEFAULT_PSTREAM_MEMBLOCK_ALIGN (256) ++ + PA_STATIC_FLIST_DECLARE(items, 0, pa_xfree); + + struct item_info { +@@ -475,7 +479,7 @@ void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, pa_cmsg_ancil_data + p->mainloop->defer_enable(p->defer_event, 1); + } + +-void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek_mode, const pa_memchunk *chunk) { ++void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek_mode, const pa_memchunk *chunk, size_t align) { + size_t length, idx; + size_t bsm; + +@@ -492,6 +496,11 @@ void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa + + bsm = pa_mempool_block_size_max(p->mempool); + ++ if (align == 0) ++ align = DEFAULT_PSTREAM_MEMBLOCK_ALIGN; ++ ++ bsm = (bsm / align) * align; ++ + while (length > 0) { + struct item_info *i; + size_t n; +diff --git a/src/pulsecore/pstream.h b/src/pulsecore/pstream.h +index 2bff270ad..88bdca4cc 100644 +--- a/src/pulsecore/pstream.h ++++ b/src/pulsecore/pstream.h +@@ -51,7 +51,7 @@ void pa_pstream_unlink(pa_pstream *p); + int pa_pstream_attach_memfd_shmid(pa_pstream *p, unsigned shm_id, int memfd_fd); + + void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, pa_cmsg_ancil_data *ancil_data); +-void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk); ++void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, size_t align); + void pa_pstream_send_release(pa_pstream *p, uint32_t block_id); + void pa_pstream_send_revoke(pa_pstream *p, uint32_t block_id); + diff --git a/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-fix-resampler-oversized-memblock.patch b/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-fix-resampler-oversized-memblock.patch new file mode 100644 index 000000000000..bd3d39d0af82 --- /dev/null +++ b/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-fix-resampler-oversized-memblock.patch @@ -0,0 +1,55 @@ +commit 1cfa7378236b3cf9daf3be09d3227b92df69cc53 +Author: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> +Date: Wed Feb 8 03:24:59 2023 +0300 + + resampler: Fix oversized memblock pushed from resampler + + The assumption that the format enum is ordered by size is not valid for quite + some time, since 24bit formats were appended to format enum later than 32bit + formats. This causes resampler to produce properly aligned memblock of size + larger than maximum mempool block size if input format is 24bit and output + format is 32bit. + + Oversized block is getting split by `pa_pstream_send_memblock()` into parts of + size not exceeding maximum mempool block size. This usually works well but for + 32ch 32bit 48000Hz stream the frame alignment is 128 bytes and maximum mempool + block size value is multiple of 64 but not 128 bytes, therefore resulting parts + are misaligned. + + On receiving side this causes extra allocation of 128 byte chunk while `mcalign` + helper reassembles properly aligned frame out of second block of misaligned + size. While first and second properly aligned frames are retrieved successfully + from `mcalign` helper, third retrieved frame would end up with properly aligned + size but misaligned memblock index (in this example, that would be 64 bytes.) + Attempt to push a chunk with misaligned memblock index causes assertion failure + + Assertion 'uchunk->index % bq->base == 0' failed at memblockq.c:289, + function pa_memblockq_push(). Aborting. + + Fix oversized block issue by checking proper size of format instead of enum + value. + + Fixes: a67c21f09 ("merge 'lennart' branch back into trunk.") + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/778> + +diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c +index b035f67ed..ba18c92c4 100644 +--- a/src/pulsecore/resampler.c ++++ b/src/pulsecore/resampler.c +@@ -613,9 +613,13 @@ size_t pa_resampler_max_block_size(pa_resampler *r) { + * conversion */ + max_ss.channels = (uint8_t) (PA_MAX(r->i_ss.channels, r->o_ss.channels)); + +- /* We silently assume that the format enum is ordered by size */ +- max_ss.format = PA_MAX(r->i_ss.format, r->o_ss.format); +- max_ss.format = PA_MAX(max_ss.format, r->work_format); ++ max_ss.format = r->i_ss.format; ++ ++ if (pa_sample_size_of_format(max_ss.format) < pa_sample_size_of_format(r->o_ss.format)) ++ max_ss.format = r->o_ss.format; ++ ++ if (pa_sample_size_of_format(max_ss.format) < pa_sample_size_of_format(r->work_format)) ++ max_ss.format = r->work_format; + + max_ss.rate = PA_MAX(r->i_ss.rate, r->o_ss.rate); + diff --git a/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-fix-uac2-broken-avoid-resampling.patch b/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-fix-uac2-broken-avoid-resampling.patch new file mode 100644 index 000000000000..a260ced351a5 --- /dev/null +++ b/media-sound/pulseaudio-daemon/files/pulseaudio-16.1-fix-uac2-broken-avoid-resampling.patch @@ -0,0 +1,382 @@ +commit aed52c507f345d0b5c4cd2b1d2c58dae2d904b53 +Author: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> +Date: Wed Feb 22 01:19:24 2023 +0300 + + alsa-util: Perform format and rate detection before setting HW params + + Perform detection of supported sample format and rates just after device is + opened, before `snd_pcm_hw_params()` is called for the first time. This fixes a + problem where device restricts available sample rates after HW params are set + preventing sample rate detection (seen with UAC2 devices and kernel 6.1.9) + + Bug: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1414 + Bug: https://github.com/alsa-project/alsa-lib/issues/119 + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/782> + +diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c +index 49c39687c..c272e392b 100644 +--- a/src/modules/alsa/alsa-mixer.c ++++ b/src/modules/alsa/alsa-mixer.c +@@ -5074,7 +5074,7 @@ static snd_pcm_t* mapping_open_pcm(pa_alsa_mapping *m, + handle = pa_alsa_open_by_template( + m->device_strings, dev_id, NULL, &try_ss, + &try_map, mode, &try_period_size, +- &try_buffer_size, 0, NULL, NULL, exact_channels); ++ &try_buffer_size, 0, NULL, NULL, NULL, NULL, exact_channels); + if (handle && !exact_channels && m->channel_map.channels != try_map.channels) { + char buf[PA_CHANNEL_MAP_SNPRINT_MAX]; + pa_log_debug("Channel map for mapping '%s' permanently changed to '%s'", m->name, +diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c +index b249df680..ca22f195f 100644 +--- a/src/modules/alsa/alsa-sink.c ++++ b/src/modules/alsa/alsa-sink.c +@@ -2527,7 +2527,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca + &ss, &map, + SND_PCM_STREAM_PLAYBACK, + &period_frames, &buffer_frames, tsched_frames, +- &b, &d, mapping))) ++ &b, &d, ++ &u->supported_formats, &u->supported_rates, ++ mapping))) + goto fail; + + } else if ((dev_id = pa_modargs_get_value(ma, "device_id", NULL))) { +@@ -2541,7 +2543,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca + &ss, &map, + SND_PCM_STREAM_PLAYBACK, + &period_frames, &buffer_frames, tsched_frames, +- &b, &d, profile_set, &mapping))) ++ &b, &d, ++ &u->supported_formats, &u->supported_rates, ++ profile_set, &mapping))) + goto fail; + + } else { +@@ -2552,7 +2556,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca + &ss, &map, + SND_PCM_STREAM_PLAYBACK, + &period_frames, &buffer_frames, tsched_frames, +- &b, &d, false))) ++ &b, &d, ++ &u->supported_formats, &u->supported_rates, ++ false))) + goto fail; + } + +@@ -2598,13 +2604,11 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca + + u->verified_sample_spec = ss; + +- u->supported_formats = pa_alsa_get_supported_formats(u->pcm_handle, ss.format); + if (!u->supported_formats) { + pa_log_error("Failed to find any supported sample formats."); + goto fail; + } + +- u->supported_rates = pa_alsa_get_supported_rates(u->pcm_handle, ss.rate); + if (!u->supported_rates) { + pa_log_error("Failed to find any supported sample rates."); + goto fail; +diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c +index ef8b12c32..d88c47f1f 100644 +--- a/src/modules/alsa/alsa-source.c ++++ b/src/modules/alsa/alsa-source.c +@@ -2218,7 +2218,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p + &ss, &map, + SND_PCM_STREAM_CAPTURE, + &period_frames, &buffer_frames, tsched_frames, +- &b, &d, mapping))) ++ &b, &d, &u->supported_formats, &u->supported_rates, mapping))) + goto fail; + + } else if ((dev_id = pa_modargs_get_value(ma, "device_id", NULL))) { +@@ -2232,7 +2232,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p + &ss, &map, + SND_PCM_STREAM_CAPTURE, + &period_frames, &buffer_frames, tsched_frames, +- &b, &d, profile_set, &mapping))) ++ &b, &d, &u->supported_formats, &u->supported_rates, profile_set, &mapping))) + goto fail; + + } else { +@@ -2243,7 +2243,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p + &ss, &map, + SND_PCM_STREAM_CAPTURE, + &period_frames, &buffer_frames, tsched_frames, +- &b, &d, false))) ++ &b, &d, &u->supported_formats, &u->supported_rates, false))) + goto fail; + } + +@@ -2279,13 +2279,11 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p + + u->verified_sample_spec = ss; + +- u->supported_formats = pa_alsa_get_supported_formats(u->pcm_handle, ss.format); + if (!u->supported_formats) { + pa_log_error("Failed to find any supported sample formats."); + goto fail; + } + +- u->supported_rates = pa_alsa_get_supported_rates(u->pcm_handle, ss.rate); + if (!u->supported_rates) { + pa_log_error("Failed to find any supported sample rates."); + goto fail; +diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c +index e75756f53..744e7aae1 100644 +--- a/src/modules/alsa/alsa-ucm.c ++++ b/src/modules/alsa/alsa-ucm.c +@@ -2026,7 +2026,7 @@ static snd_pcm_t* mapping_open_pcm(pa_alsa_ucm_config *ucm, pa_alsa_mapping *m, + try_buffer_size = ucm->core->default_n_fragments * try_period_size; + + pcm = pa_alsa_open_by_device_string(m->device_strings[0], NULL, &try_ss, +- &try_map, mode, &try_period_size, &try_buffer_size, 0, NULL, NULL, exact_channels); ++ &try_map, mode, &try_period_size, &try_buffer_size, 0, NULL, NULL, NULL, NULL, exact_channels); + + if (pcm) { + if (!exact_channels) +diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c +index fd30f18bd..b631c870c 100644 +--- a/src/modules/alsa/alsa-util.c ++++ b/src/modules/alsa/alsa-util.c +@@ -523,6 +523,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto( + snd_pcm_uframes_t tsched_size, + bool *use_mmap, + bool *use_tsched, ++ pa_sample_format_t **query_supported_formats, ++ unsigned int **query_supported_rates, + pa_alsa_profile_set *ps, + pa_alsa_mapping **mapping) { + +@@ -561,6 +563,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto( + tsched_size, + use_mmap, + use_tsched, ++ query_supported_formats, ++ query_supported_rates, + m); + + if (pcm_handle) { +@@ -588,6 +592,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto( + tsched_size, + use_mmap, + use_tsched, ++ query_supported_formats, ++ query_supported_rates, + m); + + if (pcm_handle) { +@@ -612,6 +618,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto( + tsched_size, + use_mmap, + use_tsched, ++ query_supported_formats, ++ query_supported_rates, + false); + pa_xfree(d); + +@@ -632,6 +640,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_mapping( + snd_pcm_uframes_t tsched_size, + bool *use_mmap, + bool *use_tsched, ++ pa_sample_format_t **query_supported_formats, ++ unsigned int **query_supported_rates, + pa_alsa_mapping *m) { + + snd_pcm_t *pcm_handle; +@@ -661,6 +671,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_mapping( + tsched_size, + use_mmap, + use_tsched, ++ query_supported_formats, ++ query_supported_rates, + pa_channel_map_valid(&m->channel_map) /* Query the channel count if we don't know what we want */); + + if (!pcm_handle) +@@ -684,6 +696,8 @@ snd_pcm_t *pa_alsa_open_by_device_string( + snd_pcm_uframes_t tsched_size, + bool *use_mmap, + bool *use_tsched, ++ pa_sample_format_t **query_supported_formats, ++ unsigned int **query_supported_rates, + bool require_exact_channel_number) { + + int err; +@@ -711,6 +725,12 @@ snd_pcm_t *pa_alsa_open_by_device_string( + + pa_log_debug("Managed to open %s", d); + ++ if (query_supported_formats) ++ *query_supported_formats = pa_alsa_get_supported_formats(pcm_handle, ss->format); ++ ++ if (query_supported_rates) ++ *query_supported_rates = pa_alsa_get_supported_rates(pcm_handle, ss->rate); ++ + if ((err = pa_alsa_set_hw_params( + pcm_handle, + ss, +@@ -784,6 +804,8 @@ snd_pcm_t *pa_alsa_open_by_template( + snd_pcm_uframes_t tsched_size, + bool *use_mmap, + bool *use_tsched, ++ pa_sample_format_t **query_supported_formats, ++ unsigned int **query_supported_rates, + bool require_exact_channel_number) { + + snd_pcm_t *pcm_handle; +@@ -805,6 +827,8 @@ snd_pcm_t *pa_alsa_open_by_template( + tsched_size, + use_mmap, + use_tsched, ++ query_supported_formats, ++ query_supported_rates, + require_exact_channel_number); + + pa_xfree(d); +diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h +index 2eed3eac3..c65801104 100644 +--- a/src/modules/alsa/alsa-util.h ++++ b/src/modules/alsa/alsa-util.h +@@ -67,6 +67,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto( + snd_pcm_uframes_t tsched_size, + bool *use_mmap, /* modified at return */ + bool *use_tsched, /* modified at return */ ++ pa_sample_format_t **query_supported_formats, /* modified at return */ ++ unsigned int **query_supported_rates, /* modified at return */ + pa_alsa_profile_set *ps, + pa_alsa_mapping **mapping); /* modified at return */ + +@@ -82,6 +84,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_mapping( + snd_pcm_uframes_t tsched_size, + bool *use_mmap, /* modified at return */ + bool *use_tsched, /* modified at return */ ++ pa_sample_format_t **query_supported_formats, /* modified at return */ ++ unsigned int **query_supported_rates, /* modified at return */ + pa_alsa_mapping *mapping); + + /* Opens the explicit ALSA device */ +@@ -96,6 +100,8 @@ snd_pcm_t *pa_alsa_open_by_device_string( + snd_pcm_uframes_t tsched_size, + bool *use_mmap, /* modified at return */ + bool *use_tsched, /* modified at return */ ++ pa_sample_format_t **query_supported_formats, /* modified at return */ ++ unsigned int **query_supported_rates, /* modified at return */ + bool require_exact_channel_number); + + /* Opens the explicit ALSA device with a fallback list */ +@@ -111,6 +117,8 @@ snd_pcm_t *pa_alsa_open_by_template( + snd_pcm_uframes_t tsched_size, + bool *use_mmap, /* modified at return */ + bool *use_tsched, /* modified at return */ ++ pa_sample_format_t **query_supported_formats, /* modified at return */ ++ unsigned int **query_supported_rates, /* modified at return */ + bool require_exact_channel_number); + + void pa_alsa_dump(pa_log_level_t level, snd_pcm_t *pcm); +commit 5ab2b9cb0e32190c3ea12b0f4cb7533d7340bbf1 +Author: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> +Date: Wed Feb 22 01:50:22 2023 +0300 + + alsa-util: Fix pa_alsa_get_supported_formats fallback. + + Looks like original intention was to scan over sample formats supported by PA, + but code does the scan by list of alsa formats. Reverse the map and adjust + fallback case which now can use the same map. + + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/782> + +diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c +index b631c870c..d3c092f52 100644 +--- a/src/modules/alsa/alsa-util.c ++++ b/src/modules/alsa/alsa-util.c +@@ -1502,35 +1502,35 @@ unsigned int *pa_alsa_get_supported_rates(snd_pcm_t *pcm, unsigned int fallback_ + } + + pa_sample_format_t *pa_alsa_get_supported_formats(snd_pcm_t *pcm, pa_sample_format_t fallback_format) { +- static const snd_pcm_format_t format_trans_to_pa[] = { +- [SND_PCM_FORMAT_U8] = PA_SAMPLE_U8, +- [SND_PCM_FORMAT_A_LAW] = PA_SAMPLE_ALAW, +- [SND_PCM_FORMAT_MU_LAW] = PA_SAMPLE_ULAW, +- [SND_PCM_FORMAT_S16_LE] = PA_SAMPLE_S16LE, +- [SND_PCM_FORMAT_S16_BE] = PA_SAMPLE_S16BE, +- [SND_PCM_FORMAT_FLOAT_LE] = PA_SAMPLE_FLOAT32LE, +- [SND_PCM_FORMAT_FLOAT_BE] = PA_SAMPLE_FLOAT32BE, +- [SND_PCM_FORMAT_S32_LE] = PA_SAMPLE_S32LE, +- [SND_PCM_FORMAT_S32_BE] = PA_SAMPLE_S32BE, +- [SND_PCM_FORMAT_S24_3LE] = PA_SAMPLE_S24LE, +- [SND_PCM_FORMAT_S24_3BE] = PA_SAMPLE_S24BE, +- [SND_PCM_FORMAT_S24_LE] = PA_SAMPLE_S24_32LE, +- [SND_PCM_FORMAT_S24_BE] = PA_SAMPLE_S24_32BE, ++ static const snd_pcm_format_t format_trans_to_pcm[] = { ++ [PA_SAMPLE_U8] = SND_PCM_FORMAT_U8, ++ [PA_SAMPLE_ALAW] = SND_PCM_FORMAT_A_LAW, ++ [PA_SAMPLE_ULAW] = SND_PCM_FORMAT_MU_LAW, ++ [PA_SAMPLE_S16LE] = SND_PCM_FORMAT_S16_LE, ++ [PA_SAMPLE_S16BE] = SND_PCM_FORMAT_S16_BE, ++ [PA_SAMPLE_FLOAT32LE] = SND_PCM_FORMAT_FLOAT_LE, ++ [PA_SAMPLE_FLOAT32BE] = SND_PCM_FORMAT_FLOAT_BE, ++ [PA_SAMPLE_S32LE] = SND_PCM_FORMAT_S32_LE, ++ [PA_SAMPLE_S32BE] = SND_PCM_FORMAT_S32_BE, ++ [PA_SAMPLE_S24LE] = SND_PCM_FORMAT_S24_3LE, ++ [PA_SAMPLE_S24BE] = SND_PCM_FORMAT_S24_3BE, ++ [PA_SAMPLE_S24_32LE] = SND_PCM_FORMAT_S24_LE, ++ [PA_SAMPLE_S24_32BE] = SND_PCM_FORMAT_S24_BE, + }; +- static const snd_pcm_format_t all_formats[] = { +- SND_PCM_FORMAT_U8, +- SND_PCM_FORMAT_A_LAW, +- SND_PCM_FORMAT_MU_LAW, +- SND_PCM_FORMAT_S16_LE, +- SND_PCM_FORMAT_S16_BE, +- SND_PCM_FORMAT_FLOAT_LE, +- SND_PCM_FORMAT_FLOAT_BE, +- SND_PCM_FORMAT_S32_LE, +- SND_PCM_FORMAT_S32_BE, +- SND_PCM_FORMAT_S24_3LE, +- SND_PCM_FORMAT_S24_3BE, +- SND_PCM_FORMAT_S24_LE, +- SND_PCM_FORMAT_S24_BE, ++ static const pa_sample_format_t all_formats[] = { ++ PA_SAMPLE_U8, ++ PA_SAMPLE_ALAW, ++ PA_SAMPLE_ULAW, ++ PA_SAMPLE_S16LE, ++ PA_SAMPLE_S16BE, ++ PA_SAMPLE_FLOAT32LE, ++ PA_SAMPLE_FLOAT32BE, ++ PA_SAMPLE_S32LE, ++ PA_SAMPLE_S32BE, ++ PA_SAMPLE_S24LE, ++ PA_SAMPLE_S24BE, ++ PA_SAMPLE_S24_32LE, ++ PA_SAMPLE_S24_32BE, + }; + bool supported[PA_ELEMENTSOF(all_formats)] = { + false, +@@ -1548,7 +1548,7 @@ pa_sample_format_t *pa_alsa_get_supported_formats(snd_pcm_t *pcm, pa_sample_form + } + + for (i = 0, n = 0; i < PA_ELEMENTSOF(all_formats); i++) { +- if (snd_pcm_hw_params_test_format(pcm, hwparams, all_formats[i]) == 0) { ++ if (snd_pcm_hw_params_test_format(pcm, hwparams, format_trans_to_pcm[all_formats[i]]) == 0) { + supported[i] = true; + n++; + } +@@ -1559,7 +1559,7 @@ pa_sample_format_t *pa_alsa_get_supported_formats(snd_pcm_t *pcm, pa_sample_form + + for (i = 0, j = 0; i < PA_ELEMENTSOF(all_formats); i++) { + if (supported[i]) +- formats[j++] = format_trans_to_pa[all_formats[i]]; ++ formats[j++] = all_formats[i]; + } + + formats[j] = PA_SAMPLE_MAX; +@@ -1567,7 +1567,7 @@ pa_sample_format_t *pa_alsa_get_supported_formats(snd_pcm_t *pcm, pa_sample_form + formats = pa_xnew(pa_sample_format_t, 2); + + formats[0] = fallback_format; +- if ((ret = snd_pcm_hw_params_set_format(pcm, hwparams, format_trans_to_pa[formats[0]])) < 0) { ++ if ((ret = snd_pcm_hw_params_set_format(pcm, hwparams, format_trans_to_pcm[formats[0]])) < 0) { + pa_log_debug("snd_pcm_hw_params_set_format() failed: %s", pa_alsa_strerror(ret)); + pa_xfree(formats); + return NULL; diff --git a/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.1-r8.ebuild b/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.1-r8.ebuild new file mode 100644 index 000000000000..e12ba4cea6fc --- /dev/null +++ b/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.1-r8.ebuild @@ -0,0 +1,393 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +MY_PV="${PV/_pre*}" +MY_P="pulseaudio-${MY_PV}" +inherit bash-completion-r1 gnome2-utils meson optfeature systemd tmpfiles udev + +DESCRIPTION="Daemon component of PulseAudio (networked sound server)" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/" + +if [[ ${PV} = 9999 ]]; then + inherit git-r3 + EGIT_BRANCH="master" + EGIT_REPO_URI="https://gitlab.freedesktop.org/pulseaudio/pulseaudio" +else + SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${MY_P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +S="${WORKDIR}/${MY_P}" + +# libpulse-simple and libpulse link to libpulse-core; this is daemon's +# library and can link to gdbm and other GPL-only libraries. In this +# cases, we have a fully GPL-2 package. Leaving the rest of the +# GPL-forcing USE flags for those who use them. +LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )" + +SLOT="0" + +# +alsa-plugin as discussed in bug #519530 +# TODO: Find out why webrtc-aec is + prefixed - there's already the always available speexdsp-aec +# NOTE: The current ebuild sets +X almost certainly just for the pulseaudio.desktop file +IUSE="+alsa +alsa-plugin aptx +asyncns bluetooth dbus elogind equalizer fftw +gdbm +glib gstreamer jack ldac lirc +ofono-headset +orc oss selinux sox ssl systemd system-wide tcpd test +udev valgrind +webrtc-aec +X zeroconf" + +RESTRICT="!test? ( test )" + +# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac +# Basically all IUSE are either ${MULTILIB_USEDEP} for client libs or they belong under !daemon () +# We duplicate alsa-plugin, {native,ofono}-headset under daemon to let users deal with them at once +REQUIRED_USE=" + ?? ( elogind systemd ) + alsa-plugin? ( alsa ) + aptx? ( bluetooth ) + bluetooth? ( dbus ) + equalizer? ( dbus ) + ldac? ( bluetooth ) + ofono-headset? ( bluetooth ) + udev? ( || ( alsa oss ) ) + zeroconf? ( dbus ) +" + +# NOTE: +# - libpcre needed in some cases, bug #472228 +# - media-libs/speexdsp is providing echo canceller implementation and used in resampler +# TODO: libatomic_ops is only needed on some architectures and conditions, and then at runtime too +gstreamer_deps=" + media-libs/gst-plugins-base + >=media-libs/gstreamer-1.14 +" +COMMON_DEPEND=" + ~media-libs/libpulse-${PV}[dbus?,glib?,systemd?,valgrind?,X?] + >=media-libs/libpulse-16.1-r3 + dev-libs/libatomic_ops + >=media-libs/libsndfile-1.0.20 + >=media-libs/speexdsp-1.2 + alsa? ( >=media-libs/alsa-lib-1.0.24 ) + aptx? ( ${gstreamer_deps} ) + asyncns? ( >=net-libs/libasyncns-0.1 ) + bluetooth? ( + >=net-wireless/bluez-5 + media-libs/sbc + ) + dev-libs/libltdl + sys-kernel/linux-headers + >=sys-libs/libcap-2.22-r2 + dbus? ( >=sys-apps/dbus-1.4.12 ) + elibc_mingw? ( dev-libs/libpcre:3 ) + elogind? ( sys-auth/elogind ) + equalizer? ( + sci-libs/fftw:3.0= + ) + fftw? ( + sci-libs/fftw:3.0= + ) + gdbm? ( sys-libs/gdbm:= ) + glib? ( >=dev-libs/glib-2.28.0:2 ) + gstreamer? ( + ${gstreamer_deps} + >=dev-libs/glib-2.26.0:2 + ) + jack? ( virtual/jack ) + ldac? ( ${gstreamer_deps} ) + lirc? ( app-misc/lirc ) + ofono-headset? ( >=net-misc/ofono-1.13 ) + orc? ( >=dev-lang/orc-0.4.15 ) + selinux? ( sec-policy/selinux-pulseaudio ) + sox? ( >=media-libs/soxr-0.1.1 ) + ssl? ( dev-libs/openssl:= ) + systemd? ( sys-apps/systemd:= ) + tcpd? ( sys-apps/tcp-wrappers ) + udev? ( >=virtual/udev-143[hwdb(+)] ) + valgrind? ( dev-util/valgrind ) + webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2:0 ) + X? ( + >=x11-libs/libxcb-1.6 + x11-libs/libICE + x11-libs/libSM + >=x11-libs/libX11-1.4.0 + >=x11-libs/libXtst-1.0.99.2 + ) + zeroconf? ( >=net-dns/avahi-0.6.12[dbus] ) +" + +# pulseaudio ships a bundle xmltoman, which uses XML::Parser +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-libs/check-0.9.10 ) + X? ( x11-base/xorg-proto ) +" + +# alsa-utils dep is for the alsasound init.d script (see bug 155707); TODO: read it +# NOTE: Only system-wide needs acct-group/audio unless elogind/systemd is not used +RDEPEND=" + ${COMMON_DEPEND} + system-wide? ( + alsa? ( media-sound/alsa-utils ) + acct-user/pulse + acct-group/audio + acct-group/pulse-access + ) + bluetooth? ( + ldac? ( media-plugins/gst-plugins-ldac ) + aptx? ( media-plugins/gst-plugins-openaptx ) + ) + !media-video/pipewire[sound-server(+)] +" +unset gstreamer_deps + +# This is a PDEPEND to avoid a circular dep +PDEPEND=" + alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio] ) ) +" + +BDEPEND=" + dev-lang/perl + dev-perl/XML-Parser + sys-devel/gettext + sys-devel/m4 + virtual/libiconv + virtual/libintl + virtual/pkgconfig + orc? ( >=dev-lang/orc-0.4.15 ) + system-wide? ( dev-util/unifdef ) +" + +DOCS=( NEWS README ) + +# patches merged upstream, to be removed with 16.2 or later bump +PATCHES=( + "${FILESDIR}"/pulseaudio-16.0-optional-module-console-kit.patch + "${FILESDIR}"/pulseaudio-16.1-module-combine-sink-load-crash.patch + "${FILESDIR}"/pulseaudio-16.1-module-combine-sink-unload-crash.patch + "${FILESDIR}"/pulseaudio-16.1-move-qpaeq-to-daemon.patch + # alignment fix changes internal abi, added requirement matching >=media-libs/libpulse-16.1-r3 + "${FILESDIR}"/pulseaudio-16.1-fix-memblock-alignment.patch + "${FILESDIR}"/pulseaudio-16.1-add-more-standard-samplerates.patch + "${FILESDIR}"/pulseaudio-16.1-fix-resampler-oversized-memblock.patch + "${FILESDIR}"/pulseaudio-16.1-fix-uac2-broken-avoid-resampling.patch +) + +src_prepare() { + default + + gnome2_environment_reset +} + +src_configure() { + local enable_bluez5_gstreamer="disabled" + if use aptx || use ldac ; then + enable_bluez5_gstreamer="enabled" + fi + + local enable_fftw="disabled" + if use equalizer || use fftw ; then + enable_fftw="enabled" + fi + + local emesonargs=( + --localstatedir="${EPREFIX}"/var + + -Ddaemon=true + -Dclient=false + -Ddoxygen=false + -Dgcov=false + -Dman=true + # tests involve random modules, so just do them for the native # TODO: tests should run always + $(meson_use test tests) + -Ddatabase=$(usex gdbm gdbm simple) # tdb is also an option but no one cares about it + -Dstream-restore-clear-old-devices=true + -Drunning-from-build-tree=false + + # Paths + -Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/pulseaudio/modules" # Was $(get_libdir)/${P} + -Dsystemduserunitdir=$(systemd_get_userunitdir) + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + -Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value + + # Optional features + $(meson_feature alsa) + $(meson_feature asyncns) + $(meson_feature zeroconf avahi) + $(meson_feature bluetooth bluez5) + -Dbluez5-gstreamer=${enable_bluez5_gstreamer} + $(meson_use bluetooth bluez5-native-headset) + $(meson_use ofono-headset bluez5-ofono-headset) + -Dconsolekit=disabled + $(meson_feature dbus) + $(meson_feature elogind) + -Dfftw=${enable_fftw} + $(meson_feature glib) # WARNING: toggling this likely changes ABI + $(meson_feature glib gsettings) # Supposedly correct? + $(meson_feature gstreamer) + -Dgtk=disabled + -Dhal-compat=false + -Dipv6=true + $(meson_feature jack) + $(meson_feature lirc) + $(meson_feature ssl openssl) + $(meson_feature orc) + $(meson_feature oss oss-output) + -Dsamplerate=disabled # Matches upstream + $(meson_feature sox soxr) + -Dspeex=enabled + $(meson_feature systemd) + $(meson_feature tcpd tcpwrap) + $(meson_feature udev) + $(meson_feature valgrind) + $(meson_feature X x11) + + # Echo cancellation + -Dadrian-aec=false # Not packaged? + $(meson_feature webrtc-aec) + ) + + meson_src_configure +} + +src_install() { + meson_src_install + + # qpaeq moved to media-sound/qpaeq + if [[ -f "${ED}"/usr/bin/qpaeq ]]; then + rm "${ED}"/usr/bin/qpaeq || die + fi + + # Upstream installs 'pactl' if client is built, with all symlinks except for + # 'pulseaudio', 'pacmd' and 'pasuspender' which are installed if server is built. + # This trips QA warning, workaround: + # - install missing aliases in media-libs/libpulse (client build) + # - remove corresponding symlinks in media-sound/pulseaudio-daemonclient (server build) + rm "${D}/$(get_bashcompdir)"/pulseaudio || die + rm "${D}/$(get_bashcompdir)"/pacmd || die + rm "${D}/$(get_bashcompdir)"/pasuspender || die + + # Daemon configuration scripts will try to load snippets from corresponding '.d' dirs. + # Install these dirs to silence a warning if they are missing. + keepdir /etc/pulse/default.pa.d + keepdir /etc/pulse/system.pa.d + + if use system-wide; then + newconfd "${FILESDIR}"/pulseaudio.conf.d pulseaudio + + use_define() { + local define=${2:-$(echo ${1} | tr '[:lower:]' '[:upper:]')} + + use "${1}" && echo "-D${define}" || echo "-U${define}" + } + + unifdef -x 1 \ + $(use_define zeroconf AVAHI) \ + $(use_define alsa) \ + $(use_define bluetooth) \ + $(use_define udev) \ + "${FILESDIR}"/pulseaudio.init.d-5 \ + > "${T}"/pulseaudio \ + || die + + doinitd "${T}"/pulseaudio + + systemd_dounit "${FILESDIR}"/pulseaudio.service + + # We need /var/run/pulse, bug 442852 + newtmpfiles "${FILESDIR}"/pulseaudio.tmpfiles pulseaudio.conf + else + # Prevent warnings when system-wide is not used, bug 447694 + if use dbus; then + rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf || die + fi + fi + + if use zeroconf; then + sed -i \ + -e '/module-zeroconf-publish/s:^#::' \ + "${ED}/etc/pulse/default.pa" \ + || die + fi + + # Only enable autospawning pulseaudio daemon on systems without systemd + if ! use systemd; then + insinto /etc/pulse/client.conf.d + newins "${FILESDIR}/enable-autospawn.conf" "enable-autospawn.conf" + fi + + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die +} + +pkg_postinst() { + gnome2_schemas_update + + use udev && udev_reload + + if use system-wide; then + tmpfiles_process "pulseaudio.conf" + + elog "You have enabled the 'system-wide' USE flag for pulseaudio." + elog "This mode should only be used on headless servers, embedded systems," + elog "or thin clients. It will usually require manual configuration, and is" + elog "incompatible with many expected pulseaudio features." + elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED." + elog "" + elog "For more information, see" + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/" + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/" + elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server" + elog "" + fi + + if use bluetooth; then + elog "You have enabled bluetooth USE flag for pulseaudio. Daemon will now handle" + elog "bluetooth Headset (HSP HS and HSP AG) and Handsfree (HFP HF) profiles using" + elog "native headset backend by default. This can be selectively disabled" + elog "via runtime configuration arguments to module-bluetooth-discover" + elog "in /etc/pulse/default.pa" + elog "To disable HFP HF append enable_native_hfp_hf=false" + elog "To disable HSP HS append enable_native_hsp_hs=false" + elog "To disable HSP AG append headset=auto or headset=ofono" + elog "(note this does NOT require enabling USE ofono)" + elog "" + fi + + if use ofono-headset; then + elog "You have enabled both native and ofono headset profiles. The runtime decision" + elog "which to use is done via the 'headset' argument of module-bluetooth-discover." + elog "" + fi + + if use gstreamer; then + elog "GStreamer-based RTP implementation modile enabled." + elog "To use OPUS payload install media-plugins/gst-plugins-opus" + elog "and add enable_opus=1 argument to module-rtp-send" + elog "" + fi + + if use systemd; then + elog "Pulseaudio autospawn by client library is no longer enabled when systemd is available." + elog "It's recommended to start pulseaudio via its systemd user units:" + elog "" + elog " systemctl --user enable pulseaudio.service pulseaudio.socket" + elog "" + elog "Root user can change system default configuration for all users:" + elog "" + elog " systemctl --global enable pulseaudio.service pulseaudio.socket" + elog "" + elog "If you would like to enable autospawn by client library, edit autospawn flag in /etc/pulse/client.conf like this:" + elog "" + elog " autospawn = yes" + elog "" + elog "The change from autospawn to user units will take effect after restarting." + elog "" + fi + + optfeature_header "PulseAudio can be enhanced by installing the following:" + use equalizer && optfeature "qpaeq script for equalizer GUI" media-sound/qpaeq + use dbus && optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit +} + +pkg_postrm() { + gnome2_schemas_update + use udev && udev_reload +} diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest index 4b4d95a210e9..90ca4964d842 100644 --- a/media-video/pipewire/Manifest +++ b/media-video/pipewire/Manifest @@ -1,3 +1,4 @@ DIST pipewire-0.3.75.tar.bz2 1629466 BLAKE2B e69dbb93ebe50f037bc602aa86733c8ba9ccbe57db520cd34ea025c9bf153dbd848882dbb4c2a4e830785a302a7cb7d4b7c1856c9a4be6f1c5ada92f70d1729b SHA512 19bf292f951f68de19cdfd3c76ee0e538a2ad3022e2669a4a19b40d26c2b16938799470b85def4b74b27b8c8137d03a05780d6bab0f38fb0835b528f2cd34f5d DIST pipewire-0.3.77.tar.bz2 1643767 BLAKE2B 3a2df9cdedf77d5b4927e115ddd7da0d1eecc85322ce7995a49945d41cc83b9a543c1382ad304bdb549f67ac444f7bca6871248654fb4d2e21b25eb55411940c SHA512 422c8504f608d6845b94351a336ab528f51195551418d0d245064972ed784817cacafc6afaad74eb0e0ea80474a9da33ef6917c1f60d3f8f45d70c54971f0760 DIST pipewire-0.3.80.tar.bz2 1655137 BLAKE2B cf55e01b6fff29e7ef1f40e9a8f28788b9f538380232821b334359844b33b12b913375ae14e4589d7ae9cd26d22bc841d8103d41c7eb3ea1a9f0c1db1abc6507 SHA512 77e26b6cbefc091ea703b53d147accbd9495f97ba57618a21366b0747074de3ed1060c03e91362f5cf9dc5c256da6d541eccaff8de306b369730400c7b7f46b2 +DIST pipewire-0.3.81.tar.bz2 1658240 BLAKE2B 8c67d6fbc5bc72354562e1628feb09e3baef3fd38be70bde24b145a6d57fe3a90b3bc466d4289be16fa36d936966d7d3e68759c38a7cd1383bd04b4f2a173687 SHA512 2366819d6ddad80d0db47aacc81c25c12bc69f4bd337b296bd9e8b417dd30c5e65b86d9cbb700f9aca0c464bcd2738284ee07f45f1cf68962ada9cf37799ebc7 diff --git a/media-video/pipewire/pipewire-0.3.81.ebuild b/media-video/pipewire/pipewire-0.3.81.ebuild new file mode 100644 index 000000000000..7a471fb632bf --- /dev/null +++ b/media-video/pipewire/pipewire-0.3.81.ebuild @@ -0,0 +1,475 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# 1. Please regularly check (even at the point of bumping) Fedora's packaging +# for needed backports at https://src.fedoraproject.org/rpms/pipewire/tree/rawhide. +# +# 2. Upstream also sometimes amend release notes for the previous release to mention +# needed patches, e.g. https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros +# +# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things +# continue to move quickly. It's not uncommon for fixes to be made shortly +# after releases. + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit flag-o-matic meson-multilib optfeature prefix python-any-r1 systemd tmpfiles udev + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" + inherit git-r3 +else + if [[ ${PV} == *_p* ]] ; then + MY_COMMIT="" + SRC_URI="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${MY_COMMIT}/pipewire-${MY_COMMIT}.tar.bz2 -> ${P}.tar.bz2" + S="${WORKDIR}"/${PN}-${MY_COMMIT} + else + SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2" + fi + + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +DESCRIPTION="Multimedia processing graphs" +HOMEPAGE="https://pipewire.org/" + +LICENSE="MIT LGPL-2.1+ GPL-2" +# ABI was broken in 0.3.42 for https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49 +SLOT="0/0.4" +IUSE="bluetooth dbus doc echo-cancel extra ffmpeg flatpak gstreamer gsettings ieee1394 jack-client jack-sdk liblc3 lv2" +IUSE+=" modemmanager pipewire-alsa readline roc sound-server ssl system-service systemd test v4l X zeroconf" + +# 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)! + +# - TODO: There should be "sound-server? ( || ( alsa bluetooth ) )" here, but ALSA is always enabled +# - TODO: Pulseaudio alsa plugin performs runtime check that pulseaudio server connection will work +# which provides adequate guarantee that alsa-lib will be able to provide audio services. +# If that works, pulseaudio defaults are loaded into alsa-lib runtime replacing default PCM and CTL. +# When pipewire-alsa will be able to perform similar check, pipewire-alsa can be enabled unconditionally. +# - ffmpeg is only used for pw-cat. We don't build the spa plugin which receives barely any activity. +REQUIRED_USE=" + ffmpeg? ( extra ) + bluetooth? ( dbus ) + jack-sdk? ( !jack-client ) + modemmanager? ( bluetooth ) + system-service? ( systemd ) + !sound-server? ( !pipewire-alsa ) + jack-client? ( dbus ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + >=dev-util/meson-0.59 + virtual/pkgconfig + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]') + dbus? ( dev-util/gdbus-codegen ) + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) +" +# While udev could technically be optional, it's needed for a numebr of options, +# and not really worth it, bug #877769. +RDEPEND=" + acct-group/audio + acct-group/pipewire + media-libs/alsa-lib + sys-libs/ncurses:=[unicode(+)] + virtual/libintl[${MULTILIB_USEDEP}] + virtual/libudev[${MULTILIB_USEDEP}] + bluetooth? ( + dev-libs/glib + media-libs/fdk-aac + media-libs/libldac + media-libs/libfreeaptx + media-libs/opus + media-libs/sbc + >=net-wireless/bluez-4.101:= + virtual/libusb:1 + ) + dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) + echo-cancel? ( media-libs/webrtc-audio-processing:0 ) + extra? ( >=media-libs/libsndfile-1.0.20 ) + ffmpeg? ( media-video/ffmpeg:= ) + flatpak? ( dev-libs/glib ) + gstreamer? ( + >=dev-libs/glib-2.32.0:2 + >=media-libs/gstreamer-1.10.0:1.0 + media-libs/gst-plugins-base:1.0 + ) + gsettings? ( >=dev-libs/glib-2.26.0:2 ) + ieee1394? ( media-libs/libffado[${MULTILIB_USEDEP}] ) + jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] ) + jack-sdk? ( + !media-sound/jack-audio-connection-kit + !media-sound/jack2 + ) + liblc3? ( media-sound/liblc3 ) + lv2? ( media-libs/lilv ) + modemmanager? ( >=net-misc/modemmanager-1.10.0 ) + pipewire-alsa? ( >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}] ) + sound-server? ( !media-sound/pulseaudio-daemon ) + roc? ( media-libs/roc-toolkit ) + readline? ( sys-libs/readline:= ) + ssl? ( dev-libs/openssl:= ) + systemd? ( sys-apps/systemd ) + system-service? ( acct-user/pipewire ) + v4l? ( media-libs/libv4l ) + X? ( + media-libs/libcanberra + x11-libs/libX11 + x11-libs/libXfixes + ) + zeroconf? ( net-dns/avahi ) +" + +DEPEND="${RDEPEND}" + +# TODO: Consider use cases where pipewire is not used for driving audio +# Doing so with WirePlumber currently involves editing Lua scripts +PDEPEND=">=media-video/wireplumber-0.4.8-r3" + +# 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-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 +) + +python_check_deps() { + python_has_version "dev-python/docutils[${PYTHON_USEDEP}]" +} + +src_prepare() { + default + + # Used for upstream backports + [[ -d "${FILESDIR}"/${PV} ]] && eapply "${FILESDIR}"/${PV} +} + +multilib_src_configure() { + # https://bugs.gentoo.org/838301 + filter-flags -fno-semantic-interposition + + local emesonargs=( + -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} + + $(meson_feature dbus) + $(meson_native_use_feature zeroconf avahi) + $(meson_native_use_feature doc docs) + $(meson_native_enabled examples) # TODO: Figure out if this is still important now that media-session gone + $(meson_native_enabled man) + $(meson_feature test tests) + -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests + $(meson_feature ieee1394 libffado) + $(meson_native_use_feature gstreamer) + $(meson_native_use_feature gstreamer gstreamer-device-provider) + $(meson_native_use_feature gsettings) + $(meson_native_use_feature systemd) + + $(meson_native_use_feature system-service systemd-system-service) + -Dsystemd-system-unit-dir="$(systemd_get_systemunitdir)" + -Dsystemd-user-unit-dir="$(systemd_get_userunitdir)" + + $(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 (NOTE: media-session is gone so IUSE=alsa/spa_alsa/alsa-backend might be possible) + -Dcompress-offload=disabled # TODO: tinycompress unpackaged + -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) + # https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1379 + $(meson_native_use_feature modemmanager bluez5-backend-native-mm) + $(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) + $(meson_native_use_feature bluetooth opus) + $(meson_native_use_feature bluetooth bluez5-codec-opus) + $(meson_native_use_feature bluetooth libusb) # At least for now only used by bluez5 native (quirk detection of adapters) + $(meson_native_use_feature echo-cancel echo-cancel-webrtc) #807889 + -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_native_use_feature ffmpeg pw-cat-ffmpeg) + $(meson_native_use_feature flatpak) + -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_use 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 + -Dbluez5-codec-lc3plus=disabled # unpackaged + $(meson_native_use_feature liblc3 bluez5-codec-lc3) + $(meson_native_use_feature lv2) + $(meson_native_use_feature v4l v4l2) + -Dlibcamera=disabled # libcamera is not in Portage tree + $(meson_native_use_feature roc) + $(meson_native_use_feature readline) + $(meson_native_use_feature ssl raop) + -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) + -Dlibmysofa=disabled # libmysofa is unpackaged + $(meson_native_use_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) + -Dsession-managers="[]" # All available session managers are now their own projects, so there's nothing to build + + # We still have <5.16 kernels packaged in Gentoo and 6.1 (LTS) only + # just became stable, with 5.15 being the previous LTS. Many people + # are still on it. + -Dpam-defaults-install=true + + # Just for bell sounds in X11 right now. + $(meson_native_use_feature X x11) + $(meson_native_use_feature X x11-xfixes) + $(meson_native_use_feature X libcanberra) + ) + + meson_src_configure +} + +multilib_src_test() { + meson_src_test --timeout-multiplier 10 +} + +multilib_src_install() { + # Our custom DOCS do not exist in multilib source directory + DOCS= meson_src_install +} + +multilib_src_install_all() { + einstalldocs + + if use pipewire-alsa; then + dodir /etc/alsa/conf.d + + # Install pipewire conf loader hook + insinto /usr/share/alsa/alsa.conf.d + doins "${FILESDIR}"/99-pipewire-default-hook.conf + eprefixify "${ED}"/usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf + + # These will break if someone has /etc that is a symbolic 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-hook.conf /etc/alsa/conf.d/99-pipewire-default-hook.conf + fi + + # Enable required wireplumber alsa and bluez monitors + if use sound-server; then + dodir /etc/wireplumber/main.lua.d + echo "alsa_monitor.enabled = true" > "${ED}"/etc/wireplumber/main.lua.d/89-gentoo-sound-server-enable-alsa-monitor.lua || die + + dodir /etc/wireplumber/bluetooth.lua.d + echo "bluez_monitor.enabled = true" > "${ED}"/etc/wireplumber/bluetooth.lua.d/89-gentoo-sound-server-enable-bluez-monitor.lua || die + fi + + if use system-service; then + newtmpfiles - pipewire.conf <<-EOF || die + d /run/pipewire 0755 pipewire pipewire - - + EOF + fi + + if ! use systemd; then + insinto /etc/xdg/autostart + newins "${FILESDIR}"/pipewire.desktop-r2 pipewire.desktop + + exeinto /usr/bin + newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r3 gentoo-pipewire-launcher + + doman "${FILESDIR}"/gentoo-pipewire-launcher.1 + + # Disable pipewire-pulse if sound-server is disabled. + if ! use sound-server ; then + sed -i -s '/pipewire -c pipewire-pulse.conf/s/^/#/' "${ED}"/usr/bin/gentoo-pipewire-launcher || die + fi + + eprefixify "${ED}"/usr/bin/gentoo-pipewire-launcher + fi +} + +pkg_postrm() { + udev_reload +} + +pkg_preinst() { + HAD_SOUND_SERVER=0 + HAD_SYSTEM_SERVICE=0 + + if has_version "media-video/pipewire[sound-server(-)]" ; then + HAD_SOUND_SERVER=1 + fi + + if has_version "media-video/pipewire[system-service(-)]" ; then + HAD_SYSTEM_SERVICE=1 + fi +} + +pkg_postinst() { + udev_reload + + use system-service && tmpfiles_process pipewire.conf + + local ver + for ver in ${REPLACING_VERSIONS} ; do + if has_version kde-plasma/kwin[screencast] || has_version x11-wm/mutter[screencast] ; then + # https://bugs.gentoo.org/908490 + # https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3243 + ewarn "Please restart KWin/Mutter after upgrading PipeWire." + ewarn "Screencasting may not work until you do." + fi + + if ver_test ${ver} -le 0.3.66-r1 ; then + elog ">=pipewire-0.3.66 uses the 'pipewire' group to manage permissions" + elog "and limits needed to function smoothly:" + elog + elog "1. Please make sure your user is in the 'pipewire' group for" + elog "the best experience with realtime scheduling (PAM limits behavior)!" + elog "You can add your account with:" + elog " usermod -aG pipewire <youruser>" + elog + elog "2. For the best experience with fast user switching, it is recommended" + elog "that you remove your user from the 'audio' group unless you rely on the" + elog "audio group for device access control or ACLs.:" + elog " usermod -rG audio <youruser>" + elog + + if ! use jack-sdk ; then + elog + 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 <application> 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 + ewarn + ewarn "PipeWire daemon startup has been moved to a launcher script!" + ewarn "Make sure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist or no" + ewarn "longer is set to start a session manager or PulseAudio compatibility daemon (all" + ewarn "lines similar to '{ path = /usr/bin/pipewire*' should be commented out)" + ewarn + ewarn "Those manually starting /usr/bin/pipewire via .xinitrc or similar _must_ from" + ewarn "now on start ${EROOT}/usr/bin/gentoo-pipewire-launcher instead! It is highly" + ewarn "advised that a D-Bus user session is set up before starting the script." + ewarn + fi + + if use sound-server && ( has_version 'media-sound/pulseaudio[daemon]' || has_version 'media-sound/pulseaudio-daemon' ) ; then + elog + elog "This ebuild auto-enables PulseAudio replacement. Because of that, users" + elog "are recommended to edit pulseaudio client configuration files:" + elog "${EROOT}/etc/pulse/client.conf and ${EROOT}/etc/pulse/client.conf.d/enable-autospawn.conf" + elog "if it exists, and disable autospawning 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}/usr/bin/gentoo-pipewire-launcher by commenting out the relevant" + elog "command:" + elog + elog "#${EROOT}/usr/bin/pipewire -c pipewire-pulse.conf &" + elog + fi + + if has_version 'net-misc/ofono' ; then + ewarn "Native backend has become default. Please disable oFono via:" + if systemd_is_booted ; then + ewarn "systemctl disable ofono" + else + ewarn "rc-update delete ofono" + fi + fi + fi + done + + if [[ ${HAD_SOUND_SERVER} -eq 0 || -z ${REPLACING_VERSIONS} ]] ; then + # TODO: We could drop most of this if we set up systemd presets? + # They're worth looking into because right now, the out-of-the-box experience + # is automatic on OpenRC, while it needs manual intervention on systemd. + if use sound-server && use systemd ; then + elog + elog "When switching from PulseAudio, you may need to disable PulseAudio:" + elog + elog " systemctl --user disable pulseaudio.service pulseaudio.socket" + elog + elog "To use PipeWire, the user units must be manually enabled" + elog "by running this command as each user you use for desktop activities:" + elog + elog " systemctl --user enable pipewire.socket pipewire-pulse.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 WirePlumber" + elog "for relevant users:" + elog + elog " systemctl --user disable pipewire-media-session.service" + elog " systemctl --user --force enable wireplumber.service" + elog + elog "Root user may replace --user with --global to change system default" + elog "configuration for all of the above commands." + elog + fi + + if ! use sound-server ; then + ewarn + ewarn "USE=sound-server is disabled! If you want PipeWire to provide" + ewarn "your sound, please enable it. See the wiki at" + ewarn "https://wiki.gentoo.org/wiki/PipeWire#Replacing_PulseAudio" + ewarn "for more details." + ewarn + fi + fi + + if use system-service && [[ ${HAD_SYSTEM_SERVICE} -eq 0 || -z ${REPLACING_VERSIONS} ]] ; then + ewarn + ewarn "You have enabled the system-service USE flag, which installs" + ewarn "the system-wide systemd units that enable PipeWire to run as a system" + ewarn "service. This is more than likely NOT what you want. You are strongly" + ewarn "advised not to enable this mode and instead stick with systemd user" + ewarn "units. The default configuration files will likely not work out of the" + ewarn "box, and you are on your own with configuration." + ewarn + 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 via D-Bus" sys-auth/rtkit + + if use sound-server && ! use pipewire-alsa; then + optfeature "ALSA plugin to use PulseAudio interface for output" "media-plugins/alsa-plugins[pulseaudio]" + fi +} diff --git a/sys-apps/system-monitoring-center/system-monitoring-center-2.21.2.ebuild b/sys-apps/system-monitoring-center/system-monitoring-center-2.21.2.ebuild index 0d57d2200134..da1003cb4f3f 100644 --- a/sys-apps/system-monitoring-center/system-monitoring-center-2.21.2.ebuild +++ b/sys-apps/system-monitoring-center/system-monitoring-center-2.21.2.ebuild @@ -16,7 +16,7 @@ if [[ ${PV} == *9999* ]] ; then else SRC_URI="https://github.com/hakandundar34coding/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~x86" + KEYWORDS="amd64 ~x86" fi LICENSE="GPL-3+" |