mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-15 07:56:36 +00:00
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/
This commit is contained in:
parent
4dd7a5d4ed
commit
292784d76a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=316735
@ -25,6 +25,7 @@
|
||||
SUBDIR += conserver-com
|
||||
SUBDIR += cutecom
|
||||
SUBDIR += cwdaemon
|
||||
SUBDIR += dabstick-radio
|
||||
SUBDIR += deforaos-phone
|
||||
SUBDIR += dfu-programmer
|
||||
SUBDIR += dfu-util
|
||||
|
62
comms/dabstick-radio/Makefile
Normal file
62
comms/dabstick-radio/Makefile
Normal file
@ -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>
|
2
comms/dabstick-radio/distinfo
Normal file
2
comms/dabstick-radio/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (dabstick-radio.tgz) = 5270f245abe653e714c2559848efa092d4deaee09626b2f5d8c93d7de80280e1
|
||||
SIZE (dabstick-radio.tgz) = 506372
|
@ -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
|
||||
|
15
comms/dabstick-radio/files/patch-filters_fir-filters.cpp
Normal file
15
comms/dabstick-radio/files/patch-filters_fir-filters.cpp
Normal file
@ -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
|
||||
|
||||
//===================================================================
|
||||
//=====================================================================
|
15
comms/dabstick-radio/files/patch-filters_iir-filters.cpp
Normal file
15
comms/dabstick-radio/files/patch-filters_iir-filters.cpp
Normal file
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
21
comms/dabstick-radio/files/patch-jff-include.h
Normal file
21
comms/dabstick-radio/files/patch-jff-include.h
Normal file
@ -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
|
13
comms/dabstick-radio/files/patch-utilities_decimator.cpp
Normal file
13
comms/dabstick-radio/files/patch-utilities_decimator.cpp
Normal file
@ -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;
|
11
comms/dabstick-radio/pkg-descr
Normal file
11
comms/dabstick-radio/pkg-descr
Normal file
@ -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/
|
Loading…
Reference in New Issue
Block a user