1 |
commit: f3544384630a818ea97571db41ee93919ad9c719 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 4 22:11:05 2017 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 4 22:20:07 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3544384 |
7 |
|
8 |
media-tv/tvheadend: Version bump to 4.2.4 and 9999 update |
9 |
|
10 |
* Add support for dvbcsa via USE flag |
11 |
* Add support for dvben50221 via USE flag |
12 |
* Drop support for libav (fails version checks, missing symbols) |
13 |
* Source DTV scan tables from new media-tv/dtv-scan-tables package |
14 |
* Set tvheadend user HOME to /etc/tvheadend to allow for XMLTV data |
15 |
* Tighten up the systemd service unit |
16 |
* Add debug USE flag for trace support |
17 |
* Fix inotify kernel config check |
18 |
* Add ffmpeg sub-dependencies and associated USE flags (9999 only) |
19 |
|
20 |
Closes: https://bugs.gentoo.org/579048 |
21 |
Closes: https://bugs.gentoo.org/579986 |
22 |
Closes: https://bugs.gentoo.org/586448 |
23 |
Closes: https://bugs.gentoo.org/588210 |
24 |
Closes: https://bugs.gentoo.org/626238 |
25 |
Package-Manager: Portage-2.3.16, Repoman-2.3.6 |
26 |
|
27 |
media-tv/tvheadend/Manifest | 5 +- |
28 |
.../files/tvheadend-4.0.9-use_system_queue.patch | 12 +++ |
29 |
.../files/tvheadend-4.2.1-hdhomerun.patch | 24 ++++++ |
30 |
.../files/tvheadend-4.2.2-dtv_scan_tables.patch | 12 +++ |
31 |
media-tv/tvheadend/files/tvheadend.service | 15 +++- |
32 |
media-tv/tvheadend/metadata.xml | 12 ++- |
33 |
...vheadend-9999.ebuild => tvheadend-4.2.4.ebuild} | 73 +++++++++++------- |
34 |
media-tv/tvheadend/tvheadend-9999.ebuild | 90 +++++++++++++++------- |
35 |
8 files changed, 180 insertions(+), 63 deletions(-) |
36 |
|
37 |
diff --git a/media-tv/tvheadend/Manifest b/media-tv/tvheadend/Manifest |
38 |
index f74c515869a..7d3e91d7b72 100644 |
39 |
--- a/media-tv/tvheadend/Manifest |
40 |
+++ b/media-tv/tvheadend/Manifest |
41 |
@@ -1,2 +1,3 @@ |
42 |
-DIST dtv-scan-tables-2015-02-08-f2053b3.tar.bz2 123415 SHA256 83ed1b669009ef325e5d9ccb897e48b31e15e71e81bff442b3d0bbd650131c77 SHA512 aedf0429c2ec0a4692e19c0b4ae1e8c063a5a0fb8695359aa8f716a7f40fd88435ed8b1d2aec2461de3f49b533d6cd012c2a54d06058a5291781da4adf82d609 WHIRLPOOL afaef58cdf2ce1ca03c0a695dbf13192b544e3c5a0012cc70a55834d0b1034d509174684fd0fe3f2111becbe32aac16cad5d467adc278a4b6b16c7dbd384757f |
43 |
-DIST tvheadend-4.0.9.tar.gz 15825419 SHA256 cea1106f45e286e8c25e6b2f0a581c28bd85e93ce3801ecaac7041568a214977 SHA512 ba8c6edcef126c6a260a9251b0948747074061c8f16fb20f03b250c6698645172c9396530b7fa44bf9cf4d8305fcece08c672c812ba6c48211edfbb2691fb58e WHIRLPOOL c0db6afa8d16201eab5fb188f81d062f84066037395f7e47e496d377e8207e2ffef021a58e07cba4af1217963fb2541b1822681fd33799113858329e9ff287bf |
44 |
+DIST dtv-scan-tables-2015-02-08-f2053b3.tar.bz2 123415 BLAKE2B 569987bc91f2060e5bb18b5caf35baebe1e72d95953bc69e19a713b33521668550f04dfc7ba125e3cf5ba6badee5a80c5bcdd37e2a5ca086d5dcc29cb0031c16 SHA512 aedf0429c2ec0a4692e19c0b4ae1e8c063a5a0fb8695359aa8f716a7f40fd88435ed8b1d2aec2461de3f49b533d6cd012c2a54d06058a5291781da4adf82d609 |
45 |
+DIST tvheadend-4.0.9.tar.gz 15825419 BLAKE2B b719032e46df24f37614c4a9d1da690b82f15906b1cff7eaa9573162a08e70e2813515972a9dd478530ad4ba984b01dd3fb3bf178e1c3973465000357b541f7e SHA512 ba8c6edcef126c6a260a9251b0948747074061c8f16fb20f03b250c6698645172c9396530b7fa44bf9cf4d8305fcece08c672c812ba6c48211edfbb2691fb58e |
46 |
+DIST tvheadend-4.2.4.tar.gz 21526564 BLAKE2B 19c571bb253041bd122306eaa516071d096d747b03eaf623b45b79fc0511633a75f1a0925a890207c994da001a2ba3404d1860b91236adae34e307bcf8c57796 SHA512 333a3509da198f5d96316f30fd010a216262315614db302c83405de78d29b32b1d878c0abd7fae2214713107e6955478ee3222b18888a84c57810035af882df4 |
47 |
|
48 |
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 |
49 |
new file mode 100644 |
50 |
index 00000000000..13ac3573ed2 |
51 |
--- /dev/null |
52 |
+++ b/media-tv/tvheadend/files/tvheadend-4.0.9-use_system_queue.patch |
53 |
@@ -0,0 +1,12 @@ |
54 |
+diff -up ./src/queue.h.orig ./src/queue.h |
55 |
+--- ./src/queue.h.orig 2016-03-14 10:10:57.000000000 +0100 |
56 |
++++ ./src/queue.h 2016-07-04 17:47:22.480252171 +0200 |
57 |
+@@ -5,7 +5,7 @@ |
58 |
+ #ifndef HTSQ_H |
59 |
+ #define HTSQ_H |
60 |
+ |
61 |
+-#include "../vendor/include/sys/queue.h" |
62 |
++#include <sys/queue.h> |
63 |
+ |
64 |
+ /* |
65 |
+ * Extra LIST-ops |
66 |
|
67 |
diff --git a/media-tv/tvheadend/files/tvheadend-4.2.1-hdhomerun.patch b/media-tv/tvheadend/files/tvheadend-4.2.1-hdhomerun.patch |
68 |
new file mode 100644 |
69 |
index 00000000000..64f6f691b97 |
70 |
--- /dev/null |
71 |
+++ b/media-tv/tvheadend/files/tvheadend-4.2.1-hdhomerun.patch |
72 |
@@ -0,0 +1,24 @@ |
73 |
+diff -up ./configure.orig ./configure |
74 |
+--- ./configure.orig 2017-04-21 10:32:22.000000000 +0200 |
75 |
++++ ./configure 2017-04-23 13:31:08.717237211 +0200 |
76 |
+@@ -357,7 +357,7 @@ if enabled hdhomerun_static; then |
77 |
+ else |
78 |
+ |
79 |
+ if enabled_or_auto hdhomerun_client; then |
80 |
+- if check_cc_header 'libhdhomerun/hdhomerun' libhdhomerun; then |
81 |
++ if check_cc_header 'hdhomerun/hdhomerun' libhdhomerun; then |
82 |
+ enable hdhomerun_client |
83 |
+ LDFLAGS="$LDFLAGS -lhdhomerun" |
84 |
+ fi |
85 |
+diff -up ./src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h.orig ./src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h |
86 |
+--- ./src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h.orig 2017-04-21 10:32:22.000000000 +0200 |
87 |
++++ ./src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h 2017-04-23 13:31:08.717237211 +0200 |
88 |
+@@ -24,7 +24,7 @@ |
89 |
+ #include "htsbuf.h" |
90 |
+ #include "tvhdhomerun.h" |
91 |
+ |
92 |
+-#include "libhdhomerun/hdhomerun.h" |
93 |
++#include <hdhomerun/hdhomerun.h> |
94 |
+ |
95 |
+ typedef struct tvhdhomerun_device_info tvhdhomerun_device_info_t; |
96 |
+ typedef struct tvhdhomerun_device tvhdhomerun_device_t; |
97 |
|
98 |
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 |
99 |
new file mode 100644 |
100 |
index 00000000000..51310262871 |
101 |
--- /dev/null |
102 |
+++ b/media-tv/tvheadend/files/tvheadend-4.2.2-dtv_scan_tables.patch |
103 |
@@ -0,0 +1,12 @@ |
104 |
+diff -up ./src/input/mpegts/scanfile.c.orig ./src/input/mpegts/scanfile.c |
105 |
+--- ./src/input/mpegts/scanfile.c.orig 2017-05-16 13:15:24.000000000 +0200 |
106 |
++++ ./src/input/mpegts/scanfile.c 2017-06-01 22:30:29.150834135 +0200 |
107 |
+@@ -903,7 +903,7 @@ scanfile_init ( const char *muxconf_path |
108 |
+ #elif defined(PLATFORM_FREEBSD) |
109 |
+ path = "/usr/local/share/dtv-scan-tables"; |
110 |
+ #else |
111 |
+- path = "/usr/share/dvb"; |
112 |
++ path = "/usr/share/dvbv5"; |
113 |
+ #endif |
114 |
+ |
115 |
+ if (!initialized) { |
116 |
|
117 |
diff --git a/media-tv/tvheadend/files/tvheadend.service b/media-tv/tvheadend/files/tvheadend.service |
118 |
index 227faffcb08..2d0573ca910 100644 |
119 |
--- a/media-tv/tvheadend/files/tvheadend.service |
120 |
+++ b/media-tv/tvheadend/files/tvheadend.service |
121 |
@@ -4,11 +4,20 @@ After=network.target |
122 |
|
123 |
[Service] |
124 |
Type=forking |
125 |
-PIDFile=/run/tvheadend.pid |
126 |
-ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid -C -c /etc/tvheadend -u tvheadend -g video |
127 |
-ExecStop=/usr/bin/rm /run/tvheadend.pid |
128 |
+User=tvheadend |
129 |
+Group=video |
130 |
+RuntimeDirectory=tvheadend |
131 |
+PIDFile=/run/tvheadend/tvheadend.pid |
132 |
+ExecStart=/usr/bin/tvheadend -6 -f -p /run/tvheadend.pid -C -c /etc/tvheadend |
133 |
Restart=always |
134 |
RestartSec=5 |
135 |
+DevicePolicy=closed |
136 |
+DeviceAllow=char-DVB rw # DVB devices |
137 |
+DeviceAllow=char-drm rw # GPUs for transcoding |
138 |
+RestrictAddressFamilies=AF_INET AF_INET6 |
139 |
+ProtectSystem=strict |
140 |
+ProtectHome=yes |
141 |
+NoNewPrivileges=yes |
142 |
|
143 |
[Install] |
144 |
WantedBy=multi-user.target |
145 |
|
146 |
diff --git a/media-tv/tvheadend/metadata.xml b/media-tv/tvheadend/metadata.xml |
147 |
index 9d99f123841..f8bdade2268 100644 |
148 |
--- a/media-tv/tvheadend/metadata.xml |
149 |
+++ b/media-tv/tvheadend/metadata.xml |
150 |
@@ -9,14 +9,20 @@ |
151 |
<flag name="capmt">Enable support for capmt (dvbapi) protocol</flag> |
152 |
<flag name="constcw">Enable support for the constcw protocol</flag> |
153 |
<flag name="cwc">Enable support for the cwc (newcamd) protocol</flag> |
154 |
+ <flag name="dvbcsa">Enable decryption of the DVB Common Scrambling Algorithm</flag> |
155 |
+ <flag name="dvbscan">Use scan tables from dtv-scan-tables git repository</flag> |
156 |
+ <flag name="dvben50221">Enable support for hardware CAM</flag> |
157 |
<flag name="hdhomerun">Enable support for the HDHomeRun device</flag> |
158 |
+ <flag name="imagecache">Enable support for image caching</flag> |
159 |
<flag name="iptv">Enable support for Internet Protocol TV</flag> |
160 |
+ <flag name="opus">Enable transcoding with the Opus audio codec</flag> |
161 |
<flag name="satip">Enable support for IP-based Satellite TV</flag> |
162 |
<flag name="timeshift">Enable TimeShift support</flag> |
163 |
- <flag name="xmltv">Use <pkg>media-tv/xmltv</pkg></flag> |
164 |
- <flag name="dvbscan">Use <pkg>media-tv/linuxtv-dvb-apps</pkg></flag> |
165 |
- <flag name="imagecache">Enable support for image caching</flag> |
166 |
<flag name="uriparser">Use <pkg>dev-libs/uriparser</pkg></flag> |
167 |
+ <flag name="vpx">Enable transcoding with the VP8/VP9 video codecs</flag> |
168 |
+ <flag name="x264">Enable transcoding with the H.264 video codec</flag> |
169 |
+ <flag name="x265">Enable transcoding with the HEVC video codec</flag> |
170 |
+ <flag name="xmltv">Use <pkg>media-tv/xmltv</pkg></flag> |
171 |
</use> |
172 |
<upstream> |
173 |
<remote-id type="github">tvheadend/tvheadend</remote-id> |
174 |
|
175 |
diff --git a/media-tv/tvheadend/tvheadend-9999.ebuild b/media-tv/tvheadend/tvheadend-4.2.4.ebuild |
176 |
similarity index 51% |
177 |
copy from media-tv/tvheadend/tvheadend-9999.ebuild |
178 |
copy to media-tv/tvheadend/tvheadend-4.2.4.ebuild |
179 |
index e6779acb3c1..d56276ff4fc 100644 |
180 |
--- a/media-tv/tvheadend/tvheadend-9999.ebuild |
181 |
+++ b/media-tv/tvheadend/tvheadend-4.2.4.ebuild |
182 |
@@ -1,67 +1,80 @@ |
183 |
# Copyright 1999-2017 Gentoo Foundation |
184 |
# Distributed under the terms of the GNU General Public License v2 |
185 |
|
186 |
-EAPI=5 |
187 |
+EAPI=6 |
188 |
|
189 |
-inherit eutils git-r3 linux-info systemd toolchain-funcs user |
190 |
+inherit linux-info systemd toolchain-funcs user |
191 |
|
192 |
DESCRIPTION="Tvheadend is a TV streaming server and digital video recorder" |
193 |
HOMEPAGE="https://tvheadend.org/" |
194 |
-EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" |
195 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
196 |
|
197 |
LICENSE="GPL-3" |
198 |
SLOT="0" |
199 |
-KEYWORDS="" |
200 |
+KEYWORDS="~amd64 ~arm ~x86" |
201 |
|
202 |
-IUSE="capmt constcw +cwc dbus +dvb +dvbscan ffmpeg hdhomerun libav imagecache inotify iptv satip +timeshift uriparser xmltv zeroconf zlib" |
203 |
+IUSE="+capmt +constcw +cwc dbus debug dvbcsa dvben50221 +dvb +ffmpeg hdhomerun +imagecache +inotify iptv satip systemd +timeshift uriparser xmltv zeroconf zlib" |
204 |
|
205 |
-RDEPEND="dev-libs/openssl:= |
206 |
+RDEPEND=" |
207 |
+ dev-libs/openssl:= |
208 |
virtual/libiconv |
209 |
dbus? ( sys-apps/dbus ) |
210 |
- ffmpeg? ( |
211 |
- !libav? ( >=media-video/ffmpeg-3:= ) |
212 |
- libav? ( media-video/libav:= ) |
213 |
- ) |
214 |
+ dvbcsa? ( media-libs/libdvbcsa ) |
215 |
+ dvben50221? ( media-tv/linuxtv-dvb-apps ) |
216 |
+ ffmpeg? ( media-video/ffmpeg:0/55.57.57 ) |
217 |
hdhomerun? ( media-libs/libhdhomerun ) |
218 |
uriparser? ( dev-libs/uriparser ) |
219 |
zeroconf? ( net-dns/avahi ) |
220 |
zlib? ( sys-libs/zlib )" |
221 |
|
222 |
-DEPEND="${RDEPEND} |
223 |
- dvb? ( virtual/linuxtv-dvb-headers ) |
224 |
- capmt? ( virtual/linuxtv-dvb-headers ) |
225 |
- virtual/pkgconfig" |
226 |
+DEPEND=" |
227 |
+ ${RDEPEND} |
228 |
+ sys-devel/gettext |
229 |
+ virtual/pkgconfig |
230 |
+ dvb? ( virtual/linuxtv-dvb-headers )" |
231 |
|
232 |
RDEPEND+=" |
233 |
- dvbscan? ( media-tv/linuxtv-dvb-apps ) |
234 |
+ dvb? ( media-tv/dtv-scan-tables ) |
235 |
xmltv? ( media-tv/xmltv )" |
236 |
|
237 |
-CONFIG_CHECK="~INOTIFY_USER" |
238 |
+REQUIRED_USE="dvbcsa? ( || ( capmt constcw cwc dvben50221 ) )" |
239 |
+ |
240 |
+# Some patches from: |
241 |
+# https://github.com/rpmfusion/tvheadend |
242 |
+ |
243 |
+PATCHES=( |
244 |
+ "${FILESDIR}/${PN}-4.0.9-use_system_queue.patch" |
245 |
+ "${FILESDIR}/${PN}-4.2.1-hdhomerun.patch" |
246 |
+ "${FILESDIR}/${PN}-4.2.2-dtv_scan_tables.patch" |
247 |
+) |
248 |
|
249 |
DOCS=( README.md ) |
250 |
|
251 |
pkg_setup() { |
252 |
- enewuser tvheadend -1 -1 /dev/null video |
253 |
-} |
254 |
+ use inotify && |
255 |
+ CONFIG_CHECK="~INOTIFY_USER" linux-info_pkg_setup |
256 |
|
257 |
-src_prepare() { |
258 |
- # remove '-Werror' wrt bug #438424 |
259 |
- sed -e 's:-Werror::' -i Makefile || die 'sed failed!' |
260 |
+ enewuser tvheadend -1 -1 /etc/tvheadend video |
261 |
} |
262 |
|
263 |
src_configure() { |
264 |
CC="$(tc-getCC)" \ |
265 |
- econf --prefix="${EPREFIX}"/usr \ |
266 |
- --datadir="${EPREFIX}"/usr/share \ |
267 |
- --disable-hdhomerun_static \ |
268 |
- --disable-ffmpeg_static \ |
269 |
+ PKG_CONFIG="${CHOST}-pkg-config" \ |
270 |
+ econf \ |
271 |
+ --disable-bundle \ |
272 |
--disable-ccache \ |
273 |
--disable-dvbscan \ |
274 |
+ --disable-ffmpeg_static \ |
275 |
+ --disable-hdhomerun_static \ |
276 |
+ --nowerror \ |
277 |
$(use_enable capmt) \ |
278 |
$(use_enable constcw) \ |
279 |
$(use_enable cwc) \ |
280 |
- $(use_enable dbus) \ |
281 |
+ $(use_enable dbus dbus_1) \ |
282 |
+ $(use_enable debug trace) \ |
283 |
$(use_enable dvb linuxdvb) \ |
284 |
+ $(use_enable dvbcsa) \ |
285 |
+ $(use_enable dvben50221) \ |
286 |
$(use_enable ffmpeg libav) \ |
287 |
$(use_enable hdhomerun hdhomerun_client) \ |
288 |
$(use_enable imagecache) \ |
289 |
@@ -69,6 +82,7 @@ src_configure() { |
290 |
$(use_enable iptv) \ |
291 |
$(use_enable satip satip_server) \ |
292 |
$(use_enable satip satip_client) \ |
293 |
+ $(use_enable systemd libsystemd_daemon) \ |
294 |
$(use_enable timeshift) \ |
295 |
$(use_enable uriparser) \ |
296 |
$(use_enable zeroconf avahi) \ |
297 |
@@ -82,10 +96,11 @@ src_compile() { |
298 |
src_install() { |
299 |
default |
300 |
|
301 |
- newinitd "${FILESDIR}/tvheadend.initd" tvheadend |
302 |
- newconfd "${FILESDIR}/tvheadend.confd" tvheadend |
303 |
+ newinitd "${FILESDIR}"/tvheadend.initd tvheadend |
304 |
+ newconfd "${FILESDIR}"/tvheadend.confd tvheadend |
305 |
|
306 |
- systemd_dounit "${FILESDIR}/tvheadend.service" |
307 |
+ use systemd && |
308 |
+ systemd_dounit "${FILESDIR}"/tvheadend.service |
309 |
|
310 |
dodir /etc/tvheadend |
311 |
fperms 0700 /etc/tvheadend |
312 |
|
313 |
diff --git a/media-tv/tvheadend/tvheadend-9999.ebuild b/media-tv/tvheadend/tvheadend-9999.ebuild |
314 |
index e6779acb3c1..b3eb58292b3 100644 |
315 |
--- a/media-tv/tvheadend/tvheadend-9999.ebuild |
316 |
+++ b/media-tv/tvheadend/tvheadend-9999.ebuild |
317 |
@@ -1,9 +1,9 @@ |
318 |
# Copyright 1999-2017 Gentoo Foundation |
319 |
# Distributed under the terms of the GNU General Public License v2 |
320 |
|
321 |
-EAPI=5 |
322 |
+EAPI=6 |
323 |
|
324 |
-inherit eutils git-r3 linux-info systemd toolchain-funcs user |
325 |
+inherit git-r3 linux-info systemd toolchain-funcs user |
326 |
|
327 |
DESCRIPTION="Tvheadend is a TV streaming server and digital video recorder" |
328 |
HOMEPAGE="https://tvheadend.org/" |
329 |
@@ -13,64 +13,101 @@ LICENSE="GPL-3" |
330 |
SLOT="0" |
331 |
KEYWORDS="" |
332 |
|
333 |
-IUSE="capmt constcw +cwc dbus +dvb +dvbscan ffmpeg hdhomerun libav imagecache inotify iptv satip +timeshift uriparser xmltv zeroconf zlib" |
334 |
+IUSE="+capmt +constcw +cwc dbus debug dvbcsa dvben50221 +dvb +ffmpeg hdhomerun +imagecache +inotify iptv opus satip systemd +timeshift uriparser vpx x264 x265 xmltv zeroconf zlib" |
335 |
|
336 |
-RDEPEND="dev-libs/openssl:= |
337 |
+RDEPEND=" |
338 |
+ dev-libs/openssl:= |
339 |
virtual/libiconv |
340 |
dbus? ( sys-apps/dbus ) |
341 |
- ffmpeg? ( |
342 |
- !libav? ( >=media-video/ffmpeg-3:= ) |
343 |
- libav? ( media-video/libav:= ) |
344 |
- ) |
345 |
+ dvbcsa? ( media-libs/libdvbcsa ) |
346 |
+ dvben50221? ( media-tv/linuxtv-dvb-apps ) |
347 |
+ ffmpeg? ( media-video/ffmpeg:0/55.57.57[opus?,vpx?,x264?,x265?] ) |
348 |
hdhomerun? ( media-libs/libhdhomerun ) |
349 |
uriparser? ( dev-libs/uriparser ) |
350 |
zeroconf? ( net-dns/avahi ) |
351 |
zlib? ( sys-libs/zlib )" |
352 |
|
353 |
-DEPEND="${RDEPEND} |
354 |
+# ffmpeg sub-dependencies needed for headers only. Check under |
355 |
+# src/transcoding/codec/codecs/libs for include statements. |
356 |
+ |
357 |
+DEPEND=" |
358 |
+ ${RDEPEND} |
359 |
+ sys-devel/gettext |
360 |
+ virtual/pkgconfig |
361 |
dvb? ( virtual/linuxtv-dvb-headers ) |
362 |
- capmt? ( virtual/linuxtv-dvb-headers ) |
363 |
- virtual/pkgconfig" |
364 |
+ ffmpeg? ( |
365 |
+ opus? ( media-libs/opus ) |
366 |
+ vpx? ( media-libs/libvpx ) |
367 |
+ x264? ( media-libs/x264 ) |
368 |
+ x265? ( media-libs/x265 ) |
369 |
+ )" |
370 |
|
371 |
RDEPEND+=" |
372 |
- dvbscan? ( media-tv/linuxtv-dvb-apps ) |
373 |
+ dvb? ( media-tv/dtv-scan-tables ) |
374 |
xmltv? ( media-tv/xmltv )" |
375 |
|
376 |
-CONFIG_CHECK="~INOTIFY_USER" |
377 |
+REQUIRED_USE="dvbcsa? ( || ( capmt constcw cwc dvben50221 ) )" |
378 |
+ |
379 |
+# Some patches from: |
380 |
+# https://github.com/rpmfusion/tvheadend |
381 |
+ |
382 |
+PATCHES=( |
383 |
+ "${FILESDIR}/${PN}-4.0.9-use_system_queue.patch" |
384 |
+ "${FILESDIR}/${PN}-4.2.1-hdhomerun.patch" |
385 |
+ "${FILESDIR}/${PN}-4.2.2-dtv_scan_tables.patch" |
386 |
+) |
387 |
|
388 |
DOCS=( README.md ) |
389 |
|
390 |
pkg_setup() { |
391 |
- enewuser tvheadend -1 -1 /dev/null video |
392 |
-} |
393 |
+ use inotify && |
394 |
+ CONFIG_CHECK="~INOTIFY_USER" linux-info_pkg_setup |
395 |
|
396 |
-src_prepare() { |
397 |
- # remove '-Werror' wrt bug #438424 |
398 |
- sed -e 's:-Werror::' -i Makefile || die 'sed failed!' |
399 |
+ enewuser tvheadend -1 -1 /etc/tvheadend video |
400 |
} |
401 |
|
402 |
+# We unconditionally enable codecs that do not require additional |
403 |
+# dependencies when building tvheadend. If support is missing from |
404 |
+# ffmpeg at runtime then tvheadend will simply disable these codecs. |
405 |
+ |
406 |
+# It is not necessary to specific all the --disable-*-static options as |
407 |
+# most of them only take effect when --enable-ffmpeg_static is given. |
408 |
+ |
409 |
src_configure() { |
410 |
CC="$(tc-getCC)" \ |
411 |
- econf --prefix="${EPREFIX}"/usr \ |
412 |
- --datadir="${EPREFIX}"/usr/share \ |
413 |
- --disable-hdhomerun_static \ |
414 |
- --disable-ffmpeg_static \ |
415 |
+ PKG_CONFIG="${CHOST}-pkg-config" \ |
416 |
+ econf \ |
417 |
+ --disable-bundle \ |
418 |
--disable-ccache \ |
419 |
--disable-dvbscan \ |
420 |
+ --disable-ffmpeg_static \ |
421 |
+ --disable-hdhomerun_static \ |
422 |
+ --enable-libfdkaac \ |
423 |
+ --enable-libtheora \ |
424 |
+ --enable-libvorbis \ |
425 |
+ --nowerror \ |
426 |
$(use_enable capmt) \ |
427 |
$(use_enable constcw) \ |
428 |
$(use_enable cwc) \ |
429 |
- $(use_enable dbus) \ |
430 |
+ $(use_enable dbus dbus_1) \ |
431 |
+ $(use_enable debug trace) \ |
432 |
$(use_enable dvb linuxdvb) \ |
433 |
+ $(use_enable dvbcsa) \ |
434 |
+ $(use_enable dvben50221) \ |
435 |
$(use_enable ffmpeg libav) \ |
436 |
$(use_enable hdhomerun hdhomerun_client) \ |
437 |
$(use_enable imagecache) \ |
438 |
$(use_enable inotify) \ |
439 |
$(use_enable iptv) \ |
440 |
+ $(use_enable opus libopus) \ |
441 |
$(use_enable satip satip_server) \ |
442 |
$(use_enable satip satip_client) \ |
443 |
+ $(use_enable systemd libsystemd_daemon) \ |
444 |
$(use_enable timeshift) \ |
445 |
$(use_enable uriparser) \ |
446 |
+ $(use_enable vpx libvpx) \ |
447 |
+ $(use_enable x264 libx264) \ |
448 |
+ $(use_enable x265 libx265) \ |
449 |
$(use_enable zeroconf avahi) \ |
450 |
$(use_enable zlib) |
451 |
} |
452 |
@@ -82,10 +119,11 @@ src_compile() { |
453 |
src_install() { |
454 |
default |
455 |
|
456 |
- newinitd "${FILESDIR}/tvheadend.initd" tvheadend |
457 |
- newconfd "${FILESDIR}/tvheadend.confd" tvheadend |
458 |
+ newinitd "${FILESDIR}"/tvheadend.initd tvheadend |
459 |
+ newconfd "${FILESDIR}"/tvheadend.confd tvheadend |
460 |
|
461 |
- systemd_dounit "${FILESDIR}/tvheadend.service" |
462 |
+ use systemd && |
463 |
+ systemd_dounit "${FILESDIR}"/tvheadend.service |
464 |
|
465 |
dodir /etc/tvheadend |
466 |
fperms 0700 /etc/tvheadend |