commit: 908e3716b57178e0780f624b795236dea78ea5b4 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Mon Mar 10 08:39:48 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Mar 13 13:37:08 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=908e3716
media-sound/pavucontrol: remove libcanberra automagic The X use flag did nothing before and didn't require libcanberra-gtk3. Properly hook up an option for sound support and require just libcanberra. Redo order of dependencies as well, and put the inherit above the rest of the metadata. Bug: https://bugs.gentoo.org/950761 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> .../pavucontrol-6.1-libcanberra-automagic.patch | 39 +++++++++++++++++ media-sound/pavucontrol/metadata.xml | 3 ++ media-sound/pavucontrol/pavucontrol-6.1-r1.ebuild | 50 ++++++++++++++++++++++ 3 files changed, 92 insertions(+) diff --git a/media-sound/pavucontrol/files/pavucontrol-6.1-libcanberra-automagic.patch b/media-sound/pavucontrol/files/pavucontrol-6.1-libcanberra-automagic.patch new file mode 100644 index 000000000000..deef40022731 --- /dev/null +++ b/media-sound/pavucontrol/files/pavucontrol-6.1-libcanberra-automagic.patch @@ -0,0 +1,39 @@ +https://bugs.gentoo.org/950761 +https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/merge_requests/104 + +From 53b44d9ccd2e095a9c0ce1511e122e4ed37bbbb5 Mon Sep 17 00:00:00 2001 +From: Alfred Wingate <[email protected]> +Date: Mon, 10 Mar 2025 20:44:02 +0200 +Subject: [PATCH] Add a option for controlling libcanberra feature + +The retains the previous behavior of automagic except it allows the user to +explicitly enable or disable the feature. + +Chose to call the feature a more agnostic "audio-feedback". + +Bug: https://bugs.gentoo.org/950761 +See-Also: 22b04fff6e881b4e0a1b8344a6513bdf99a10c65 +Signed-off-by: Alfred Wingate <[email protected]> +--- a/meson.build ++++ b/meson.build +@@ -10,7 +10,7 @@ cpp = meson.get_compiler('cpp') + + gtkmm_dep = dependency('gtkmm-4.0', version : '>= 4.0', required : true) + sigcpp_dep = dependency('sigc++-3.0', required : true) +-canberragtk_dep = dependency('libcanberra', version : '>= 0.16', required : false) ++canberragtk_dep = dependency('libcanberra', version : '>= 0.16', required : get_option('audio-feedback')) + + libpulse_dep = dependency('libpulse', version : '>= 5.0', required : true) + libpulsemlglib_dep = dependency('libpulse-mainloop-glib', version : '>= 0.9.16', required : true) +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,3 +1,6 @@ + option('lynx', + type : 'boolean', value : true, + description : 'Enable building of the README text file for installation') ++option('audio-feedback', ++ type : 'feature', value: 'auto', ++ description : 'Play a sound when you change the volume of a sink') +-- +GitLab + diff --git a/media-sound/pavucontrol/metadata.xml b/media-sound/pavucontrol/metadata.xml index b69a849fd57e..aee1b6f2706a 100644 --- a/media-sound/pavucontrol/metadata.xml +++ b/media-sound/pavucontrol/metadata.xml @@ -5,4 +5,7 @@ <email>[email protected]</email> <name>Gentoo Sound project</name> </maintainer> +<use> + <flag name="sound">Enable sound notifications using <pkg>media-libs/libcanberra</pkg></flag> +</use> </pkgmetadata> diff --git a/media-sound/pavucontrol/pavucontrol-6.1-r1.ebuild b/media-sound/pavucontrol/pavucontrol-6.1-r1.ebuild new file mode 100644 index 000000000000..1ee7cbbcd5cb --- /dev/null +++ b/media-sound/pavucontrol/pavucontrol-6.1-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson + +DESCRIPTION="Pulseaudio Volume Control, GTK based mixer for Pulseaudio" +HOMEPAGE="https://freedesktop.org/software/pulseaudio/pavucontrol/" +SRC_URI="https://freedesktop.org/software/pulseaudio/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE="sound" + +RDEPEND=" + dev-cpp/gtkmm:4.0 + dev-libs/json-glib + dev-libs/libsigc++:3 + >=media-libs/libpulse-15.0[glib] + virtual/freedesktop-icon-theme + sound? ( media-libs/libcanberra ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + sys-devel/gettext +" + +PATCHES=( + "${FILESDIR}/pavucontrol-6.1-libcanberra-automagic.patch" +) + +src_prepare() { + default + + # Follow Gentoo FHS with docdir + sed -i -e "/^docdir/ { s/${PN}/${PF}/ }" meson.build || die +} + +src_configure() { + local emesonargs=( + -Dlynx=false + $(meson_feature sound audio-feedback) + ) + + meson_src_configure +}
