commit:     12e09c25de13980ab3023c209cda3de0acd9601f
Author:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 10 18:00:55 2025 +0000
Commit:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Fri Oct 10 18:01:49 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12e09c25

media-radio/wsjtx_improved: Fix missing audio output with >=qt-6.9.2

Closes: https://bugs.gentoo.org/963899
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>

 .../files/wsjtx-2.8.0-qt692-audio.patch            | 22 +++++++
 .../wsjtx_improved/wsjtx_improved-2.8.0-r2.ebuild  | 76 ++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git a/media-radio/wsjtx_improved/files/wsjtx-2.8.0-qt692-audio.patch 
b/media-radio/wsjtx_improved/files/wsjtx-2.8.0-qt692-audio.patch
new file mode 100644
index 000000000000..9afc417fd776
--- /dev/null
+++ b/media-radio/wsjtx_improved/files/wsjtx-2.8.0-qt692-audio.patch
@@ -0,0 +1,22 @@
+# fixes Bug #https://bugs.gentoo.org/963899
+# Due to changes on the pulseaudio backend >=Qt 692 needs a bytesAvailable() 
function defined which returns more than zero.
+diff --git a/Modulator/Modulator.hpp b/Modulator/Modulator.hpp
+index fee2877..7203696 100755
+--- a/Modulator/Modulator.hpp
++++ b/Modulator/Modulator.hpp
+@@ -50,14 +50,12 @@ protected:
+   {
+     return -1;                        // we don't consume data
+   }
+-#if defined(Q_OS_WIN)
+-// On Windows, bytesAvailable() must return a size that exceeds some 
threshold 
++// bytesAvailable() must return a size that exceeds some threshold 
+ // in order for the AudioSink to go into Active state and start pulling data.
+   qint64 bytesAvailable () const
+   {
+     return 8000;
+   }
+-#endif
+ 
+ private:
+   qint16 postProcessSample (qint16 sample) const;

diff --git a/media-radio/wsjtx_improved/wsjtx_improved-2.8.0-r2.ebuild 
b/media-radio/wsjtx_improved/wsjtx_improved-2.8.0-r2.ebuild
new file mode 100644
index 000000000000..36e8c140fb97
--- /dev/null
+++ b/media-radio/wsjtx_improved/wsjtx_improved-2.8.0-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake edos2unix flag-o-matic
+
+DESCRIPTION="Weak signal ham radio communication with improvements"
+HOMEPAGE="https://physics.princeton.edu//pulsar/K1JT/wsjtx.html";
+SRC_URI="https://downloads.sourceforge.net/wsjt-x-improved/wsjtx-${PV}_improved_PLUS_250501_qt6.tgz";
+
+S=${WORKDIR}/wsjtx
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+       !media-radio/wsjtx
+       dev-libs/boost:=[nls,python]
+       dev-qt/qtbase:6[concurrent,gui,network,sql,sqlite,widgets]
+       dev-qt/qtmultimedia:6
+       dev-qt/qtserialport:6
+       dev-qt/qtwebsockets:6
+       virtual/libusb:1
+       >=media-libs/hamlib-4.0:=
+       sci-libs/fftw:3.0=[threads,fortran]
+       virtual/fortran
+       app-text/asciidoc
+       doc? ( dev-ruby/asciidoctor )"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-qt/qttools[linguist]"
+
+PATCHES=(
+       "${FILESDIR}/wsjtx-2.2.0-werror.patch"
+       "${FILESDIR}/wsjtx-2.3.0-drop-docs.patch"
+       "${FILESDIR}/wsjtx-clang.patch"
+       "${FILESDIR}/wsjtx-fix-sound-dir.patch"
+       "${FILESDIR}/wsjtx-2.8.0-qt691.patch"
+       "${FILESDIR}/wsjtx-2.8.0-qt692-audio.patch"
+)
+
+DOCS=( AUTHORS BUGS NEWS README THANKS )
+
+src_unpack() {
+       unpack ${A}
+       unpack "${WORKDIR}/wsjtx-2.8.0/src/wsjtx.tgz"
+}
+
+src_prepare() {
+       edos2unix "${S}/message_aggregator.desktop"
+       edos2unix "${S}/wsjtx.desktop"
+       edos2unix "${S}/CMakeLists.txt"
+       sed -i -e "s/COMMAND \${GZIP_EXECUTABLE}/#  COMMAND/" \
+                                                               
manpages/CMakeLists.txt || die
+       cmake_src_prepare
+}
+
+src_configure() {
+       # fails to compile with -flto (bug #860417)
+       filter-lto
+
+       local mycmakeargs=(
+               -DWSJT_GENERATE_DOCS="$(usex doc)"
+               -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
+       )
+       append-ldflags -no-pie
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+       rm "${D}"/usr/bin/rigctl{,d,com}-wsjtx || die
+       rm "${D}"/usr/share/man/man1/rigctl{,d,com}-wsjtx.1 || die
+}

Reply via email to