diff options
author | decke <decke@FreeBSD.org> | 2018-10-16 22:45:19 +0800 |
---|---|---|
committer | decke <decke@FreeBSD.org> | 2018-10-16 22:45:19 +0800 |
commit | 34096000f46fb5ab4c5cb43020ab7151be04afe0 (patch) | |
tree | ffc80679dbed32fc996dd50d7ab8b6150337856d /multimedia | |
parent | ed8b37a24adefd65eefb9c15c27bee7e6f7b0671 (diff) | |
download | freebsd-ports-gnome-34096000f46fb5ab4c5cb43020ab7151be04afe0.tar.gz freebsd-ports-gnome-34096000f46fb5ab4c5cb43020ab7151be04afe0.tar.zst freebsd-ports-gnome-34096000f46fb5ab4c5cb43020ab7151be04afe0.zip |
multimedia/tvheadend: Update to 4.2.7
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/tvheadend/Makefile | 6 | ||||
-rw-r--r-- | multimedia/tvheadend/distinfo | 8 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-Makefile.webui | 29 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-src_tcp.c | 39 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-src_webui_webui.c | 74 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-src_wrappers.c | 48 |
6 files changed, 25 insertions, 179 deletions
diff --git a/multimedia/tvheadend/Makefile b/multimedia/tvheadend/Makefile index f7ba84feb495..f3a517b79fa0 100644 --- a/multimedia/tvheadend/Makefile +++ b/multimedia/tvheadend/Makefile @@ -2,14 +2,10 @@ # $FreeBSD$ PORTNAME= tvheadend -PORTVERSION= 4.2.6 +PORTVERSION= 4.2.7 DISTVERSIONPREFIX= v -PORTREVISION= 5 CATEGORIES= multimedia -PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ -PATCHFILES= 3cb4f580565b.patch:-p1 - MAINTAINER= decke@FreeBSD.org COMMENT= TV streaming server supporting DVB, IPTV, SAT>IP and more diff --git a/multimedia/tvheadend/distinfo b/multimedia/tvheadend/distinfo index 8519413c8fe1..9141baf45db5 100644 --- a/multimedia/tvheadend/distinfo +++ b/multimedia/tvheadend/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1522131748 -SHA256 (tvheadend-tvheadend-v4.2.6_GH0.tar.gz) = 09b4d4ff436a2006001ef3c3f38553dc4db3ea31bf9871b046a33180a0e8a8b9 -SIZE (tvheadend-tvheadend-v4.2.6_GH0.tar.gz) = 21528720 -SHA256 (3cb4f580565b.patch) = b27328ece106d5c66bba3f3a39ce69b66a3182ea686acd57d393d1ae7255b0bb -SIZE (3cb4f580565b.patch) = 5541 +TIMESTAMP = 1539012290 +SHA256 (tvheadend-tvheadend-v4.2.7_GH0.tar.gz) = 8383990895be767a1b8f6d3a9356c2d5b2ea5d686d2293fbdb1552ffc6ea0640 +SIZE (tvheadend-tvheadend-v4.2.7_GH0.tar.gz) = 21544435 diff --git a/multimedia/tvheadend/files/patch-Makefile.webui b/multimedia/tvheadend/files/patch-Makefile.webui deleted file mode 100644 index d0d4b7b7b136..000000000000 --- a/multimedia/tvheadend/files/patch-Makefile.webui +++ /dev/null @@ -1,29 +0,0 @@ ---- Makefile.webui.orig 2017-01-20 19:41:51.000000000 +0100 -+++ Makefile.webui 2017-02-08 10:35:04.215801000 +0100 -@@ -189,22 +189,22 @@ - $(VV)$(CSS_PY) --in="$^" utf-check - $(VV)cat $^ > $@.tmp - $(VV)$(RUN_JS) < $@.tmp > $@.tmp2 -- @stat --printf="%-35n %7s\n" $@.tmp $@.tmp2 -+ @stat -f "%-35N %7b" $@.tmp $@.tmp2 - $(VV)$(GZIPCMD) -c $@.tmp2 > $@.tmp - @rm $@.tmp2 - @mv $@.tmp $@ -- @stat --printf="%-35n %7s\n" $@ -+ @stat -f "%-35N %7b" $@ - endef - - define GO_CSS - $(VV)$(CSS_PY) --in="$^" utf-check - $(VV)$(CSS_PY) --in="$^" > $@.tmp - $(VV)$(RUN_CSS) < $@.tmp > $@.tmp2 -- @stat --printf="%-35n %7s\n" $@.tmp $@.tmp2 -+ @stat -f "%-35N %7b" $@.tmp $@.tmp2 - $(VV)$(GZIPCMD) -c $@.tmp2 > $@.tmp - @rm $@.tmp2 - @mv $@.tmp $@ -- @stat --printf="%-35n %7s\n" $@ -+ @stat -f "%-35N %7b" $@ - endef - - define merge-po diff --git a/multimedia/tvheadend/files/patch-src_tcp.c b/multimedia/tvheadend/files/patch-src_tcp.c deleted file mode 100644 index fc9c75570fb5..000000000000 --- a/multimedia/tvheadend/files/patch-src_tcp.c +++ /dev/null @@ -1,39 +0,0 @@ -From dc7804e1410971dabbe087193ca2b47f02131524 Mon Sep 17 00:00:00 2001 -From: Jongsung Kim <jongsung.kim@gmail.com> -Date: Mon, 16 Apr 2018 13:01:41 +0900 -Subject: [PATCH] tcp: fix tcp_socket_dead() for FreeBSD - -The FreeBSD port of tvheadend couldn't stream Live TV, and debug -log shows webui judged the peer socket closed immediately after -starting streaming: - -2018-04-15 06:30:04.996 [ DEBUG]:webui: Start streaming /stream/mux/c4bc67bdaa13457e33740ca883cc4d75?ticket=7D1B56AD0E434C5F7EBFA4677A7FBE4C94097974 -2018-04-15 06:30:04.996 [ DEBUG]:webui: Stop streaming /stream/mux/c4bc67bdaa13457e33740ca883cc4d75?ticket=7D1B56AD0E434C5F7EBFA4677A7FBE4C94097974, client hung up - -It looks because tcp_socket_dead() misunderstood the zero-return -from recv(). For the FreeBSD, recv() might return zero for alive -sockets which have nothing to read. - -Patch tested with the latest FreeBSD port of tvheadend-4.2.6. ---- - src/tcp.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/tcp.c b/src/tcp.c -index 40f6c1c0cc..9b865eb292 100644 ---- src/tcp.c -+++ src/tcp.c -@@ -453,8 +453,13 @@ tcp_socket_dead(int fd) - return -errno; - if (err) - return -err; -+#ifdef PLATFORM_FREEBSD -+ if (recv(fd, NULL, 0, MSG_PEEK | MSG_DONTWAIT) < 0) -+ return -errno; -+#else - if (recv(fd, NULL, 0, MSG_PEEK | MSG_DONTWAIT) == 0) - return -EIO; -+#endif - return 0; - } - diff --git a/multimedia/tvheadend/files/patch-src_webui_webui.c b/multimedia/tvheadend/files/patch-src_webui_webui.c deleted file mode 100644 index ea5462d76929..000000000000 --- a/multimedia/tvheadend/files/patch-src_webui_webui.c +++ /dev/null @@ -1,74 +0,0 @@ -From d19ee83aba20e5a64a6cef6dd528191a71f9aa31 Mon Sep 17 00:00:00 2001 -From: Jongsung Kim <jongsung.kim@gmail.com> -Date: Tue, 29 May 2018 03:42:04 +0900 -Subject: [PATCH] webui: fix http_serve_file() for FreeBSD - -This patch fixes two major problems of FreeBSD port of tvheadend: - -1. very high CPU usage while streaming a recored program -2. unable to stream the recorded program beyond 128MB. - -Unlike Linux sendfile(), FreeBSD sendfile() requires an explicit -file offset, and return value must be checked to catch any error -occurred. (i.e., closed connection) - -Patch tested with the latest FreeBSD port of tvheadend-4.2.6. - ---- src/webui/webui.c.orig 2018-03-26 10:19:37.000000000 +0200 -+++ src/webui/webui.c 2018-06-13 14:47:58.627430000 +0200 -@@ -1570,7 +1570,7 @@ - #if defined(PLATFORM_LINUX) - ssize_t r; - #elif defined(PLATFORM_FREEBSD) || defined(PLATFORM_DARWIN) -- off_t r; -+ off_t o, r; - #endif - - if (fconv) { -@@ -1631,6 +1631,7 @@ - sprintf(range_buf, "bytes %jd-%jd/%jd", - file_start, file_end, (intmax_t)st.st_size); - -+#if defined(PLATFORM_LINUX) - if(file_start > 0) - if (lseek(fd, file_start, SEEK_SET) != file_start) { - close(fd); -@@ -1644,6 +1645,9 @@ - return ret; - } - } -+#elif defined(PLATFORM_FREEBSD) || defined(PLATFORM_DARWIN) -+ o = file_start; -+#endif - - http_send_begin(hc); - http_send_header(hc, range ? HTTP_STATUS_PARTIAL_CONTENT : HTTP_STATUS_OK, -@@ -1656,16 +1660,22 @@ - chunk = MIN(1024 * ((stats ? 128 : 1024) * 1024), content_len); - #if defined(PLATFORM_LINUX) - r = sendfile(hc->hc_fd, fd, NULL, chunk); -+ if (r < 0) { -+ ret = -1; -+ break; -+ } - #elif defined(PLATFORM_FREEBSD) -- sendfile(fd, hc->hc_fd, 0, chunk, NULL, &r, 0); -+ ret = sendfile(fd, hc->hc_fd, o, chunk, NULL, &r, 0); -+ if (ret < 0) -+ break; -+ o += r; - #elif defined(PLATFORM_DARWIN) - r = chunk; -- sendfile(fd, hc->hc_fd, 0, &r, NULL, 0); --#endif -- if(r < 0) { -- ret = -1; -+ ret = sendfile(fd, hc->hc_fd, o, &r, NULL, 0); -+ if (ret < 0) - break; -- } -+ o += r; -+#endif - content_len -= r; - if (stats) - stats(hc, r, opaque); diff --git a/multimedia/tvheadend/files/patch-src_wrappers.c b/multimedia/tvheadend/files/patch-src_wrappers.c index 5aca192cf560..af4aaafea0f5 100644 --- a/multimedia/tvheadend/files/patch-src_wrappers.c +++ b/multimedia/tvheadend/files/patch-src_wrappers.c @@ -1,30 +1,24 @@ ---- src/wrappers.c.orig 2017-05-16 11:15:24.000000000 +0000 -+++ src/wrappers.c 2017-06-21 18:00:42.352871000 +0000 -@@ -290,6 +290,19 @@ - } while (r > 0); - } - -+#ifdef PLATFORM_FREEBSD -+int64_t -+tvh_usleep(int64_t us) -+{ -+ return usleep(us); -+} -+ -+int64_t -+tvh_usleep_abs(int64_t us) -+{ -+ return usleep(us - getfastmonoclock()); -+} -+#else +Use the implementation from Darwin for tvh_usleep() and tvh_usleep_abs() +in FreeBSD. + +Submitted by: Bernhard Froehlich <decke@FreeBSD.org> +--- src/wrappers.c.orig 2018-10-08 12:37:05.000000000 +0000 ++++ src/wrappers.c 2018-10-16 14:27:38.788502000 +0000 +@@ -324,7 +324,7 @@ int64_t tvh_usleep(int64_t us) { -@@ -323,6 +336,7 @@ - return val; - return r ? -r : 0; - } -+#endif - - /* - * qsort +-#if defined(PLATFORM_DARWIN) ++#if defined(PLATFORM_DARWIN) || defined(PLATFORM_FREEBSD) + return usleep(us); + #else + struct timespec ts; +@@ -345,7 +345,7 @@ + int64_t + tvh_usleep_abs(int64_t us) + { +-#if defined(PLATFORM_DARWIN) ++#if defined(PLATFORM_DARWIN) || defined(PLATFORM_FREEBSD) + /* Convert to relative wait */ + int64_t now = getmonoclock(); + int64_t relative = us - now; |