diff options
author | Thomas Beierlein <tomjbe@gentoo.org> | 2012-06-25 18:37:35 +0000 |
---|---|---|
committer | Thomas Beierlein <tomjbe@gentoo.org> | 2012-06-25 18:37:35 +0000 |
commit | 76127ea2605dee10c361a6c1072a74728351d384 (patch) | |
tree | 7cf05975f858bf187a5bbafbbf57a46303e11e1f /media-radio | |
parent | Make libsamplerate mandatory and phonon optional. Require imagemagick/graphic... (diff) | |
download | historical-76127ea2605dee10c361a6c1072a74728351d384.tar.gz historical-76127ea2605dee10c361a6c1072a74728351d384.tar.bz2 historical-76127ea2605dee10c361a6c1072a74728351d384.zip |
Adapt to new unixcw-3. Bug #423389. Thanks Diego
Package-Manager: portage-2.1.11.1/cvs/Linux x86_64
Diffstat (limited to 'media-radio')
-rw-r--r-- | media-radio/cwdaemon/ChangeLog | 6 | ||||
-rw-r--r-- | media-radio/cwdaemon/Manifest | 15 | ||||
-rw-r--r-- | media-radio/cwdaemon/cwdaemon-0.9.4.ebuild | 12 | ||||
-rw-r--r-- | media-radio/cwdaemon/files/cwdaemon-0.9.4-unixcw3.patch | 134 |
4 files changed, 160 insertions, 7 deletions
diff --git a/media-radio/cwdaemon/ChangeLog b/media-radio/cwdaemon/ChangeLog index b1199a76ae02..f02d1daa6e7a 100644 --- a/media-radio/cwdaemon/ChangeLog +++ b/media-radio/cwdaemon/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-radio/cwdaemon # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-radio/cwdaemon/ChangeLog,v 1.17 2012/05/03 03:48:57 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-radio/cwdaemon/ChangeLog,v 1.18 2012/06/25 18:37:35 tomjbe Exp $ + + 25 Jun 2012; Thomas Beierlein <tomjbe@gentoo.org> cwdaemon-0.9.4.ebuild, + +files/cwdaemon-0.9.4-unixcw3.patch: + Adapt to new unixcw-3. Bug #423389. Thanks Diego 03 May 2012; Jeff Horelick <jdhore@gentoo.org> cwdaemon-0.9.4.ebuild: dev-util/pkgconfig -> virtual/pkgconfig diff --git a/media-radio/cwdaemon/Manifest b/media-radio/cwdaemon/Manifest index fd4dc34db69e..2e8d80ccde69 100644 --- a/media-radio/cwdaemon/Manifest +++ b/media-radio/cwdaemon/Manifest @@ -1,6 +1,17 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX cwdaemon-0.9.4-unixcw3.patch 3020 RMD160 2c216bbb759c95eb0475c798de1f8d9246c63dcc SHA1 c94a693b4e91f5b8aac2bf1b89566007228581b8 SHA256 0cefb8a297e918b0da466fb540b549f4ae74a4e40172c3f55a32cb380b754cb7 DIST cwdaemon-0.9.2.tar.gz 267210 RMD160 1bf6d749a0f578081103d6363256f6ce18d5ce06 SHA1 13a81c5cf09235d1b8db70c9db68e71e3f18a2f4 SHA256 c390fbc8fb5eec49fad5934a0b3353264a47807bdd0fb76ea194ddc8d2eece7d DIST cwdaemon-0.9.4.tar.gz 236395 RMD160 d8303defd827652e37757feb8f4d5e0626d76b74 SHA1 81c0362f52128dd05e7922e1d0ea736f842e1b47 SHA256 0b26304333a1933d45814be23788295dd22fa6d80fc651a32fb12bd042b9e84e EBUILD cwdaemon-0.9.2.ebuild 556 RMD160 585bea81f1b57714ba3035d4abb0bdcb39c78782 SHA1 f5acdb7e45f2955d92069e3ca77bfb104f317191 SHA256 e8e0a072325f485e5b7127f2017118a3828b2cd8ba11cadd4d0cb8177b1de8b3 -EBUILD cwdaemon-0.9.4.ebuild 597 RMD160 217095c349cc125bcd711a2c41cac5489d024965 SHA1 8f18d345b6197bd24929fb4141ad69115239c91d SHA256 b12c031dc46fecc6a7329cfd2d56dee6f73175d9d07677a724f4891d64ef89a1 -MISC ChangeLog 3332 RMD160 87cd95e8af35b844f9cdff2182a47d08d90c7caa SHA1 6b532fed5827aeae50c436f288f86c6323832e10 SHA256 723d375cf565e83ba6e1d047bf44d76e4a9a2b78f07979cf1b72234f7054666f +EBUILD cwdaemon-0.9.4.ebuild 614 RMD160 b8ca025f231a86c1496c735e13d67a8c0eaf09e0 SHA1 0029f5e8764c0026649cfa9b3fd79bbd5fd9a53d SHA256 c4fee008c93ae2cd921dd43b00303badfc291d6f8a8e6e218869fe7d820785f0 +MISC ChangeLog 3498 RMD160 fadbf2a0cff1cc40d00afcbcf495c5075b99b7db SHA1 3e768a62d3f5b9896c2c228803b26e7f9b26244c SHA256 4ddd9d347ae47681488259062d59589efa5b155f8980d3fe3700c9e0fea2a677 MISC metadata.xml 237 RMD160 87ed45dfb51c4338c69039c467ec45e1bec94a51 SHA1 4f2622261b78e0595f2b1c95457410a8ea94a4e5 SHA256 158ddbefb55fcef02625b7550043306a9ae6400d33558f2ca96f5f8ba242deea +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iEYEARECAAYFAk/or/0ACgkQQe4uqXYgU9UvQACg3kr7BnggV3RQWwNQgAPPrT5J +voEAni03sHjNrDxZ1ABDY5WqwoDxqXaP +=AdF5 +-----END PGP SIGNATURE----- diff --git a/media-radio/cwdaemon/cwdaemon-0.9.4.ebuild b/media-radio/cwdaemon/cwdaemon-0.9.4.ebuild index 47487d3b4db8..f7cda092c20c 100644 --- a/media-radio/cwdaemon/cwdaemon-0.9.4.ebuild +++ b/media-radio/cwdaemon/cwdaemon-0.9.4.ebuild @@ -1,6 +1,9 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-radio/cwdaemon/cwdaemon-0.9.4.ebuild,v 1.4 2012/05/03 03:48:57 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-radio/cwdaemon/cwdaemon-0.9.4.ebuild,v 1.5 2012/06/25 18:37:35 tomjbe Exp $ + +EAPI=4 +inherit eutils DESCRIPTION="A morse daemon for the parallel or serial port" HOMEPAGE="http://www.ibiblio.org/pub/linux/apps/ham/morse" @@ -11,10 +14,11 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~ppc ~x86" IUSE="" -RDEPEND=">=media-radio/unixcw-2.3" +RDEPEND=">=media-radio/unixcw-3.0.2" DEPEND="$RDEPEND virtual/pkgconfig" -src_install() { - make DESTDIR="${D}" install || die "install failed" +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-unixcw3.patch } diff --git a/media-radio/cwdaemon/files/cwdaemon-0.9.4-unixcw3.patch b/media-radio/cwdaemon/files/cwdaemon-0.9.4-unixcw3.patch new file mode 100644 index 000000000000..c9b7acc8d9e0 --- /dev/null +++ b/media-radio/cwdaemon/files/cwdaemon-0.9.4-unixcw3.patch @@ -0,0 +1,134 @@ +# Changes to adapt to new unixcw-3 package thanks to AAPI changes in libcw +# Taken from debians patches from Kamil Ignacak, the maintainer of unixcw +--- cwdaemon.c.orig 2012-06-25 20:00:23.000000000 +0200 ++++ cwdaemon.c 2012-06-25 20:00:30.000000000 +0200 +@@ -89,7 +89,7 @@ + #endif + #include <limits.h> + +-#include <cwlib.h> ++#include <libcw.h> + #include "cwdaemon.h" + + /* network vars */ +@@ -165,6 +165,9 @@ + cwdevice *cwdev; + static void playmorsestring (char *x); + ++static int set_libcw_output (void); ++static void close_libcw (void); ++ + /* catch ^C when running in foreground */ + static RETSIGTYPE + catchint (int signal) +@@ -299,17 +302,59 @@ + } + } + +-/* initialize unixcw */ ++/* (re)set initial parameters of libcw */ + static void +-initmorse (void) ++reset_libcw (void) + { ++ /* just in case if an old generator exists */ ++ close_libcw (); ++ ++ set_libcw_output (); ++ + cw_set_frequency (morse_tone); + cw_set_send_speed (morse_speed); +- cw_set_soundcard_sound (soundcard_sound); +- cw_set_console_sound (console_sound); + cw_set_volume (morse_volume); + cw_set_gap (0); + } ++ ++static void ++close_libcw (void) ++{ ++ cw_generator_stop (); ++ cw_generator_delete (); ++} ++ ++/* set up output of libcw */ ++static int ++set_libcw_output (void) ++{ ++ int rv = 0; ++ if (soundcard_sound && !console_sound) ++ { ++ rv = cw_generator_new (CW_AUDIO_ALSA, NULL); ++ if (rv != CW_FAILURE) ++ { ++ rv = cw_generator_start(); ++ } ++ } ++ else if (!soundcard_sound && console_sound) ++ { ++ rv = cw_generator_new (CW_AUDIO_CONSOLE, NULL); ++ if (rv != CW_FAILURE) ++ { ++ rv = cw_generator_start(); ++ } ++ } ++ else ++ { ++ /* libcw can't do both soundcard and console, ++ and it has to have one and only one sound ++ system specified */ ++ errmsg ("Sound output specified incorrectly"); ++ rv = CW_FAILURE; ++ } ++ return rv == CW_FAILURE ? -1 : 0; ++} + + /* properly parse a 'long' integer */ + static int +@@ -320,7 +365,7 @@ + + errno = 0; + lv = strtol(buf, &ep, 10); +- if (buf[0] == '\0' || *ep != '\0') ++ if (buf[0] == '\0' || (*ep != '\0' && *ep != '\n')) + return (-1); + if (errno == ERANGE && (lv == LONG_MAX || lv == LONG_MIN)) + return (-1); +@@ -371,7 +416,7 @@ + morse_volume = 70; + console_sound = 1; + soundcard_sound = 0; +- initmorse (); ++ reset_libcw (); + wordmode = 0; + async_abort = 0; + cwdev->reset (cwdev); +@@ -559,8 +604,7 @@ + if (valid_sdevice == 1) + { + debug ("Sound device: %s", message + 2); +- cw_set_soundcard_sound (soundcard_sound); +- cw_set_console_sound (console_sound); ++ set_libcw_output (); + } + break; + case 'g': /* volume */ +@@ -640,6 +684,7 @@ + debug ("Morse = %c", c); + cw_send_character (c); + if (cw_get_gap () == 2) cw_set_gap (0); ++ cw_wait_for_tone_queue(); + } + x++; + i++; +@@ -858,7 +903,9 @@ + } + cwdev->desc = keydev; + +- initmorse (); ++ reset_libcw (); ++ atexit (close_libcw); ++ + cw_register_keying_callback (keyingevent, NULL); + + debug ("Device used: %s", cwdev->desc); |