diff options
author | mef <mef> | 2014-10-13 13:05:36 +0000 |
---|---|---|
committer | mef <mef> | 2014-10-13 13:05:36 +0000 |
commit | 749fd6b3e9d057f59fcb5919810ad5dfa52283b7 (patch) | |
tree | 0ec31b1010f02641e51c4dc7f53ca8f308350296 /ham | |
parent | f2a98272126a3c1fd752a52a701f99a80e40ba47 (diff) | |
download | pkgsrc-749fd6b3e9d057f59fcb5919810ad5dfa52283b7.tar.gz |
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
Diffstat (limited to 'ham')
-rw-r--r-- | ham/rtl-sdr/DESCR | 5 | ||||
-rw-r--r-- | ham/rtl-sdr/Makefile | 43 | ||||
-rw-r--r-- | ham/rtl-sdr/PLIST | 14 | ||||
-rw-r--r-- | ham/rtl-sdr/buildlink3.mk | 14 | ||||
-rw-r--r-- | ham/rtl-sdr/distinfo | 6 | ||||
-rw-r--r-- | ham/rtl-sdr/patches/patch-src_rtl__fm_c | 26 |
6 files changed, 108 insertions, 0 deletions
diff --git a/ham/rtl-sdr/DESCR b/ham/rtl-sdr/DESCR new file mode 100644 index 00000000000..a071b8f49ec --- /dev/null +++ b/ham/rtl-sdr/DESCR @@ -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 diff --git a/ham/rtl-sdr/Makefile b/ham/rtl-sdr/Makefile new file mode 100644 index 00000000000..afb0588a13e --- /dev/null +++ b/ham/rtl-sdr/Makefile @@ -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" diff --git a/ham/rtl-sdr/PLIST b/ham/rtl-sdr/PLIST new file mode 100644 index 00000000000..fff3e764ea3 --- /dev/null +++ b/ham/rtl-sdr/PLIST @@ -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} diff --git a/ham/rtl-sdr/buildlink3.mk b/ham/rtl-sdr/buildlink3.mk new file mode 100644 index 00000000000..d99a9dc303d --- /dev/null +++ b/ham/rtl-sdr/buildlink3.mk @@ -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 diff --git a/ham/rtl-sdr/distinfo b/ham/rtl-sdr/distinfo new file mode 100644 index 00000000000..d3396c6d96d --- /dev/null +++ b/ham/rtl-sdr/distinfo @@ -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 diff --git a/ham/rtl-sdr/patches/patch-src_rtl__fm_c b/ham/rtl-sdr/patches/patch-src_rtl__fm_c new file mode 100644 index 00000000000..3daab1055e7 --- /dev/null +++ b/ham/rtl-sdr/patches/patch-src_rtl__fm_c @@ -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); |