diff options
author | Diane Bruce <db@FreeBSD.org> | 2022-01-24 10:20:10 -0500 |
---|---|---|
committer | Diane Bruce <db@FreeBSD.org> | 2022-01-24 10:20:10 -0500 |
commit | 569b94a82dd9037e73d679ef8bc902173efa27b9 (patch) | |
tree | a3d3ff92e01902c8ea0c613548df6e708f791c85 /comms/qrq | |
parent | devel/sonarqube-community: update plugins (diff) |
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
Diffstat (limited to 'comms/qrq')
-rw-r--r-- | comms/qrq/Makefile | 14 | ||||
-rw-r--r-- | comms/qrq/distinfo | 6 | ||||
-rw-r--r-- | comms/qrq/files/patch-Makefile | 103 | ||||
-rw-r--r-- | comms/qrq/files/patch-qrq.c | 30 | ||||
-rw-r--r-- | comms/qrq/pkg-plist | 1 |
5 files changed, 124 insertions, 30 deletions
diff --git a/comms/qrq/Makefile b/comms/qrq/Makefile index 3654374d476d..5c68b9965278 100644 --- a/comms/qrq/Makefile +++ b/comms/qrq/Makefile @@ -1,5 +1,5 @@ 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> diff --git a/comms/qrq/distinfo b/comms/qrq/distinfo index 04125c3c2fba..d056035f8e77 100644 --- a/comms/qrq/distinfo +++ b/comms/qrq/distinfo @@ -1,3 +1,3 @@ -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 diff --git a/comms/qrq/files/patch-Makefile b/comms/qrq/files/patch-Makefile index cf241a0e0c77..341bab242a9c 100644 --- a/comms/qrq/files/patch-Makefile +++ b/comms/qrq/files/patch-Makefile @@ -1,6 +1,14 @@ ---- 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 + diff --git a/comms/qrq/files/patch-qrq.c b/comms/qrq/files/patch-qrq.c new file mode 100644 index 000000000000..357eeba491dd --- /dev/null +++ b/comms/qrq/files/patch-qrq.c @@ -0,0 +1,30 @@ +--- 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 () { diff --git a/comms/qrq/pkg-plist b/comms/qrq/pkg-plist index a3dc5e39eeed..8f9a7434a96f 100644 --- a/comms/qrq/pkg-plist +++ b/comms/qrq/pkg-plist @@ -1,6 +1,7 @@ bin/qrq bin/qrqscore man/man1/qrq.1.gz +%%DATADIR%%/cwops.qcb %%DATADIR%%/callbase.qcb %%DATADIR%%/english.qcb %%DATADIR%%/qrqrc |