comms/ebook2cw: Update 0.8.2 => 0.8.5

* Use https:// for MASTER_SITES, remove LOCAL/db
+ Add LICENSE_FILE
* Use gettext (also add -lintl to Makefile)
* Mark as PIE_UNSAFE
* Improve post-install stance
* Fix DOCS and EXAMPLES options to really work
* Use %%PREFIX%% and %%LOCALBASE%% templates for Makefile
* Fix pkg-descr

PR:		288673
Approved by:	yuri@ (Mentor)
This commit is contained in:
Älven
2025-09-10 13:11:11 +04:00
parent 2c0ecbd52f
commit cdc7414c6b
5 changed files with 36 additions and 40 deletions
+15 -9
View File
@@ -1,20 +1,23 @@
PORTNAME= ebook2cw
PORTVERSION= 0.8.2
PORTREVISION= 3
DISTVERSION= 0.8.5
CATEGORIES= comms hamradio
MASTER_SITES= http://fkurz.net/ham/ebook2cw/ \
LOCAL/db
MASTER_SITES= https://fkurz.net/ham/ebook2cw/
MAINTAINER= hamradio@FreeBSD.org
COMMENT= Convert text files into cw as an mp3 or ogg file
WWW= https://fkurz.net/ham/ebook2cw.html
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libmp3lame.so:audio/lame \
libogg.so:audio/libogg \
libvorbis.so:audio/libvorbis
USES= gettext
PIE_UNSAFE= yes
OPTIONS_DEFINE= DOCS EXAMPLES
post-patch:
@@ -23,14 +26,17 @@ post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|'g \
${WRKSRC}/Makefile
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/ebook2cw ${STAGEDIR}${PREFIX}/bin/ebook2cw
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ebook2cw
${INSTALL_DATA} ${WRKSRC}/ebook2cw.1 ${STAGEDIR}${PREFIX}/share/man/man1
${INSTALL_PROGRAM} ${WRKSRC}/ebook2cw ${STAGEDIR}${PREFIX}/bin/ebook2cw
${INSTALL_MAN} ${WRKSRC}/ebook2cw.1 ${STAGEDIR}${PREFIX}/share/man/man1
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
do-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for f in ebook2cw.conf isomap.txt utf8map.txt
${INSTALL_DATA} ${WRKSRC}/$f ${STAGEDIR}${EXAMPLESDIR}/$f
.endfor
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
+3 -2
View File
@@ -1,2 +1,3 @@
SHA256 (ebook2cw-0.8.2.tar.gz) = d8277ac6aaf9e64d9cb9a96457488b3a0dbd77e87622ded8f0825acb500c5758
SIZE (ebook2cw-0.8.2.tar.gz) = 29170
TIMESTAMP = 1754384661
SHA256 (ebook2cw-0.8.5.tar.gz) = 571f734f12123b4affbad90b55dd4c9630b254afe343fa621fc5114b9bd25fc3
SIZE (ebook2cw-0.8.5.tar.gz) = 34619
+15 -26
View File
@@ -1,11 +1,11 @@
--- Makefile.orig 2013-01-04 14:33:04 UTC
--- Makefile.orig 2023-08-16 18:54:49 UTC
+++ Makefile
@@ -3,37 +3,26 @@
# $Id: Makefile 547 2012-12-29 21:07:53Z dj1yfk $
@@ -1,30 +1,16 @@ VERSION=0.8.5
# ebook2cw Makefile -- Fabian Kurz, DJ5CW -- http://fkurz.net/ham/ebook2cw.html
VERSION=0.8.2
VERSION=0.8.5
-DESTDIR ?= /usr
+DESTDIR ?= /usr/local
+DESTDIR ?= %%PREFIX%%
+CC ?= gcc
-# Set to NO to compile without Lame/Ogg-vorbis support
@@ -13,8 +13,8 @@
-USE_OGG?=YES
-
CFLAGS:=$(CFLAGS) -D DESTDIR=\"$(DESTDIR)\" -D VERSION=\"$(VERSION)\"
+CFLAGS+= -I/usr/local/include -D LAME -D OGGV
+LDFLAGS+= -L/usr/local/lib -lmp3lame -lvorbis -lvorbisenc -logg
+CFLAGS+= -I%%LOCALBASE%%/include -D LAME -D OGGV
+LDFLAGS+= -L%%LOCALBASE%%/lib -lintl -lmp3lame -lvorbis -lvorbisenc -logg
-ifeq ($(USE_LAME), YES)
- CFLAGS:=$(CFLAGS) -D LAME
@@ -24,26 +24,15 @@
- CFLAGS:=$(CFLAGS) -D OGGV
- LDFLAGS:=$(LDFLAGS) -lvorbis -lvorbisenc -logg
-endif
+all: ebook2cw cgi
-
UNAME := $(shell uname)
-ifeq ($(UNAME), Darwin)
- LDFLAGS += -lintl
-endif
-
-all: ebook2cw
-
+all: ebook2cw cgi
ebook2cw: ebook2cw.c codetables.h
- gcc ebook2cw.c -pedantic -Wall -lm $(LDFLAGS) $(CFLAGS) -o ebook2cw
+ ${CC} ebook2cw.c -pedantic -Wall -lm $(LDFLAGS) $(CFLAGS) -o ebook2cw
cgi: ebook2cw.c codetables.h
- gcc -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -o cw.cgi
+ ${CC} -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -o cw.cgi
cgibuffered: ebook2cw.c codetables.h
- gcc -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -D CGIBUFFERED -o cw.cgi
+ ${CC} -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -D CGIBUFFERED -o cw.cgi
static:
- gcc -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -o ebook2cw
+ ${CC} -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -o ebook2cw
install:
install -d -v $(DESTDIR)/share/man/man1/
$(CC) ebook2cw.c -pedantic -Wall -Wno-format-truncation -lm $(LDFLAGS) $(CFLAGS) -o ebook2cw
+1 -1
View File
@@ -1,5 +1,5 @@
ebook2cw is a command line program (optional GUI available) which converts
a plain text (ISO 8859-1 or UTF-8) ebook to morse code MP3 files.
It works on several platforms, including Windows and Linux.
It works on several platforms, including GNU/Linux and Windows.
Written by Fabian Kurz, DJ1YFK <mail@fkurz.net>
+2 -2
View File
@@ -1,6 +1,6 @@
bin/ebook2cw
share/man/man1/ebook2cw.1.gz
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ebook2cw.conf
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/isomap.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/utf8map.txt
%%PORTDOCS%%%%DOCSDIR%%/README
share/man/man1/ebook2cw.1.gz