From bd96e95e3fd6fe17949afa783563465d5edb285e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 19 Nov 2018 14:48:02 -0800 Subject: [PATCH] tvheadend: Fix compilation without OpenSSL deprecated APIs Also switched to codeload for Makefile simplicity. Signed-off-by: Rosen Penev (cherry-picked from 5033e594ccca4368ee0562abd7ea618f19f10948) --- multimedia/tvheadend/Makefile | 14 +++----- .../patches/010-openssl-deprecated.patch | 35 +++++++++++++++++++ 2 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 multimedia/tvheadend/patches/010-openssl-deprecated.patch diff --git a/multimedia/tvheadend/Makefile b/multimedia/tvheadend/Makefile index c026a50f36..634ed7eacb 100644 --- a/multimedia/tvheadend/Makefile +++ b/multimedia/tvheadend/Makefile @@ -9,15 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tvheadend PKG_VERSION:=4.0.10 -PKG_RELEASE:=1 - -PKG_SOURCE_SUBDIR:=$(PKG_NAME) -PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MIRROR_HASH:=afe42bcf683e8576ca8ccd4755ea308f79195e92f7c30fc5961973e238f49105 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/tvheadend/tvheadend.git -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/tvheadend/tvheadend/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=f610e7d9f3bf6cff05cd73830a66ee0c74bc5291c4c9d08369364c4c681ebf23 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=LICENSE.md diff --git a/multimedia/tvheadend/patches/010-openssl-deprecated.patch b/multimedia/tvheadend/patches/010-openssl-deprecated.patch new file mode 100644 index 0000000000..93b6072d3d --- /dev/null +++ b/multimedia/tvheadend/patches/010-openssl-deprecated.patch @@ -0,0 +1,35 @@ +--- a/src/main.c ++++ b/src/main.c +@@ -965,10 +965,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 + + /* Initialise configuration */ + notify_init(); +@@ -1159,8 +1161,11 @@ main(int argc, char **argv) + #endif + free(opt_satip_xml.str); + ++#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(); +@@ -1174,6 +1179,7 @@ main(int argc, char **argv) + 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); -- 2.30.2