summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-09-03 19:31:13 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2024-09-04 08:55:40 +0200
commit0f186d93d80ca99a9f9e64357b54e1a8bda34f66 (patch)
treee66cef6b238c75b29378d5ca04e269513e2e67e7 /kde-apps/kmix
parentkde-frameworks/kwallet: Drop pointless slot pinning from optfeature (diff)
downloadgentoo-0f186d93d80ca99a9f9e64357b54e1a8bda34f66.tar.gz
gentoo-0f186d93d80ca99a9f9e64357b54e1a8bda34f66.tar.bz2
gentoo-0f186d93d80ca99a9f9e64357b54e1a8bda34f66.zip
kde-apps/kmix: Patch out implicit kde-plasma/plasma-pa RDEPEND
Makes it possible to drop the (futile, anyway) dependency on kde-plasma/kde-cli-tools:* for runtime usage of 'kcmshell5'. Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/kmix')
-rw-r--r--kde-apps/kmix/files/kmix-24.05.2-revert-kcm_pulseaudio-dep.patch94
-rw-r--r--kde-apps/kmix/kmix-24.05.2-r1.ebuild78
-rw-r--r--kde-apps/kmix/kmix-24.08.0-r1.ebuild78
3 files changed, 250 insertions, 0 deletions
diff --git a/kde-apps/kmix/files/kmix-24.05.2-revert-kcm_pulseaudio-dep.patch b/kde-apps/kmix/files/kmix-24.05.2-revert-kcm_pulseaudio-dep.patch
new file mode 100644
index 000000000000..23987a8261db
--- /dev/null
+++ b/kde-apps/kmix/files/kmix-24.05.2-revert-kcm_pulseaudio-dep.patch
@@ -0,0 +1,94 @@
+From 8d6837131706bd0f5dbd573726e7c01775f8256c Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Wed, 4 Sep 2024 08:03:09 +0200
+Subject: [PATCH] Revert "When we click on "Audio Setup", calls kcm_pulseaudio"
+
+This reverts commit a54f760987557036b90888a3efa7ad17346a00ed.
+---
+ apps/kmixwindow.cpp | 22 +---------------------
+ apps/kmixwindow.h | 2 --
+ desktop/kmixui.rc | 1 -
+ 3 files changed, 1 insertion(+), 24 deletions(-)
+
+diff --git a/apps/kmixwindow.cpp b/apps/kmixwindow.cpp
+index fa727f39..fb182f49 100644
+--- a/apps/kmixwindow.cpp
++++ b/apps/kmixwindow.cpp
+@@ -37,7 +37,6 @@
+ #include <klocalizedstring.h>
+ #include <kstandardaction.h>
+ #include <kxmlguifactory.h>
+-#include <KProcess>
+
+ // KMix
+ #include "kmix_debug.h"
+@@ -164,11 +163,7 @@ void KMixWindow::initActions()
+
+ KStandardAction::keyBindings(guiFactory(), &KXMLGUIFactory::showConfigureShortcutsDialog, actionCollection());
+
+- QAction* action = actionCollection()->addAction(QStringLiteral("launch_kdesoundsetup"));
+- action->setText(i18n("Audio Setup..."));
+- connect(action, SIGNAL(triggered(bool)), SLOT(slotKdeAudioSetupExec()));
+-
+- action = actionCollection()->addAction(QStringLiteral("hide_kmixwindow"));
++ QAction* action = actionCollection()->addAction(QStringLiteral("hide_kmixwindow"));
+ action->setText(i18n("Hide Mixer Window"));
+ connect(action, SIGNAL(triggered(bool)), SLOT(hideOrClose()));
+ actionCollection()->setDefaultShortcut(action, Qt::Key_Escape);
+@@ -1174,21 +1169,6 @@ void KMixWindow::toggleMenuBar()
+ menuBar()->setVisible(_actionShowMenubar->isChecked());
+ }
+
+-void KMixWindow::slotKdeAudioSetupExec()
+-{
+- forkExec(QStringList() << "kcmshell5" << "kcm_pulseaudio");
+-}
+-
+-void KMixWindow::forkExec(const QStringList& args)
+-{
+- int pid = KProcess::startDetached(args);
+- if (pid == 0)
+- {
+- KMessageBox::error(this, i18n("The helper application is either not installed or not working.\n\n%1",
+- args.join(QLatin1String(" "))));
+- }
+-}
+-
+ void KMixWindow::slotConfigureCurrentView()
+ {
+ KMixerWidget *mw = qobject_cast<KMixerWidget *>(m_wsMixers->currentWidget());
+diff --git a/apps/kmixwindow.h b/apps/kmixwindow.h
+index 67560723..0bcb04ed 100644
+--- a/apps/kmixwindow.h
++++ b/apps/kmixwindow.h
+@@ -86,7 +86,6 @@ protected Q_SLOTS:
+
+ private:
+ KMixerWidget* findKMWforTab( const QString& tabId );
+- void forkExec(const QStringList& args);
+ KToggleAction* _actionShowMenubar;
+
+ bool m_startVisible;
+@@ -117,7 +116,6 @@ private:
+ static QString getKmixctrlRcFilename(const QString &postfix);
+
+ private Q_SLOTS:
+- void slotKdeAudioSetupExec();
+ void slotConfigureCurrentView();
+
+ void plugged(const char *driverName, const QString &udi, int dev);
+diff --git a/desktop/kmixui.rc b/desktop/kmixui.rc
+index 5c53281a..27ca3351 100644
+--- a/desktop/kmixui.rc
++++ b/desktop/kmixui.rc
+@@ -16,7 +16,6 @@
+ <Menu name="settings">
+ <Action name="toggle_channels_currentview" append="save_merge"/>
+ <Action name="select_master" append="save_merge"/>
+- <Action name="launch_kdesoundsetup" append="save_merge"/>
+ </Menu>
+ <Menu name="help" append="about_merge"><text>&amp;Help</text>
+ <Action name="hwinfo"/>
+--
+2.46.0
+
diff --git a/kde-apps/kmix/kmix-24.05.2-r1.ebuild b/kde-apps/kmix/kmix-24.05.2-r1.ebuild
new file mode 100644
index 000000000000..314dc674568a
--- /dev/null
+++ b/kde-apps/kmix/kmix-24.05.2-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="forceoptional"
+ECM_TEST="false"
+KFMIN=5.115.0
+QTMIN=5.15.12
+inherit ecm gear.kde.org
+
+DESCRIPTION="Volume control gui based on KDE Frameworks"
+HOMEPAGE="https://apps.kde.org/kmix/"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="amd64 arm64 ~ppc64 ~riscv x86"
+IUSE="alsa plasma pulseaudio"
+
+# kde-frameworks/kwindowsystem[X]: Unconditional use of KX11Extras
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kcrash-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5[X]
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/solid-${KFMIN}:5
+ alsa? ( >=media-libs/alsa-lib-1.0.14a )
+ plasma? ( >=kde-plasma/libplasma-${KFMIN}:5 )
+ pulseaudio? (
+ media-libs/libcanberra
+ media-libs/libpulse
+ )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ # TODO: upstream
+ "${FILESDIR}/${PN}-23.04.2-autostart_disable.patch"
+ "${FILESDIR}/${P}-revert-kcm_pulseaudio-dep.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package alsa ALSA)
+ -DBUILD_DATAENGINE=$(usex plasma)
+ $(cmake_use_find_package pulseaudio Canberra)
+ $(cmake_use_find_package pulseaudio PulseAudio)
+ )
+
+ ecm_src_configure
+}
+
+pkg_postinst() {
+ if use pulseaudio && has_version kde-plasma/plasma-pa; then
+ elog "In KDE Plasma, kde-plasma/plasma-pa is the default audio volume handler,"
+ elog "therefore, autostart by default was disabled for KMix."
+ elog
+ elog "Should you prefer to still use kde-apps/kmix instead, do the following:"
+ elog " - In system tray, right click on [Show hidden items]"
+ elog " - Select [Configure System Tray]"
+ elog " - In [Entries], search for [Audio Volume] and set it to [Disabled]"
+ elog
+ fi
+ elog "KMix will be shown as [Volume Control] after manually starting it once"
+ elog "and will be autostarted after configuring such in KMix startup settings."
+ ecm_pkg_postinst
+}
diff --git a/kde-apps/kmix/kmix-24.08.0-r1.ebuild b/kde-apps/kmix/kmix-24.08.0-r1.ebuild
new file mode 100644
index 000000000000..5153c51334f1
--- /dev/null
+++ b/kde-apps/kmix/kmix-24.08.0-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="forceoptional"
+ECM_TEST="false"
+KFMIN=5.115.0
+QTMIN=5.15.12
+inherit ecm gear.kde.org
+
+DESCRIPTION="Volume control gui based on KDE Frameworks"
+HOMEPAGE="https://apps.kde.org/kmix/"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="alsa plasma pulseaudio"
+
+# kde-frameworks/kwindowsystem[X]: Unconditional use of KX11Extras
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kcrash-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5[X]
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/solid-${KFMIN}:5
+ alsa? ( >=media-libs/alsa-lib-1.0.14a )
+ plasma? ( >=kde-plasma/libplasma-${KFMIN}:5 )
+ pulseaudio? (
+ media-libs/libcanberra
+ media-libs/libpulse
+ )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ # TODO: upstream
+ "${FILESDIR}/${PN}-23.04.2-autostart_disable.patch"
+ "${FILESDIR}/${PN}-24.05.2-revert-kcm_pulseaudio-dep.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package alsa ALSA)
+ -DBUILD_DATAENGINE=$(usex plasma)
+ $(cmake_use_find_package pulseaudio Canberra)
+ $(cmake_use_find_package pulseaudio PulseAudio)
+ )
+
+ ecm_src_configure
+}
+
+pkg_postinst() {
+ if use pulseaudio && has_version kde-plasma/plasma-pa; then
+ elog "In KDE Plasma, kde-plasma/plasma-pa is the default audio volume handler,"
+ elog "therefore, autostart by default was disabled for KMix."
+ elog
+ elog "Should you prefer to still use kde-apps/kmix instead, do the following:"
+ elog " - In system tray, right click on [Show hidden items]"
+ elog " - Select [Configure System Tray]"
+ elog " - In [Entries], search for [Audio Volume] and set it to [Disabled]"
+ elog
+ fi
+ elog "KMix will be shown as [Volume Control] after manually starting it once"
+ elog "and will be autostarted after configuring such in KMix startup settings."
+ ecm_pkg_postinst
+}