+comment "Generic options"
+ depends on PACKAGE_tvheadend
+
+config TVHEADEND_OPTIMIZE_SPEED
+ bool "Optimize for speed"
+ depends on PACKAGE_tvheadend
+ default n
+ help
+ Optimize tvheadend for speed instead of size. This option adds -O2 and LTO (Link Time Optimization).
+ Note: No benchmarks were performed when this option was added. Speed improvements (if any) are not known.
+
+config TVHEADEND_TRACE
+ bool "Low level debug trace"
+ depends on PACKAGE_tvheadend
+ default n
+ help
+ Support low level debug trace for tvheadend subsystems.
+ For a list of available subsystems, run "tvheadend --subsystems" in OpenWRT console.
+ Note: Selecting this option does not automatically enable trace logging.
+ It only includes support for --trace command line option and GUI.
+
+config TVHEADEND_AVAHI_SUPPORT
+ bool "Avahi client"
+ depends on PACKAGE_tvheadend
+ select PACKAGE_libavahi-client
+ default n
+ help
+ Enables the opensource implementation of Apple's zero configuration protocol.
+ Tvheadend will advertise itself on the network using this protocol.
+
+choice
+ prompt "Regular Expression"
+ depends on PACKAGE_tvheadend
+ config TVHEADEND_REGEX_POSIX
+ bool "POSIX (internal)"
+ help
+ Use internal POSIX Regular Expressions.
+ Note that not all EPG parsers will work with POSIX RegEx.
+ config TVHEADEND_REGEX_PCRE
+ bool "PCRE (libpcre)"
+ select PACKAGE_libpcre
+ help
+ Use more advanced Perl-Compatible Regular Expressions, provided by libpcre.
+ config TVHEADEND_REGEX_PCRE2
+ bool "PCRE2 (libpcre2)"
+ select PACKAGE_libpcre2
+ help
+ Use more advanced Perl-Compatible Regular Expressions, provided by libpcre2.
+endchoice
+
+config TVHEADEND_IMAGECACHE
+ bool "Image cache"
+ depends on PACKAGE_tvheadend
+ default n
+ help
+ Support caching TV station logos and other images on disk.
+ Note: Activating disk cache will increase fash memory wear.
+ Selecting this option does not automatically enable disk caching. It only includes support for it.
+
comment "Input & output support"
+ depends on PACKAGE_tvheadend
config TVHEADEND_LINUXDVB_SUPPORT
- bool "DVB tuners"
- default y
- help
- Include support for DVB tuners.
- Note: Kernel driver(s) and firmware must also be installed.
+ bool "DVB tuners"
+ depends on PACKAGE_tvheadend
+ default y
+ help
+ Include support for DVB tuners.
+ Note: Kernel driver(s) and firmware must also be installed.
config TVHEADEND_DVBSCAN_SUPPORT
- bool "Fetch DVB-scan data"
- depends on TVHEADEND_LINUXDVB_SUPPORT
- default TVHEADEND_LINUXDVB_SUPPORT
- help
- Download and include DVB scan tables.
+ bool "Include DVB-scan tables"
+ depends on TVHEADEND_LINUXDVB_SUPPORT
+ default TVHEADEND_LINUXDVB_SUPPORT
+ help
+ Download and include DVB scan tables.
config TVHEADEND_IPTV
- bool "IPTV client"
- default y
- help
- Include IP-TV client.
+ bool "IPTV client"
+ depends on PACKAGE_tvheadend
+ default y
+ help
+ Include IP-TV client.
config TVHEADEND_SATIP_CLIENT
- bool "SAT>IP client"
- default y
- help
- Include SAT>IP client. This allows tvheadend to receive streams from a SAT>IP server.
- SAT>IP is a client-server communication protocol in which SAT>IP servers,
- connected to one or more DVB broadcast sources, send the program requested
- by an SAT>IP client over an IP based network.
- The main difference of SAT>IP to other IP-based TV distribution systems
- such as IP-TV and DLNA is that the SAT>IP client does not select a program
- from a server specific list, but has to specify the DVB reception parameters
- such as the signal source, frequency, polarisation, modulation, PIDs and others.
-
+ bool "SAT>IP client"
+ depends on PACKAGE_tvheadend
+ default y
+ help
+ Include SAT>IP client. This allows tvheadend to receive streams from a SAT>IP server.
+
config TVHEADEND_SATIP_SERVER
- bool "SAT>IP server"
- default y
- help
- Include SAT>IP server. This allows tvheadend to stream to SAT>IP clients.
- SAT>IP is a client-server communication protocol in which SAT>IP servers,
- connected to one or more DVB broadcast sources, send the program requested
- by an SAT>IP client over an IP based network.
- The main difference of SAT>IP to other IP-based TV distribution systems
- such as IP-TV and DLNA is that the SAT>IP client does not select a program
- from a server specific list, but has to specify the DVB reception parameters
- such as the signal source, frequency, polarisation, modulation, PIDs and others.
-
+ bool "SAT>IP server"
+ depends on PACKAGE_tvheadend
+ default y
+ help
+ Include SAT>IP server. This allows tvheadend to stream to SAT>IP clients.
+
config TVHEADEND_HDHOMERUN_CLIENT
- bool "HDHomeRun client"
- default y
- help
- Include HDHomeRun client.
- HDHomeRun is a network-attached, digital television tuner box.
+ bool "HDHomeRun client"
+ depends on PACKAGE_tvheadend
+ default y
+ help
+ Include HDHomeRun client.
+ HDHomeRun is a network-attached, digital television tuner box.
comment "SoftCAM (Software Conditional Access Module)"
+ depends on PACKAGE_tvheadend
+ depends on BUILD_PATENTED
-config TVHEADEND_CWC_SUPPORT
- bool "CWC newcamd"
- default y
- help
- Support descrambling using Code Word Client newcamd protocol.
+config TVHEADEND_CSA
+ bool "CSA decoding"
+ depends on PACKAGE_tvheadend
+ depends on BUILD_PATENTED
+ select PACKAGE_libdvbcsa
+ default n
+ help
+ Support decoding CSA (Common Scrambling Algorithm). Uses libdvbcsa package.
-config TVHEADEND_CAPMT_SUPPORT
- bool "CWC capmnt"
- default y
- help
- Support descrambling using Code Word Client capmnt (Linux Network DVBAPI) protocol.
+config TVHEADEND_CONSTCW
+ bool "CCW"
+ depends on TVHEADEND_CSA
+ default TVHEADEND_CSA
+ help
+ Support Constant Control Word.
-config TVHEADEND_CONSTCW_SUPPORT
- bool "CCW"
- default y
- help
- Support descrambling using Constant Code Word.
+config TVHEADEND_CAPMT
+ bool "CWC capmt client"
+ depends on TVHEADEND_CSA
+ default n
+ help
+ Support Control Word Client capmt (Linux Network DVBAPI) protocol.
-comment "Other options"
+config TVHEADEND_NEWCAMD
+ bool "CWC newcamd client"
+ depends on TVHEADEND_CSA
+ default n
+ help
+ Support Control Word Client newcamd protocol.
-config TVHEADEND_AVAHI_SUPPORT
- bool "Avahi client"
- select PACKAGE_libavahi-client
- default n
- help
- Enables the opensource implementation of Apple's zero configuration protocol.
- Tvheadend will advertise itself on the network using this protocol.
+config TVHEADEND_CCCAM
+ bool "CCCam client"
+ depends on TVHEADEND_CSA
+ default n
-config TVHEADEND_IMAGECACHE
- bool "Image cache"
- default n
- help
- Support caching TV station logos and other images on disk.
- Note: Activating disk cache will increase fash memory wear.
- Selecting this option does not automatically enable disk caching. It only includes support for it.
+comment "DVB descrambling and some codecs are only available with BUILD_PATENTED."
+ depends on PACKAGE_tvheadend
+ depends on !BUILD_PATENTED
-config TVHEADEND_TRACE
- bool "Low level debug trace"
- default n
- help
- Support low level debug trace for tvheadend subsystems.
- For a list of available subsystems, run "tvheadend --subsystems" in OpenWRT console.
- Note: Selecting this option does not automatically enable trace logging.
- It only includes support for --trace command line option and GUI.
+## Transcoding | Uncomment these options.
+##comment "Transcoding and codecs"
+## depends on PACKAGE_tvheadend
+##
+##config TVHEADEND_LIBFFMPEG
+## bool "ffmpeg transcoding"
+## depends on PACKAGE_tvheadend
+## depends on BUILD_PATENTED
+## select PACKAGE_libffmpeg-full
+## default n
+## help
+## Use ffmpeg libraries for transcoding.
+##
+##config TVHEADEND_LIBX264
+## bool "x264"
+## depends on PACKAGE_tvheadend
+## depends on BUILD_PATENTED
+## select PACKAGE_libx264
+## default n
+## help
+## Make x264 video codec available for transcoding. Uses libx264 package.
+##
+##config TVHEADEND_LIBX265
+## bool "x265"
+## depends on PACKAGE_tvheadend
+## depends on BUILD_PATENTED
+## default n
+## help
+## Make x265 video codec available for transcoding. Uses static (built-in) libx265.
+##
+##config TVHEADEND_LIBVPX
+## bool "VP8, VP9"
+## depends on PACKAGE_tvheadend
+## select PACKAGE_libvpx
+## default n
+## help
+## Make VP8 and VP9 video codecs available for transcoding. Uses libvpx package.
+##
+##config TVHEADEND_LIBTHEORA
+## bool "Theora"
+## depends on PACKAGE_tvheadend
+## select PACKAGE_libtheora
+## default n
+## help
+## Make Theora video codec available for transcoding. Uses libtheora package.
+##
+##config TVHEADEND_LIBFDKAAC
+## bool "AAC"
+## depends on PACKAGE_tvheadend
+## depends on BUILD_PATENTED
+## select PACKAGE_fdk-aac
+## default n
+## help
+## Make AAC audio codec available for transcoding. Uses fdk-aac package.
+##
+##config TVHEADEND_LIBVORBIS
+## bool "Vorbis"
+## depends on PACKAGE_tvheadend
+## select PACKAGE_libvorbis
+## default n
+## help
+## Make Vorbis audio codec available for transcoding. Uses libvorbis package.
+##
+##config TVHEADEND_LIBOPUS
+## bool "Opus"
+## depends on PACKAGE_tvheadend
+## select PACKAGE_libopusenc
+## default n
+## help
+## Make Opus audio codec available for transcoding. Uses libopusenc package.
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
include $(TOPDIR)/rules.mk
PKG_NAME:=tvheadend
-PKG_VERSION:=4.2.8
+PKG_VERSION:=2021-11-16
PKG_RELEASE:=$(AUTORELEASE)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/tvheadend/tvheadend/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=1aef889373d5fad2a7bd2f139156d4d5e34a64b6d38b87b868a2df415f01f7ad
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/tvheadend/tvheadend.git
+PKG_MIRROR_HASH:=1645e90b6b8f104f2749fb0911493010f7ae3176253f2a96a4d6094536207c03
+PKG_SOURCE_VERSION:=2efe90cdcf74fdc4179692d283cf46c85e1cf681
+PKG_SOURCE_DATE:=2021-11-16
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE.md
+PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
define Package/tvheadend
SECTION:=multimedia
CATEGORY:=Multimedia
- TITLE:=Tvheadend is a TV streaming server for Linux
- DEPENDS:=+libopenssl +librt +zlib +libffi +TVHEADEND_AVAHI_SUPPORT:libavahi-client $(ICONV_DEPENDS)
+ TITLE:=TV streaming server
+ MENU:=1
USERID:=tvheadend:dvb
URL:=https://tvheadend.org
MAINTAINER:=Marius Dinu <m95d+git@psihoexpert.ro>
+ DEPENDS:= \
+ +librt \
+ +libffi \
+ +libopenssl \
+ $(ICONV_DEPENDS) \
+ +zlib \
+ +TVHEADEND_AVAHI_SUPPORT:libavahi-client \
+ +TVHEADEND_REGEX_PCRE:libpcre \
+ +TVHEADEND_REGEX_PCRE2:libpcre2 \
+ +BUILD_PATENTED&&TVHEADEND_CSA:libdvbcsa
+
+## Transcoding | Add these to DEPENDS.
+## +TVHEADEND_LIBFFMPEG:libffmpeg-full \
+## +TVHEADEND_LIBVPX:libvpx \
+## +TVHEADEND_LIBTHEORA:libtheora \
+## +TVHEADEND_LIBVORBIS:libvorbis \
+## +TVHEADEND_LIBOPUS:libopusenc \
+## +TVHEADEND_LIBFDKAAC:fdk-aac \
+## +BUILD_PATENTED&&TVHEADEND_LIBX264:libx264 \
+
endef
define Package/tvheadend/description
Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, SAT>IP and HDHomeRun as input sources.
-
Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.
endef
define Package/tvheadend/config
- menu "Configuration"
- depends on PACKAGE_tvheadend
source "$(SOURCE)/Config.in"
- endmenu
endef
-# Generic build options
+## Generic OpenWrt options
ifneq ($(CONFIG_PKG_ASLR_PIE_NONE),)
- CONFIGURE_ARGS += --disable-pie
+ CONFIGURE_ARGS += --disable-pie
+endif
+
+## Generic tvheadend options
+ifneq ($(CONFIG_TVHEADEND_OPTIMIZE_SPEED),)
+ TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3 -flto
+ TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS)) -O3 -flto
+ TARGET_LDFLAGS += -flto
endif
-# TV sources
+ifeq ($(CONFIG_TVHEADEND_TRACE),)
+ CONFIGURE_ARGS += --disable-trace
+endif
+
+ifneq ($(CONFIG_TVHEADEND_REGEX_PCRE2),)
+ CONFIGURE_ARGS += --disable-pcre --enable-pcre2
+else
+ifneq ($(CONFIG_TVHEADEND_REGEX_PCRE),)
+ CONFIGURE_ARGS += --enable-pcre --disable-pcre2
+else
+ifneq ($(CONFIG_TVHEADEND_REGEX_POSIX),)
+ CONFIGURE_ARGS += --disable-pcre --disable-pcre2
+endif
+endif
+endif
+
+ifeq ($(CONFIG_TVHEADEND_AVAHI_SUPPORT),)
+ CONFIGURE_ARGS += --disable-avahi
+else
+ CONFIGURE_ARGS += --enable-avahi
+endif
+
+ifeq ($(CONFIG_TVHEADEND_IMAGECACHE),)
+ CONFIGURE_ARGS += --disable-imagecache
+else
+ CONFIGURE_ARGS += --enable-imagecache
+endif
+
+## TV sources
ifeq ($(CONFIG_TVHEADEND_LINUXDVB_SUPPORT),)
- CONFIGURE_ARGS += --disable-linuxdvb
+ CONFIGURE_ARGS += --disable-linuxdvb
endif
ifeq ($(CONFIG_TVHEADEND_DVBSCAN_SUPPORT),)
- CONFIGURE_ARGS += --disable-dvbscan
+ CONFIGURE_ARGS += --disable-dvbscan
endif
ifeq ($(CONFIG_TVHEADEND_IPTV),)
- CONFIGURE_ARGS += --disable-iptv
+ CONFIGURE_ARGS += --disable-iptv
endif
ifeq ($(CONFIG_TVHEADEND_SATIP_SERVER),)
- CONFIGURE_ARGS += --disable-satip_server
+ CONFIGURE_ARGS += --disable-satip_server
endif
ifeq ($(CONFIG_TVHEADEND_SATIP_CLIENT),)
- CONFIGURE_ARGS += --disable-satip_client
+ CONFIGURE_ARGS += --disable-satip_client
endif
ifeq ($(CONFIG_TVHEADEND_HDHOMERUN_CLIENT),)
- CONFIGURE_ARGS += --disable-hdhomerun_static
+ CONFIGURE_ARGS += --disable-hdhomerun_static
else
- CONFIGURE_ARGS += --enable-hdhomerun_client
+ CONFIGURE_ARGS += --enable-hdhomerun_client
endif
-# Descrambling
-ifeq ($(CONFIG_TVHEADEND_CWC_SUPPORT),)
- CONFIGURE_ARGS += --disable-cwc
+## Descrambling
+ifeq ($(CONFIG_BUILD_PATENTED),)
+ CONFIGURE_ARGS += --disable-tvhcsa --disable-dvbcsa --disable-constcw --disable-cwc --disable-capmt --disable-cccam
+else
+ifeq ($(CONFIG_TVHEADEND_CSA),)
+ CONFIGURE_ARGS += --disable-tvhcsa --disable-dvbcsa --disable-constcw --disable-cwc --disable-capmt --disable-cccam
+else
+ CONFIGURE_ARGS += --enable-tvhcsa --enable-dvbcsa
+ifeq ($(CONFIG_TVHEADEND_CONSTCW),)
+ CONFIGURE_ARGS += --disable-constcw
endif
-
-ifeq ($(CONFIG_TVHEADEND_CAPMT_SUPPORT),)
- CONFIGURE_ARGS += --disable-capmt
+ifeq ($(CONFIG_TVHEADEND_NEWCAMD),)
+ CONFIGURE_ARGS += --disable-cwc
endif
-
-ifeq ($(CONFIG_TVHEADEND_CCW_SUPPORT),)
- CONFIGURE_ARGS += --disable-constcw
+ifeq ($(CONFIG_TVHEADEND_CAPMT),)
+ CONFIGURE_ARGS += --disable-capmt
endif
-
-# Other options
-ifeq ($(CONFIG_TVHEADEND_AVAHI_SUPPORT),)
- CONFIGURE_ARGS += --disable-avahi
-else
- CONFIGURE_ARGS += --enable-avahi
+ifeq ($(CONFIG_TVHEADEND_CCCAM),)
+ CONFIGURE_ARGS += --disable-cccam
endif
-
-ifeq ($(CONFIG_TVHEADEND_IMAGECACHE),)
- CONFIGURE_ARGS += --disable-imagecache
-else
- CONFIGURE_ARGS += --enable-imagecache
endif
-
-ifeq ($(CONFIG_TVHEADEND_TRACE),)
- CONFIGURE_ARGS += --disable-trace
endif
-# libav and ffmpeg are broken, so remove codecs too.
+## Transcoding | Uncomment these.
+##ifeq ($(CONFIG_BUILD_PATENTED),)
+## CONFIGURE_ARGS += --disable-libav --disable-libx264 --disable-libx265 --disable-libx265_static
+##else
+##ifeq ($(CONFIG_TVHEADEND_LIBFFMPEG),)
+## CONFIGURE_ARGS += --disable-libav
+##else
+## CONFIGURE_ARGS += --enable-libav
+##endif
+##ifeq ($(CONFIG_TVHEADEND_LIBX264),)
+## CONFIGURE_ARGS += --disable-libx264
+##endif
+##ifeq ($(CONFIG_TVHEADEND_LIBX265),)
+## CONFIGURE_ARGS += --disable-libx265 --disable-libx265_static
+##endif
+##ifneq ($(CONFIG_TVHEADEND_LIBFDKAAC),)
+## CONFIGURE_ARGS += --enable-libfdkaac
+##endif
+##endif
+##
+##ifeq ($(CONFIG_TVHEADEND_LIBVPX),)
+## CONFIGURE_ARGS += --disable-libvpx
+##endif
+##
+##ifeq ($(CONFIG_TVHEADEND_LIBlibtheora),)
+## CONFIGURE_ARGS += --disable-libtheora
+##endif
+##
+##ifeq ($(CONFIG_TVHEADEND_LIBVORBIS),)
+## CONFIGURE_ARGS += --disable-libvorbis
+##endif
+##
+##ifeq ($(CONFIG_TVHEADEND_LIBOPUS),)
+## CONFIGURE_ARGS += --disable-libopus
+##endif
+
CONFIGURE_ARGS += \
--arch=$(ARCH) \
+ --disable-libsystemd_daemon \
--disable-dbus_1 \
--disable-libav \
--disable-ffmpeg_static \
--disable-libtheora_static \
--disable-libvorbis \
--disable-libvorbis_static \
+ --disable-libopus \
+ --disable-libopus_static \
--disable-libfdkaac \
--disable-libfdkaac_static \
+ --disable-pcloud_cache \
--enable-bundle \
--nowerror=unused-variable
+## Transcoding | Remove these from CONFIGURE_ARGS.
+## --disable-libav \
+## --disable-libx265 \
+## --disable-libx265_static \
+## --disable-libx264_static \
+## --disable-libvpx_static \
+## --disable-libtheora_static \
+## --disable-libvorbis_static \
+## --disable-libopus_static \
+## --disable-libfdkaac_static \
+## --disable-pcloud_cache \
+
define Build/Prepare
$(call Build/Prepare/Default)
echo 'Tvheadend $(shell echo $(PKG_SOURCE_VERSION) | sed "s/^v//")~openwrt$(PKG_RELEASE)' \
$(INSTALL_CONF) ./files/tvheadend.config $(1)/etc/config/tvheadend
$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
$(INSTALL_BIN) ./files/dvb.hotplug $(1)/etc/hotplug.d/usb/50-dvb
-
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build.linux/tvheadend $(1)/usr/bin/
endef
#!/bin/sh
case "$ACTION" in
add)
- chown -R root:dvb /dev/dvb/*/*
- chmod -R 660 /dev/dvb/*/*
+ chown -R root:dvb /dev/dvb/*
+ chmod -R 660 /dev/dvb/*
;;
esac
ensure_config_exists
procd_open_instance
procd_set_param file /etc/config/tvheadend
- chown -R root:$TVH_GROUP /dev/dvb/*/*
+ chown -R root:$TVH_GROUP /dev/dvb/*
procd_set_param command "$PROG" -B -u $TVH_USER -g $TVH_GROUP
load_uci_config
procd_close_instance
+++ /dev/null
-From 7d657f0a87be1f135f7e5146b06e26121691c33a Mon Sep 17 00:00:00 2001
-From: Josef Schlehofer <pepe.schlehofer@gmail.com>
-Date: Mon, 18 Oct 2021 22:54:02 +0200
-Subject: [PATCH] Makefile.hdhomerun: update library to version 20180817
-
-The previous tarball is not available and because of that, the
-compilation of tvheadend does not proceed.
-
-The latest version can not be used somehow as the compilation fails.
----
- Makefile.hdhomerun | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/Makefile.hdhomerun
-+++ b/Makefile.hdhomerun
-@@ -32,10 +32,10 @@ endif
- # Upstream Packages
- # ###########################################################################
-
--LIBHDHR = libhdhomerun_20171221
-+LIBHDHR = libhdhomerun_20180817
- LIBHDHR_TB = $(LIBHDHR).tgz
--LIBHDHR_URL = http://download.silicondust.com/hdhomerun/$(LIBHDHR_TB)
--LIBHDHR_SHA1 = 6b019728eadea3af7a5686ed5ba44e970bca7365
-+LIBHDHR_URL = https://download.silicondust.com/hdhomerun/$(LIBHDHR_TB)
-+LIBHDHR_SHA1 = 052868bde3a5713c55b4d060b77e0bc3a0d891d6
-
- # ###########################################################################
- # Library Config
+++ /dev/null
---- a/src/main.c
-+++ b/src/main.c
-@@ -1155,10 +1155,12 @@ main(int argc, char **argv)
- sigprocmask(SIG_BLOCK, &set, NULL);
- trap_init(argv[0]);
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- /* SSL library init */
- OPENSSL_config(NULL);
- SSL_load_error_strings();
- SSL_library_init();
-+#endif
- /* Rand seed */
- randseed.thread_id = (void *)main_tid;
- gettimeofday(&randseed.tv, NULL);
-@@ -1346,8 +1348,11 @@ main(int argc, char **argv)
- if(opt_fork)
- unlink(opt_pidpath);
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- /* OpenSSL - welcome to the "cleanup" hell */
-+#ifndef OPENSSL_NO_ENGINE
- ENGINE_cleanup();
-+#endif
- RAND_cleanup();
- CRYPTO_cleanup_all_ex_data();
- EVP_cleanup();
-@@ -1355,12 +1360,13 @@ main(int argc, char **argv)
- #if !defined(OPENSSL_NO_COMP)
- COMP_zlib_cleanup();
- #endif
-- ERR_remove_state(0);
-+ ERR_remove_thread_state(NULL);
- ERR_free_strings();
- #if !defined(OPENSSL_NO_COMP) && OPENSSL_VERSION_NUMBER < 0x1010006f
- sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
- #endif
- /* end of OpenSSL cleanup code */
-+#endif
-
- #if ENABLE_DBUS_1
- extern void dbus_shutdown(void);
+++ /dev/null
---- a/src/input/mpegts.h
-+++ b/src/input/mpegts.h
-@@ -1132,7 +1132,7 @@ typedef struct mpegts_listener
- void (*ml_mux_delete) (mpegts_mux_t *mm, void *p);
- } mpegts_listener_t;
-
--LIST_HEAD(,mpegts_listener) mpegts_listeners;
-+static LIST_HEAD(,mpegts_listener) mpegts_listeners;
-
- #define mpegts_add_listener(ml)\
- LIST_INSERT_HEAD(&mpegts_listeners, ml, ml_link)
---- a/src/input.h
-+++ b/src/input.h
-@@ -128,8 +128,8 @@ void tvh_hardware_delete ( tvh_hardware_
- 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)
--- /dev/null
+--- a/src/intlconv.c
++++ b/src/intlconv.c
+@@ -36,9 +36,8 @@ intlconv_test( void )
+ (strcmp(s, "ZlutouckyKun") &&
+ strcmp(s, "Zlutouck'yKun") &&
+ strcmp(s, "?lu?ou?k?K??"))) {
+- tvherror(LS_MAIN, "iconv() routine is not working properly (%s), aborting!", s);
++ tvherror(LS_MAIN, "iconv() routine is not working properly (%s)", s);
+ tvh_safe_usleep(2000000);
+- abort();
+ }
+ free(s);
+ }