aboutsummaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorJon Hopper <fbsd@thesoo.org>2022-12-08 10:17:37 +0000
committerGleb Popov <arrowd@FreeBSD.org>2022-12-08 11:45:57 +0000
commit2aefc158b2d82adfec992bdcebd2d4a08c48be7a (patch)
tree3654cd0baf50c7064455fb3bc17ed1699a406719 /comms
parentd2d795c4dc5d59ff292a9c0cb104d12e69e61927 (diff)
downloadports-2aefc158b2d82adfec992bdcebd2d4a08c48be7a.tar.gz
ports-2aefc158b2d82adfec992bdcebd2d4a08c48be7a.zip
comms/quisk: Resurrect the port.
Reviewed By: arrowd Differential Revision: https://reviews.freebsd.org/D37614
Diffstat (limited to 'comms')
-rw-r--r--comms/Makefile1
-rwxr-xr-xcomms/quisk/Makefile35
-rw-r--r--comms/quisk/distinfo3
-rw-r--r--comms/quisk/files/patch-ac2yd_remote.c10
-rw-r--r--comms/quisk/files/patch-quisk.h11
-rw-r--r--comms/quisk/files/patch-setup.py18
-rw-r--r--comms/quisk/files/patch-sound.c20
-rwxr-xr-xcomms/quisk/pkg-descr8
8 files changed, 106 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile
index af639e00af8b..379e130fc7b0 100644
--- a/comms/Makefile
+++ b/comms/Makefile
@@ -155,6 +155,7 @@
SUBDIR += qt6-serialbus
SUBDIR += qt6-serialport
SUBDIR += qtel
+ SUBDIR += quisk
SUBDIR += redsea
SUBDIR += remserial
SUBDIR += rtl-433
diff --git a/comms/quisk/Makefile b/comms/quisk/Makefile
new file mode 100755
index 000000000000..8515b5c05201
--- /dev/null
+++ b/comms/quisk/Makefile
@@ -0,0 +1,35 @@
+PORTNAME= quisk
+DISTVERSION= 4.2.13
+CATEGORIES= comms hamradio
+MASTER_SITES= CHEESESHOP
+
+MAINTAINER= fbsd@thesoo.org
+COMMENT= Software Defined Radio (SDR)
+WWW= https://james.ahlstrom.name/quisk/
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/license.txt
+
+LIB_DEPENDS= libfftw3.so:math/fftw3 \
+ libportaudio.so:audio/portaudio \
+ libasound.so:audio/alsa-lib \
+ libpulse.so:audio/pulseaudio
+
+USES= python:3.6+
+USE_PYTHON= autoplist distutils noflavors
+USE_WX= 3.2
+
+WX_COMPS= python
+
+post-extract:
+ @${RM} ${WRKSRC}/_quisk.so ${WRKSRC}/sdriqpkg/sdriq.so \
+ ${WRKSRC}/freedvpkg/libcodec2_32.so \
+ ${WRKSRC}/freedvpkg/libcodec2_64.so
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/setup.py
+
+post-stage:
+ @${FIND} ${STAGEDIR}${PREFIX} -name "*.so" | ${XARGS} ${STRIP_CMD}
+
+.include <bsd.port.mk>
diff --git a/comms/quisk/distinfo b/comms/quisk/distinfo
new file mode 100644
index 000000000000..823f7e713ad3
--- /dev/null
+++ b/comms/quisk/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1670342744
+SHA256 (quisk-4.2.13.tar.gz) = 7fba7b6140ac361546fab526aa22dc2ebedbafe1a8c513a303c22a2befd95b98
+SIZE (quisk-4.2.13.tar.gz) = 4800770
diff --git a/comms/quisk/files/patch-ac2yd_remote.c b/comms/quisk/files/patch-ac2yd_remote.c
new file mode 100644
index 000000000000..eef5199f5a2f
--- /dev/null
+++ b/comms/quisk/files/patch-ac2yd_remote.c
@@ -0,0 +1,10 @@
+--- ac2yd/remote.c.orig 2022-11-30 19:10:07 UTC
++++ ac2yd/remote.c
+@@ -20,6 +20,7 @@
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <netinet/ip.h>
++#include <netinet/in.h>
+ #include <fcntl.h>
+ #endif
+
diff --git a/comms/quisk/files/patch-quisk.h b/comms/quisk/files/patch-quisk.h
new file mode 100644
index 000000000000..ba27e1d8b0ea
--- /dev/null
+++ b/comms/quisk/files/patch-quisk.h
@@ -0,0 +1,11 @@
+--- quisk.h.orig 2022-11-01 15:26:26 UTC
++++ quisk.h
+@@ -10,7 +10,7 @@
+ #define MAX_FILTER_SIZE 10001
+ #define BIG_VOLUME 2.2e9
+ #define CLOSED_TEXT "The sound device is closed."
+-#define CLIP32 2147483647
++#define CLIP32 (float)2147483647
+ #define CLIP16 32767
+ #define SAMP_BUFFER_SIZE 66000 // size of arrays used to capture samples
+ #define IMD_TONE_1 1200 // frequency of IMD test tones
diff --git a/comms/quisk/files/patch-setup.py b/comms/quisk/files/patch-setup.py
new file mode 100644
index 000000000000..fdb7c4652a2f
--- /dev/null
+++ b/comms/quisk/files/patch-setup.py
@@ -0,0 +1,18 @@
+--- setup.py.orig 2022-11-19 21:34:46 UTC
++++ setup.py
+@@ -48,6 +48,15 @@ if sys.platform == "darwin": # Build for Macintosh
+ define_macros.append(("QUISK_HAVE_PULSEAUDIO", None))
+ Modules = [Extension ('quisk._quisk', include_dirs=['.', base_dir + '/include'], library_dirs=['.', base_dir + '/lib'],
+ libraries=libraries, sources=sources, define_macros=define_macros)]
++if "freebsd" in sys.platform: #Build for FreeBSD
++ define_macros = [("QUISK_HAVE_PORTAUDIO", None)] # PortAudio is always available
++ libraries = ['portaudio', 'fftw3', 'm']
++ base_dir = '%%LOCALBASE%%'
++ if os.path.isfile(base_dir + "/include/pulse/pulseaudio.h"):
++ libraries.append('pulse')
++ define_macros.append(("QUISK_HAVE_PULSEAUDIO", None))
++ Modules = [Extension ('quisk._quisk', include_dirs=['.', base_dir + '/include'], library_dirs=['.', base_dir + '/lib'],
++ libraries=libraries, sources=sources, define_macros=define_macros)]
+ else: # Linux
+ define_macros = [("QUISK_HAVE_ALSA", None), ("QUISK_HAVE_PULSEAUDIO", None)]
+ libraries = ['asound', 'pulse', 'fftw3', 'm']
diff --git a/comms/quisk/files/patch-sound.c b/comms/quisk/files/patch-sound.c
new file mode 100644
index 000000000000..335e4db9a755
--- /dev/null
+++ b/comms/quisk/files/patch-sound.c
@@ -0,0 +1,20 @@
+--- sound.c.orig 2022-11-01 15:27:27 UTC
++++ sound.c
+@@ -15,7 +15,7 @@
+ #else
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+-#include <netinet/ip.h>
++#include <netinet/in.h>
+ #endif
+
+ #include "quisk.h"
+@@ -596,7 +596,7 @@ void play_sound_interface(struct sound_dev* dev, int n
+ else
+ dev->cr_correction = (0.5 - dev->cr_average_fill) * dev->play_buf_size;
+ if (dev->cr_correction != 0)
+- dev->cr_correct_time = abs(dev->sample_rate * AVG_SEC / dev->cr_correction);
++ dev->cr_correct_time = fabs(dev->sample_rate * AVG_SEC / dev->cr_correction);
+ if (quisk_sound_state.verbose_sound > 1)
+ QuiskPrintf("%s: Buffer average %5.2lf cr_correction %5d\n",
+ dev->stream_description, dev->cr_average_fill * 100, dev->cr_correction);
diff --git a/comms/quisk/pkg-descr b/comms/quisk/pkg-descr
new file mode 100755
index 000000000000..554770de7fe2
--- /dev/null
+++ b/comms/quisk/pkg-descr
@@ -0,0 +1,8 @@
+This is QUISK, a Software Defined Radio (SDR).
+- Quisk can control the HiQSDR.
+- As a receiver it can use the SDR-IQ by RfSpace as a sample source.
+- As a receiver it can use your soundcard as a sample source.
+- Quisk can control SoftRock hardware for both receive and transmit.
+- As a transmitter it can accept microphone input and send that to your
+ transmitter for SSB operation. For CW, QUISK can mute the audio and
+ substitute a side tone.