diff --git a/multimedia/w_scan2/Makefile b/multimedia/w_scan2/Makefile new file mode 100644 index 000000000000..c455acafa137 --- /dev/null +++ b/multimedia/w_scan2/Makefile @@ -0,0 +1,33 @@ +# Created by: Juergen Lock +# $FreeBSD$ + +PORTNAME= w_scan2 +PORTVERSION= 1.0.9 +CATEGORIES= multimedia + +MAINTAINER= rene@FreeBSD.org +COMMENT= Perform frequency scans for DVB and ATSC transmissions + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= v4l_compat>=1.0.20120501:multimedia/v4l_compat + +GNU_CONFIGURE= yes +USES= autoreconf gettext iconv localbase +LDFLAGS+= ${ICONV_LIB} + +USE_GITHUB= yes +GH_ACCOUNT= stefantalpalaru + +PORTDOCS= COPYING ChangeLog README.md +PLIST_FILES= bin/${PORTNAME} \ + man/man1/${PORTNAME}.1.gz + +OPTIONS_DEFINE= DOCS + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}) + +.include diff --git a/multimedia/w_scan2/distinfo b/multimedia/w_scan2/distinfo new file mode 100644 index 000000000000..e11df4c9d800 --- /dev/null +++ b/multimedia/w_scan2/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1598103820 +SHA256 (stefantalpalaru-w_scan2-1.0.9_GH0.tar.gz) = a2718e922302297f845961af54e615852be4f575bea63f3a90ed19a04d955f36 +SIZE (stefantalpalaru-w_scan2-1.0.9_GH0.tar.gz) = 232486 diff --git a/multimedia/w_scan2/files/patch-src_char-coding.c b/multimedia/w_scan2/files/patch-src_char-coding.c new file mode 100644 index 000000000000..2a00f9286e7b --- /dev/null +++ b/multimedia/w_scan2/files/patch-src_char-coding.c @@ -0,0 +1,35 @@ +--- src/char-coding.c.orig 2020-08-22 13:49:25 UTC ++++ src/char-coding.c +@@ -340,14 +340,31 @@ void char_coding(char **inbuf, size_t * inbytesleft, c + // Fallback method: copy all printable chars from *inbuf to *outbuf. + size_t i; + size_t pos = 0; +- ++#ifdef __FreeBSD__ ++ int to_utf = user_charset_id < iconv_codes_count() && ++ !strncmp(iconv_codes[user_charset_id], "UTF", sizeof "UTF" - 1); ++#endif + for (i = 0; i < nsrc; i++) { + switch ((uint8_t) * (psrc + i)) { + //case 0x20 ... 0x7E: + //case 0xA0 ... 0xFF: + // printable chars ISO-6937-2 + // Figure A.1: Character code table 00 - Latin alphabet ++#ifdef __FreeBSD__ ++ case 0x80 ... 0xFF: ++ // the iconv used on FreeBSD doesn't know about the ++ // default DVB charset ISO-6397-2 so we'll end up here ++ // for 8-bit chars in channel names that are (usually ++ // wrongly) specified as the default charset - and if ++ // we are converting to UTF those will create invalid ++ // encodings. ++ if (to_utf) ++ continue; ++ // FALLTHRU ++ case 0x01 ... 0x7F: ++#else + case 0x01 ... 0xFF: // 20121202: don't touch anything; leave it as it is. ++#endif + *(pdest + pos++) = *(psrc + i); + default:; + } diff --git a/multimedia/w_scan2/files/patch-src_si__types.h b/multimedia/w_scan2/files/patch-src_si__types.h new file mode 100644 index 000000000000..93bc4a06ee27 --- /dev/null +++ b/multimedia/w_scan2/files/patch-src_si__types.h @@ -0,0 +1,10 @@ +--- src/si_types.h.orig 2020-08-22 13:49:25 UTC ++++ src/si_types.h +@@ -23,6 +23,7 @@ + #define __SI_TYPES_H + + #include ++#include + #include "descriptors.h" + #include "tools.h" + diff --git a/multimedia/w_scan2/pkg-descr b/multimedia/w_scan2/pkg-descr new file mode 100644 index 000000000000..3aa4e6466171 --- /dev/null +++ b/multimedia/w_scan2/pkg-descr @@ -0,0 +1,24 @@ +w_scan2 is a small channel scan tool which generates ATSC, DVB-C, +DVB-S/S2 and DVB-T/T2 channels.conf files. + +It's based on the old "scan" tool from linuxtv-dvb-apps-1.1.0. The +differences are: +* no initial tuning data needed, because scanning without this data + is exactly what a scan tool like this should do. +* it detects automatically which DVB/ATSC card to use. +* much more output formats, interfacing to other dtv software. + +w_scan2 is a fork of the original w_scan from +https://www.gen2vdr.de/wirbel/w_scan/index2.html + +Main changes from w_scan to w_scan2: +* keep duplicate transponders by default because a stronger transponder + with the same ID might have a higher frequency and be discarded simply + because it's scanned later. Also don't replace the current transponder + with an advertised one by default. The latter may have a lower signal + strength. More details here: + https://stefantalpalaru.wordpress.com/2016/02/04/scan-all-the-things/ + The old behaviour can be enabled with -d (--delete-duplicate-transponders). +* re-enable VHF band III in Europe + +WWW: https://github.com/stefantalpalaru/w_scan2