multimedia/tvheadend: Updated for version 4.2.8.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2020-12-06 13:39:17 +01:00 committed by Robby Workman
parent b42166cb70
commit 3025785468
4 changed files with 108 additions and 8 deletions

View File

@ -0,0 +1,55 @@
From 1f2a0a59e3acaef88509d3ac899b905c73b7b8f8 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Fri, 15 May 2020 17:45:30 +0100
Subject: [PATCH] Fix building with -fno-common (default from GCC 10)
---
src/input.h | 4 ++--
src/input/mpegts.c | 2 ++
src/input/mpegts.h | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/input.h b/src/input.h
index a9c96df04..3dce355c6 100644
--- a/src/input.h
+++ b/src/input.h
@@ -133,8 +133,8 @@ void tvh_hardware_delete ( tvh_hardware_t *th );
extern const idclass_t tvh_input_class;
extern const idclass_t tvh_input_instance_class;
-tvh_input_list_t tvh_inputs;
-tvh_hardware_list_t tvh_hardware;
+extern tvh_input_list_t tvh_inputs;
+extern tvh_hardware_list_t tvh_hardware;
#define TVH_INPUT_FOREACH(x) LIST_FOREACH(x, &tvh_inputs, ti_link)
#define TVH_HARDWARE_FOREACH(x) LIST_FOREACH(x, &tvh_hardware, th_link)
diff --git a/src/input/mpegts.c b/src/input/mpegts.c
index e02d491f1..fca4f3429 100644
--- a/src/input/mpegts.c
+++ b/src/input/mpegts.c
@@ -20,6 +20,8 @@
#include "mpegts/fastscan.h"
#include "memoryinfo.h"
+struct mpegts_listeners mpegts_listeners;
+
extern memoryinfo_t mpegts_input_queue_memoryinfo;
extern memoryinfo_t mpegts_input_table_memoryinfo;
diff --git a/src/input/mpegts.h b/src/input/mpegts.h
index 9dda3baca..9c4c57b73 100644
--- a/src/input/mpegts.h
+++ b/src/input/mpegts.h
@@ -1149,7 +1149,7 @@ typedef struct mpegts_listener
void (*ml_mux_delete) (mpegts_mux_t *mm, void *p);
} mpegts_listener_t;
-LIST_HEAD(,mpegts_listener) mpegts_listeners;
+extern LIST_HEAD(mpegts_listeners, mpegts_listener) mpegts_listeners;
#define mpegts_add_listener(ml)\
LIST_INSERT_HEAD(&mpegts_listeners, ml, ml_link)
--
2.26.2

View File

@ -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);
}

View File

@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=tvheadend
VERSION=${VERSION:-3.4patch1}
VERSION=${VERSION:-4.2.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -60,7 +60,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@ -69,15 +69,24 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
patch -p1 < $CWD/tvheadend-4.2.8-gcc9.patch
patch -p1 < $CWD/tvheadend-4.2.8-fno-common.patch
CFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS -Wno-error=stringop-truncation -Wno-error=attributes" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-libffmpeg_static \
--disable-ffmpeg_static \
--disable-libx264_static \
--disable-libx265_static \
--disable-libvpx_static \
--disable-libtheora_static \
--disable-libvorbis_static \
--disable-libfdkaac_static \
--python=python3 \
--build=$ARCH-slackware-linux
make

View File

@ -1,10 +1,10 @@
PRGNAM="tvheadend"
VERSION="3.4patch1"
VERSION="4.2.8"
HOMEPAGE="https://tvheadend.org"
DOWNLOAD="https://github.com/tvheadend/tvheadend/archive/3.4patch1.tar.gz"
MD5SUM="86d1be0ad6e02bd2aecd3d529a026797"
DOWNLOAD="https://github.com/tvheadend/tvheadend/archive/v4.2.8/tvheadend-4.2.8.tar.gz"
MD5SUM="b9571efa46dd489f9fe87acdb391d591"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
REQUIRES="uriparser"
MAINTAINER="William PC"
EMAIL="w_calandrini[at]hotmail[dot]com"