Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Dec 2022 11:46:20 GMT
From:      Gleb Popov <arrowd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2aefc158b2d8 - main - comms/quisk: Resurrect the port.
Message-ID:  <202212081146.2B8BkKmj085363@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by arrowd:

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

commit 2aefc158b2d82adfec992bdcebd2d4a08c48be7a
Author:     Jon Hopper <fbsd@thesoo.org>
AuthorDate: 2022-12-08 10:17:37 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-12-08 11:45:57 +0000

    comms/quisk: Resurrect the port.
    
    Reviewed By: arrowd
    
    Differential Revision: https://reviews.freebsd.org/D37614
---
 MOVED                                  |  1 -
 comms/Makefile                         |  1 +
 comms/quisk/Makefile                   | 35 ++++++++++++++++++++++++++++++++++
 comms/quisk/distinfo                   |  3 +++
 comms/quisk/files/patch-ac2yd_remote.c | 10 ++++++++++
 comms/quisk/files/patch-quisk.h        | 11 +++++++++++
 comms/quisk/files/patch-setup.py       | 18 +++++++++++++++++
 comms/quisk/files/patch-sound.c        | 20 +++++++++++++++++++
 comms/quisk/pkg-descr                  |  8 ++++++++
 9 files changed, 106 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index d2cc387e8177..2dc84955d97d 100644
--- a/MOVED
+++ b/MOVED
@@ -15364,7 +15364,6 @@ biology/tophat||2020-09-19|Has expired: Uses deprecated version of python
 chinese/ibus-array||2020-09-19|Has expired: Uses deprecated version of python
 comms/congruity||2020-09-19|Has expired: Uses deprecated version of python
 comms/libbtbb||2020-09-19|Has expired: Uses deprecated version of python
-comms/quisk||2020-09-19|Has expired: Uses deprecated version of python
 databases/mtools-mongodb||2020-09-19|Has expired: Uses deprecated version of python
 databases/mydbf2mysql||2020-09-19|Has expired: Uses deprecated version of python
 databases/ntdb||2020-09-19|Has expired: Uses deprecated version of python
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212081146.2B8BkKmj085363>