- Update to 20111203 .
- Add knob to install the Linux version too (needs multimedia/linux_dvbwrapper-kmod kldload'ed to run.) - Add workaround to avoid invalid UTF-8 encodings when converting from ISO_6937-2 (that the iconv used on FreeBSD doesn't know) - if you need ISO_6937-2 converted properly you have to use the Linux version for now. (Tho all the 8-bit channel names I see here marked as the default ISO_6937-2 charset are in fact ISO8859-1(5) i.e. the charset isn't marked properly on those transponders and thus the Linux version would convert them wrongly too.) Feature safe: yes
This commit is contained in:
parent
75db61c222
commit
556f752a10
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=286811
3 changed files with 53 additions and 4 deletions
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= w_scan
|
||||
PORTVERSION= 20111011
|
||||
PORTVERSION= 20111203
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= http://wirbel.htpc-forum.de/w_scan/
|
||||
|
||||
|
@ -15,6 +15,10 @@ COMMENT= Perform frequency scans for DVB and ATSC transmissions
|
|||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/include/linux/dvb/frontend.h:${PORTSDIR}/multimedia/v4l_compat
|
||||
|
||||
OPTIONS= LINUX "Install Linux binary too (linux-w_scan)" off
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
USE_BZIP2= yes
|
||||
GNU_CONFIGURE= yes
|
||||
PATCH_STRIP= -p1
|
||||
|
@ -26,13 +30,23 @@ PLIST_FILES= bin/${PORTNAME}
|
|||
MAN1= w_scan.1
|
||||
MAKE_JOBS_SAFE= yes
|
||||
|
||||
.if defined(WITH_LINUX)
|
||||
USE_LINUX= yes
|
||||
RUN_DEPENDS+= linux_dvbwrapper-kmod>=1.0:${PORTSDIR}/multimedia/linux_dvbwrapper-kmod
|
||||
PLIST_FILES+= bin/linux-${PORTNAME}
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -f ${FILESDIR}/types.sed ${WRKSRC}/configure ${WRKSRC}/*.c ${WRKSRC}/*.h
|
||||
${CP} ${WRKSRC}/${PORTNAME} ${WRKSRC}/linux-${PORTNAME}
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR})
|
||||
.endif
|
||||
.if defined(WITH_LINUX)
|
||||
(cd ${WRKSRC} && ${INSTALL_PROGRAM} linux-${PORTNAME} ${PREFIX}/bin)
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SHA256 (w_scan-20111011.tar.bz2) = cc8210ca3297da3525b6cdb45775ab97e457efbca3c2618a7cf4ec38f668f7e4
|
||||
SIZE (w_scan-20111011.tar.bz2) = 482678
|
||||
SHA256 (w_scan-20111203.tar.bz2) = d51d8718dc9bebf2fecf5fde869adf1b8f30f366d07c0a6e2c983a4b8d2800cd
|
||||
SIZE (w_scan-20111203.tar.bz2) = 483525
|
||||
|
|
35
multimedia/w_scan/files/patch-char-coding.c
Normal file
35
multimedia/w_scan/files/patch-char-coding.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
--- a/char-coding.c
|
||||
+++ b/char-coding.c
|
||||
@@ -250,6 +250,10 @@ void char_coding(char **inbuf, size_t *
|
||||
// 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)) {
|
||||
@@ -257,7 +259,21 @@ void char_coding(char **inbuf, size_t *
|
||||
//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_6937-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:;
|
||||
}
|
Loading…
Reference in a new issue