aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2013-07-26 02:53:30 +0800
committernox <nox@FreeBSD.org>2013-07-26 02:53:30 +0800
commit17d804707193549d3280a9c414e97f116dc4d28a (patch)
treedff560eaa06315d65bf08bd37d07c67f0c3f6170 /comms
parent9c879ee5759d6b1c88aef83706cc54d07bc33411 (diff)
downloadfreebsd-ports-graphics-17d804707193549d3280a9c414e97f116dc4d28a.tar.gz
freebsd-ports-graphics-17d804707193549d3280a9c414e97f116dc4d28a.tar.zst
freebsd-ports-graphics-17d804707193549d3280a9c414e97f116dc4d28a.zip
Add new port comms/jsdr:
SDR-J (formerly Jsdr) is a suite of four programs provided under a LGPL open source license for playing around with sdr (software defined radio). The software can be used directly with the PM-SDR kit and RTL2832U based dongles, and in the 32 bits Windows version with other kits as well. The suite contains four programs: - a full blown "short wave" receiver, which provides tuning in the range of 100K .. 165M using the PM-SDR (although above 55 M with reduced performance) and from app 55 MHz to app 900 Mhz or above using an RTL2832U based dongle. The receiver provides quite a number of decoders for amateur modes. - am/fm receiver covering the same frequency bands as the sw receiver, however, with am bandwidths selectable, with fm mono and stereo decoding as well as with rds decoding. - spectrum viewer for use with the RTL2832U based dongles, showing spectra of up to 3 Mhz bandwidth. - mini receiver, a stripped version of the fm receiver, a gadget for listening to WFM using DAB sticks. WWW: http://www.sdr-j.tk/
Diffstat (limited to 'comms')
-rw-r--r--comms/Makefile1
-rw-r--r--comms/jsdr/Makefile64
-rw-r--r--comms/jsdr/distinfo2
-rw-r--r--comms/jsdr/files/patch-filters_fir-filters.cpp15
-rw-r--r--comms/jsdr/files/patch-filters_iir-filters.cpp15
-rw-r--r--comms/jsdr/files/patch-make-x64_fmreceiver_fmreceiver.pro24
-rw-r--r--comms/jsdr/files/patch-make-x64_jff-include.h19
-rw-r--r--comms/jsdr/files/patch-make-x64_mini-receiver_mini-receiver.pro24
-rw-r--r--comms/jsdr/files/patch-make-x64_spectrum-viewer_spectrum-viewer.pro23
-rw-r--r--comms/jsdr/files/patch-make-x64_swreceiver_swreceiver.pro32
-rw-r--r--comms/jsdr/files/patch-righandling_dabstick-2_librtlsdr.c14
-rw-r--r--comms/jsdr/files/patch-righandling_pmsdr_pmsdr_usb.h14
-rw-r--r--comms/jsdr/files/patch-swreceiver_swdecoders_domino_dominodecoder.cpp15
-rw-r--r--comms/jsdr/files/patch-swreceiver_swdecoders_mfskdecoder_mfskdecoder.cpp15
-rw-r--r--comms/jsdr/files/patch-utilities_decimator.cpp13
-rw-r--r--comms/jsdr/pkg-descr22
16 files changed, 312 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile
index 0dc101a1040..4b275dfc56f 100644
--- a/comms/Makefile
+++ b/comms/Makefile
@@ -70,6 +70,7 @@
SUBDIR += java-commapi
SUBDIR += java-commapi-freebsd
SUBDIR += jerm
+ SUBDIR += jsdr
SUBDIR += kallers
SUBDIR += kb
SUBDIR += kermit
diff --git a/comms/jsdr/Makefile b/comms/jsdr/Makefile
new file mode 100644
index 00000000000..d87a7f57413
--- /dev/null
+++ b/comms/jsdr/Makefile
@@ -0,0 +1,64 @@
+# Created by: Juergen Lock <nox@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= jsdr
+PORTVERSION= 4.1
+CATEGORIES= comms audio hamradio
+MASTER_SITES= http://www.sdr-j.tk/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= nox@FreeBSD.org
+COMMENT= SDR tools for RTL2832-based USB sticks
+
+LICENSE= GPLv2
+
+LIB_DEPENDS+= qwt:${PORTSDIR}/x11-toolkits/qwt5 \
+ portaudio.2:${PORTSDIR}/audio/portaudio2 \
+ samplerate:${PORTSDIR}/audio/libsamplerate \
+ sndfile:${PORTSDIR}/audio/libsndfile \
+ fftw3:${PORTSDIR}/math/fftw3
+
+USE_QT4= gui qt3support qmake_build moc_build rcc_build uic_build
+
+QMAKE_DABSTICK= ${QMAKE} -unix PREFIX=${PREFIX} -o
+
+PORTDOCS= *
+PLIST_FILES+= bin/swreceiver bin/spectrum-viewer-${PORTVERSION} \
+ bin/mini-receiver bin/fmreceiver-${PORTVERSION}
+
+.include <bsd.port.pre.mk>
+
+do-configure:
+ cd ${WRKSRC}/make-x64/swreceiver && ${SETENV} ${MAKE_ENV} \
+ ${QMAKE_DABSTICK} Makefile swreceiver.pro
+ cd ${WRKSRC}/make-x64/fmreceiver && ${SETENV} ${MAKE_ENV} \
+ ${QMAKE_DABSTICK} Makefile fmreceiver.pro
+ cd ${WRKSRC}/make-x64/spectrum-viewer && ${SETENV} ${MAKE_ENV} \
+ ${QMAKE_DABSTICK} Makefile spectrum-viewer.pro
+ cd ${WRKSRC}/make-x64/mini-receiver && ${SETENV} ${MAKE_ENV} \
+ ${QMAKE_DABSTICK} Makefile mini-receiver.pro
+
+do-build:
+ cd ${WRKSRC}/make-x64/swreceiver && ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${_MAKE_JOBS}
+ cd ${WRKSRC}/make-x64/fmreceiver && ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${_MAKE_JOBS}
+ cd ${WRKSRC}/make-x64/spectrum-viewer && ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${_MAKE_JOBS}
+ cd ${WRKSRC}/make-x64/mini-receiver && ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${_MAKE_JOBS}
+
+do-install:
+ ${INSTALL} ${WRKSRC}/make-x64/swreceiver/swreceiver \
+ ${WRKSRC}/make-x64/mini-receiver/mini-receiver \
+ ${PREFIX}/bin
+ ${INSTALL} ${WRKSRC}/make-x64/spectrum-viewer/spectrum-viewer \
+ ${PREFIX}/bin/spectrum-viewer-${PORTVERSION}
+ ${INSTALL} ${WRKSRC}/make-x64/fmreceiver/fmreceiver \
+ ${PREFIX}/bin/fmreceiver-${PORTVERSION}
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/docs/* ${DOCSDIR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/comms/jsdr/distinfo b/comms/jsdr/distinfo
new file mode 100644
index 00000000000..4a34b76281c
--- /dev/null
+++ b/comms/jsdr/distinfo
@@ -0,0 +1,2 @@
+SHA256 (jsdr-4.1.tgz) = 6c9f828378d3d9433de5b1d9db533faecfcc7e81b9577b3e510aee42ac3db97b
+SIZE (jsdr-4.1.tgz) = 2753477
diff --git a/comms/jsdr/files/patch-filters_fir-filters.cpp b/comms/jsdr/files/patch-filters_fir-filters.cpp
new file mode 100644
index 00000000000..ca518d9de96
--- /dev/null
+++ b/comms/jsdr/files/patch-filters_fir-filters.cpp
@@ -0,0 +1,15 @@
+--- filters/fir-filters.cpp.orig
++++ filters/fir-filters.cpp
+@@ -28,8 +28,12 @@
+
+ #include "fir-filters.h"
+ #ifndef __MINGW32__
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#else
+ #include "alloca.h"
+ #endif
++#endif
+
+ //===================================================================
+ //=====================================================================
diff --git a/comms/jsdr/files/patch-filters_iir-filters.cpp b/comms/jsdr/files/patch-filters_iir-filters.cpp
new file mode 100644
index 00000000000..d234b789d69
--- /dev/null
+++ b/comms/jsdr/files/patch-filters_iir-filters.cpp
@@ -0,0 +1,15 @@
+--- filters/iir-filters.cpp.orig
++++ filters/iir-filters.cpp
+@@ -28,8 +28,12 @@
+
+ #include "iir-filters.h"
+ #ifndef __MINGW32__
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#else
+ #include "alloca.h"
+ #endif
++#endif
+
+ #define MAXORDER 0176
+
diff --git a/comms/jsdr/files/patch-make-x64_fmreceiver_fmreceiver.pro b/comms/jsdr/files/patch-make-x64_fmreceiver_fmreceiver.pro
new file mode 100644
index 00000000000..39de395f6da
--- /dev/null
+++ b/comms/jsdr/files/patch-make-x64_fmreceiver_fmreceiver.pro
@@ -0,0 +1,24 @@
+--- make-x64/fmreceiver/fmreceiver.pro.orig
++++ make-x64/fmreceiver/fmreceiver.pro
+@@ -137,9 +137,18 @@ LIBS += -lstdc++
+ #}
+
+ #for fedora use the second set
+-unix { INCLUDEPATH += /usr/include/qwt
+- INCLUDEPATH += /usr/include/
+- LIBS+= -lqwt -lusb-1.0 -lrt -lportaudio -lsndfile -lsamplerate -lfftw3 -ldl
++#unix { INCLUDEPATH += /usr/include/qwt
++# INCLUDEPATH += /usr/include/
++# LIBS+= -lqwt -lusb-1.0 -lrt -lportaudio -lsndfile -lsamplerate -lfftw3 -ldl
++#}
++
++#for FreeBSD use the third set
++unix { INCLUDEPATH += ${LOCALBASE}/include/qwt
++ INCLUDEPATH += ${LOCALBASE}/include/portaudio2
++ INCLUDEPATH += ${LOCALBASE}/include
++ QMAKE_LIBDIR = ${LOCALBASE}/lib/portaudio2
++ QMAKE_LIBDIR += ${LOCALBASE}/lib
++ LIBS+= -lqwt -lusb -lrt -lportaudio -lsndfile -lsamplerate -lfftw3
+ }
+
+
diff --git a/comms/jsdr/files/patch-make-x64_jff-include.h b/comms/jsdr/files/patch-make-x64_jff-include.h
new file mode 100644
index 00000000000..e1145061479
--- /dev/null
+++ b/comms/jsdr/files/patch-make-x64_jff-include.h
@@ -0,0 +1,19 @@
+--- make-x64/jff-include.h.orig
++++ make-x64/jff-include.h
+@@ -32,10 +32,16 @@
+ #include <complex>
+ #include <stdint.h>
+
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+ #ifndef __MINGW32__
++#ifndef __FreeBSD__
+ #include "alloca.h"
+ #endif
++#endif
+
+ #ifdef __MINGW32__
+ #define CURRENT_VERSION "4.1:x64"
diff --git a/comms/jsdr/files/patch-make-x64_mini-receiver_mini-receiver.pro b/comms/jsdr/files/patch-make-x64_mini-receiver_mini-receiver.pro
new file mode 100644
index 00000000000..f0f3ea2793f
--- /dev/null
+++ b/comms/jsdr/files/patch-make-x64_mini-receiver_mini-receiver.pro
@@ -0,0 +1,24 @@
+--- make-x64/mini-receiver/mini-receiver.pro.orig
++++ make-x64/mini-receiver/mini-receiver.pro
+@@ -108,9 +108,18 @@ LIBS += -lstdc++
+ #}
+
+ #for fedora use the second set
+-unix { INCLUDEPATH += /usr/include/qwt
+- INCLUDEPATH += /usr/include/
+- LIBS+= -lqwt -lusb-1.0 -lrt -lportaudio -lsndfile -lsamplerate -lfftw3 -ldl
++#unix { INCLUDEPATH += /usr/include/qwt
++# INCLUDEPATH += /usr/include/
++# LIBS+= -lqwt -lusb-1.0 -lrt -lportaudio -lsndfile -lsamplerate -lfftw3 -ldl
++#}
++
++#for FreeBSD use the third set
++unix { INCLUDEPATH += ${LOCALBASE}/include/qwt
++ INCLUDEPATH += ${LOCALBASE}/include/portaudio2
++ INCLUDEPATH += ${LOCALBASE}/include
++ QMAKE_LIBDIR = ${LOCALBASE}/lib/portaudio2
++ QMAKE_LIBDIR += ${LOCALBASE}/lib
++ LIBS+= -lqwt -lusb -lrt -lportaudio -lsndfile -lsamplerate -lfftw3
+ }
+
+
diff --git a/comms/jsdr/files/patch-make-x64_spectrum-viewer_spectrum-viewer.pro b/comms/jsdr/files/patch-make-x64_spectrum-viewer_spectrum-viewer.pro
new file mode 100644
index 00000000000..bdff81d0289
--- /dev/null
+++ b/comms/jsdr/files/patch-make-x64_spectrum-viewer_spectrum-viewer.pro
@@ -0,0 +1,23 @@
+--- make-x64/spectrum-viewer/spectrum-viewer.pro.orig
++++ make-x64/spectrum-viewer/spectrum-viewer.pro
+@@ -83,10 +83,16 @@ LIBS += -lsamplerate
+ #}
+
+ #for fedora use the second set
+-unix { INCLUDEPATH += /usr/include/qwt
+- INCLUDEPATH += /usr/include/
+- INCLUDEPATH += /usr/local/include
+- LIBS+= -lqwt -lusb-1.0 -lrt -lfftw3 -lsamplerate -ldl
++#unix { INCLUDEPATH += /usr/include/qwt
++# INCLUDEPATH += /usr/include/
++# INCLUDEPATH += /usr/local/include
++# LIBS+= -lqwt -lusb-1.0 -lrt -lfftw3 -lsamplerate -ldl
++#}
++
++#for FreeBSD use the third set
++unix { INCLUDEPATH += ${LOCALBASE}/include/qwt
++ INCLUDEPATH += ${LOCALBASE}/include
++ LIBS+= -lqwt -lusb -lrt -lfftw3 -lsamplerate
+ }
+
+
diff --git a/comms/jsdr/files/patch-make-x64_swreceiver_swreceiver.pro b/comms/jsdr/files/patch-make-x64_swreceiver_swreceiver.pro
new file mode 100644
index 00000000000..f7e7fea1853
--- /dev/null
+++ b/comms/jsdr/files/patch-make-x64_swreceiver_swreceiver.pro
@@ -0,0 +1,32 @@
+--- make-x64/swreceiver/swreceiver.pro.orig
++++ make-x64/swreceiver/swreceiver.pro
+@@ -180,13 +180,21 @@ LIBS += -lwinmm
+ #}
+
+ #for Fedora use the second set
+-unix { INCLUDEPATH += /usr/include/qwt
+- INCLUDEPATH += /usr/include/
+- INCLUDEPATH += /usr/local/include/
+- LIBS += -L/usr/lib64
+- LIBS += -L/lib64
+- LIBS += -L/usr/local/lib
+- LIBS += -lqwt -lrt -lsndfile -lsamplerate -lportaudio -lusb-1.0 -lfftw3 -ldl
+-}
++#unix { INCLUDEPATH += /usr/include/qwt
++# INCLUDEPATH += /usr/include/
++# INCLUDEPATH += /usr/local/include/
++# LIBS += -L/usr/lib64
++# LIBS += -L/lib64
++# LIBS += -L/usr/local/lib
++# LIBS += -lqwt -lrt -lsndfile -lsamplerate -lportaudio -lusb-1.0 -lfftw3 -ldl
++#}
+
++#for FreeBSD use the third set
++unix { INCLUDEPATH += ${LOCALBASE}/include/qwt
++ INCLUDEPATH += ${LOCALBASE}/include/portaudio2
++ INCLUDEPATH += ${LOCALBASE}/include
++ QMAKE_LIBDIR = ${LOCALBASE}/lib/portaudio2
++ QMAKE_LIBDIR += ${LOCALBASE}/lib
++ LIBS += -lqwt -lrt -lsndfile -lsamplerate -lportaudio -lusb -lfftw3
++}
+
diff --git a/comms/jsdr/files/patch-righandling_dabstick-2_librtlsdr.c b/comms/jsdr/files/patch-righandling_dabstick-2_librtlsdr.c
new file mode 100644
index 00000000000..41a6e25e990
--- /dev/null
+++ b/comms/jsdr/files/patch-righandling_dabstick-2_librtlsdr.c
@@ -0,0 +1,14 @@
+--- righandling/dabstick-2/librtlsdr.c.orig
++++ righandling/dabstick-2/librtlsdr.c
+@@ -29,7 +29,11 @@
+
+ #define lmin(a, b) (((a) < (b)) ? (a) : (b))
+ //#include <libusb.h>
++#ifdef __FreeBSD__
++#include <libusb.h>
++#else
+ #include "libusb-1.0/libusb.h"
++#endif
+
+
+ /*
diff --git a/comms/jsdr/files/patch-righandling_pmsdr_pmsdr_usb.h b/comms/jsdr/files/patch-righandling_pmsdr_pmsdr_usb.h
new file mode 100644
index 00000000000..c4843c321cb
--- /dev/null
+++ b/comms/jsdr/files/patch-righandling_pmsdr_pmsdr_usb.h
@@ -0,0 +1,14 @@
+--- righandling/pmsdr/pmsdr_usb.h.orig
++++ righandling/pmsdr/pmsdr_usb.h
+@@ -36,7 +36,11 @@
+ //#ifdef __MINGW32__
+ //#include <libusb.h>
+ //#else
++#ifdef __FreeBSD__
++#include <libusb.h>
++#else
+ #include <libusb-1.0/libusb.h>
++#endif
+ //#endif
+
+ class RadioInterface;
diff --git a/comms/jsdr/files/patch-swreceiver_swdecoders_domino_dominodecoder.cpp b/comms/jsdr/files/patch-swreceiver_swdecoders_domino_dominodecoder.cpp
new file mode 100644
index 00000000000..f05136fe4d5
--- /dev/null
+++ b/comms/jsdr/files/patch-swreceiver_swdecoders_domino_dominodecoder.cpp
@@ -0,0 +1,15 @@
+--- swreceiver/swdecoders/domino/dominodecoder.cpp.orig
++++ swreceiver/swdecoders/domino/dominodecoder.cpp
+@@ -39,8 +39,12 @@
+ #include "gui.h"
+ #include "dominodecoder.h"
+ #ifndef __MINGW32__
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#else
+ #include "alloca.h"
+ #endif
++#endif
+
+ /*
+ * Standard Nasa coefficients for the viterbi decoder
diff --git a/comms/jsdr/files/patch-swreceiver_swdecoders_mfskdecoder_mfskdecoder.cpp b/comms/jsdr/files/patch-swreceiver_swdecoders_mfskdecoder_mfskdecoder.cpp
new file mode 100644
index 00000000000..96dabe07ccb
--- /dev/null
+++ b/comms/jsdr/files/patch-swreceiver_swdecoders_mfskdecoder_mfskdecoder.cpp
@@ -0,0 +1,15 @@
+--- swreceiver/swdecoders/mfskdecoder/mfskdecoder.cpp.orig
++++ swreceiver/swdecoders/mfskdecoder/mfskdecoder.cpp
+@@ -32,8 +32,12 @@
+ #include "mfskdecoder.h"
+ #include "oscillator.h"
+ #ifndef __MINGW32__
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#else
+ #include "alloca.h"
+ #endif
++#endif
+
+ #define BitIsContained(pat, bit) ((pat) & (1 << (mfskNumBits - (bit + 1))))
+ /*
diff --git a/comms/jsdr/files/patch-utilities_decimator.cpp b/comms/jsdr/files/patch-utilities_decimator.cpp
new file mode 100644
index 00000000000..5b67bfccf3c
--- /dev/null
+++ b/comms/jsdr/files/patch-utilities_decimator.cpp
@@ -0,0 +1,13 @@
+--- utilities/decimator.cpp.orig
++++ utilities/decimator.cpp
+@@ -67,8 +67,8 @@ bool downDecimator::doDecimate (DSPFLOAT
+ */
+ this -> inSamplerate = inSamplerate;
+ this -> outSamplerate = outSamplerate;
+- inperiod = (int64_t)(100000000000) / inSamplerate;
+- outperiod = (int64_t)(100000000000) / outSamplerate;
++ inperiod = (int64_t)(100000000000LL) / inSamplerate;
++ outperiod = (int64_t)(100000000000LL) / outSamplerate;
+ oldinsampleTime = 0;
+ currentinsampleTime = 0;
+ oldinsampleValue = 0;
diff --git a/comms/jsdr/pkg-descr b/comms/jsdr/pkg-descr
new file mode 100644
index 00000000000..1120554e956
--- /dev/null
+++ b/comms/jsdr/pkg-descr
@@ -0,0 +1,22 @@
+SDR-J (formerly Jsdr) is a suite of four programs provided under a
+LGPL open source license for playing around with sdr (software
+defined radio). The software can be used directly with the PM-SDR
+kit and RTL2832U based dongles, and in the 32 bits Windows version
+with other kits as well.
+
+The suite contains four programs:
+
+- a full blown "short wave" receiver, which provides tuning in the
+ range of 100K .. 165M using the PM-SDR (although above 55 M with
+ reduced performance) and from app 55 MHz to app 900 Mhz or above
+ using an RTL2832U based dongle. The receiver provides quite a number
+ of decoders for amateur modes.
+- am/fm receiver covering the same frequency bands as the sw receiver,
+ however, with am bandwidths selectable, with fm mono and stereo
+ decoding as well as with rds decoding.
+- spectrum viewer for use with the RTL2832U based dongles, showing
+ spectra of up to 3 Mhz bandwidth.
+- mini receiver, a stripped version of the fm receiver, a gadget
+ for listening to WFM using DAB sticks.
+
+WWW: http://www.sdr-j.tk/