aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2013-04-29 01:34:17 +0800
committernox <nox@FreeBSD.org>2013-04-29 01:34:17 +0800
commit57a366e0941e1ef07af288dc4364c45fb65558ad (patch)
tree864c4aa9976b80bee9221b0b9c0bd50bc4b7bafd /comms
parente62c459bfbf76d129764ed814f5505bcaaebd634 (diff)
downloadfreebsd-ports-gnome-57a366e0941e1ef07af288dc4364c45fb65558ad.tar.gz
freebsd-ports-gnome-57a366e0941e1ef07af288dc4364c45fb65558ad.tar.zst
freebsd-ports-gnome-57a366e0941e1ef07af288dc4364c45fb65558ad.zip
Add new port comms/dabstick-radio:
While preparing for a release 4.2 of the sdr-j software package, we created two new programs a DAB receiver a broad spectrum version of the FM receiver It is quite obvious that one can use a DAB stick to receive DAB programs. However, the DAB software presented here is a real SDR in that it uses the 8 bit I/Q samples of the DAB stick. WWW: http://www.sdr-j.tk/
Diffstat (limited to 'comms')
-rw-r--r--comms/Makefile1
-rw-r--r--comms/dabstick-radio/Makefile62
-rw-r--r--comms/dabstick-radio/distinfo2
-rw-r--r--comms/dabstick-radio/files/patch-dabreceiver-V2_dabreceiver.pro42
-rw-r--r--comms/dabstick-radio/files/patch-filters_fir-filters.cpp15
-rw-r--r--comms/dabstick-radio/files/patch-filters_iir-filters.cpp15
-rw-r--r--comms/dabstick-radio/files/patch-fmreceiver-dab_fmreceiver.pro32
-rw-r--r--comms/dabstick-radio/files/patch-jff-include.h21
-rw-r--r--comms/dabstick-radio/files/patch-utilities_decimator.cpp13
-rw-r--r--comms/dabstick-radio/pkg-descr11
10 files changed, 214 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile
index 8b84a76fd5c2..c12d2cda3dc4 100644
--- a/comms/Makefile
+++ b/comms/Makefile
@@ -25,6 +25,7 @@
SUBDIR += conserver-com
SUBDIR += cutecom
SUBDIR += cwdaemon
+ SUBDIR += dabstick-radio
SUBDIR += deforaos-phone
SUBDIR += dfu-programmer
SUBDIR += dfu-util
diff --git a/comms/dabstick-radio/Makefile b/comms/dabstick-radio/Makefile
new file mode 100644
index 000000000000..e6c1468328e7
--- /dev/null
+++ b/comms/dabstick-radio/Makefile
@@ -0,0 +1,62 @@
+# Created by: Juergen Lock <nox@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= dabstick-radio
+PORTVERSION= 0.1
+CATEGORIES= comms audio hamradio
+MASTER_SITES= http://www.sdr-j.tk/
+DISTNAME= ${PORTNAME}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= nox@FreeBSD.org
+COMMENT= DAB/DAB+ and wideband FM receiver for RTL2832-based USB sticks
+
+LICENSE= GPLv2
+
+LIB_DEPENDS+= rtlsdr:${PORTSDIR}/comms/rtl-sdr \
+ qwt:${PORTSDIR}/x11-toolkits/qwt5 \
+ portaudio.2:${PORTSDIR}/audio/portaudio2 \
+ samplerate:${PORTSDIR}/audio/libsamplerate \
+ avcodec${FFMPEG_SUFFIX}:${PORTSDIR}/multimedia/ffmpeg${FFMPEG_SUFFIX} \
+ fftw3:${PORTSDIR}/math/fftw3 \
+ faad:${PORTSDIR}/audio/faad
+
+USE_QT4= gui qt3support qmake_build moc_build rcc_build uic_build
+
+FFMPEG_SUFFIX= 1
+
+QMAKE_DABSTICK= ${QMAKE} -unix PREFIX=${PREFIX} -o
+MAKE_ENV+= FFMPEG_SUFFIX=${FFMPEG_SUFFIX}
+MAKE_JOBS_SAFE= yes
+
+PORTDOCS= dab-manual.pdf
+PLIST_FILES+= bin/dabreceiver bin/fmreceiver
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 800069
+IGNORE= requires FreeBSD 8.0 or later
+.endif
+
+do-configure:
+ cd ${WRKSRC}/fmreceiver-dab && ${SETENV} ${MAKE_ENV} \
+ ${QMAKE_DABSTICK} Makefile fmreceiver.pro
+ cd ${WRKSRC}/dabreceiver-V2 && ${SETENV} ${MAKE_ENV} \
+ ${QMAKE_DABSTICK} Makefile dabreceiver.pro
+
+do-build:
+ cd ${WRKSRC}/fmreceiver-dab && ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${_MAKE_JOBS}
+ cd ${WRKSRC}/dabreceiver-V2 && ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${_MAKE_JOBS}
+
+do-install:
+ ${INSTALL} ${WRKSRC}/fmreceiver-dab/fmreceiver \
+ ${WRKSRC}/dabreceiver-V2/dabreceiver \
+ ${PREFIX}/bin
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/dab-manual.pdf ${DOCSDIR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/comms/dabstick-radio/distinfo b/comms/dabstick-radio/distinfo
new file mode 100644
index 000000000000..abc54f4debd2
--- /dev/null
+++ b/comms/dabstick-radio/distinfo
@@ -0,0 +1,2 @@
+SHA256 (dabstick-radio.tgz) = 5270f245abe653e714c2559848efa092d4deaee09626b2f5d8c93d7de80280e1
+SIZE (dabstick-radio.tgz) = 506372
diff --git a/comms/dabstick-radio/files/patch-dabreceiver-V2_dabreceiver.pro b/comms/dabstick-radio/files/patch-dabreceiver-V2_dabreceiver.pro
new file mode 100644
index 000000000000..53461a5ad929
--- /dev/null
+++ b/comms/dabstick-radio/files/patch-dabreceiver-V2_dabreceiver.pro
@@ -0,0 +1,42 @@
+--- dabreceiver-V2/dabreceiver.pro.orig
++++ dabreceiver-V2/dabreceiver.pro
+@@ -135,15 +135,35 @@ LIBS += -lfaad
+ #}
+
+ #for fedora use the second set
++#unix {
++# HEADERS += ../input/dabstick.h
++# SOURCES += ../input/dabstick.cpp
++# INCLUDEPATH += /usr/include/qwt5-qt4
++# INCLUDEPATH += /usr/include/
++# INCLUDEPATH += /usr/include/ffmpeg
++# LIBS+= -lqwt5-qt4 -lusb-1.0 -lrt -lportaudio -lsamplerate -lfftw3 -lrtlsdr -ldl -lz
++##uncomment the following line when using the libav package for ffmpeg
++# LIBS+= -lavcodec -lavdevice -lavutil -lavformat -lswresample -lswscale -lavfilter
++##uncomment the following line when using the faad library
++# LIBS += -lfaad
++#
++#}
++
++#for FreeBSD use the third set
+ unix {
+ HEADERS += ../input/dabstick.h
+ SOURCES += ../input/dabstick.cpp
+- INCLUDEPATH += /usr/include/qwt5-qt4
++ INCLUDEPATH += ${LOCALBASE}/include/qwt
++ INCLUDEPATH += ${LOCALBASE}/include/portaudio2
++ INCLUDEPATH += ${LOCALBASE}/include/ffmpeg1
++ INCLUDEPATH += ${LOCALBASE}/include
+ INCLUDEPATH += /usr/include/
+- INCLUDEPATH += /usr/include/ffmpeg
+- LIBS+= -lqwt5-qt4 -lusb-1.0 -lrt -lportaudio -lsamplerate -lfftw3 -lrtlsdr -ldl -lz
++ QMAKE_LIBDIR = ${LOCALBASE}/lib/portaudio2
++ QMAKE_LIBDIR += ${LOCALBASE}/lib/ffmpeg${FFMPEG_SUFFIX}
++ QMAKE_LIBDIR += ${LOCALBASE}/lib
++ LIBS+= -lqwt -lusb -lrt -lportaudio -lsamplerate -lfftw3 -lrtlsdr -lz
+ #uncomment the following line when using the libav package for ffmpeg
+- LIBS+= -lavcodec -lavdevice -lavutil -lavformat -lswresample -lswscale -lavfilter
++ LIBS+= -lavcodec${FFMPEG_SUFFIX} -lavdevice${FFMPEG_SUFFIX} -lavutil${FFMPEG_SUFFIX} -lavformat${FFMPEG_SUFFIX} -lswresample${FFMPEG_SUFFIX} -lswscale${FFMPEG_SUFFIX} -lavfilter${FFMPEG_SUFFIX}
+ #uncomment the following line when using the faad library
+ LIBS += -lfaad
+
diff --git a/comms/dabstick-radio/files/patch-filters_fir-filters.cpp b/comms/dabstick-radio/files/patch-filters_fir-filters.cpp
new file mode 100644
index 000000000000..ca518d9de964
--- /dev/null
+++ b/comms/dabstick-radio/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/dabstick-radio/files/patch-filters_iir-filters.cpp b/comms/dabstick-radio/files/patch-filters_iir-filters.cpp
new file mode 100644
index 000000000000..d234b789d69e
--- /dev/null
+++ b/comms/dabstick-radio/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/dabstick-radio/files/patch-fmreceiver-dab_fmreceiver.pro b/comms/dabstick-radio/files/patch-fmreceiver-dab_fmreceiver.pro
new file mode 100644
index 000000000000..884cf70e9e4f
--- /dev/null
+++ b/comms/dabstick-radio/files/patch-fmreceiver-dab_fmreceiver.pro
@@ -0,0 +1,32 @@
+--- fmreceiver-dab/fmreceiver.pro.orig
++++ fmreceiver-dab/fmreceiver.pro
+@@ -121,13 +121,26 @@ LIBS += -lstdc++
+ #}
+
+ #for fedora use the second set
++#unix {
++# HEADERS += ../input/dabstick.h
++# SOURCES += ../input/dabstick.cpp
++# INCLUDEPATH += /usr/include/qwt5-qt4
++# INCLUDEPATH += /usr/local/include
++# INCLUDEPATH += /usr/include/
++# LIBS+= -lqwt5-qt4 -lusb-1.0 -lrt -lportaudio -lsndfile -lsamplerate -lfftw3 -lrtlsdr -ldl
++#}
++
++#for FreeBSD use the third set
+ unix {
+ HEADERS += ../input/dabstick.h
+ SOURCES += ../input/dabstick.cpp
+- INCLUDEPATH += /usr/include/qwt5-qt4
+- INCLUDEPATH += /usr/local/include
++ INCLUDEPATH += ${LOCALBASE}/include/qwt
++ INCLUDEPATH += ${LOCALBASE}/include/portaudio2
++ INCLUDEPATH += ${LOCALBASE}/include
+ INCLUDEPATH += /usr/include/
+- LIBS+= -lqwt5-qt4 -lusb-1.0 -lrt -lportaudio -lsndfile -lsamplerate -lfftw3 -lrtlsdr -ldl
++ QMAKE_LIBDIR = ${LOCALBASE}/lib/portaudio2
++ QMAKE_LIBDIR += ${LOCALBASE}/lib
++ LIBS+= -lqwt -lusb -lrt -lportaudio -lsndfile -lsamplerate -lfftw3 -lrtlsdr
+ }
+
+
diff --git a/comms/dabstick-radio/files/patch-jff-include.h b/comms/dabstick-radio/files/patch-jff-include.h
new file mode 100644
index 000000000000..5a2884382853
--- /dev/null
+++ b/comms/dabstick-radio/files/patch-jff-include.h
@@ -0,0 +1,21 @@
+--- jff-include.h.orig
++++ jff-include.h
+@@ -32,12 +32,18 @@
+ #include <complex>
+ #include <stdint.h>
+
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+
+ #ifdef __MINGW32__
+ #include "windows.h"
+ #else
++#ifndef __FreeBSD__
+ #include "alloca.h"
++#endif
+ #include "dlfcn.h"
+ typedef void *HINSTANCE;
+ #endif
diff --git a/comms/dabstick-radio/files/patch-utilities_decimator.cpp b/comms/dabstick-radio/files/patch-utilities_decimator.cpp
new file mode 100644
index 000000000000..5b67bfccf3cc
--- /dev/null
+++ b/comms/dabstick-radio/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/dabstick-radio/pkg-descr b/comms/dabstick-radio/pkg-descr
new file mode 100644
index 000000000000..6e6fa88585e7
--- /dev/null
+++ b/comms/dabstick-radio/pkg-descr
@@ -0,0 +1,11 @@
+While preparing for a release 4.2 of the sdr-j software package,
+we created two new programs
+
+ a DAB receiver
+ a broad spectrum version of the FM receiver
+
+It is quite obvious that one can use a DAB stick to receive DAB
+programs. However, the DAB software presented here is a real SDR
+in that it uses the 8 bit I/Q samples of the DAB stick.
+
+WWW: http://www.sdr-j.tk/