diff options
-rw-r--r-- | comms/Makefile | 1 | ||||
-rw-r--r-- | comms/morse/Makefile | 59 | ||||
-rw-r--r-- | comms/morse/distinfo | 2 | ||||
-rw-r--r-- | comms/morse/files/patch-Makefile | 48 | ||||
-rw-r--r-- | comms/morse/files/patch-QSO.1 | 5 | ||||
-rw-r--r-- | comms/morse/files/patch-morse.1 | 85 | ||||
-rw-r--r-- | comms/morse/files/patch-morse.d-Makefile | 58 | ||||
-rw-r--r-- | comms/morse/files/patch-qso.d-Makefile | 17 | ||||
-rw-r--r-- | comms/morse/pkg-descr | 6 |
9 files changed, 281 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile index ff3ed5bc0da5..ce0bc1f442c6 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -81,6 +81,7 @@ SUBDIR += minicom SUBDIR += mlan SUBDIR += mlan3 + SUBDIR += morse SUBDIR += nasawash SUBDIR += ncid SUBDIR += nec2c diff --git a/comms/morse/Makefile b/comms/morse/Makefile new file mode 100644 index 000000000000..9d7f2224c1db --- /dev/null +++ b/comms/morse/Makefile @@ -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> diff --git a/comms/morse/distinfo b/comms/morse/distinfo new file mode 100644 index 000000000000..3c9b02586816 --- /dev/null +++ b/comms/morse/distinfo @@ -0,0 +1,2 @@ +SHA256 (morse-2.4.tar.gz) = b049b90276a398a90d26162eebe9257e3653ee0b02f051f2e3d09fd3a444a3dc +SIZE (morse-2.4.tar.gz) = 46264 diff --git a/comms/morse/files/patch-Makefile b/comms/morse/files/patch-Makefile new file mode 100644 index 000000000000..5ddc74575d3c --- /dev/null +++ b/comms/morse/files/patch-Makefile @@ -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 diff --git a/comms/morse/files/patch-QSO.1 b/comms/morse/files/patch-QSO.1 new file mode 100644 index 000000000000..4488ce3654cd --- /dev/null +++ b/comms/morse/files/patch-QSO.1 @@ -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 diff --git a/comms/morse/files/patch-morse.1 b/comms/morse/files/patch-morse.1 new file mode 100644 index 000000000000..71163d3f598b --- /dev/null +++ b/comms/morse/files/patch-morse.1 @@ -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 diff --git a/comms/morse/files/patch-morse.d-Makefile b/comms/morse/files/patch-morse.d-Makefile new file mode 100644 index 000000000000..562e882ee907 --- /dev/null +++ b/comms/morse/files/patch-morse.d-Makefile @@ -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 diff --git a/comms/morse/files/patch-qso.d-Makefile b/comms/morse/files/patch-qso.d-Makefile new file mode 100644 index 000000000000..a2c4e68fa2bc --- /dev/null +++ b/comms/morse/files/patch-qso.d-Makefile @@ -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) + diff --git a/comms/morse/pkg-descr b/comms/morse/pkg-descr new file mode 100644 index 000000000000..c2ae86157f9d --- /dev/null +++ b/comms/morse/pkg-descr @@ -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/ |