aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2011-12-04 01:12:29 +0800
committernox <nox@FreeBSD.org>2011-12-04 01:12:29 +0800
commitc753790f928f7f631aedd1ab8ef4a73a557d986c (patch)
treea3b8a729e3c6744b96af8fe9707cf78c3d2eb676 /multimedia
parentcf816b037b6c37603fdfb41167d4aa5c82e5ba92 (diff)
downloadfreebsd-ports-gnome-c753790f928f7f631aedd1ab8ef4a73a557d986c.tar.gz
freebsd-ports-gnome-c753790f928f7f631aedd1ab8ef4a73a557d986c.tar.zst
freebsd-ports-gnome-c753790f928f7f631aedd1ab8ef4a73a557d986c.zip
- 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
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/w_scan/Makefile18
-rw-r--r--multimedia/w_scan/distinfo4
-rw-r--r--multimedia/w_scan/files/patch-char-coding.c35
3 files changed, 53 insertions, 4 deletions
diff --git a/multimedia/w_scan/Makefile b/multimedia/w_scan/Makefile
index e131bb6802ab..37874767516b 100644
--- a/multimedia/w_scan/Makefile
+++ b/multimedia/w_scan/Makefile
@@ -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>
diff --git a/multimedia/w_scan/distinfo b/multimedia/w_scan/distinfo
index 63bd425e513a..8d49b03a75fa 100644
--- a/multimedia/w_scan/distinfo
+++ b/multimedia/w_scan/distinfo
@@ -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
diff --git a/multimedia/w_scan/files/patch-char-coding.c b/multimedia/w_scan/files/patch-char-coding.c
new file mode 100644
index 000000000000..2169ee592671
--- /dev/null
+++ b/multimedia/w_scan/files/patch-char-coding.c
@@ -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:;
+ }