summaryrefslogtreecommitdiff
path: root/media-tv/tvheadend
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-06 18:23:20 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-06 18:23:20 +0000
commitd37b97a25b8b10f748eead6574b01f893f140b01 (patch)
tree13e2a142a31cd193a39c63042a64cab29a1f7ae9 /media-tv/tvheadend
parenta833e3f4a431b8eea751b7420e127787f9c92117 (diff)
gentoo resync : 06.12.2017
Diffstat (limited to 'media-tv/tvheadend')
-rw-r--r--media-tv/tvheadend/Manifest15
-rw-r--r--media-tv/tvheadend/files/tvheadend-4.0.9-hdhomerun-include.patch27
-rw-r--r--media-tv/tvheadend/files/tvheadend-4.0.9-use_system_queue.patch12
-rw-r--r--media-tv/tvheadend/files/tvheadend-4.2.1-hdhomerun.patch24
-rw-r--r--media-tv/tvheadend/files/tvheadend-4.2.2-dtv_scan_tables.patch12
-rw-r--r--media-tv/tvheadend/files/tvheadend.service15
-rw-r--r--media-tv/tvheadend/metadata.xml11
-rw-r--r--media-tv/tvheadend/tvheadend-4.2.4.ebuild (renamed from media-tv/tvheadend/tvheadend-4.0.9.ebuild)85
-rw-r--r--media-tv/tvheadend/tvheadend-9999.ebuild91
9 files changed, 184 insertions, 108 deletions
diff --git a/media-tv/tvheadend/Manifest b/media-tv/tvheadend/Manifest
index fb1352aa43e9..e434039482fd 100644
--- a/media-tv/tvheadend/Manifest
+++ b/media-tv/tvheadend/Manifest
@@ -1,9 +1,10 @@
-AUX tvheadend-4.0.9-hdhomerun-include.patch 985 BLAKE2B f9665a2586ab0cedd6cb827d55173adb333b3efc518ed860a39d3c0e8926d801db40ccddc7dd41063b3ee32f9f8fcbb7234d1021295cda18540b7ea299795a51 SHA512 860db8a1a0172b200d0eafcc628b086d557433b83025a7744bfc077ec97efec57f63d314f4c29904d75ba42fdb54eb676f384644f601bb0b30d42ee3acf65c58
+AUX tvheadend-4.0.9-use_system_queue.patch 296 BLAKE2B 0986117969d9bb3463123e984aba7a73c8caf89b16f0c10e870a9b49857f8c946958a31900d99c5d332f5635cbd49ae544c2cc97f1e8a211c352bcaba965fe76 SHA512 56180b9c2fbb092530963229213805ec63e3d941c67d967e38b46f778db85db981234fe5727b5a8dcf64ab3a9e24c9d10b681abf275249e0d6f0ad63e391ecc4
+AUX tvheadend-4.2.1-hdhomerun.patch 1045 BLAKE2B cad3922efbdd20c457c9570ecc75a786a997cafbe698226e31e4175394c38b79071ed7a165194ddc31e318ed015a0253dfb1f978695db35721749077154534f4 SHA512 416af870e5070001fbd0e09ec8c14160ff7c54b716564f708c6a983ca529cdf5963678c05551ad676a23c3347b4932bd7ae65e8eeea47a5f9f3955b46292c3f9
+AUX tvheadend-4.2.2-dtv_scan_tables.patch 463 BLAKE2B 4e52d89d75c05d8a3cc645280794dd4570953bb5452d1067442177d7eb4c85779a8bcb96f1f8d3fbbcb6a34e770ff014bb262103eae5a92556ac4586038cdd9e SHA512 9bdecbac57ee1f30be91f9145e32f89949b5631090edc85cd5383915b09949ec9211f62474bd06afb4600e431093ce2ee5550d204b08c64b5b2e1a1cd38a517d
AUX tvheadend.confd 355 BLAKE2B 36ba5a3466838b643beb877050ef6cc481adb91a433efa7429977104c9db1e6ef54901750d14dc0f43a20c89ddf504a9fc28a10a88d68105e5a5f07820696d50 SHA512 64ae0cca1e1b46a3ecb2fb4a4ba69ad1dd6a72ce57944b44be28768d293f9cca2ab29067335023f384433e8c75d976fbc4610ca574c930b9891a2f1c75ff4c0b
AUX tvheadend.initd 376 BLAKE2B 9ea5ac60f0f93f2f656d4de3516568502b2527a4d4956583551da0707df8fbba8b04d3bed057e91bbe8829783f6095bf5ace1ad610dc0b5286095a1a377cbf1f SHA512 e0cd720289185f9a483901b8d52aec989934423630dfa99d2fec5006bc5c16d6ce013dacd62e2fe2395a77bcd9649dbcc8972cb118c1789ac4427dae3af98c12
-AUX tvheadend.service 304 BLAKE2B 646b856d958d6a2ce11e7a985e50c6e7419dccf65646617eda33f609300af60044de0771367717a69c59f5f621254b256636ad16b9ce5d6c94cad3519a3dfd97 SHA512 96c61ef4082ecf77ca17a377de3698ae2a47c29519e02676a28d1d2813d5f43dfc3b29d8b91a126a7b8da5f38a8dc2cf13044dba285e22235e7782053041207f
-DIST dtv-scan-tables-2015-02-08-f2053b3.tar.bz2 123415 SHA256 83ed1b669009ef325e5d9ccb897e48b31e15e71e81bff442b3d0bbd650131c77 SHA512 aedf0429c2ec0a4692e19c0b4ae1e8c063a5a0fb8695359aa8f716a7f40fd88435ed8b1d2aec2461de3f49b533d6cd012c2a54d06058a5291781da4adf82d609 WHIRLPOOL afaef58cdf2ce1ca03c0a695dbf13192b544e3c5a0012cc70a55834d0b1034d509174684fd0fe3f2111becbe32aac16cad5d467adc278a4b6b16c7dbd384757f
-DIST tvheadend-4.0.9.tar.gz 15825419 SHA256 cea1106f45e286e8c25e6b2f0a581c28bd85e93ce3801ecaac7041568a214977 SHA512 ba8c6edcef126c6a260a9251b0948747074061c8f16fb20f03b250c6698645172c9396530b7fa44bf9cf4d8305fcece08c672c812ba6c48211edfbb2691fb58e WHIRLPOOL c0db6afa8d16201eab5fb188f81d062f84066037395f7e47e496d377e8207e2ffef021a58e07cba4af1217963fb2541b1822681fd33799113858329e9ff287bf
-EBUILD tvheadend-4.0.9.ebuild 3017 BLAKE2B 562f1df1c114717909a50355138dd459a4ca746257213e16fc857d0140feab0571d48b322e43945a814ffa9926ca8006acd811c9565ff24986bfe3da87706a08 SHA512 caa587e799ca324039dad9e6810e1f87bf84aafc558805860d6f704a214343caf388b1d38c57af710d51750c40ec553a031806b5c750b40c2861b68d0ff8bf73
-EBUILD tvheadend-9999.ebuild 2475 BLAKE2B f8ca81ef2dde711a86efded71e9841003b67ec35781404e7529400e3a709ac54aa3035e291d0f6735c3d43330ddcb71a01f431b5a3bb441ebaa3202f267923ce SHA512 2e42ae7f95d5189a1ab229ff0b34713640fe6cc44c6d16cd91a6a5e1cb9f5cea14b0bfe8b12c78174ac516d9e90fb42cb4b7293ef0bc052b53b8d74cb6da36f5
-MISC metadata.xml 1080 BLAKE2B 6caa993b62730ae2dd4c3f1d24901c5ed1ad5f368bf0dc4ae77ebbc3ac76d97a17de9e6e6e3787cff58e499ffe401ee2a9c33aacf97ad440b69e1b93cc829496 SHA512 c73fe203e28350af2dc3d88fa9a8d4179d3171e4e07f24b7928abe4a4f95eca0c092b6eb2a0534e4b13045722da02cb691fe009669b683238978f14d5bf6e591
+AUX tvheadend.service 512 BLAKE2B b51bb6facda5287e038059f6234f7fd585ffd33a9a0483e1a9d89fe3cfa35bfc2859718b7a3e4774bf2159c0bf4c791b1424d9933c985d123f5763fec7f7573b SHA512 48fa16a3511ebed58d60b81227c483c4aac734abf096b14474f18cff55a9c44a7972c09d28fd2f6b622e91c5bc810869804da65e4a9676c6f684ba655430b695
+DIST tvheadend-4.2.4.tar.gz 21526564 BLAKE2B 19c571bb253041bd122306eaa516071d096d747b03eaf623b45b79fc0511633a75f1a0925a890207c994da001a2ba3404d1860b91236adae34e307bcf8c57796 SHA512 333a3509da198f5d96316f30fd010a216262315614db302c83405de78d29b32b1d878c0abd7fae2214713107e6955478ee3222b18888a84c57810035af882df4
+EBUILD tvheadend-4.2.4.ebuild 2974 BLAKE2B 62c7b046ce561fc8d85f8cf4bcf02531f611213877abc7aa7926d72e8490462763584221ed2d6aac5db91d1128f0d443a2bc8c98609db859481c2e193bb699b9 SHA512 bed3ac3bc460824f0b8c3ba0bff4b8299c31ff7a50b316a1bb12f06d00e85165ca17ae1189fbe18278d9db9ec0f79751921ffe672688b50685762cdfd8d44332
+EBUILD tvheadend-9999.ebuild 3769 BLAKE2B 2d2e57abb5786a19f6f50b33e1f11f2d3d12883735cd94c0d5bda0c04bc6b90badc417391228abda44c291d3ef5b4cc39cca057e7ccac26ca3d4c4f0156118a2 SHA512 23f7fd58dde6f2a46e7726ba899af498a4ee1f5be96c9961c851397e97b5d94aba744e72721db8938fad13ad8648c9efe5ee0f82794482ea2fe35366c3ab23aa
+MISC metadata.xml 1452 BLAKE2B 7c89c4b517de4e2a4910c6b943f655a77f9f5e378b8ccb1eabfb13615b0302ff74f1d6c2e9cb33d595b919c5ad19f9ea9998ba0e7644fcf656cfb3e72398fc02 SHA512 e213a5f0041fc562efcc4dbf48ea8cf7fd3a2fa9e68dbd8cd8dc925a316cb9c56756d9ce874c878d12721e25a4b80dae6539f8cfde4ccaa69e24b353bbdb36f8
diff --git a/media-tv/tvheadend/files/tvheadend-4.0.9-hdhomerun-include.patch b/media-tv/tvheadend/files/tvheadend-4.0.9-hdhomerun-include.patch
deleted file mode 100644
index 8a0768fa6f02..000000000000
--- a/media-tv/tvheadend/files/tvheadend-4.0.9-hdhomerun-include.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/configure b/configure
-index 47d2cf2..6f9fcc5 100755
---- a/configure
-+++ b/configure
-@@ -290,7 +290,7 @@ if enabled hdhomerun_static; then
- else
-
- if enabled_or_auto hdhomerun_client; then
-- if check_cc_header 'libhdhomerun/hdhomerun' libhdhomerun; then
-+ if check_cc_header 'hdhomerun/hdhomerun' libhdhomerun; then
- enable hdhomerun_client
- LDFLAGS="$LDFLAGS -lhdhomerun"
- fi
-diff --git a/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h b/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h
-index 962627a..6d1c52b 100644
---- a/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h
-+++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h
-@@ -24,7 +24,8 @@
- #include "htsbuf.h"
- #include "tvhdhomerun.h"
-
--#include <libhdhomerun/hdhomerun.h>
-+#include <hdhomerun/hdhomerun.h>
-+#include <hdhomerun/hdhomerun_debug.h>
-
- typedef struct tvhdhomerun_device_info tvhdhomerun_device_info_t;
- typedef struct tvhdhomerun_device tvhdhomerun_device_t;
diff --git a/media-tv/tvheadend/files/tvheadend-4.0.9-use_system_queue.patch b/media-tv/tvheadend/files/tvheadend-4.0.9-use_system_queue.patch
new file mode 100644
index 000000000000..13ac3573ed27
--- /dev/null
+++ b/media-tv/tvheadend/files/tvheadend-4.0.9-use_system_queue.patch
@@ -0,0 +1,12 @@
+diff -up ./src/queue.h.orig ./src/queue.h
+--- ./src/queue.h.orig 2016-03-14 10:10:57.000000000 +0100
++++ ./src/queue.h 2016-07-04 17:47:22.480252171 +0200
+@@ -5,7 +5,7 @@
+ #ifndef HTSQ_H
+ #define HTSQ_H
+
+-#include "../vendor/include/sys/queue.h"
++#include <sys/queue.h>
+
+ /*
+ * Extra LIST-ops
diff --git a/media-tv/tvheadend/files/tvheadend-4.2.1-hdhomerun.patch b/media-tv/tvheadend/files/tvheadend-4.2.1-hdhomerun.patch
new file mode 100644
index 000000000000..64f6f691b976
--- /dev/null
+++ b/media-tv/tvheadend/files/tvheadend-4.2.1-hdhomerun.patch
@@ -0,0 +1,24 @@
+diff -up ./configure.orig ./configure
+--- ./configure.orig 2017-04-21 10:32:22.000000000 +0200
++++ ./configure 2017-04-23 13:31:08.717237211 +0200
+@@ -357,7 +357,7 @@ if enabled hdhomerun_static; then
+ else
+
+ if enabled_or_auto hdhomerun_client; then
+- if check_cc_header 'libhdhomerun/hdhomerun' libhdhomerun; then
++ if check_cc_header 'hdhomerun/hdhomerun' libhdhomerun; then
+ enable hdhomerun_client
+ LDFLAGS="$LDFLAGS -lhdhomerun"
+ fi
+diff -up ./src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h.orig ./src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h
+--- ./src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h.orig 2017-04-21 10:32:22.000000000 +0200
++++ ./src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h 2017-04-23 13:31:08.717237211 +0200
+@@ -24,7 +24,7 @@
+ #include "htsbuf.h"
+ #include "tvhdhomerun.h"
+
+-#include "libhdhomerun/hdhomerun.h"
++#include <hdhomerun/hdhomerun.h>
+
+ typedef struct tvhdhomerun_device_info tvhdhomerun_device_info_t;
+ typedef struct tvhdhomerun_device tvhdhomerun_device_t;
diff --git a/media-tv/tvheadend/files/tvheadend-4.2.2-dtv_scan_tables.patch b/media-tv/tvheadend/files/tvheadend-4.2.2-dtv_scan_tables.patch
new file mode 100644
index 000000000000..513102628716
--- /dev/null
+++ b/media-tv/tvheadend/files/tvheadend-4.2.2-dtv_scan_tables.patch
@@ -0,0 +1,12 @@
+diff -up ./src/input/mpegts/scanfile.c.orig ./src/input/mpegts/scanfile.c
+--- ./src/input/mpegts/scanfile.c.orig 2017-05-16 13:15:24.000000000 +0200
++++ ./src/input/mpegts/scanfile.c 2017-06-01 22:30:29.150834135 +0200
+@@ -903,7 +903,7 @@ scanfile_init ( const char *muxconf_path
+ #elif defined(PLATFORM_FREEBSD)
+ path = "/usr/local/share/dtv-scan-tables";
+ #else
+- path = "/usr/share/dvb";
++ path = "/usr/share/dvbv5";
+ #endif
+
+ if (!initialized) {
diff --git a/media-tv/tvheadend/files/tvheadend.service b/media-tv/tvheadend/files/tvheadend.service
index 227faffcb082..2d0573ca910f 100644
--- a/media-tv/tvheadend/files/tvheadend.service
+++ b/media-tv/tvheadend/files/tvheadend.service
@@ -4,11 +4,20 @@ After=network.target
[Service]
Type=forking
-PIDFile=/run/tvheadend.pid
-ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid -C -c /etc/tvheadend -u tvheadend -g video
-ExecStop=/usr/bin/rm /run/tvheadend.pid
+User=tvheadend
+Group=video
+RuntimeDirectory=tvheadend
+PIDFile=/run/tvheadend/tvheadend.pid
+ExecStart=/usr/bin/tvheadend -6 -f -p /run/tvheadend.pid -C -c /etc/tvheadend
Restart=always
RestartSec=5
+DevicePolicy=closed
+DeviceAllow=char-DVB rw # DVB devices
+DeviceAllow=char-drm rw # GPUs for transcoding
+RestrictAddressFamilies=AF_INET AF_INET6
+ProtectSystem=strict
+ProtectHome=yes
+NoNewPrivileges=yes
[Install]
WantedBy=multi-user.target
diff --git a/media-tv/tvheadend/metadata.xml b/media-tv/tvheadend/metadata.xml
index 9d99f1238417..ad28ad1f4b6f 100644
--- a/media-tv/tvheadend/metadata.xml
+++ b/media-tv/tvheadend/metadata.xml
@@ -9,14 +9,19 @@
<flag name="capmt">Enable support for capmt (dvbapi) protocol</flag>
<flag name="constcw">Enable support for the constcw protocol</flag>
<flag name="cwc">Enable support for the cwc (newcamd) protocol</flag>
+ <flag name="dvbcsa">Enable decryption of the DVB Common Scrambling Algorithm</flag>
+ <flag name="dvben50221">Enable support for hardware CAM</flag>
<flag name="hdhomerun">Enable support for the HDHomeRun device</flag>
+ <flag name="imagecache">Enable support for image caching</flag>
<flag name="iptv">Enable support for Internet Protocol TV</flag>
+ <flag name="opus">Enable transcoding with the Opus audio codec</flag>
<flag name="satip">Enable support for IP-based Satellite TV</flag>
<flag name="timeshift">Enable TimeShift support</flag>
- <flag name="xmltv">Use <pkg>media-tv/xmltv</pkg></flag>
- <flag name="dvbscan">Use <pkg>media-tv/linuxtv-dvb-apps</pkg></flag>
- <flag name="imagecache">Enable support for image caching</flag>
<flag name="uriparser">Use <pkg>dev-libs/uriparser</pkg></flag>
+ <flag name="vpx">Enable transcoding with the VP8/VP9 video codecs</flag>
+ <flag name="x264">Enable transcoding with the H.264 video codec</flag>
+ <flag name="x265">Enable transcoding with the HEVC video codec</flag>
+ <flag name="xmltv">Use <pkg>media-tv/xmltv</pkg></flag>
</use>
<upstream>
<remote-id type="github">tvheadend/tvheadend</remote-id>
diff --git a/media-tv/tvheadend/tvheadend-4.0.9.ebuild b/media-tv/tvheadend/tvheadend-4.2.4.ebuild
index d3627e8f13cc..99676db49370 100644
--- a/media-tv/tvheadend/tvheadend-4.0.9.ebuild
+++ b/media-tv/tvheadend/tvheadend-4.2.4.ebuild
@@ -3,80 +3,79 @@
EAPI=6
-inherit eutils linux-info systemd toolchain-funcs user
-
-DTV_SCAN_TABLES_VERSION="2015-02-08-f2053b3"
+inherit linux-info systemd toolchain-funcs user
DESCRIPTION="Tvheadend is a TV streaming server and digital video recorder"
HOMEPAGE="https://tvheadend.org/"
-SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
- dvbscan? ( https://linuxtv.org/downloads/dtv-scan-tables/dtv-scan-tables-${DTV_SCAN_TABLES_VERSION}.tar.bz2 )"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~x86"
-IUSE="capmt constcw +cwc dbus +dvb +dvbscan ffmpeg hdhomerun libav imagecache inotify iptv satip +timeshift uriparser xmltv zeroconf zlib"
+IUSE="+capmt +constcw +cwc dbus debug dvbcsa dvben50221 +dvb +ffmpeg hdhomerun +imagecache +inotify iptv libressl satip systemd +timeshift uriparser xmltv zeroconf zlib"
-# does not build with ffmpeg-3 - bug 574990
-# https://tvheadend.org/issues/3597
-RDEPEND="dev-libs/openssl:=
+RDEPEND="
virtual/libiconv
dbus? ( sys-apps/dbus )
- ffmpeg? (
- !libav? ( <media-video/ffmpeg-3:= )
- libav? ( media-video/libav:= )
- )
+ dvbcsa? ( media-libs/libdvbcsa )
+ dvben50221? ( media-tv/linuxtv-dvb-apps )
+ ffmpeg? ( media-video/ffmpeg:0/55.57.57 )
hdhomerun? ( media-libs/libhdhomerun )
+ !libressl? ( dev-libs/openssl:= )
+ libressl? ( dev-libs/libressl:= )
uriparser? ( dev-libs/uriparser )
zeroconf? ( net-dns/avahi )
zlib? ( sys-libs/zlib )"
-DEPEND="${RDEPEND}
- dvb? ( virtual/linuxtv-dvb-headers )
- capmt? ( virtual/linuxtv-dvb-headers )
- virtual/pkgconfig"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ dvb? ( virtual/linuxtv-dvb-headers )"
RDEPEND+="
+ dvb? ( media-tv/dtv-scan-tables )
xmltv? ( media-tv/xmltv )"
-CONFIG_CHECK="~INOTIFY_USER"
-
-DOCS=( README.md )
-PATCHES=( "${FILESDIR}/${P}-hdhomerun-include.patch" )
+REQUIRED_USE="dvbcsa? ( || ( capmt constcw cwc dvben50221 ) )"
-src_unpack() {
- unpack "${P}.tar.gz"
+# Some patches from:
+# https://github.com/rpmfusion/tvheadend
- if use dvbscan; then
- mkdir "${S}/data/dvb-scan" || die
- cd "${T}" || die
- unpack dtv-scan-tables-${DTV_SCAN_TABLES_VERSION}.tar.bz2
- rmdir "${S}/data/dvb-scan" || die
- mv "${T}/usr/share/dvb" "${S}/data/dvb-scan" || die
+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"
+)
- # This is needed to prevent make from removing files
- touch "${S}/data/dvb-scan/.stamp" || die
- fi
-}
+DOCS=( README.md )
pkg_setup() {
- enewuser tvheadend -1 -1 /dev/null video
+ use inotify &&
+ CONFIG_CHECK="~INOTIFY_USER" linux-info_pkg_setup
+
+ enewuser tvheadend -1 -1 /etc/tvheadend video
}
src_configure() {
CC="$(tc-getCC)" \
- econf --prefix="${EPREFIX}"/usr \
- --datadir="${EPREFIX}"/usr/share \
+ PKG_CONFIG="${CHOST}-pkg-config" \
+ econf \
+ --disable-bundle \
--disable-ccache \
- --nowerror \
+ --disable-dvbscan \
+ --disable-ffmpeg_static \
--disable-hdhomerun_static \
+ --nowerror \
$(use_enable capmt) \
$(use_enable constcw) \
$(use_enable cwc) \
$(use_enable dbus dbus_1) \
- $(use_enable dvbscan) \
+ $(use_enable debug trace) \
$(use_enable dvb linuxdvb) \
+ $(use_enable dvbcsa) \
+ $(use_enable dvben50221) \
$(use_enable ffmpeg libav) \
$(use_enable hdhomerun hdhomerun_client) \
$(use_enable imagecache) \
@@ -84,6 +83,7 @@ src_configure() {
$(use_enable iptv) \
$(use_enable satip satip_server) \
$(use_enable satip satip_client) \
+ $(use_enable systemd libsystemd_daemon) \
$(use_enable timeshift) \
$(use_enable uriparser) \
$(use_enable zeroconf avahi) \
@@ -97,10 +97,11 @@ src_compile() {
src_install() {
default
- newinitd "${FILESDIR}/tvheadend.initd" tvheadend
- newconfd "${FILESDIR}/tvheadend.confd" tvheadend
+ newinitd "${FILESDIR}"/tvheadend.initd tvheadend
+ newconfd "${FILESDIR}"/tvheadend.confd tvheadend
- systemd_dounit "${FILESDIR}/tvheadend.service"
+ use systemd &&
+ systemd_dounit "${FILESDIR}"/tvheadend.service
dodir /etc/tvheadend
fperms 0700 /etc/tvheadend
diff --git a/media-tv/tvheadend/tvheadend-9999.ebuild b/media-tv/tvheadend/tvheadend-9999.ebuild
index e6779acb3c1f..55773cf0ac91 100644
--- a/media-tv/tvheadend/tvheadend-9999.ebuild
+++ b/media-tv/tvheadend/tvheadend-9999.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=6
-inherit eutils git-r3 linux-info systemd toolchain-funcs user
+inherit git-r3 linux-info systemd toolchain-funcs user
DESCRIPTION="Tvheadend is a TV streaming server and digital video recorder"
HOMEPAGE="https://tvheadend.org/"
@@ -13,64 +13,102 @@ LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
-IUSE="capmt constcw +cwc dbus +dvb +dvbscan ffmpeg hdhomerun libav imagecache inotify iptv satip +timeshift uriparser xmltv zeroconf zlib"
+IUSE="+capmt +constcw +cwc dbus debug dvbcsa dvben50221 +dvb +ffmpeg hdhomerun +imagecache +inotify iptv libressl opus satip systemd +timeshift uriparser vpx x264 x265 xmltv zeroconf zlib"
-RDEPEND="dev-libs/openssl:=
+RDEPEND="
virtual/libiconv
dbus? ( sys-apps/dbus )
- ffmpeg? (
- !libav? ( >=media-video/ffmpeg-3:= )
- libav? ( media-video/libav:= )
- )
+ dvbcsa? ( media-libs/libdvbcsa )
+ dvben50221? ( media-tv/linuxtv-dvb-apps )
+ ffmpeg? ( media-video/ffmpeg:0/55.57.57[opus?,vpx?,x264?,x265?] )
hdhomerun? ( media-libs/libhdhomerun )
+ !libressl? ( dev-libs/openssl:= )
+ libressl? ( dev-libs/libressl:= )
uriparser? ( dev-libs/uriparser )
zeroconf? ( net-dns/avahi )
zlib? ( sys-libs/zlib )"
-DEPEND="${RDEPEND}
+# ffmpeg sub-dependencies needed for headers only. Check under
+# src/transcoding/codec/codecs/libs for include statements.
+
+DEPEND="
+ ${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
dvb? ( virtual/linuxtv-dvb-headers )
- capmt? ( virtual/linuxtv-dvb-headers )
- virtual/pkgconfig"
+ ffmpeg? (
+ opus? ( media-libs/opus )
+ vpx? ( media-libs/libvpx )
+ x264? ( media-libs/x264 )
+ x265? ( media-libs/x265 )
+ )"
RDEPEND+="
- dvbscan? ( media-tv/linuxtv-dvb-apps )
+ dvb? ( media-tv/dtv-scan-tables )
xmltv? ( media-tv/xmltv )"
-CONFIG_CHECK="~INOTIFY_USER"
+REQUIRED_USE="dvbcsa? ( || ( capmt constcw cwc dvben50221 ) )"
+
+# Some patches from:
+# https://github.com/rpmfusion/tvheadend
+
+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"
+)
DOCS=( README.md )
pkg_setup() {
- enewuser tvheadend -1 -1 /dev/null video
-}
+ use inotify &&
+ CONFIG_CHECK="~INOTIFY_USER" linux-info_pkg_setup
-src_prepare() {
- # remove '-Werror' wrt bug #438424
- sed -e 's:-Werror::' -i Makefile || die 'sed failed!'
+ enewuser tvheadend -1 -1 /etc/tvheadend video
}
+# We unconditionally enable codecs that do not require additional
+# dependencies when building tvheadend. If support is missing from
+# ffmpeg at runtime then tvheadend will simply disable these codecs.
+
+# It is not necessary to specific all the --disable-*-static options as
+# most of them only take effect when --enable-ffmpeg_static is given.
+
src_configure() {
CC="$(tc-getCC)" \
- econf --prefix="${EPREFIX}"/usr \
- --datadir="${EPREFIX}"/usr/share \
- --disable-hdhomerun_static \
- --disable-ffmpeg_static \
+ PKG_CONFIG="${CHOST}-pkg-config" \
+ econf \
+ --disable-bundle \
--disable-ccache \
--disable-dvbscan \
+ --disable-ffmpeg_static \
+ --disable-hdhomerun_static \
+ --enable-libfdkaac \
+ --enable-libtheora \
+ --enable-libvorbis \
+ --nowerror \
$(use_enable capmt) \
$(use_enable constcw) \
$(use_enable cwc) \
- $(use_enable dbus) \
+ $(use_enable dbus dbus_1) \
+ $(use_enable debug trace) \
$(use_enable dvb linuxdvb) \
+ $(use_enable dvbcsa) \
+ $(use_enable dvben50221) \
$(use_enable ffmpeg libav) \
$(use_enable hdhomerun hdhomerun_client) \
$(use_enable imagecache) \
$(use_enable inotify) \
$(use_enable iptv) \
+ $(use_enable opus libopus) \
$(use_enable satip satip_server) \
$(use_enable satip satip_client) \
+ $(use_enable systemd libsystemd_daemon) \
$(use_enable timeshift) \
$(use_enable uriparser) \
+ $(use_enable vpx libvpx) \
+ $(use_enable x264 libx264) \
+ $(use_enable x265 libx265) \
$(use_enable zeroconf avahi) \
$(use_enable zlib)
}
@@ -82,10 +120,11 @@ src_compile() {
src_install() {
default
- newinitd "${FILESDIR}/tvheadend.initd" tvheadend
- newconfd "${FILESDIR}/tvheadend.confd" tvheadend
+ newinitd "${FILESDIR}"/tvheadend.initd tvheadend
+ newconfd "${FILESDIR}"/tvheadend.confd tvheadend
- systemd_dounit "${FILESDIR}/tvheadend.service"
+ use systemd &&
+ systemd_dounit "${FILESDIR}"/tvheadend.service
dodir /etc/tvheadend
fperms 0700 /etc/tvheadend