summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2019-11-02 11:52:01 +0000
committerJames Le Cuirot <chewi@gentoo.org>2019-11-02 12:04:18 +0000
commit1d77ca72c6de413343b61c2a4658b20f2fda8fc4 (patch)
treec78f17a99fb8c1aee4d1585e442cb2b477e5fdfe /media-tv
parentmail-client/neomutt: Version bump to 20191102 (diff)
downloadgentoo-1d77ca72c6de413343b61c2a4658b20f2fda8fc4.tar.gz
gentoo-1d77ca72c6de413343b61c2a4658b20f2fda8fc4.tar.bz2
gentoo-1d77ca72c6de413343b61c2a4658b20f2fda8fc4.zip
media-tv/tvheadend: Add Python 3 and GCC 9 patches from RPM Fusion
Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/tvheadend/files/tvheadend-4.2.7-python3.patch91
-rw-r--r--media-tv/tvheadend/files/tvheadend-4.2.8-gcc9.patch36
-rw-r--r--media-tv/tvheadend/tvheadend-4.2.8.ebuild2
-rw-r--r--media-tv/tvheadend/tvheadend-9999.ebuild1
4 files changed, 130 insertions, 0 deletions
diff --git a/media-tv/tvheadend/files/tvheadend-4.2.7-python3.patch b/media-tv/tvheadend/files/tvheadend-4.2.7-python3.patch
new file mode 100644
index 000000000000..752b17ba08fb
--- /dev/null
+++ b/media-tv/tvheadend/files/tvheadend-4.2.7-python3.patch
@@ -0,0 +1,91 @@
+diff -up ./lib/py/tvh/tsreader.py.orig ./lib/py/tvh/tsreader.py
+--- ./lib/py/tvh/tsreader.py.orig 2018-10-08 14:37:05.000000000 +0200
++++ ./lib/py/tvh/tsreader.py 2018-10-15 11:53:53.766850060 +0200
+@@ -31,7 +31,7 @@ def encode_utf8(c):
+
+ def conv_8859(tnum, data):
+ r = u''
+- print 'TBL %d' % tnum
++ print('TBL %d' % tnum)
+ tbl = conv_8859_table[tnum]
+ for c in data:
+ if ord(c) <= 0x7f:
+@@ -46,8 +46,8 @@ def conv_8859(tnum, data):
+
+
+ def dvb_convert_string(data, conv):
+- print 'convert(%d)' % conv
+- print repr(data)
++ print('convert(%d)' % conv)
++ print(repr(data))
+ if not conv:
+ return data
+ return conv_8859(conv, data)
+@@ -83,8 +83,8 @@ class TsSection(object):
+ # print self.tid, self.len, len(data)
+
+ def process(self):
+- print 'TS Section:'
+- print self.tid, self.len, len(self.data)
++ print('TS Section:')
++ print(self.tid, self.len, len(self.data))
+ # print str2hex(self.data, 16)
+ # print self.data
+
+@@ -112,7 +112,7 @@ class TsSection(object):
+ if l + 1 > dlen:
+ return (None, -1)
+ c = ord(data[1])
+- print c
++ print(c)
+ conv = None
+ if c == 0:
+ return (None, -1)
+@@ -162,14 +162,14 @@ class TsSection(object):
+ eid = (hdr[0] << 8) + hdr[1]
+ start = dvb_convert_date(hdr[2:])
+
+- print 'process event (%d):' % dllen
+- print ' EID : %d' % eid
+- print ' START : %d' % start
++ print('process event (%d):' % dllen)
++ print(' EID : %d' % eid)
++ print(' START : %d' % start)
+
+ while dllen > 2:
+ dtag = ord(data[0])
+ dlen = ord(data[1])
+- print 'dtag = 0x%02x, dlen = %d' % (dtag, dlen)
++ print('dtag = 0x%02x, dlen = %d' % (dtag, dlen))
+
+ dllen = dllen - 2
+ data = data[2:]
+@@ -178,8 +178,8 @@ class TsSection(object):
+
+ if dtag == 0x4d:
+ (title, summary) = self.short_event(data, dlen)
+- print ' TITLE : %s' % title
+- print ' SUMMARY : %s' % summary
++ print(' TITLE : %s' % title)
++ print(' SUMMARY : %s' % summary)
+
+ dllen = dllen - dlen
+ data = data[dlen:]
+@@ -216,7 +216,7 @@ if __name__ == '__main__':
+ # Complete?
+ if cur:
+ if len(cur.data) >= cur.len:
+- print 'Process Section:'
++ print('Process Section:')
+ # try:
+ cur.process()
+ # except: pass
+@@ -224,7 +224,7 @@ if __name__ == '__main__':
+ print
+ sys.exit(0)
+ else:
+- print 'waiting for %d bytes' % (cur.len - len(cur.data))
++ print('waiting for %d bytes' % (cur.len - len(cur.data)))
+
+ # Next
+ if nxt:
diff --git a/media-tv/tvheadend/files/tvheadend-4.2.8-gcc9.patch b/media-tv/tvheadend/files/tvheadend-4.2.8-gcc9.patch
new file mode 100644
index 000000000000..9ccadb44c42c
--- /dev/null
+++ b/media-tv/tvheadend/files/tvheadend-4.2.8-gcc9.patch
@@ -0,0 +1,36 @@
+diff -up ./src/plumbing/transcoding.c.orig ./src/plumbing/transcoding.c
+--- ./src/plumbing/transcoding.c.orig 2019-01-12 09:58:47.000000000 +0100
++++ ./src/plumbing/transcoding.c 2019-03-12 15:49:24.922314869 +0100
+@@ -1804,7 +1804,7 @@ transcoder_init_video(transcoder_t *t, s
+ char *str, *token, *saveptr, codec_list[sizeof(tp->tp_src_vcodec)];
+ int codec_match=0;
+
+- strncpy(codec_list, tp->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
++ memcpy(codec_list, tp->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
+
+ tvhtrace(LS_TRANSCODE, "src_vcodec=\"%s\" ssc_type=%d (%s)\n",
+ tp->tp_src_vcodec,
+@@ -2130,10 +2130,10 @@ transcoder_set_properties(streaming_targ
+ transcoder_t *t = (transcoder_t *)st;
+ transcoder_props_t *tp = &t->t_props;
+
+- strncpy(tp->tp_vcodec, props->tp_vcodec, sizeof(tp->tp_vcodec)-1);
+- strncpy(tp->tp_vcodec_preset, props->tp_vcodec_preset, sizeof(tp->tp_vcodec_preset)-1);
+- strncpy(tp->tp_acodec, props->tp_acodec, sizeof(tp->tp_acodec)-1);
+- strncpy(tp->tp_scodec, props->tp_scodec, sizeof(tp->tp_scodec)-1);
++ memcpy(tp->tp_vcodec, props->tp_vcodec, sizeof(tp->tp_vcodec)-1);
++ memcpy(tp->tp_vcodec_preset, props->tp_vcodec_preset, sizeof(tp->tp_vcodec_preset)-1);
++ memcpy(tp->tp_acodec, props->tp_acodec, sizeof(tp->tp_acodec)-1);
++ memcpy(tp->tp_scodec, props->tp_scodec, sizeof(tp->tp_scodec)-1);
+ tp->tp_channels = props->tp_channels;
+ tp->tp_vbitrate = props->tp_vbitrate;
+ tp->tp_abitrate = props->tp_abitrate;
+@@ -2141,7 +2141,7 @@ transcoder_set_properties(streaming_targ
+
+ memcpy(tp->tp_language, props->tp_language, 4);
+
+- strncpy(tp->tp_src_vcodec, props->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
++ memcpy(tp->tp_src_vcodec, props->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
+ }
+
+
diff --git a/media-tv/tvheadend/tvheadend-4.2.8.ebuild b/media-tv/tvheadend/tvheadend-4.2.8.ebuild
index 0673c7bc7a39..4a49b1460b59 100644
--- a/media-tv/tvheadend/tvheadend-4.2.8.ebuild
+++ b/media-tv/tvheadend/tvheadend-4.2.8.ebuild
@@ -49,6 +49,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-4.0.9-use_system_queue.patch
"${FILESDIR}"/${PN}-4.2.1-hdhomerun.patch
"${FILESDIR}"/${PN}-4.2.2-dtv_scan_tables.patch
+ "${FILESDIR}"/${PN}-4.2.7-python3.patch
+ "${FILESDIR}"/${PN}-4.2.8-gcc9.patch
)
DOCS=( README.md )
diff --git a/media-tv/tvheadend/tvheadend-9999.ebuild b/media-tv/tvheadend/tvheadend-9999.ebuild
index 7fa2c9c7f255..692d4ec897c3 100644
--- a/media-tv/tvheadend/tvheadend-9999.ebuild
+++ b/media-tv/tvheadend/tvheadend-9999.ebuild
@@ -59,6 +59,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-4.0.9-use_system_queue.patch
"${FILESDIR}"/${PN}-4.3-hdhomerun.patch
"${FILESDIR}"/${PN}-4.2.2-dtv_scan_tables.patch
+ "${FILESDIR}"/${PN}-4.2.7-python3.patch
)
DOCS=( README.md )