media-radio/unixcw: Fix tests
authorThomas Beierlein <tomjbe@gentoo.org>
Wed, 1 Aug 2018 08:38:05 +0000 (10:38 +0200)
committerThomas Beierlein <tomjbe@gentoo.org>
Wed, 1 Aug 2018 08:38:05 +0000 (10:38 +0200)
Make test independent of installed audio system.

Reported-by: Toralf Förster <toralf@gentoo.org>
Closes: https://bugs.gentoo.org/630276
Package-Manager: Portage-2.3.44, Repoman-2.3.10

media-radio/unixcw/files/unixcw-tests.patch [new file with mode: 0644]
media-radio/unixcw/unixcw-3.5.1.ebuild

diff --git a/media-radio/unixcw/files/unixcw-tests.patch b/media-radio/unixcw/files/unixcw-tests.patch
new file mode 100644 (file)
index 0000000..9d2c3d9
--- /dev/null
@@ -0,0 +1,12 @@
+# works now without any installed audio system
+--- src/libcw/tests/libcw_test_tq_short_space.c.orig   2018-08-01 07:53:33.972577616 +0000
++++ src/libcw/tests/libcw_test_tq_short_space.c        2018-08-01 07:53:42.877456677 +0000
+@@ -94,7 +94,7 @@
+       bool success = true;
+         /* Library initialization. */
+-        cw_generator_new(CW_AUDIO_SOUNDCARD, NULL);
++        cw_generator_new(CW_AUDIO_NULL, NULL);
+         cw_generator_start();
+       cw_register_tone_queue_low_callback(cwdaemon_tone_queue_low_callback, NULL, tq_low_watermark);
index 1eb06a2ba00d8bc4b51c143588663e3e8f15b163..b50fdf97de9c16f6e7e65016a9bd41eba971fbbf 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -14,8 +14,6 @@ SLOT="0"
 KEYWORDS="alpha amd64 ppc x86"
 IUSE="alsa ncurses pulseaudio suid test qt5"
 
-REQUIRED_USE="test? ( || ( alsa pulseaudio ) )"
-
 RDEPEND="ncurses? ( sys-libs/ncurses:= )
        qt5? ( dev-qt/qtcore:5
                dev-qt/qtgui:5
@@ -30,7 +28,8 @@ DEPEND="${RDEPEND}
 src_prepare() {
        append-cflags -std=gnu11
        append-cxxflags -std=gnu++11
-       epatch "${FILESDIR}"/$PN-3.5-tinfo.patch
+       epatch "${FILESDIR}"/$PN-3.5-tinfo.patch \
+           "${FILESDIR}"/$PN-tests.patch
        eautoreconf
 }