From b6cfc0c19effe2d9f7b8ab303cd00636f16da253 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 19 Apr 2024 12:05:02 +0100 Subject: gentoo auto-resync : 19:04:2024 - 12:05:02 --- media-sound/pavucontrol/Manifest | 2 + ...pavucontrol-5.0-make-libcanberra-optional.patch | 125 +++++++++++++++++++++ media-sound/pavucontrol/pavucontrol-5.0-r3.ebuild | 52 +++++++++ 3 files changed, 179 insertions(+) create mode 100644 media-sound/pavucontrol/files/pavucontrol-5.0-make-libcanberra-optional.patch create mode 100644 media-sound/pavucontrol/pavucontrol-5.0-r3.ebuild (limited to 'media-sound/pavucontrol') diff --git a/media-sound/pavucontrol/Manifest b/media-sound/pavucontrol/Manifest index ac0fb7243740..92d1a73c85a4 100644 --- a/media-sound/pavucontrol/Manifest +++ b/media-sound/pavucontrol/Manifest @@ -1,3 +1,5 @@ +AUX pavucontrol-5.0-make-libcanberra-optional.patch 3727 BLAKE2B 27e38b16e1eaf64c7b1c3b0f3a6efc85bd4b290fef8b4c4c64a0e6e24de6565090e8a1f5d0ec1dc6ef1b65ff3c3c0836186ee53f27c844ca68515e98ea239e0c SHA512 3b866adf8495b8ffdbe48329ab4d54663ea3294e031f6d870d3c278b26b1d0314245ed4bca88e905e79cb503506f5762c3332fb5c9cc66ebe8205feb89e21369 DIST pavucontrol-5.0.tar.xz 194248 BLAKE2B 9e6b9b7d94be51a4ad8b5310e031c4fed0f5299e67c770c9a573c0647edf27345014fb6504892fad29b9b5e79ce43ed312217dbed8e2b31b805f291531062903 SHA512 5673d783c2c819a68b49025c051bedd39f4caba446a479797b06569e24a96acc0924ba680d2416baff8c3211cfc7c94760d503900207fbe7c89c5cb2adaebec1 EBUILD pavucontrol-5.0-r2.ebuild 836 BLAKE2B 3a4c18ccd682c477c931dca5e3c5f61700aedf49820933ab17059290824649572f565cd7523493b4e1aa090a62407f65d57891e82a4388981814cc708c0c1395 SHA512 10caf61a4adf2efd673f92a2d75328f884d8e96700e0fc104b384bc8f6a61415d53d67317c1960ad585f4170577062b1c45ec66174a55a3713a1e6e07666483d +EBUILD pavucontrol-5.0-r3.ebuild 1017 BLAKE2B e94815d58fdcd1e34789a7802c6307b7e3ce6665e5e0ff63ac5f47f70afb8c3f3a797265e815b7563ca07eedd5a98bd8c27d4334e64bed6765edcb228e4aea57 SHA512 9ef6f5dfb237f4fa212fa743968d53c5d6b3603f88a9cd869a4662ff22d3b95723bac1c3fc8f366f7a684f926545399dfd4e77ec01f5ef220d200357f04f0010 MISC metadata.xml 250 BLAKE2B 3e6dae5d5f3b3ac412806dd8615a1975c7ea8a64bfd72ad54f2c93a9b24c19c620ac3e8b26e1f6cadec899443e138ee4fb7a82ecb83c784d0c03ee91854d8622 SHA512 2bfce2cf73aefce6dda06ea351cb93b2990b9543f48be1ae5406a5a5acf2c34faed1eb2ce715eb689eb50a9a1add5576b39232eb818c233f5a5589e16032aca8 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 000000000000..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; +@@ -136,6 +140,7 @@ void SinkWidget::executeVolumeUpdate() { + NULL); + + ca_context_change_device(ca_gtk_context_get(), NULL); ++#endif + } + + void SinkWidget::onMuteToggleButton() { +-- +2.43.2 + diff --git a/media-sound/pavucontrol/pavucontrol-5.0-r3.ebuild b/media-sound/pavucontrol/pavucontrol-5.0-r3.ebuild new file mode 100644 index 000000000000..c818ec9985c6 --- /dev/null +++ b/media-sound/pavucontrol/pavucontrol-5.0-r3.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="nls X" + +inherit autotools + +PATCHES=( + "${FILESDIR}/${PN}-5.0-make-libcanberra-optional.patch" +) + +RDEPEND=" + dev-libs/json-glib + X? ( + >=dev-cpp/gtkmm-3.22:3.0[X] + >=media-libs/libcanberra-0.16[gtk3] + ) + !X? ( >=dev-cpp/gtkmm-3.22:3.0 ) + >=dev-libs/libsigc++-2.2:2 + >=media-libs/libpulse-15.0[glib] + virtual/freedesktop-icon-theme +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + nls? ( + dev-util/intltool + sys-devel/gettext + ) +" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myeconfargs=( + --disable-lynx + $(use_enable nls) + ) + econf "${myeconfargs[@]}" +} -- cgit v1.2.3