[gentoo-commits] repo/gentoo:master commit in: media-sound/pavucontrol/, media-sound/pavucontrol/files/

2025-03-13 Thread Sam James
commit: 908e3716b57178e0780f624b795236dea78ea5b4
Author: Alfred Wingate  protonmail  com>
AuthorDate: Mon Mar 10 08:39:48 2025 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Mar 13 13:37:08 2025 +
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  protonmail.com>
Signed-off-by: Sam James  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 ..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 53b44d9ccd2e095a9c0ce1511e122e4ed375 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate 
+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 
+--- 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 protected]
Gentoo Sound project
 
+
+   Enable sound notifications using 
media-libs/libcanberra
+
 

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 ..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
+}



[gentoo-commits] repo/gentoo:master commit in: media-sound/pavucontrol/, media-sound/pavucontrol/files/

2024-12-13 Thread Patrick McLean
commit: 7141c6e4df2f27a7bbb6e50955c9e1deb306e8c2
Author: Patrick McLean  gentoo  org>
AuthorDate: Fri Dec 13 17:06:31 2024 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Fri Dec 13 17:06:31 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7141c6e4

media-sound/pavucontrol: add 6.1

Signed-off-by: Patrick McLean  gentoo.org>

 media-sound/pavucontrol/Manifest   |  1 +
 .../pavucontrol/files/pavucontrol-6.1-docdir.patch | 13 +++
 media-sound/pavucontrol/pavucontrol-6.1.ebuild | 41 ++
 3 files changed, 55 insertions(+)

diff --git a/media-sound/pavucontrol/Manifest b/media-sound/pavucontrol/Manifest
index 33ea38be36bb..2efaa217b7c5 100644
--- a/media-sound/pavucontrol/Manifest
+++ b/media-sound/pavucontrol/Manifest
@@ -1 +1,2 @@
 DIST pavucontrol-5.0.tar.xz 194248 BLAKE2B 
9e6b9b7d94be51a4ad8b5310e031c4fed0f5299e67c770c9a573c0647edf27345014fb6504892fad29b9b5e79ce43ed312217dbed8e2b31b805f291531062903
 SHA512 
5673d783c2c819a68b49025c051bedd39f4caba446a479797b06569e24a96acc0924ba680d2416baff8c3211cfc7c94760d503900207fbe7c89c5cb2adaebec1
+DIST pavucontrol-6.1.tar.xz 169488 BLAKE2B 
888fbe404482e5da5b59d10f913f174daa128029babbb9493df5df5d6d3c0b95e22d03a3ec2629fbcd4f33c6267f6e2173428d7eb9be8b7f4c7f012d3e777e92
 SHA512 
90a0d85916010f624928f6aa68524f776b0a529d84e75287739a07db48e4084767ca0caf75503e44e04d8add84b1d668ee9ed5b822b8f8f945cd902cdf78413a

diff --git a/media-sound/pavucontrol/files/pavucontrol-6.1-docdir.patch 
b/media-sound/pavucontrol/files/pavucontrol-6.1-docdir.patch
new file mode 100644
index ..55dd41921a37
--- /dev/null
+++ b/media-sound/pavucontrol/files/pavucontrol-6.1-docdir.patch
@@ -0,0 +1,13 @@
+diff --git a/meson.build b/meson.build
+index bc1a300..553abc1 100644
+--- a/meson.build
 b/meson.build
+@@ -28,7 +28,7 @@ configinc = include_directories('.')
+ 
+ prefix = get_option('prefix')
+ datadir = join_paths(prefix, get_option('datadir'))
+-docdir = join_paths(datadir, 'doc', 'pavucontrol')
++docdir = join_paths(datadir, 'doc', 'pavucontrol-' + meson.project_version())
+ localedir = join_paths(prefix, get_option('localedir'))
+ 
+ cdata = configuration_data()

diff --git a/media-sound/pavucontrol/pavucontrol-6.1.ebuild 
b/media-sound/pavucontrol/pavucontrol-6.1.ebuild
new file mode 100644
index ..8cc8143ff6a2
--- /dev/null
+++ b/media-sound/pavucontrol/pavucontrol-6.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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="X"
+
+inherit meson
+
+RDEPEND="
+   dev-libs/json-glib
+   dev-cpp/gtkmm:4.0
+   X? ( media-libs/libcanberra-gtk3 )
+   dev-libs/libsigc++:3
+   >=media-libs/libpulse-15.0[glib]
+   virtual/freedesktop-icon-theme
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+   virtual/pkgconfig
+   sys-devel/gettext
+"
+
+PATCHES=(
+   "${FILESDIR}/pavucontrol-6.1-docdir.patch"
+)
+
+src_configure() {
+   local emesonargs=(
+   -Dlynx=false
+   )
+
+   meson_src_configure
+}



[gentoo-commits] repo/gentoo:master commit in: media-sound/pavucontrol/, media-sound/pavucontrol/files/

2024-04-18 Thread Miroslav Šulc
commit: 61c44287d935124e91f90839c177afc5b4e5cb5e
Author: Adrian Ratiu  collabora  com>
AuthorDate: Fri Mar 29 21:59:36 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Thu Apr 18 10:57:08 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61c44287

media-libs/pavucontrol: make X optional

The only dependency requiring X is libcanberra,
which I'm in the process of fixing upstream [1].

In the meantime, since we can't do a clean backport
from upstream because they moved to gtk 4 and meson
after releasing 5.0, I'm adding an autotools patch
and fixing the ebuild so it can work with USE=-X.

I am upstreaming the patch, so by the time we
upgrade to the next release we can drop it (and
move to meson / gtk 4).

[1] https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/merge_requests/84
Closes: https://bugs.gentoo.org/834794
Signed-off-by: Adrian Ratiu  collabora.com>
Closes: https://github.com/gentoo/gentoo/pull/36300
Signed-off-by: Miroslav Šulc  gentoo.org>

 ...pavucontrol-5.0-make-libcanberra-optional.patch | 125 +
 media-sound/pavucontrol/pavucontrol-5.0-r3.ebuild  |  52 +
 2 files changed, 177 insertions(+)

diff --git 
a/media-sound/pavucontrol/files/pavucontrol-5.0-make-libcanberra-optional.patch 
b/media-sound/pavucontrol/files/pavucontrol-5.0-make-libcanberra-optional.patch
new file mode 100644
index ..595cf9f8d0bd
--- /dev/null
+++ 
b/media-sound/pavucontrol/files/pavucontrol-5.0-make-libcanberra-optional.patch
@@ -0,0 +1,125 @@
+From 8916cb62b0facf45ccb220fd2efd5746fdaf79b8 Mon Sep 17 00:00:00 2001
+From: Adrian Ratiu 
+Date: Mon, 25 Mar 2024 02:19:42 +0200
+Subject: [PATCH] Make libcanberra optional
+
+libcanberra is an old abandoned project whose last release
+was well over a decade ago, despite getting some few fixes
+on its master branch since then, which are unreleased.
+
+My problem with libcanberra is that it can't be built on
+pure wayland systems (no X11 headers) which are becoming
+more common nowadays.
+
+It is the only thing keeping pavucontrol tied to X11, all
+other dependencies (eg gtk+) build fine on pure wayland.
+Since canberra is not a core part of the project, let's
+make it optional so pavucontrol can build & work on
+pure wayland systems.
+
+Ideally in the future libcanberra can be replaced with
+something else, however I don't have the bandwidth to
+take this on for now, so I'm just making it optional.
+
+Signed-off-by: Adrian Ratiu 
+---
+ configure.ac   | 9 -
+ src/pavuapplication.cc | 2 --
+ src/pavucontrol.cc | 4 
+ src/sinkwidget.cc  | 5 +
+ 4 files changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 056ba5e..1b793b8 100644
+--- a/configure.ac
 b/configure.ac
+@@ -41,10 +41,17 @@ AC_TYPE_SIGNAL
+ AC_HEADER_STDC
+ AX_CXX_COMPILE_STDCXX_11
+ 
+-PKG_CHECK_MODULES(GUILIBS, [ gtkmm-3.0 >= 3.22 sigc++-2.0 libcanberra-gtk3 >= 
0.16 json-glib-1.0 ])
++PKG_CHECK_MODULES(GUILIBS, [ gtkmm-3.0 >= 3.22 sigc++-2.0 json-glib-1.0 ])
+ AC_SUBST(GUILIBS_CFLAGS)
+ AC_SUBST(GUILIBS_LIBS)
+ 
++AC_CHECK_LIB([canberra-gtk3], [canberra_gtk_play], [HAVE_LIBCANBERRA=yes], 
[HAVE_LIBCANBERRA=no])
++AS_IF([test "x$HAVE_LIBCANBERRA" = "xyes"], [
++AC_DEFINE([HAVE_LIBCANBERRA], [1], [Have libcanberra support.])
++AC_SUBST(LIBCANBERRA_CFLAGS)
++AC_SUBST(LIBCANBERRA_LIBS)
++])
++
+ if test -d ../pulseaudio ; then
+PULSE_CFLAGS='-I$(top_srcdir)/../pulseaudio/src'
+PULSE_LIBS='-L$(top_srcdir)/../pulseaudio/src/.libs -lpulse 
-lpulse-mainloop-glib'
+diff --git a/src/pavuapplication.cc b/src/pavuapplication.cc
+index 6773b53..60c016c 100644
+--- a/src/pavuapplication.cc
 b/src/pavuapplication.cc
+@@ -24,8 +24,6 @@
+ 
+ #include "i18n.h"
+ 
+-#include 
+-
+ #include "pavuapplication.h"
+ #include "pavucontrol.h"
+ #include "mainwindow.h"
+diff --git a/src/pavucontrol.cc b/src/pavucontrol.cc
+index 18d5400..ff652be 100644
+--- a/src/pavucontrol.cc
 b/src/pavucontrol.cc
+@@ -29,7 +29,9 @@
+ #include 
+ #endif
+ 
++#ifdef HAVE_LIBCANBERRA
+ #include 
++#endif
+ 
+ #include "pavucontrol.h"
+ #include "i18n.h"
+@@ -916,7 +918,9 @@ MainWindow* pavucontrol_get_window(pa_glib_mainloop *m, 
bool maximize, bool _ret
+ tab_number = _tab_number;
+ retry = _retry;
+ 
++#ifdef HAVE_LIBCANBERRA
+ ca_context_set_driver(ca_gtk_context_get(), "pulse");
++#endif
+ 
+ mainWindow = MainWindow::create(maximize);
+ 
+diff --git a/src/sinkwidget.cc b/src/sinkwidget.cc
+index f30bd37..41d7bb8 100644
+--- a/src/sinkwidget.cc
 b/src/sinkwidget.cc
+@@ -24,7 +24,10 @@
+ 
+ #include "sinkwidget.h"
+ 
++#ifdef HAVE_LIBCANBERRA
+ #include 
++#endif
++
+ #if HAVE_EXT_DEVICE_RESTORE_API
+ #  include 
+ #  include 
+@@ -120,6 +123,7 @@ void SinkWidget::executeVolumeUpdate() {
+ 
+ pa_operation_unref(o);
+ 
++#ifdef HAVE_LIBCANBERRA
+ ca_context_playing(ca_gtk_context_get(), 2, &playing);
+ if (playing)
+ return;
+@@