git: ce8ceb06f79f - main - comms/morse: update 2.5 => 2.6

From: Älven <alven_at_FreeBSD.org>
Date: Wed, 30 Jul 2025 11:44:30 UTC
The branch main has been updated by alven:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ce8ceb06f79ff7a425e71b0be9bff0c72516295e

commit ce8ceb06f79ff7a425e71b0be9bff0c72516295e
Author:     Älven <alven@FreeBSD.org>
AuthorDate: 2025-07-27 13:54:43 +0000
Commit:     Älven <alven@FreeBSD.org>
CommitDate: 2025-07-30 11:43:25 +0000

    comms/morse: update 2.5 => 2.6
    
    * Switch to Gitlab upstream
    * Use textproc/xmlto for man page generation
    * Format using portfmt(1)
    * Actualise patches to current version
    * Use explicit localbase:ldflags helper for X11 option instead of CFLAGS and LDFLAGS
    * Regression: build with X11 option set failed with:
      ./alarm.h:15:15: error: a parameter list without types is only allowed in a function definition
    
    PR:             288513
    Approved by:    yuri@ (Mentor)
---
 comms/morse/Makefile                     | 39 ++++++++-------
 comms/morse/distinfo                     |  5 +-
 comms/morse/files/patch-Makefile         | 36 ++++++--------
 comms/morse/files/patch-QSO.1            |  5 --
 comms/morse/files/patch-morse.1          | 85 --------------------------------
 comms/morse/files/patch-morse.d-Makefile |  8 +--
 comms/morse/files/patch-qso.d-Makefile   |  8 +--
 7 files changed, 46 insertions(+), 140 deletions(-)

diff --git a/comms/morse/Makefile b/comms/morse/Makefile
index d2d71232532a..cbe502e80b3d 100644
--- a/comms/morse/Makefile
+++ b/comms/morse/Makefile
@@ -1,9 +1,6 @@
 PORTNAME=	morse
-PORTVERSION=	2.5
-PORTREVISION=	2
+DISTVERSION=	2.6
 CATEGORIES=	comms hamradio
-MASTER_SITES=	http://www.catb.org/~esr/morse/ \
-		LOCAL/db
 
 MAINTAINER=	hamradio@FreeBSD.org
 COMMENT=	Morse Code Trainer
@@ -12,27 +9,33 @@ WWW=		http://www.catb.org/~esr/morse/
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-PLIST_FILES=	bin/morsec bin/QSO share/man/man1/QSO.1.gz share/man/man1/morsec.1.gz
+BUILD_DEPENDS=	xmlto>0:textproc/xmlto
 
-OPTIONS_SINGLE=	SOUND
-OPTIONS_SINGLE_SOUND=	OSS X11 PULSEAUDIO
-OPTIONS_DEFAULT=	OSS
+USE_GITLAB=	yes
+GL_ACCOUNT=	esr
+GL_PROJECT=	morse-classic
 
-OSS_DESC=	Beep using OSS (/dev/dsp)
-X11_DESC=	Beep using X server
-PULSEAUDIO_DESC=	Beep using Pulse Audio
+PLIST_FILES=	bin/morsec \
+		bin/QSO \
+		share/man/man1/morsec.1.gz \
+		share/man/man1/QSO.1.gz
 
-OSS_MAKE_ARGS=	DEVICE=OSS
+OPTIONS_DEFAULT=	OSS
+OPTIONS_SINGLE=		SOUND
+OPTIONS_SINGLE_SOUND=	OSS PULSEAUDIO X11
 
-X11_MAKE_ARGS=	DEVICE=X11
-X11_USES=	xorg
-X11_USE=	XORG=x11
-X11_CFLAGS=	-I${LOCALBASE}/include
-X11_LDFLAGS=	-L${LOCALBASE}/lib
+OSS_DESC=		Beep using OSS (/dev/dsp)
+PULSEAUDIO_DESC=	Beep using PulseAudio
+X11_DESC=		Beep using X.Org Server
 
-PULSEAUDIO_MAKE_ARGS=	DEVICE=PA
+OSS_MAKE_ARGS=		DEVICE=OSS
 PULSEAUDIO_LIB_DEPENDS=	libpulse-simple.so:audio/pulseaudio
 PULSEAUDIO_USES=	pkgconfig
+PULSEAUDIO_MAKE_ARGS=	DEVICE=PA
+X11_BROKEN=		./alarm.h:15:15: error: a parameter list without types is only allowed in a function definition
+X11_USES=		localbase:ldflags xorg
+X11_USE=		XORG=x11
+X11_MAKE_ARGS=		DEVICE=X11
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/morse ${STAGEDIR}${PREFIX}/bin/morsec
diff --git a/comms/morse/distinfo b/comms/morse/distinfo
index 761e989b3fff..0ea88231845d 100644
--- a/comms/morse/distinfo
+++ b/comms/morse/distinfo
@@ -1,2 +1,3 @@
-SHA256 (morse-2.5.tar.gz) = 476d1e8e95bb173b1aadc755db18f7e7a73eda35426944e1abd57c20307d4987
-SIZE (morse-2.5.tar.gz) = 46470
+TIMESTAMP = 1753622427
+SHA256 (morse-classic-2.6.tar.bz2) = ec44144d52a1eef36fbe0ca400c54556a7ba8f8c3de38d80512d19703b89f615
+SIZE (morse-classic-2.6.tar.bz2) = 45356
diff --git a/comms/morse/files/patch-Makefile b/comms/morse/files/patch-Makefile
index 1bcf5dc10a87..a4e93a87edc4 100644
--- a/comms/morse/files/patch-Makefile
+++ b/comms/morse/files/patch-Makefile
@@ -1,21 +1,19 @@
---- Makefile.orig	2012-11-26 22:52:36.000000000 -0800
-+++ Makefile	2012-12-04 11:58:37.000000000 -0800
-@@ -26,7 +26,7 @@
+--- Makefile.orig	2024-02-14 19:40:27 UTC
++++ Makefile
+@@ -28,10 +28,10 @@
+ #DEVICE = X11
  #DEVICE = Linux
  #DEVICE = OSS
- #DEVICE = ALSA
--DEVICE = PA
-+#DEVICE = PA
+-DEVICE = ALSA
++#DEVICE = ALSA
+ #DEVICE = PA
  
- VERSION=2.5
- 
-@@ -37,16 +37,16 @@
- 	qso.d/*.[ch] qso.d/Makefile
- 
- default: all
--	make testmorse
-+	${MAKE} testmorse
+-VERSION=$(shell sed -n <NEWS '/^[0-9]/s/:.*//p' | head -1)
++VERSION = 2.6
  
+ MANPAGES = morse.1 QSO.1 
+ DOCS = README NEWS COPYING TODO morse.xml $(MANPAGES)
+@@ -44,11 +44,11 @@ morse:
  all: morse QSO morse.1 QSO.1
  
  morse:
@@ -29,10 +27,10 @@
  	ln qso.d/QSO ./QSO
  
  #
-@@ -67,8 +67,8 @@
+@@ -69,8 +69,8 @@ clean:
  
  clean:
- 	rm -f morse QSO *.1 *.html SHIPPER.*
+ 	rm -f morse QSO *.1 *.html
 -	cd morse.d; make clean
 -	cd qso.d; make clean
 +	${MAKE} -C morse.d clean
@@ -40,9 +38,3 @@
  
  pristine: clean
  	rm -f $(MANPAGES) morse.html
-@@ -93,4 +93,4 @@
- 
- 
- 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
deleted file mode 100644
index fc74d54e7fc5..000000000000
--- a/comms/morse/files/patch-QSO.1
+++ /dev/null
@@ -1,5 +0,0 @@
---- QSO.1.orig	2012-11-27 06:47:32 UTC
-+++ QSO.1
-@@ -1 +1 @@
--.so morse.1
-+.so man1/morsec.1
diff --git a/comms/morse/files/patch-morse.1 b/comms/morse/files/patch-morse.1
deleted file mode 100644
index 71163d3f598b..000000000000
--- a/comms/morse/files/patch-morse.1
+++ /dev/null
@@ -1,85 +0,0 @@
---- 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
index 562e882ee907..d589b4518ec9 100644
--- a/comms/morse/files/patch-morse.d-Makefile
+++ b/comms/morse/files/patch-morse.d-Makefile
@@ -1,5 +1,5 @@
---- morse.d/Makefile.orig	2011-06-04 02:08:38.000000000 -0700
-+++ morse.d/Makefile	2012-04-12 11:10:58.000000000 -0700
+--- morse.d/Makefile.orig	2024-02-14 19:40:27 UTC
++++ morse.d/Makefile
 @@ -1,40 +1,43 @@
 -DEVICE=PA
 +DEVICE?=PA
@@ -42,10 +42,10 @@
  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)
diff --git a/comms/morse/files/patch-qso.d-Makefile b/comms/morse/files/patch-qso.d-Makefile
index a2c4e68fa2bc..2424ec4f7c3c 100644
--- a/comms/morse/files/patch-qso.d-Makefile
+++ b/comms/morse/files/patch-qso.d-Makefile
@@ -1,12 +1,12 @@
---- qso.d/Makefile.orig	2010-10-12 22:11:39.000000000 -0700
-+++ qso.d/Makefile	2012-04-12 10:23:28.000000000 -0700
+--- qso.d/Makefile.orig	2024-02-14 19:40:27 UTC
++++ qso.d/Makefile
 @@ -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 @@
+ INCLUDES = antenna.i callsign.i city.i cityh.i heights.i jobs.i misc.i \
+@@ -7,7 +7,7 @@ QSO:	$(OBJECTS)
  all:	QSO
  
  QSO:	$(OBJECTS)