Commit 569b94a8 authored by Diane Bruce's avatar Diane Bruce
Browse files

comms/qrq: Update to 0.3.4

0.3.4 / 2022-01-22   Fabian Kurz <fabian@fkurz.net>
	* Updated Makefile for OS X (tnx David Winarsky, Jon Nall)
	* Accept - for / (easier for keyboard layouts where
	  / requires pressing shift - tnx DF4TS)
	* F8 toggles between complete toplist or only user's own
	  attempts.
	* Add KG7IEL's patches from (Debian #997190)
	* Add word lists from Tom Mozdzen
	* Handle long words better (up to 28 characters - tnx SQ6JNX)
	* Add characters: . , = ? (tnx W4MSL)

Reported by:	portscout
parent 985c9a9f
PORTNAME= qrq
PORTVERSION= 0.3.3
PORTVERSION= 0.3.4
CATEGORIES= comms hamradio
MASTER_SITES= http://fkurz.net/ham/qrq/
......@@ -13,9 +13,15 @@ USE_CSTD= c99
SHEBANG_FILES= qrqscore
post-install:
${INSTALL_DATA} ${WRKSRC}/qrq.png ${STAGEDIR}${DATADIR}/qrq.png
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
-e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/qrq.c
MAKE_ENV= DESTDIR=${LOCALBASE}
post-install:
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/qrq.png ${STAGEDIR}${DATADIR}
.include <bsd.port.mk>
TIMESTAMP = 1567990101
SHA256 (qrq-0.3.3.tar.gz) = 306ef7f8e0bbb16bdddc58a5d9c357e9b05c1a5c8a52680e5bae093a4064e945
SIZE (qrq-0.3.3.tar.gz) = 159832
TIMESTAMP = 1642879197
SHA256 (qrq-0.3.4.tar.gz) = 2a961cc962131a2bcb930543f0a51ce6c9d374847492bc2ccfc37012ce4c230f
SIZE (qrq-0.3.4.tar.gz) = 194956
--- Makefile.orig 2019-03-09 20:14:52 UTC
--- Makefile.orig 2022-01-22 09:18:24 UTC
+++ Makefile
@@ -8,7 +8,7 @@ DESTDIR?=/usr
@@ -2,13 +2,15 @@
VERSION?=0.3.4
DESTDIR?=/usr
+PREFIX=%%PREFIX%%
+LOCALBASE=%%LOCALBASE%%
# set to YES if you want to use Core Audio
# note that you must use Core Audio for OSX
USE_CA=NO
# set to YES if you want to use PulseAudio instead of OSS
......@@ -9,7 +17,7 @@
# set to YES if you compile with MINGW32
USE_WIN32=NO
@@ -27,8 +27,8 @@ endif
@@ -27,8 +29,8 @@ endif
ifeq ($(USE_WIN32), YES)
CC=i686-w64-mingw32-gcc-posix
......@@ -19,29 +27,78 @@
+# CC=gcc
endif
# build information may be added by CI scripts and will be
@@ -104,16 +104,14 @@ uninstall:
INSTALL ?= install
@@ -38,7 +40,7 @@ INSTALL ?= install
BUILD_INFO=" Date: $(shell date +%Y-%m-%dT%H:%M:%S%z)\n git branch/commit: $(shell if [ x${CI_COMMIT_REF_NAME} != x ]; then echo ${CI_COMMIT_REF_NAME} ; elif [ -e .git ] || [ -e ../.git ]; then git symbolic-ref --short HEAD ; else echo not built from git repository ; fi) / $(shell if [ x${CI_COMMIT_SHA} != x ]; then echo ${CI_COMMIT_SHA}; elif [ -e .git ] || [ -e ../.git ] ; then git rev-parse --verify HEAD ; else echo - ; fi )\n by $(USER)@$(shell hostname -f)\n OS: $(shell uname -s -r -p)\n Compiler: $(shell $(CC) --version | head -1)"
-CFLAGS:=$(CFLAGS) -D DESTDIR=\"$(DESTDIR)\" -D BUILD_INFO=\"$(BUILD_INFO)\" -D VERSION=\"$(VERSION)\" -I.
+CFLAGS:=$(CFLAGS) -I${LOCALBASE}/include -D DESTDIR=\"$(DESTDIR)\" -D BUILD_INFO=\"$(BUILD_INFO)\" -D VERSION=\"$(VERSION)\" -I.
ifeq ($(USE_CA), YES)
CC=clang
@@ -68,14 +70,14 @@ else ifeq ($(USE_WIN32), YES)
OBJECTS=qrq.o qrq.res lib/libncursesw.a
else
OBJECTS=qrq.o oss.o
- LDFLAGS:=$(LDFLAGS) -lpthread -lncurses
+ LDFLAGS:= $(LDFLAGS) -lpthread -lncurses
CFLAGS:=$(CFLAGS) -D OSS
endif
all: qrq
qrq: $(OBJECTS)
- $(CC) -Wall -o $@ $^ -lm $(LDFLAGS)
+ $(CC) -Wall -o $@ $^ -lm -L${LOCALBASE}/lib $(LDFLAGS)
.c.o:
$(CC) -Wall $(CPPFLAGS) $(CFLAGS) -c $<
@@ -109,28 +111,28 @@ uninstall:
else
install: qrq
- install -d -v $(DESTDIR)/share/qrq/
- install -d -v $(DESTDIR)/share/man/man1/
- install -d -v $(DESTDIR)/bin/
- install -s -m 0755 qrq $(DESTDIR)/bin/
- install -m 0755 qrqscore $(DESTDIR)/bin/
- install -m 0644 qrq.1 $(DESTDIR)/share/man/man1/
- install -m 0644 callbase.qcb $(DESTDIR)/share/qrq/
- install -m 0644 english.qcb $(DESTDIR)/share/qrq/
- install -m 0644 qrqrc $(DESTDIR)/share/qrq/
- install -m 0644 toplist $(DESTDIR)/share/qrq/
+ mkdir -p $(DESTDIR)$(PREFIX)/share/qrq/
+ $(BSD_INSTALL_PROGRAM) qrq $(DESTDIR)$(PREFIX)/bin/
+ $(BSD_INSTALL_SCRIPT) qrqscore $(DESTDIR)$(PREFIX)/bin/
+ $(BSD_INSTALL_MAN) qrq.1 $(DESTDIR)$(PREFIX)/man/man1/
+ $(BSD_INSTALL_DATA) callbase.qcb $(DESTDIR)$(PREFIX)/share/qrq/
+ $(BSD_INSTALL_DATA) english.qcb $(DESTDIR)$(PREFIX)/share/qrq/
+ $(BSD_INSTALL_DATA) qrqrc $(DESTDIR)$(PREFIX)/share/qrq/
+ $(BSD_INSTALL_DATA) toplist $(DESTDIR)$(PREFIX)/share/qrq/
- ${INSTALL} -d -v $(DESTDIR)/share/qrq/
- ${INSTALL} -d -v $(DESTDIR)/share/man/man1/
- ${INSTALL} -d -v $(DESTDIR)/bin/
- ${INSTALL} -s -m 0755 qrq $(DESTDIR)/bin/
- ${INSTALL} -m 0755 qrqscore $(DESTDIR)/bin/
- ${INSTALL} -m 0644 qrq.1 $(DESTDIR)/share/man/man1/
- ${INSTALL} -m 0644 callbase.qcb $(DESTDIR)/share/qrq/
- ${INSTALL} -m 0644 english.qcb $(DESTDIR)/share/qrq/
- ${INSTALL} -m 0644 cwops.qcb $(DESTDIR)/share/qrq/
- ${INSTALL} -m 0644 qrqrc $(DESTDIR)/share/qrq/
- ${INSTALL} -m 0644 toplist $(DESTDIR)/share/qrq/
+ ${INSTALL} -d -v $(DESTDIR)${PREFIX}/share/qrq/
+ ${INSTALL} -d -v $(DESTDIR)${PREFIX}/man/man1/
+ ${INSTALL} -d -v $(DESTDIR)${PREFIX}/bin/
+ ${INSTALL} -s -m 0755 qrq $(DESTDIR)${PREFIX}/bin/
+ ${INSTALL} -m 0755 qrqscore $(DESTDIR)${PREFIX}/bin/
+ ${INSTALL} -m 0644 qrq.1 $(DESTDIR)${PREFIX}/man/man1/
+ ${INSTALL} -m 0644 callbase.qcb $(DESTDIR)${PREFIX}/share/qrq/
+ ${INSTALL} -m 0644 english.qcb $(DESTDIR)${PREFIX}/share/qrq/
+ ${INSTALL} -m 0644 cwops.qcb $(DESTDIR)${PREFIX}/share/qrq/
+ ${INSTALL} -m 0644 qrqrc $(DESTDIR)${PREFIX}/share/qrq/
+ ${INSTALL} -m 0644 toplist $(DESTDIR)${PREFIX}/share/qrq/
uninstall:
- rm -f $(DESTDIR)/bin/qrq
- rm -f $(DESTDIR)/bin/qrqscore
- rm -f $(DESTDIR)/share/man/man1/qrq.1
- rm -f $(DESTDIR)/share/qrq/callbase.qcb
- rm -f $(DESTDIR)/share/qrq/english.qcb
- rm -f $(DESTDIR)/share/qrq/qrqrc
- rm -f $(DESTDIR)/share/qrq/toplist
- rmdir $(DESTDIR)/share/qrq/
+ rm -f $(DESTDIR)${PREFIX}/bin/qrq
+ rm -f $(DESTDIR)${PREFIX}/bin/qrqscore
+ rm -f $(DESTDIR)${PREFIX}/share/man/man1/qrq.1
+ rm -f $(DESTDIR)${PREFIX}/share/qrq/callbase.qcb
+ rm -f $(DESTDIR)${PREFIX}/share/qrq/english.qcb
+ rm -f $(DESTDIR)${PREFIX}/share/qrq/qrqrc
+ rm -f $(DESTDIR)${PREFIX}/share/qrq/toplist
+ rmdir $(DESTDIR)${PREFIX}/share/qrq/
endif
--- qrq.c.orig 2022-01-22 09:18:24 UTC
+++ qrq.c
@@ -61,6 +61,7 @@ typedef int AUDIO_HANDLE;
#define CALL_MAX 28 /* maximum allowed length of a call/word. limit to 28 so we can fit word + correction into the window */
+#define PREFIX "%%PREFIX%%"
#ifndef DESTDIR
# define DESTDIR "/usr"
#endif
@@ -208,7 +209,7 @@ int main (int argc, char *argv[]) {
}
strcat(destdir, "/Resources");
#else
- strcpy(destdir, DESTDIR);
+ strcpy(destdir, PREFIX);
#endif
char abort = 0;
@@ -1867,8 +1868,8 @@ static int check_toplist () {
* The can be:
* 1) In the current directory -> use them
* 2) In ~/.qrq/ -> use toplist and qrqrc from there and callbase from
- * DESTDIR/share/qrq/
- * 3) in DESTDIR/share/qrq/ -> create ~/.qrq/ and copy qrqrc and toplist
+ * PREFIX/share/qrq/
+ * 3) in PREFIX/share/qrq/ -> create ~/.qrq/ and copy qrqrc and toplist
* there.
* 4) Nowhere --> Exit.*/
static int find_files () {
bin/qrq
bin/qrqscore
man/man1/qrq.1.gz
%%DATADIR%%/cwops.qcb
%%DATADIR%%/callbase.qcb
%%DATADIR%%/english.qcb
%%DATADIR%%/qrqrc
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment