Add package tvheadend

Add package libdvbcsa

required by tvheadend

tvheadend: disable all static libs

tvheadend: disable libav and `--enable-android` only for 32 bits

Revert "tvheadend: `--enable-android` only for 32 bits"

This reverts commit fba7db937ee9063b971e25d087f2fbb2b50a8d7e.

tvheadend: disable libav

tvheadend: add patch for `<time64.h>` header

 this is needed for 32 bit archs only

tvheadend: supress warnings as error

tvheadend: disable `mmx` instructions for arm

It is not supported by Arm (or Android ?)

tvheadend: disable `sse2` instructions as well

tvheadend: add cflag for include dir

tvheadend: enable tvhcsa

tvheadend: remove TODO comments
This commit is contained in:
Aditya Alok 2021-09-20 19:42:53 +05:30
parent 0be9dbcd32
commit 8896b615ab
No known key found for this signature in database
GPG Key ID: 5A52117417798AC7
4 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,12 @@
TERMUX_PKG_HOMEPAGE="https://www.videolan.org/developers/libdvbcsa.html"
TERMUX_PKG_DESCRIPTION="An implementation of the DVB Common Scrambling Algorithm - DVB/CSA - with encryption and decryption capabilities"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@MrAdityaAlok <dev.aditya.alok@gmail.com>"
TERMUX_PKG_VERSION=1.1.0
TERMUX_PKG_SRCURL="https://download.videolan.org/pub/videolan/libdvbcsa/${TERMUX_PKG_VERSION}/libdvbcsa-${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=4db78af5cdb2641dfb1136fe3531960a477c9e3e3b6ba19a2754d046af3f456d
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure(){
autoreconf -fvi
}

View File

@ -0,0 +1,41 @@
TERMUX_PKG_HOMEPAGE="https://tvheadend.org/"
TERMUX_PKG_DESCRIPTION="TV streaming server for Linux and Android supporting DVB-S, DVB-S2 and other formats."
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@MrAdityaAlok <dev.aditya.alok@gmail.com>"
TERMUX_PKG_VERSION=4.2.8
TERMUX_PKG_SRCURL="https://github.com/tvheadend/tvheadend/archive/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=1aef889373d5fad2a7bd2f139156d4d5e34a64b6d38b87b868a2df415f01f7ad
TERMUX_PKG_DEPENDS="openssl, libiconv, zlib, ffmpeg, pcre2, libopus, libdvbcsa, libx264, libx265, libvpx, libfdk-aac, libogg, libtheora, libvorbis, pngquant"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--enable-android
--nowerror
--enable-pcre
--enable-zlib
--enable-pngquant
--enable-ffmpeg
--enable-libx264
--enable-libx265
--enable-libvpx
--enable-libogg
--enable-libtheora
--enable-libvorbis
--enable-libfdkaac
--enable-libopus
--disable-libav
--enable-tvhcsa
--disable-hdhomerun_static
--disable-ffmpeg_static
--disable-avahi
"
termux_step_pre_configure() {
termux_setup_cmake
CFLAGS+=" -I${TERMUX_PREFIX}/include"
# Arm (or Android ?) does not support mmx and sse2 instructions.
if [ "${TERMUX_ARCH}" = "arm" ] || [ "${TERMUX_ARCH}" = "aarch64" ]; then
patch -p1 <"${TERMUX_PKG_BUILDER_DIR}/disable-mmx-sse2"
fi
}

View File

@ -0,0 +1,11 @@
--- tvheadend/configure 2021-09-20 23:33:06.016999948 +0530
+++ tvheadend-mod/configure 2021-09-20 23:54:51.453999691 +0530
@@ -156,8 +156,6 @@
else
check_cc_header execinfo
fi
-check_cc_option mmx
-check_cc_option sse2
check_cc_optionW unused-result
# Some options from https://wiki.debian.org/Hardening
check_cc_optionf stack-protector

View File

@ -0,0 +1,13 @@
--- tvheadend/src/compat.h 2021-09-19 19:48:05.484999708 +0530
+++ tvheadend-mod/src/compat.h 2021-09-20 21:30:01.315999938 +0530
@@ -30,10 +30,6 @@
#define pthread_yield() sched_yield()
#endif
#define S_IEXEC S_IXUSR
-#include <time64.h>
-// 32-bit Android has only timegm64() and not timegm().
-// We replicate the behaviour of timegm() when the result overflows time_t.
-
#endif /* ENABLE_ANDROID */
#ifndef ENABLE_EPOLL_CREATE1