aboutsummaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2016-06-20 16:23:28 +0000
committerMathieu Arnold <mat@FreeBSD.org>2016-06-20 16:23:28 +0000
commit7ae7b018ccf7760013f368fcb83aad9ecd8982a8 (patch)
treee83ee6693050a76e305a95a376451aa583df151e /multimedia
parenta35ba13770957a577275c3575d979457605f2aff (diff)
downloadports-7ae7b018ccf7760013f368fcb83aad9ecd8982a8.tar.gz
ports-7ae7b018ccf7760013f368fcb83aad9ecd8982a8.zip
With the power of USES=dos2unix, get rid of most patches and files
with CRLF. While there, run make makepatch, rename patches to use the new scheme, and various fixes. With hat: portmgr Sponsored by: Absolight
Notes
Notes: svn path=/head/; revision=417166
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/vdr-plugin-wirbelscan/Makefile3
-rw-r--r--multimedia/vdr-plugin-wirbelscan/files/patch-scanner.c18
-rw-r--r--multimedia/w_scan/Makefile5
-rw-r--r--multimedia/w_scan/files/patch-char-coding.c68
-rw-r--r--multimedia/w_scan/files/patch-descriptors.c (renamed from multimedia/w_scan/files/patch-clang)10
-rw-r--r--multimedia/w_scan/files/patch-scan.c18
-rw-r--r--multimedia/w_scan/files/patch-z-scan.c14
7 files changed, 66 insertions, 70 deletions
diff --git a/multimedia/vdr-plugin-wirbelscan/Makefile b/multimedia/vdr-plugin-wirbelscan/Makefile
index caedd025db0d..ed26f592c406 100644
--- a/multimedia/vdr-plugin-wirbelscan/Makefile
+++ b/multimedia/vdr-plugin-wirbelscan/Makefile
@@ -11,7 +11,8 @@ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERS
MAINTAINER= ports@FreeBSD.org
COMMENT= Video Disk Recorder - wirbelscan plugin
-USES= tar:tgz
+USES= dos2unix tar:tgz
+DOS2UNIX_FILES= scanner.c
PATCH_STRIP= -p1
HAVE_CONFIGURE= yes
PORTDOCS= COPYING README HISTORY
diff --git a/multimedia/vdr-plugin-wirbelscan/files/patch-scanner.c b/multimedia/vdr-plugin-wirbelscan/files/patch-scanner.c
index fc4ce34c9b74..5c6fa8443e94 100644
--- a/multimedia/vdr-plugin-wirbelscan/files/patch-scanner.c
+++ b/multimedia/vdr-plugin-wirbelscan/files/patch-scanner.c
@@ -1,11 +1,11 @@
--- a/scanner.c
+++ b/scanner.c
-@@ -633,7 +633,7 @@ void cScanner::Action(void) {
- else
- continue;
- cCondWait::SleepMs(2000);
-- vbiSupport = vcap.capabilities & (V4L2_CAP_VBI_CAPTURE || V4L2_CAP_SLICED_VBI_CAPTURE);
-+ vbiSupport = vcap.capabilities & (V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE);
- if (vbiSupport)
- dlog(1, "device can capture vbi");
- }
+@@ -633,7 +633,7 @@ void cScanner::Action(void) {
+ else
+ continue;
+ cCondWait::SleepMs(2000);
+- vbiSupport = vcap.capabilities & (V4L2_CAP_VBI_CAPTURE || V4L2_CAP_SLICED_VBI_CAPTURE);
++ vbiSupport = vcap.capabilities & (V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE);
+ if (vbiSupport)
+ dlog(1, "device can capture vbi");
+ }
diff --git a/multimedia/w_scan/Makefile b/multimedia/w_scan/Makefile
index 4d12b984e908..58fdffc98d51 100644
--- a/multimedia/w_scan/Makefile
+++ b/multimedia/w_scan/Makefile
@@ -14,10 +14,9 @@ LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= v4l_compat>=1.0.20120501:multimedia/v4l_compat
-PATCH_STRIP= -lp1
-
GNU_CONFIGURE= yes
-USES= gettext iconv localbase tar:bzip2
+USES= dos2unix gettext iconv localbase tar:bzip2
+DOS2UNIX_GLOB= *.c *.h
LDFLAGS+= ${ICONV_LIB}
NO_WRKSUBDIR= yes
diff --git a/multimedia/w_scan/files/patch-char-coding.c b/multimedia/w_scan/files/patch-char-coding.c
index 2169ee592671..fb87b8a35811 100644
--- a/multimedia/w_scan/files/patch-char-coding.c
+++ b/multimedia/w_scan/files/patch-char-coding.c
@@ -1,35 +1,35 @@
---- a/char-coding.c
-+++ b/char-coding.c
+--- char-coding.c.orig 2016-06-20 13:13:56 UTC
++++ 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:;
- }
+ // 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 +261,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:;
+ }
diff --git a/multimedia/w_scan/files/patch-clang b/multimedia/w_scan/files/patch-descriptors.c
index 77120dd5a8df..0bfcf37ed9e2 100644
--- a/multimedia/w_scan/files/patch-clang
+++ b/multimedia/w_scan/files/patch-descriptors.c
@@ -1,9 +1,9 @@
The code is using gnu C extensions. The following new patchfile under files/ fixes the issue:
# cat files/patch-descriptors.c
---- a/descriptors.c 2012-10-03 12:39:42.000000000 +0200
-+++ b/descriptors.c 2012-10-03 12:39:56.000000000 +0200
-@@ -1000,6 +1000,16 @@
+--- descriptors.c.orig 2016-06-20 13:13:56 UTC
++++ descriptors.c
+@@ -1000,6 +1000,16 @@ void parse_T2_delivery_system_descriptor
}
}
@@ -20,7 +20,7 @@ The code is using gnu C extensions. The following new patchfile under files/ fix
/* 300468 v011101 annex C, Conversion between time and date conventions
* NOTE: These formulas are applicable between the inclusive dates 1900 March 1 to 2100 February 28.
-@@ -1011,16 +1021,6 @@
+@@ -1011,16 +1021,6 @@ struct tm modified_julian_date_to_utc(__
int _M = (int) (MJD - 14956.1 - (int) (_Y * 365.25)) / 30.6001;
int K = (_M == 14) ? 1 : (_M == 15) ? 1 : 0;
@@ -37,5 +37,3 @@ The code is using gnu C extensions. The following new patchfile under files/ fix
memset(&utc, 0, sizeof(struct tm));
utc.tm_mday = MJD - 14956 - (int) (_Y * 365.25) - (int) (_M * 30.6001);
utc.tm_year = _Y + K;
-
-
diff --git a/multimedia/w_scan/files/patch-scan.c b/multimedia/w_scan/files/patch-scan.c
index 5fa98523dca7..88910e56532d 100644
--- a/multimedia/w_scan/files/patch-scan.c
+++ b/multimedia/w_scan/files/patch-scan.c
@@ -1,6 +1,18 @@
---- a/scan.c
-+++ b/scan.c
-@@ -2936,8 +2936,8 @@ int main (int argc, char **argv)
+--- scan.c.orig 2016-06-20 13:13:56 UTC
++++ scan.c
+@@ -1816,7 +1816,11 @@ static int set_frontend(int frontend_fd,
+ case SCAN_TERRESTRIAL:
+ set_cmd_sequence(DTV_DELIVERY_SYSTEM, t->param.u.terr.delivery_system);
+ if (t->param.u.terr.delivery_system == SYS_DVBT2) {
++#ifndef DTV_DVBT2_PLP_ID
++ set_cmd_sequence(DTV_DVBT2_PLP_ID_LEGACY, t->pids.plp_id);
++#else
+ set_cmd_sequence(DTV_DVBT2_PLP_ID, t->pids.plp_id);
++#endif
+ }
+ set_cmd_sequence(DTV_FREQUENCY, t->param.frequency);
+ set_cmd_sequence(DTV_INVERSION, t->param.inversion);
+@@ -3010,8 +3014,8 @@ int main (int argc, char **argv)
cleanup();
return -1;
}
diff --git a/multimedia/w_scan/files/patch-z-scan.c b/multimedia/w_scan/files/patch-z-scan.c
deleted file mode 100644
index 860de10895b1..000000000000
--- a/multimedia/w_scan/files/patch-z-scan.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/scan.c
-+++ b/scan.c
-@@ -1816,7 +1816,11 @@ static int set_frontend(int frontend_fd,
- case SCAN_TERRESTRIAL:
- set_cmd_sequence(DTV_DELIVERY_SYSTEM, t->param.u.terr.delivery_system);
- if (t->param.u.terr.delivery_system == SYS_DVBT2) {
-+#ifndef DTV_DVBT2_PLP_ID
-+ set_cmd_sequence(DTV_DVBT2_PLP_ID_LEGACY, t->pids.plp_id);
-+#else
- set_cmd_sequence(DTV_DVBT2_PLP_ID, t->pids.plp_id);
-+#endif
- }
- set_cmd_sequence(DTV_FREQUENCY, t->param.frequency);
- set_cmd_sequence(DTV_INVERSION, t->param.inversion);