Morse Classic is a generic morse-code practice utility
for Unix systems. A modified version of the program "QSO" by Paul J. Drongowski is also included. PR: ports/166863 Submitted by: Stephen Hurd <shurd@sasktel.net> Approved by: eadler (mentor)
This commit is contained in:
parent
43f5cc727e
commit
6df25e8a32
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=294988
9 changed files with 281 additions and 0 deletions
|
@ -81,6 +81,7 @@
|
|||
SUBDIR += minicom
|
||||
SUBDIR += mlan
|
||||
SUBDIR += mlan3
|
||||
SUBDIR += morse
|
||||
SUBDIR += nasawash
|
||||
SUBDIR += ncid
|
||||
SUBDIR += nec2c
|
||||
|
|
59
comms/morse/Makefile
Normal file
59
comms/morse/Makefile
Normal file
|
@ -0,0 +1,59 @@
|
|||
# New ports collection makefile for: morse
|
||||
# Date created: 2012-04-11
|
||||
# Whom: Stephen Hurd <shurd@sasktel.net>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= morse
|
||||
PORTVERSION= 2.4
|
||||
CATEGORIES= comms hamradio
|
||||
MASTER_SITES= http://www.catb.org/~esr/morse/
|
||||
|
||||
MAINTAINER= shurd@sasktel.net
|
||||
COMMENT= Morse Code Trainer
|
||||
|
||||
MAN1= morsec.1 QSO.1
|
||||
PLIST_FILES= bin/morsec \
|
||||
bin/QSO
|
||||
|
||||
OPTIONS= OSS "Beep using OSS (/dev/dsp)" on \
|
||||
X11 "Beep using X server" off \
|
||||
PA "Beep using Pulse Audio" off
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if defined(WITH_OSS)
|
||||
MAKE_FLAGS+= DEVICE=OSS
|
||||
|
||||
.if defined(WITH_X11) || defined(WITH_PA)
|
||||
BROKEN= Only one sound output method must be chosen.
|
||||
.endif
|
||||
|
||||
.elif defined(WITH_X11)
|
||||
MAKE_FLAGS+= DEVICE=X11
|
||||
USE_XORG= x11
|
||||
CFLAGS+= -I${PREFIX}/include
|
||||
LDFLAGS+= -L${PREFIX}/lib
|
||||
|
||||
.if defined(WITH_OSS) || defined(WITH_PA)
|
||||
BROKEN= Only one sound output method must be chosen.
|
||||
.endif
|
||||
|
||||
.elif defined(WITH_PA)
|
||||
MAKE_FLAGS+= DEVICE=PA
|
||||
LIB_DEPENDS+= pulse-simple:${PORTSDIR}/audio/pulseaudio
|
||||
USE_GNOME= pkgconfig
|
||||
|
||||
.if defined(WITH_OSS) || defined(WITH_X11)
|
||||
BROKEN= Only one sound output method must be chosen.
|
||||
.endif
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/morse ${PREFIX}/bin/morsec
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/QSO ${PREFIX}/bin/QSO
|
||||
${INSTALL_MAN} ${WRKSRC}/morse.1 ${MAN1PREFIX}/man/man1/morsec.1
|
||||
${INSTALL_MAN} ${WRKSRC}/QSO.1 ${MAN1PREFIX}/man/man1/QSO.1
|
||||
|
||||
.include <bsd.port.mk>
|
2
comms/morse/distinfo
Normal file
2
comms/morse/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (morse-2.4.tar.gz) = b049b90276a398a90d26162eebe9257e3653ee0b02f051f2e3d09fd3a444a3dc
|
||||
SIZE (morse-2.4.tar.gz) = 46264
|
48
comms/morse/files/patch-Makefile
Normal file
48
comms/morse/files/patch-Makefile
Normal file
|
@ -0,0 +1,48 @@
|
|||
--- Makefile.orig 2011-06-04 02:18:03.000000000 -0700
|
||||
+++ Makefile 2012-04-12 10:03:23.000000000 -0700
|
||||
@@ -26,7 +26,7 @@
|
||||
#DEVICE = Linux
|
||||
#DEVICE = OSS
|
||||
#DEVICE = ALSA
|
||||
-DEVICE = PA
|
||||
+#DEVICE = PA
|
||||
|
||||
VERSION=2.4
|
||||
|
||||
@@ -37,16 +37,16 @@
|
||||
qso.d/*.[ch] qso.d/Makefile
|
||||
|
||||
default:
|
||||
- make testmorse
|
||||
+ ${MAKE} testmorse
|
||||
|
||||
all: morse QSO morse.1 QSO.1
|
||||
|
||||
morse:
|
||||
- cd morse.d && make DEVICE=${DEVICE}
|
||||
+ ${MAKE} -C morse.d DEVICE=${DEVICE}
|
||||
ln morse.d/morse ./morse
|
||||
|
||||
QSO:
|
||||
- cd qso.d && make
|
||||
+ ${MAKE} -C qso.d
|
||||
ln qso.d/QSO ./QSO
|
||||
|
||||
#
|
||||
@@ -67,8 +67,8 @@
|
||||
|
||||
clean:
|
||||
rm -f morse QSO *.1 *.html SHIPPER.*
|
||||
- cd morse.d; make clean
|
||||
- cd qso.d; make clean
|
||||
+ ${MAKE} -C morse.d clean
|
||||
+ ${MAKE} -C qso.d clean
|
||||
|
||||
pristine: clean
|
||||
rm -f $(MANPAGES) morse.html
|
||||
@@ -88,4 +88,4 @@
|
||||
dist: morse-$(VERSION).tar.gz
|
||||
|
||||
release: morse-$(VERSION).tar.gz morse.html
|
||||
- shipper -u -m -t; make clean
|
||||
+ shipper -u -m -t; ${MAKE} clean
|
5
comms/morse/files/patch-QSO.1
Normal file
5
comms/morse/files/patch-QSO.1
Normal file
|
@ -0,0 +1,5 @@
|
|||
--- QSO.1.orig 2012-04-12 10:05:53.000000000 -0700
|
||||
+++ QSO.1 2012-04-12 10:05:57.000000000 -0700
|
||||
@@ -1 +1 @@
|
||||
-.so man1/morse.1
|
||||
+.so man1/morsec.1
|
85
comms/morse/files/patch-morse.1
Normal file
85
comms/morse/files/patch-morse.1
Normal file
|
@ -0,0 +1,85 @@
|
|||
--- morse.1.orig 2011-06-04 02:26:20.000000000 -0700
|
||||
+++ morse.1 2012-04-12 10:06:31.000000000 -0700
|
||||
@@ -28,22 +28,22 @@
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
-morse, QSO \- Morse\-code trainer and QSO generator for aspiring radio hams
|
||||
+morsec, QSO \- Morse\-code trainer and QSO generator for aspiring radio hams
|
||||
.SH "SYNOPSIS"
|
||||
-.HP \w'\fBmorse\fR\ 'u
|
||||
-\fBmorse\fR [\-i] [\-I] [\-r] [\-n\ \fInum\fR] [\-R\ \fInum\fR] [\-N\ \fInum\fR] [\-C\ \fIcharset\fR] [\-w\ \fInum\fR] [\-f\ \fInum\fR] [\-v\ \fInum\fR] [\-g\ \fInum\fR] [\-f\ \fInum\fR] [\-e] [\-c] [\-b] [\-a] [\-l] [\-m] [\-t] [\-T] [\-s] [\-q] [\-p\ \fInum\fR] [\-E\ \fInum\fR] [\-M\ \fInum\fR] [\-d] [\-A] [\-B] [\-S] [\-x\ \fInum\fR] [\-X\ \fInum\fR] [\fIword\fR...]
|
||||
+.HP \w'\fBmorsec\fR\ 'u
|
||||
+\fBmorsec\fR [\-i] [\-I] [\-r] [\-n\ \fInum\fR] [\-R\ \fInum\fR] [\-N\ \fInum\fR] [\-C\ \fIcharset\fR] [\-w\ \fInum\fR] [\-f\ \fInum\fR] [\-v\ \fInum\fR] [\-g\ \fInum\fR] [\-f\ \fInum\fR] [\-e] [\-c] [\-b] [\-a] [\-l] [\-m] [\-t] [\-T] [\-s] [\-q] [\-p\ \fInum\fR] [\-E\ \fInum\fR] [\-M\ \fInum\fR] [\-d] [\-A] [\-B] [\-S] [\-x\ \fInum\fR] [\-X\ \fInum\fR] [\fIword\fR...]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
The
|
||||
-\fBmorse\fR
|
||||
+\fBmorsec\fR
|
||||
program is a Morse\-code trainer intended to help aspiring radio hams pass the 5\-word\-per\-minute Element 1 test\&. It can take test text from a text file on standard input, or test words from its command\-line arguments, or generate random text (\-r) or play back what you type (\-i)\&.
|
||||
.PP
|
||||
A helper program,
|
||||
\fBQSO\fR, generates plausible QSOs that can be fed to the standard input of
|
||||
-\fBmorse\fR\&.
|
||||
+\fBmorsec\fR\&.
|
||||
.PP
|
||||
The following options control the behavior of
|
||||
-\fBmorse\fR:
|
||||
+\fBmorsec\fR:
|
||||
.PP
|
||||
\-i
|
||||
.RS 4
|
||||
@@ -311,7 +311,7 @@
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
-morse \-r \-s \-T \-d \-w 5 \-F 15 \-p 5 \-E \-10
|
||||
+morsec \-r \-s \-T \-d \-w 5 \-F 15 \-p 5 \-E \-10
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@@ -332,7 +332,7 @@
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
-morse \-r \-s \-T \-d \-w 5 \-F 15 \-p 5 \-E 0
|
||||
+morsec \-r \-s \-T \-d \-w 5 \-F 15 \-p 5 \-E 0
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@@ -353,7 +353,7 @@
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
-morse \-r \-T \-d \-w 5 \-F 15 \-M 2 \-E 4
|
||||
+morsec \-r \-T \-d \-w 5 \-F 15 \-M 2 \-E 4
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@@ -374,7 +374,7 @@
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
-QSO | morse \-e \-T \-d \-w 5 \-F 15
|
||||
+QSO | morsec \-e \-T \-d \-w 5 \-F 15
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@@ -395,7 +395,7 @@
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
-morse \-r \-T \-d \-w 5 \-F 15
|
||||
+morsec \-r \-T \-d \-w 5 \-F 15
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@@ -416,7 +416,7 @@
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
-morse \-r \-T \-d \-w 13 \-F 24
|
||||
+morsec \-r \-T \-d \-w 13 \-F 24
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
58
comms/morse/files/patch-morse.d-Makefile
Normal file
58
comms/morse/files/patch-morse.d-Makefile
Normal file
|
@ -0,0 +1,58 @@
|
|||
--- morse.d/Makefile.orig 2011-06-04 02:08:38.000000000 -0700
|
||||
+++ morse.d/Makefile 2012-04-12 11:10:58.000000000 -0700
|
||||
@@ -1,40 +1,43 @@
|
||||
-DEVICE=PA
|
||||
+DEVICE?=PA
|
||||
|
||||
BEEPERS = beepLinux.c beepOSS.c beepX11.c beepALSA.c
|
||||
SOURCES = alarm.c morse.c alarm.h beep.h $(BEEPERS)
|
||||
|
||||
# The flags necessary to link with the X11 libraries.
|
||||
-X11LIBS = -L/usr/X11R6/lib -lX11
|
||||
+X11LIBS = -lX11
|
||||
|
||||
# The flags necessary to link with PulseAudio and support pthread
|
||||
-PA_CFLAGS = -pthread $(shell pkg-config --cflags libpulse-simple)
|
||||
-PA_LIBS = $(shell pkg-config --libs libpulse-simple) -pthread
|
||||
+PA_CFLAGS = -pthread `pkg-config --cflags libpulse-simple`
|
||||
+PA_LIBS = `pkg-config --libs libpulse-simple` -pthread
|
||||
|
||||
# The flags necessary to link with ALSA
|
||||
-ALSA_CFLAGS = $(shell pkg-config --cflags alsa)
|
||||
-ALSA_LIBS = $(shell pkg-config --libs alsa)
|
||||
+ALSA_CFLAGS = `pkg-config --cflags alsa`
|
||||
+ALSA_LIBS = `shell pkg-config --libs alsa`
|
||||
|
||||
# Any additional flags your favorite C compiler requires to work.
|
||||
-CFLAGS = -O3 -I/usr/X11R6/include $($(device)_EXTRA_CFLAGS)
|
||||
+#CFLAGS = -O3 -I/usr/X11R6/include $($(device)_EXTRA_CFLAGS)
|
||||
|
||||
morse: morse${DEVICE}
|
||||
rm -f $@
|
||||
ln morse${DEVICE} $@
|
||||
|
||||
morseX11: morse.o beepX11.o alarm.o
|
||||
- $(CC) $(X11LIBS) -o $@ morse.o beepX11.o alarm.o
|
||||
+ $(CC) $(X11LIBS) $(LDFLAGS) -o $@ morse.o beepX11.o alarm.o
|
||||
|
||||
morseLinux: morse.o beepLinux.o alarm.o
|
||||
- $(CC) -o $@ morse.o beepLinux.o alarm.o -lm
|
||||
+ $(CC) $(LDFLAGS) -o $@ morse.o beepLinux.o alarm.o -lm
|
||||
|
||||
morseOSS: morse.o beepOSS.o
|
||||
- $(CC) $(CFLAGS) -o $@ morse.o beepOSS.o -lm
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ morse.o beepOSS.o -lm
|
||||
+
|
||||
+beepPA.o: beepPA.c
|
||||
+ ${CC} ${CFLAGS} ${PA_CFLAGS} -c ${.IMPSRC}
|
||||
|
||||
morsePA: morse.o beepPA.o
|
||||
- $(CC) $(CFLAGS) $(PA_CFLAGS) -o $@ morse.o beepPA.o -lm $(PA_LIBS)
|
||||
+ $(CC) $(CFLAGS) $(PA_CFLAGS) $(LDFLAGS) -o $@ morse.o beepPA.o -lm $(PA_LIBS)
|
||||
|
||||
morseALSA: morse.o beepALSA.o
|
||||
- $(CC) $(CFLAGS) $(ALSA_CFLAGS) -o $@ morse.o beepALSA.o -lm $(ALSA_LIBS)
|
||||
+ $(CC) $(CFLAGS) $(ALSA_CFLAGS) $(LDFLAGS) -o $@ morse.o beepALSA.o -lm $(ALSA_LIBS)
|
||||
|
||||
morse.o: beep.h Makefile
|
||||
beepX11.o: beep.h alarm.h
|
17
comms/morse/files/patch-qso.d-Makefile
Normal file
17
comms/morse/files/patch-qso.d-Makefile
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- qso.d/Makefile.orig 2010-10-12 22:11:39.000000000 -0700
|
||||
+++ qso.d/Makefile 2012-04-12 10:23:28.000000000 -0700
|
||||
@@ -1,4 +1,4 @@
|
||||
-CFLAGS = -O3
|
||||
+#CFLAGS = -O3
|
||||
|
||||
OBJECTS = QSO.o put_form.o make_fre.o grammar.o util.o init_str.o
|
||||
INCLUDES = antenna.h callsign.h city.h cityh.h heights.h jobs.h misc.h \
|
||||
@@ -7,7 +7,7 @@
|
||||
all: QSO
|
||||
|
||||
QSO: $(OBJECTS)
|
||||
- $(CC) -o $@ $(OBJECTS)
|
||||
+ $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJECTS)
|
||||
|
||||
init_str.o: $(INCLUDES)
|
||||
|
6
comms/morse/pkg-descr
Normal file
6
comms/morse/pkg-descr
Normal file
|
@ -0,0 +1,6 @@
|
|||
This is Morse Classic, a generic morse-code practice utility for Unix systems.
|
||||
You'll invoke it as "morsec"; to distinguish it from Alan Cox's "morse" program.
|
||||
|
||||
A modified version of the program "QSO" by Paul J. Drongowski is also included.
|
||||
|
||||
WWW: http://www.catb.org/~esr/morse/
|
Loading…
Reference in a new issue