Import ham/rtl-sdr as rtl-sdr-0.5.3
Turns your Realtek RTL2832 based DVB dongle into a SDR receiver. =============================================================== For more information see: http://sdr.osmocom.org/trac/wiki/rtl-sdr
This commit is contained in:
parent
fd9a6cdb00
commit
ed3690d920
6 changed files with 108 additions and 0 deletions
5
ham/rtl-sdr/DESCR
Normal file
5
ham/rtl-sdr/DESCR
Normal file
|
@ -0,0 +1,5 @@
|
|||
Turns your Realtek RTL2832 based DVB dongle into a SDR receiver.
|
||||
===============================================================
|
||||
|
||||
For more information see:
|
||||
http://sdr.osmocom.org/trac/wiki/rtl-sdr
|
43
ham/rtl-sdr/Makefile
Normal file
43
ham/rtl-sdr/Makefile
Normal file
|
@ -0,0 +1,43 @@
|
|||
# $NetBSD: Makefile,v 1.1 2014/10/13 13:05:36 mef Exp $
|
||||
#
|
||||
DISTNAME= v0.5.3
|
||||
PKGNAME= rtl-sdr-${DISTNAME:S/v//}
|
||||
CATEGORIES= ham
|
||||
MASTER_SITES= -https://github.com/steve-m/librtlsdr/archive/${DISTNAME}${EXTRACT_SUFX}
|
||||
EXTRACT_SUFX= .zip
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= http://sdr.osmocom.org/trac/wiki/rtl-sdr
|
||||
COMMENT= Turns your Realtek RTL2832 based DVB dongle into a SDR receiver
|
||||
LICENSE= gnu-gpl-v2
|
||||
|
||||
DIST_SUBDIR= rtl-sdr
|
||||
USE_LANGUAGES+= c c++
|
||||
USE_TOOLS+= gmake
|
||||
USE_CMAKE= yes
|
||||
WRKSRC= ${WRKDIR}/librtlsdr-${DISTNAME:S/v//}
|
||||
AUTO_MKDIRS= yes
|
||||
|
||||
## CMake Error at CMakeLists.txt:69 (message):
|
||||
## LibUSB 1.0 required to compile rtl-sdr
|
||||
CMAKE_ARGS+= -DLIBUSB_INCLUDE_DIR=${PREFIX}/include/libusb-1.0
|
||||
CMAKE_ARG_PATH= ../
|
||||
CONFIGURE_DIRS= build
|
||||
|
||||
SUBST_CLASSES+= destdir
|
||||
SUBST_MESSAGE.destdir= Replace install destination to ${DESTDIR}
|
||||
SUBST_FILES.destdir= build/cmake_install.cmake
|
||||
SUBST_STAGE.destdir= pre-install
|
||||
SUBST_SED.destdir= -e 's|\$${CMAKE_INSTALL_PREFIX}|${DESTDIR}\$${CMAKE_INSTALL_PREFIX}|'
|
||||
|
||||
pre-configure:
|
||||
(cd ${WRKSRC}; ${MKDIR} build;)
|
||||
|
||||
do-build:
|
||||
(cd ${WRKSRC}/build; ${GMAKE})
|
||||
|
||||
do-install:
|
||||
(cd ${WRKSRC}/build; ${GMAKE} install)
|
||||
|
||||
.include "../../devel/libusb1/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
14
ham/rtl-sdr/PLIST
Normal file
14
ham/rtl-sdr/PLIST
Normal file
|
@ -0,0 +1,14 @@
|
|||
@comment $NetBSD: PLIST,v 1.1 2014/10/13 13:05:36 mef Exp $
|
||||
bin/rtl_adsb
|
||||
bin/rtl_eeprom
|
||||
bin/rtl_fm
|
||||
bin/rtl_power
|
||||
bin/rtl_sdr
|
||||
bin/rtl_tcp
|
||||
bin/rtl_test
|
||||
include/rtl-sdr.h
|
||||
include/rtl-sdr_export.h
|
||||
lib/librtlsdr.a
|
||||
lib/librtlsdr.so
|
||||
lib/librtlsdr.so.0
|
||||
lib/librtlsdr.so.${PKGVERSION}
|
14
ham/rtl-sdr/buildlink3.mk
Normal file
14
ham/rtl-sdr/buildlink3.mk
Normal file
|
@ -0,0 +1,14 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.1 2014/10/13 13:05:36 mef Exp $
|
||||
|
||||
BUILDLINK_TREE+= rtl-sdr
|
||||
|
||||
.if !defined(RTL_SDR_BUILDLINK3_MK)
|
||||
RTL_SDR_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.rtl-sdr+= rtl-sdr>=0.5.3
|
||||
BUILDLINK_ABI_DEPENDS.rtl-sdr+= rtl-sdr>=0.5.3
|
||||
BUILDLINK_PKGSRCDIR.rtl-sdr?= ../../ham/rtl-sdr
|
||||
|
||||
.endif # RTL_SDR_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -rtl-sdr
|
6
ham/rtl-sdr/distinfo
Normal file
6
ham/rtl-sdr/distinfo
Normal file
|
@ -0,0 +1,6 @@
|
|||
$NetBSD: distinfo,v 1.1 2014/10/13 13:05:36 mef Exp $
|
||||
|
||||
SHA1 (rtl-sdr/v0.5.3.zip) = 305d286a440d9feb02ee9f929200aab9cbfaccb5
|
||||
RMD160 (rtl-sdr/v0.5.3.zip) = d314ce3515aa25c1fe1c6dc5686fff700f247641
|
||||
Size (rtl-sdr/v0.5.3.zip) = 148189 bytes
|
||||
SHA1 (patch-src_rtl__fm_c) = 04ec7142f38f26d2ed431765017f53e8e79a3a36
|
26
ham/rtl-sdr/patches/patch-src_rtl__fm_c
Normal file
26
ham/rtl-sdr/patches/patch-src_rtl__fm_c
Normal file
|
@ -0,0 +1,26 @@
|
|||
$NetBSD: patch-src_rtl__fm_c,v 1.1 2014/10/13 13:05:36 mef Exp $
|
||||
|
||||
rtl_fm picks frequency with some offset. It is supposed to be activated
|
||||
by (no documented option) -Eoffset. Disable it for default behavior
|
||||
-- should be discussed with upstream --
|
||||
|
||||
--- ./src/rtl_fm.c
|
||||
+++ ./src/rtl_fm.c
|
||||
@@ -792,7 +792,7 @@ static void rtlsdr_callback(unsigned char *buf, uint32_t len, void *ctx)
|
||||
buf[i] = 127;}
|
||||
s->mute = 0;
|
||||
}
|
||||
- if (!s->offset_tuning) {
|
||||
+ if (s->offset_tuning) {
|
||||
rotate_90(buf, len);}
|
||||
for (i=0; i<(int)len; i++) {
|
||||
s->buf16[i] = (int16_t)buf[i] - 127;}
|
||||
@@ -864,7 +864,7 @@ static void optimal_settings(int freq, int rate)
|
||||
}
|
||||
capture_freq = freq;
|
||||
capture_rate = dm->downsample * dm->rate_in;
|
||||
- if (!d->offset_tuning) {
|
||||
+ if (d->offset_tuning) {
|
||||
capture_freq = freq + capture_rate/4;}
|
||||
capture_freq += cs->edge * dm->rate_in / 2;
|
||||
dm->output_scale = (1<<15) / (128 * dm->downsample);
|
Loading…
Reference in a new issue