From f7bfb22c1382c4a92d7781a413ce90cb8afb84d8 Mon Sep 17 00:00:00 2001 From: Symeon Huang Date: Thu, 20 May 2021 15:08:38 +0100 Subject: [PATCH] add pavucontrol-qt package --- x11-packages/pavucontrol-qt/build.sh | 10 +++++ .../pavucontrol-qt/fix_glib_linking.patch | 12 +++++ .../pavucontrol-qt/no_pulse_glib.patch | 44 +++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 x11-packages/pavucontrol-qt/build.sh create mode 100644 x11-packages/pavucontrol-qt/fix_glib_linking.patch create mode 100644 x11-packages/pavucontrol-qt/no_pulse_glib.patch diff --git a/x11-packages/pavucontrol-qt/build.sh b/x11-packages/pavucontrol-qt/build.sh new file mode 100644 index 000000000..501a633e0 --- /dev/null +++ b/x11-packages/pavucontrol-qt/build.sh @@ -0,0 +1,10 @@ +TERMUX_PKG_HOMEPAGE=https://lxqt.github.io +TERMUX_PKG_DESCRIPTION="Qt port of volume control of sound server PulseAudio" +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_MAINTAINER="Simeon Huang " +TERMUX_PKG_VERSION=0.17.0 +TERMUX_PKG_SRCURL="https://github.com/lxqt/pavucontrol-qt/releases/download/${TERMUX_PKG_VERSION}/pavucontrol-qt-${TERMUX_PKG_VERSION}.tar.xz" +TERMUX_PKG_SHA256=6c274cd3a80a699c4b3f4dbf4eccaef3fafdc677c6240e2b45672bafe46da170 +TERMUX_PKG_DEPENDS="qt5-qtbase, kwindowsystem, glib, liblxqt, pulseaudio" +TERMUX_PKG_BUILD_DEPENDS="cmake, lxqt-build-tools, qt5-qtbase-cross-tools, qt5-qttools-cross-tools" + diff --git a/x11-packages/pavucontrol-qt/fix_glib_linking.patch b/x11-packages/pavucontrol-qt/fix_glib_linking.patch new file mode 100644 index 000000000..c4073f587 --- /dev/null +++ b/x11-packages/pavucontrol-qt/fix_glib_linking.patch @@ -0,0 +1,12 @@ +glib is not properly linked, changing the variable so it is present +--- src/src/CMakeLists.txt 2021-04-13 18:13:27.000000000 +0000 ++++ src.mod/src/CMakeLists.txt 2021-05-20 14:03:49.449914000 +0000 +@@ -75,7 +75,7 @@ + target_link_libraries(pavucontrol-qt + Qt5::Widgets + ${PULSE_LDFLAGS} +- ${GLIB_LDFLAGS} ++ ${GLIB_LIBRARIES} + ) + + install(TARGETS diff --git a/x11-packages/pavucontrol-qt/no_pulse_glib.patch b/x11-packages/pavucontrol-qt/no_pulse_glib.patch new file mode 100644 index 000000000..90b052198 --- /dev/null +++ b/x11-packages/pavucontrol-qt/no_pulse_glib.patch @@ -0,0 +1,44 @@ +PulseAudio in Termux doesn't have glib feature. +This patch replaces the glib mainloop with the primary basic mainloop. +--- src/src/pavucontrol.cc 2021-04-13 18:13:27.000000000 +0000 ++++ src.mod/src/pavucontrol.cc 2021-05-20 13:56:35.699908000 +0000 +@@ -25,7 +25,7 @@ + #define PACKAGE_VERSION "0.1" + + #include +-#include ++#include + #include + #include + +@@ -688,9 +688,9 @@ + if(parser.isSet(maximizeOption)) + mainWindow->showMaximized(); + +- pa_glib_mainloop *m = pa_glib_mainloop_new(g_main_context_default()); ++ pa_mainloop *m = pa_mainloop_new(); + g_assert(m); +- api = pa_glib_mainloop_get_api(m); ++ api = pa_mainloop_get_api(m); + g_assert(api); + + connect_to_pulse(mainWindow); +@@ -706,7 +706,7 @@ + + if (context) + pa_context_unref(context); +- pa_glib_mainloop_free(m); ++ pa_mainloop_free(m); + + return 0; + } +--- src/CMakeLists.txt 2021-04-13 18:13:27.000000000 +0000 ++++ src.mod/CMakeLists.txt 2021-05-20 13:57:15.588923000 +0000 +@@ -42,7 +42,6 @@ + pkg_check_modules( + PULSE REQUIRED + libpulse>=5.0 +- libpulse-mainloop-glib>=0.9.16 + ) + + add_subdirectory(src)