1 |
commit: 0dcdf482cd292d53a4cb213c9d76e74dd310385e |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 3 14:38:40 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 3 14:39:53 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dcdf482 |
7 |
|
8 |
Revert "media-video/vdr: cleanup old" |
9 |
|
10 |
This reverts commit 99d096c75cc5a13e96a8a3438df6fd93412ce06a. |
11 |
|
12 |
media-video/vdr-2* still required by media-plugins/vdr-pvr350. |
13 |
|
14 |
media-video/vdr/Manifest | 3 + |
15 |
media-video/vdr/files/vdr-2.0.6_gentoo.patch | 68 ++++ |
16 |
.../vdr/files/vdr-2.0.7_systemd_argsdir.patch | 438 +++++++++++++++++++++ |
17 |
.../files/vdr-2.0.7_systemd_argsdir_vanilla.patch | 438 +++++++++++++++++++++ |
18 |
media-video/vdr/metadata.xml | 9 + |
19 |
media-video/vdr/vdr-2.0.6-r1.ebuild | 277 +++++++++++++ |
20 |
media-video/vdr/vdr-2.0.7.ebuild | 288 ++++++++++++++ |
21 |
7 files changed, 1521 insertions(+) |
22 |
|
23 |
diff --git a/media-video/vdr/Manifest b/media-video/vdr/Manifest |
24 |
index dac0f69a4e8..671820be372 100644 |
25 |
--- a/media-video/vdr/Manifest |
26 |
+++ b/media-video/vdr/Manifest |
27 |
@@ -1,2 +1,5 @@ |
28 |
+DIST extpng-vdr-2.0.6-gentoo-edition-v6.patch.bz2 69472 BLAKE2B 60669e9c20b2bd573eb05733bbf9548d2e643b36693be8b15a377b38470708a71b29e2a16baf7ed378132265f814ec9d35dae749ccf6ae204cd9beb787dc8f57 SHA512 f4ecb786ec5a026fa75fcf539518e80273bf43fc325c13a380c70eb85351910efa991b3ee71ca477e597bc2b4598a18620b6cf00fc02714acfcc4e6112d84b6c |
29 |
DIST extpng-vdr-2.2.0-gentoo-edition-v1.patch.bz2 34664 BLAKE2B 81b68ebe0ef4588c3676f0b7a2c766d8d4d4f754a987b3be5868f3c6eff9158d4cea8e492ca81df535e637dbdc5baff638d1fafb4163e9d9a2d0125aba17e2e1 SHA512 16d6fbb8201f003dfe653b6a49424b794d7e697e27ad6f2383dbe17b76712ea5a3da88a676900b84d75ff7425bf3eb9084d60a89a4598758f482dc1f013f7b3e |
30 |
+DIST vdr-2.0.6.tar.bz2 839575 BLAKE2B 40de46d8465b7008bc29c7e2c1c241d4114aa3d62aa6a0acd81636133c295cd87c2fc618e725885c98f47445220e897c23188373457a96b51cf832ca417c9842 SHA512 070ebbfb85478887088567872a71744305dbf9c75de8b095a8fe46d883b0b4fe140539caeb2243715f42793a45790a127542655f549f7ea3cb71c4f9912fa07d |
31 |
+DIST vdr-2.0.7.tar.bz2 841511 BLAKE2B bde06dd038ea2ebfa8768742c02bc7046448ade29032a90130f721af1c4c5d2301ff52065a04c51b31f14250d8ae252d796d93e3012ea1057f2359b1ef9c327c SHA512 cba35f62162cd681179872915023890f492e95cc94d65aadd3cb4d03d7e3c7e2f197e7f35149cdf872169af35c2b841e1042e054f28164860b7cea8367793ce0 |
32 |
DIST vdr-2.2.0.tar.bz2 922708 BLAKE2B 975e07d6d4c5bd13ee92be5d6a1826d6404b0c59e20fa2e30689b185a61e02d54782ad528e6a4f15e0d36806b30bcf48aa336d63adb3604e78056ff318e0fd2c SHA512 183f58133915c6c0fe8ec2b88becbcb2a36418210e6dcf7931053d3771d727c3581593f9eb5c9693abf39e22e728f7b41c42079cd704610c3636ec05134ea93d |
33 |
|
34 |
diff --git a/media-video/vdr/files/vdr-2.0.6_gentoo.patch b/media-video/vdr/files/vdr-2.0.6_gentoo.patch |
35 |
new file mode 100644 |
36 |
index 00000000000..1641fc8e2ee |
37 |
--- /dev/null |
38 |
+++ b/media-video/vdr/files/vdr-2.0.6_gentoo.patch |
39 |
@@ -0,0 +1,68 @@ |
40 |
+diff -Naur vdr-2.0.6.orig/Makefile vdr-2.0.6/Makefile |
41 |
+--- vdr-2.0.6.orig/Makefile 2014-09-22 22:17:23.000000000 +0200 |
42 |
++++ vdr-2.0.6/Makefile 2014-09-24 15:22:43.000000000 +0200 |
43 |
+@@ -109,7 +109,7 @@ |
44 |
+ VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h) |
45 |
+ APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h) |
46 |
+ |
47 |
+-all: vdr i18n plugins |
48 |
++all: vdr i18n |
49 |
+ |
50 |
+ # Implicit rules: |
51 |
+ |
52 |
+@@ -162,7 +162,7 @@ |
53 |
+ |
54 |
+ PODIR = po |
55 |
+ LOCALEDIR = locale |
56 |
+-I18Npo = $(wildcard $(PODIR)/*.po) |
57 |
++I18Npo = $(foreach dir,$(LINGUAS),$(wildcard $(PODIR)/$(dir)*.po)) |
58 |
+ I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) |
59 |
+ I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr.mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) |
60 |
+ I18Npot = $(PODIR)/vdr.pot |
61 |
+@@ -185,7 +185,7 @@ |
62 |
+ |
63 |
+ install-i18n: i18n |
64 |
+ @mkdir -p $(DESTDIR)$(LOCDIR) |
65 |
+- cp -r $(LOCALEDIR)/* $(DESTDIR)$(LOCDIR) |
66 |
++ @(cd $(LOCALEDIR); for linguas in $(LINGUAS); do [ "$$linguas" = "en" ] && continue; cp -r --parents $$linguas* $(DESTDIR)$(LOCDIR); done) |
67 |
+ |
68 |
+ # The 'include' directory (for plugins): |
69 |
+ |
70 |
+@@ -247,7 +247,7 @@ |
71 |
+ |
72 |
+ # Install the files (note that 'install-pc' must be first!): |
73 |
+ |
74 |
+-install: install-pc install-bin install-dirs install-conf install-doc install-plugins install-i18n install-includes |
75 |
++install: install-pc install-bin install-dirs install-conf install-doc install-i18n install-includes |
76 |
+ |
77 |
+ # VDR binary: |
78 |
+ |
79 |
+@@ -259,11 +259,12 @@ |
80 |
+ |
81 |
+ install-dirs: |
82 |
+ @mkdir -p $(DESTDIR)$(VIDEODIR) |
83 |
+- @mkdir -p $(DESTDIR)$(CONFDIR) |
84 |
+- @mkdir -p $(DESTDIR)$(CACHEDIR) |
85 |
++# @mkdir -p $(DESTDIR)$(CONFDIR) |
86 |
++# @mkdir -p $(DESTDIR)$(CACHEDIR) |
87 |
+ @mkdir -p $(DESTDIR)$(RESDIR) |
88 |
+ |
89 |
+ install-conf: |
90 |
++ @mkdir -p $(DESTDIR)$(CONFDIR) |
91 |
+ @cp -pn *.conf $(DESTDIR)$(CONFDIR) |
92 |
+ |
93 |
+ # Documentation: |
94 |
+@@ -290,8 +291,11 @@ |
95 |
+ # Includes: |
96 |
+ |
97 |
+ install-includes: include-dir |
98 |
+- @mkdir -p $(DESTDIR)$(INCDIR) |
99 |
+- @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR) |
100 |
++# @mkdir -p $(DESTDIR)$(INCDIR) |
101 |
++# @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR) |
102 |
++ @mkdir -p $(DESTDIR)$(INCDIR)/vdr $(DESTDIR)$(INCDIR)/vdr/libsi |
103 |
++ @cp -pLR include/vdr $(DESTDIR)$(INCDIR) |
104 |
++ @cp -pLR include/libsi Make.config $(DESTDIR)$(INCDIR)/vdr |
105 |
+ |
106 |
+ # pkg-config file: |
107 |
+ |
108 |
|
109 |
diff --git a/media-video/vdr/files/vdr-2.0.7_systemd_argsdir.patch b/media-video/vdr/files/vdr-2.0.7_systemd_argsdir.patch |
110 |
new file mode 100644 |
111 |
index 00000000000..de9f4b90163 |
112 |
--- /dev/null |
113 |
+++ b/media-video/vdr/files/vdr-2.0.7_systemd_argsdir.patch |
114 |
@@ -0,0 +1,438 @@ |
115 |
+diff -Naur vdr-2.0.7.orig/HISTORY vdr-2.0.7/HISTORY |
116 |
+--- vdr-2.0.7.orig/HISTORY 2015-01-23 09:16:13.735620000 +0100 |
117 |
++++ vdr-2.0.7/HISTORY 2015-01-23 09:17:29.038614491 +0100 |
118 |
+@@ -7916,6 +7916,16 @@ |
119 |
+ - The APIVERSION has been increased to 2.0.6 due to the changes to pat.h, sdt.h and |
120 |
+ the functional modification to cFont::CreateFont(). |
121 |
+ |
122 |
++2015-01-18: Version 2.0.6 + backport of systemd support from versions 2.1.6 and 2.1.7 |
123 |
++ |
124 |
++- Added support for systemd (thanks to Christopher Reimer). To activate this you |
125 |
++ need to add "SDNOTIFY=1" to the 'make' call. |
126 |
++ |
127 |
++2015-01-18: Version 2.0.6 + backport of reading command line arguments from files, from version 2.1$ |
128 |
++ |
129 |
++- VDR now reads command line options from *.conf files in /etc/vdr/conf.d (thanks |
130 |
++ to Lars Hanisch). See vdr.1 and vdr.5 for details. |
131 |
++ |
132 |
+ 2015-01-20: Version 2.0.7 |
133 |
+ |
134 |
+ - Fixed a possible division by zero in frame rate detection. |
135 |
+diff -Naur vdr-2.0.7.orig/Make.config.template vdr-2.0.7/Make.config.template |
136 |
+--- vdr-2.0.7.orig/Make.config.template 2015-01-23 09:16:13.736620000 +0100 |
137 |
++++ vdr-2.0.7/Make.config.template 2015-01-23 09:16:34.199618503 +0100 |
138 |
+@@ -38,6 +38,7 @@ |
139 |
+ |
140 |
+ #VIDEODIR = /srv/vdr/video |
141 |
+ #CONFDIR = /var/lib/vdr |
142 |
++#ARGSDIR = /etc/vdr/conf.d |
143 |
+ #CACHEDIR = /var/cache/vdr |
144 |
+ |
145 |
+ # Overrides for preset/legacy configurations: |
146 |
+diff -Naur vdr-2.0.7.orig/Makefile vdr-2.0.7/Makefile |
147 |
+--- vdr-2.0.7.orig/Makefile 2015-01-23 09:16:13.724620001 +0100 |
148 |
++++ vdr-2.0.7/Makefile 2015-01-23 09:17:58.588612330 +0100 |
149 |
+@@ -31,6 +31,7 @@ |
150 |
+ DESTDIR ?= |
151 |
+ VIDEODIR ?= /srv/vdr/video |
152 |
+ CONFDIR ?= /var/lib/vdr |
153 |
++ARGSDIR ?= /etc/vdr/conf.d |
154 |
+ CACHEDIR ?= /var/cache/vdr |
155 |
+ |
156 |
+ PREFIX ?= /usr/local |
157 |
+@@ -66,7 +67,7 @@ |
158 |
+ |
159 |
+ SILIB = $(LSIDIR)/libsi.a |
160 |
+ |
161 |
+-OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\ |
162 |
++OBJS = args.o audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\ |
163 |
+ dvbplayer.o dvbspu.o dvbsubtitle.o eit.o eitscan.o epg.o filter.o font.o i18n.o interface.o keys.o\ |
164 |
+ lirc.o menu.o menuitems.o nit.o osdbase.o osd.o pat.o player.o plugin.o\ |
165 |
+ receiver.o recorder.o recording.o remote.o remux.o ringbuffer.o sdt.o sections.o shutdown.o\ |
166 |
+@@ -111,12 +112,18 @@ |
167 |
+ DEFINES += -DBIDI |
168 |
+ LIBS += $(shell pkg-config --libs fribidi) |
169 |
+ endif |
170 |
++ifdef SDNOTIFY |
171 |
++INCLUDES += $(shell pkg-config --cflags libsystemd-daemon) |
172 |
++DEFINES += -DSDNOTIFY |
173 |
++LIBS += $(shell pkg-config --libs libsystemd-daemon) |
174 |
++endif |
175 |
+ |
176 |
+ LIRC_DEVICE ?= /var/run/lirc/lircd |
177 |
+ |
178 |
+ DEFINES += -DLIRC_DEVICE=\"$(LIRC_DEVICE)\" |
179 |
+ DEFINES += -DVIDEODIR=\"$(VIDEODIR)\" |
180 |
+ DEFINES += -DCONFDIR=\"$(CONFDIR)\" |
181 |
++DEFINES += -DARGSDIR=\"$(ARGSDIR)\" |
182 |
+ DEFINES += -DCACHEDIR=\"$(CACHEDIR)\" |
183 |
+ DEFINES += -DRESDIR=\"$(RESDIR)\" |
184 |
+ DEFINES += -DPLUGINDIR=\"$(LIBDIR)\" |
185 |
+@@ -161,6 +168,7 @@ |
186 |
+ @echo "mandir=$(MANDIR)" >> $@ |
187 |
+ @echo "configdir=$(CONFDIR)" >> $@ |
188 |
+ @echo "videodir=$(VIDEODIR)" >> $@ |
189 |
++ @echo "argsdir=$(ARGSDIR)" >> $@ |
190 |
+ @echo "cachedir=$(CACHEDIR)" >> $@ |
191 |
+ @echo "resdir=$(RESDIR)" >> $@ |
192 |
+ @echo "libdir=$(LIBDIR)" >> $@ |
193 |
+@@ -278,6 +286,7 @@ |
194 |
+ install-dirs: |
195 |
+ @mkdir -p $(DESTDIR)$(VIDEODIR) |
196 |
+ # @mkdir -p $(DESTDIR)$(CONFDIR) |
197 |
++ @mkdir -p $(DESTDIR)$(ARGSDIR) |
198 |
+ # @mkdir -p $(DESTDIR)$(CACHEDIR) |
199 |
+ @mkdir -p $(DESTDIR)$(RESDIR) |
200 |
+ |
201 |
+diff -Naur vdr-2.0.7.orig/args.c vdr-2.0.7/args.c |
202 |
+--- vdr-2.0.7.orig/args.c 1970-01-01 01:00:00.000000000 +0100 |
203 |
++++ vdr-2.0.7/args.c 2015-01-23 09:16:34.199618503 +0100 |
204 |
+@@ -0,0 +1,129 @@ |
205 |
++/* |
206 |
++ * args.c: Read arguments from files |
207 |
++ * |
208 |
++ * See the main source file 'vdr.c' for copyright information and |
209 |
++ * how to reach the author. |
210 |
++ * |
211 |
++ * Original version written by Lars Hanisch <dvb@×××××××××××.de>. |
212 |
++ * |
213 |
++ * $Id$ |
214 |
++ */ |
215 |
++ |
216 |
++#include "args.h" |
217 |
++#include <unistd.h> |
218 |
++ |
219 |
++cArgs::cArgs(const char *Argv0) |
220 |
++{ |
221 |
++ argv0 = Argv0; |
222 |
++ argc = 0; |
223 |
++ argv = NULL; |
224 |
++} |
225 |
++ |
226 |
++cArgs::~cArgs(void) |
227 |
++{ |
228 |
++ if (argv != NULL) |
229 |
++ delete [] argv; |
230 |
++} |
231 |
++ |
232 |
++bool cArgs::AddArg(const char *s) |
233 |
++{ |
234 |
++ if (inVdrSection) |
235 |
++ args.Append(strdup(s)); |
236 |
++ else if (*lastArg == NULL) |
237 |
++ return false; |
238 |
++ else |
239 |
++ lastArg = cString::sprintf("%s %s", *lastArg, s); |
240 |
++ return true; |
241 |
++} |
242 |
++ |
243 |
++bool cArgs::ReadDirectory(const char *Directory) |
244 |
++{ |
245 |
++ if (argv != NULL) |
246 |
++ delete [] argv; |
247 |
++ argc = 0; |
248 |
++ argv = NULL; |
249 |
++ args.Clear(); |
250 |
++ lastArg = NULL; |
251 |
++ inVdrSection = false; |
252 |
++ cFileNameList files(Directory, false); |
253 |
++ if (files.Size() == 0) |
254 |
++ return false; |
255 |
++ for (int i = 0; i < files.Size(); i++) { |
256 |
++ const char *fileName = files.At(i); |
257 |
++ if (startswith(fileName, ".") || !endswith(fileName, ".conf")) |
258 |
++ continue; |
259 |
++ cString fullFileName = AddDirectory(Directory, fileName); |
260 |
++ struct stat fs; |
261 |
++ if ((access(*fullFileName, F_OK) != 0) || (stat(*fullFileName, &fs) != 0) || S_ISDIR(fs.st_mode)) |
262 |
++ continue; |
263 |
++ bool ok = true; |
264 |
++ int line = 0; |
265 |
++ FILE *f = fopen(*fullFileName, "r"); |
266 |
++ if (f) { |
267 |
++ char *s; |
268 |
++ cReadLine ReadLine; |
269 |
++ while ((s = ReadLine.Read(f)) != NULL) { |
270 |
++ line++; |
271 |
++ s = stripspace(skipspace(s)); |
272 |
++ if (!isempty(s) && (s[0] != '#')) { |
273 |
++ if (startswith(s, "[") && endswith(s, "]")) { |
274 |
++ s[strlen(s) - 1] = 0; |
275 |
++ s++; |
276 |
++ if (*lastArg) { |
277 |
++ args.Append(strdup(*lastArg)); |
278 |
++ lastArg = NULL; |
279 |
++ } |
280 |
++ if (strcmp(s, "vdr") == 0) |
281 |
++ inVdrSection = true; |
282 |
++ else { |
283 |
++ inVdrSection = false; |
284 |
++ lastArg = cString::sprintf("--plugin=%s", s); |
285 |
++ } |
286 |
++ } |
287 |
++ else { |
288 |
++ if ((strlen(s) > 2) && (s[0] == '-') && (s[1] != '-')) { // short option, split at first space |
289 |
++ char *p = strchr(s, ' '); |
290 |
++ if (p == NULL) { |
291 |
++ ok = AddArg(s); |
292 |
++ if (!ok) |
293 |
++ break; |
294 |
++ } |
295 |
++ else { |
296 |
++ *p = 0; |
297 |
++ p++; |
298 |
++ ok = AddArg(s); |
299 |
++ if (!ok) |
300 |
++ break; |
301 |
++ ok = AddArg(p); |
302 |
++ if (!ok) |
303 |
++ break; |
304 |
++ } |
305 |
++ } |
306 |
++ else { |
307 |
++ ok = AddArg(s); |
308 |
++ if (!ok) |
309 |
++ break; |
310 |
++ } |
311 |
++ } |
312 |
++ } |
313 |
++ } |
314 |
++ fclose(f); |
315 |
++ } |
316 |
++ if (!ok) { |
317 |
++ esyslog("ERROR: args file %s, line %d", *fullFileName, line); |
318 |
++ return false; |
319 |
++ } |
320 |
++ } |
321 |
++ if (*lastArg) { |
322 |
++ args.Append(strdup(*lastArg)); |
323 |
++ lastArg = NULL; |
324 |
++ } |
325 |
++ argv = new char*[args.Size() + 1]; |
326 |
++ argv[0] = strdup(*argv0); |
327 |
++ argc = 1; |
328 |
++ for (int i = 0; i < args.Size(); i++) { |
329 |
++ argv[argc] = args.At(i); |
330 |
++ argc++; |
331 |
++ } |
332 |
++ return true; |
333 |
++} |
334 |
+diff -Naur vdr-2.0.7.orig/args.h vdr-2.0.7/args.h |
335 |
+--- vdr-2.0.7.orig/args.h 1970-01-01 01:00:00.000000000 +0100 |
336 |
++++ vdr-2.0.7/args.h 2015-01-23 09:16:34.199618503 +0100 |
337 |
+@@ -0,0 +1,34 @@ |
338 |
++/* |
339 |
++ * args.h: Read arguments from files |
340 |
++ * |
341 |
++ * See the main source file 'vdr.c' for copyright information and |
342 |
++ * how to reach the author. |
343 |
++ * |
344 |
++ * Original version written by Lars Hanisch <dvb@×××××××××××.de>. |
345 |
++ * |
346 |
++ * $Id$ |
347 |
++ */ |
348 |
++ |
349 |
++#ifndef __ARGS_H |
350 |
++#define __ARGS_H |
351 |
++ |
352 |
++#include "tools.h" |
353 |
++ |
354 |
++class cArgs { |
355 |
++private: |
356 |
++ cString argv0; |
357 |
++ cStringList args; |
358 |
++ cString lastArg; |
359 |
++ bool inVdrSection; |
360 |
++ int argc; |
361 |
++ char **argv; |
362 |
++ bool AddArg(const char *s); |
363 |
++public: |
364 |
++ cArgs(const char *Argv0); |
365 |
++ ~cArgs(void); |
366 |
++ bool ReadDirectory(const char *Directory); |
367 |
++ int GetArgc(void) const { return argc; }; |
368 |
++ char **GetArgv(void) const { return argv; }; |
369 |
++ }; |
370 |
++ |
371 |
++#endif //__ARGS_H |
372 |
+diff -Naur vdr-2.0.7.orig/interface.c vdr-2.0.7/interface.c |
373 |
+--- vdr-2.0.7.orig/interface.c 2015-01-23 09:16:13.725620001 +0100 |
374 |
++++ vdr-2.0.7/interface.c 2015-01-23 09:16:34.199618503 +0100 |
375 |
+@@ -10,6 +10,9 @@ |
376 |
+ #include "interface.h" |
377 |
+ #include <ctype.h> |
378 |
+ #include <stdlib.h> |
379 |
++#ifdef SDNOTIFY |
380 |
++#include <systemd/sd-daemon.h> |
381 |
++#endif |
382 |
+ #include <unistd.h> |
383 |
+ #include "i18n.h" |
384 |
+ #include "status.h" |
385 |
+@@ -159,6 +162,9 @@ |
386 |
+ bool known = Keys.KnowsRemote(Remote->Name()); |
387 |
+ dsyslog("remote control %s - %s", Remote->Name(), known ? "keys known" : "learning keys"); |
388 |
+ if (!known) { |
389 |
++#ifdef SDNOTIFY |
390 |
++ sd_notify(0, "READY=1\nSTATUS=Learning keys..."); |
391 |
++#endif |
392 |
+ cSkinDisplayMenu *DisplayMenu = Skins.Current()->DisplayMenu(); |
393 |
+ DisplayMenu->SetMenuCategory(mcUnknown); |
394 |
+ char Headline[256]; |
395 |
+diff -Naur vdr-2.0.7.orig/vdr.1 vdr-2.0.7/vdr.1 |
396 |
+--- vdr-2.0.7.orig/vdr.1 2015-01-23 09:16:13.730620000 +0100 |
397 |
++++ vdr-2.0.7/vdr.1 2015-01-23 09:16:34.200618503 +0100 |
398 |
+@@ -178,6 +178,10 @@ |
399 |
+ Read resource files from \fIdir\fR |
400 |
+ (default is to read them from the config directory). |
401 |
+ .TP |
402 |
++.BI \-\-showargs[= dir ] |
403 |
++Read command line arguments from \fIdir\fR (default is \fI/etc/vdr/conf.d\fR), |
404 |
++display them to the console and exit. |
405 |
++.TP |
406 |
+ .BI \-s\ cmd ,\ \-\-shutdown= cmd |
407 |
+ Call \fIcmd\fR to shutdown the computer. See the file \fIINSTALL\fR for more |
408 |
+ information. |
409 |
+@@ -213,6 +217,10 @@ |
410 |
+ .BI \-w\ sec ,\ \-\-watchdog= sec |
411 |
+ Activate the watchdog timer with a timeout of \fIsec\fR seconds. |
412 |
+ A value of \fB0\fR (default) disables the watchdog. |
413 |
++.P |
414 |
++If started without any options, vdr tries to read command line options |
415 |
++from files named '*.conf' in the directory /etc/vdr/conf.d. Files are |
416 |
++read in alphabetical order. See vdr(5) for details. |
417 |
+ .SH SIGNALS |
418 |
+ .TP |
419 |
+ .B SIGINT, SIGTERM |
420 |
+diff -Naur vdr-2.0.7.orig/vdr.5 vdr-2.0.7/vdr.5 |
421 |
+--- vdr-2.0.7.orig/vdr.5 2015-01-23 09:16:13.732620000 +0100 |
422 |
++++ vdr-2.0.7/vdr.5 2015-01-23 09:16:34.200618503 +0100 |
423 |
+@@ -895,6 +895,33 @@ |
424 |
+ just 16 bit wide. The internal representation in VDR allows for 32 bit to |
425 |
+ be used, so that external tools can generate EPG data that is guaranteed |
426 |
+ not to collide with the ids of existing data. |
427 |
++.SS COMMANDLINE OPTIONS |
428 |
++If started without any options, vdr tries to read any files in the directory |
429 |
++/etc/vdr/conf.d with names that do not begin with a '.' and that end with '.conf'. |
430 |
++These files are read in alphabetical order. The format of these files is |
431 |
++ |
432 |
++# comment |
433 |
++.br |
434 |
++[name] |
435 |
++.br |
436 |
++-a |
437 |
++.br |
438 |
++-b 123 |
439 |
++.br |
440 |
++--long |
441 |
++.br |
442 |
++--longarg=123 |
443 |
++.br |
444 |
++ |
445 |
++Any lines that begin with '#' as the first non-whitespace character are considered |
446 |
++comments and are ignored. |
447 |
++A command line option file consists of one or more sections, indicated by '[name]', |
448 |
++where 'name' is either the fixed word 'vdr' (if this section contains options for |
449 |
++the main VDR program) or the name of the plugin this section applies to. |
450 |
++Each option must be written on a separate line, including the leading '-' (for |
451 |
++a short option) or '--' (for a long option). If the option has additional arguments, |
452 |
++they have to be written on the same line as the option itself, separated from the |
453 |
++option with a blank (short option) or equal sign (long option). |
454 |
+ .SH SEE ALSO |
455 |
+ .BR vdr (1) |
456 |
+ .SH AUTHOR |
457 |
+diff -Naur vdr-2.0.7.orig/vdr.c vdr-2.0.7/vdr.c |
458 |
+--- vdr-2.0.7.orig/vdr.c 2015-01-23 09:16:13.732620000 +0100 |
459 |
++++ vdr-2.0.7/vdr.c 2015-01-23 09:16:34.200618503 +0100 |
460 |
+@@ -34,8 +34,12 @@ |
461 |
+ #include <stdlib.h> |
462 |
+ #include <sys/capability.h> |
463 |
+ #include <sys/prctl.h> |
464 |
++#ifdef SDNOTIFY |
465 |
++#include <systemd/sd-daemon.h> |
466 |
++#endif |
467 |
+ #include <termios.h> |
468 |
+ #include <unistd.h> |
469 |
++#include "args.h" |
470 |
+ #include "audio.h" |
471 |
+ #include "channels.h" |
472 |
+ #include "config.h" |
473 |
+@@ -192,6 +196,7 @@ |
474 |
+ #define DEFAULTWATCHDOG 0 // seconds |
475 |
+ #define DEFAULTVIDEODIR VIDEODIR |
476 |
+ #define DEFAULTCONFDIR dd(CONFDIR, VideoDirectory) |
477 |
++#define DEFAULTARGSDIR dd(ARGSDIR, "/etc/vdr/conf.d") |
478 |
+ #define DEFAULTCACHEDIR dd(CACHEDIR, VideoDirectory) |
479 |
+ #define DEFAULTRESDIR dd(RESDIR, ConfigDirectory) |
480 |
+ #define DEFAULTPLUGINDIR PLUGINDIR |
481 |
+@@ -229,6 +234,15 @@ |
482 |
+ VdrUser = VDR_USER; |
483 |
+ #endif |
484 |
+ |
485 |
++ cArgs *Args = NULL; |
486 |
++ if (argc == 1) { |
487 |
++ Args = new cArgs(argv[0]); |
488 |
++ if (Args->ReadDirectory(DEFAULTARGSDIR)) { |
489 |
++ argc = Args->GetArgc(); |
490 |
++ argv = Args->GetArgv(); |
491 |
++ } |
492 |
++ } |
493 |
++ |
494 |
+ SetVideoDirectory(VideoDirectory); |
495 |
+ cPluginManager PluginManager(DEFAULTPLUGINDIR); |
496 |
+ |
497 |
+@@ -256,6 +270,7 @@ |
498 |
+ { "port", required_argument, NULL, 'p' }, |
499 |
+ { "record", required_argument, NULL, 'r' }, |
500 |
+ { "resdir", required_argument, NULL, 'r' | 0x100 }, |
501 |
++ { "showargs", optional_argument, NULL, 's' | 0x200 }, |
502 |
+ { "shutdown", required_argument, NULL, 's' }, |
503 |
+ { "split", no_argument, NULL, 's' | 0x100 }, |
504 |
+ { "terminal", required_argument, NULL, 't' }, |
505 |
+@@ -428,6 +443,19 @@ |
506 |
+ case 's' | 0x100: |
507 |
+ Setup.SplitEditedFiles = 1; |
508 |
+ break; |
509 |
++ case 's' | 0x200: { |
510 |
++ const char *ArgsDir = optarg ? optarg : DEFAULTARGSDIR; |
511 |
++ cArgs Args(argv[0]); |
512 |
++ if (!Args.ReadDirectory(ArgsDir)) { |
513 |
++ fprintf(stderr, "vdr: can't read arguments from directory: %s\n", ArgsDir); |
514 |
++ return 2; |
515 |
++ } |
516 |
++ int c = Args.GetArgc(); |
517 |
++ char **v = Args.GetArgv(); |
518 |
++ for (int i = 1; i < c; i++) |
519 |
++ printf("%s\n", v[i]); |
520 |
++ return 0; |
521 |
++ } |
522 |
+ case 't': Terminal = optarg; |
523 |
+ if (access(Terminal, R_OK | W_OK) < 0) { |
524 |
+ fprintf(stderr, "vdr: can't access terminal: %s\n", Terminal); |
525 |
+@@ -541,6 +569,8 @@ |
526 |
+ " -s CMD, --shutdown=CMD call CMD to shutdown the computer\n" |
527 |
+ " --split split edited files at the editing marks (only\n" |
528 |
+ " useful in conjunction with --edit)\n" |
529 |
++ " --showargs[=DIR] print the arguments read from DIR and exit\n" |
530 |
++ " (default: %s)\n" |
531 |
+ " -t TTY, --terminal=TTY controlling tty\n" |
532 |
+ " -u USER, --user=USER run as user USER; only applicable if started as\n" |
533 |
+ " root\n" |
534 |
+@@ -563,6 +593,7 @@ |
535 |
+ DEFAULTLOCDIR, |
536 |
+ DEFAULTSVDRPPORT, |
537 |
+ DEFAULTRESDIR, |
538 |
++ DEFAULTARGSDIR, |
539 |
+ DEFAULTVIDEODIR, |
540 |
+ DEFAULTWATCHDOG |
541 |
+ ); |
542 |
+@@ -848,6 +879,10 @@ |
543 |
+ alarm(WatchdogTimeout); // Initial watchdog timer start |
544 |
+ } |
545 |
+ |
546 |
++#ifdef SDNOTIFY |
547 |
++ sd_notify(0, "READY=1\nSTATUS=Ready"); |
548 |
++#endif |
549 |
++ |
550 |
+ // Main program loop: |
551 |
+ |
552 |
+ #define DELETE_MENU ((IsInfoMenu &= (Menu == NULL)), delete Menu, Menu = NULL) |
553 |
|
554 |
diff --git a/media-video/vdr/files/vdr-2.0.7_systemd_argsdir_vanilla.patch b/media-video/vdr/files/vdr-2.0.7_systemd_argsdir_vanilla.patch |
555 |
new file mode 100644 |
556 |
index 00000000000..f7bae16fdd4 |
557 |
--- /dev/null |
558 |
+++ b/media-video/vdr/files/vdr-2.0.7_systemd_argsdir_vanilla.patch |
559 |
@@ -0,0 +1,438 @@ |
560 |
+diff -Naur vdr-2.0.7.orig/HISTORY vdr-2.0.7/HISTORY |
561 |
+--- vdr-2.0.7.orig/HISTORY 2015-01-23 09:07:52.777656645 +0100 |
562 |
++++ vdr-2.0.7/HISTORY 2015-01-23 09:09:57.798647500 +0100 |
563 |
+@@ -7916,6 +7916,16 @@ |
564 |
+ - The APIVERSION has been increased to 2.0.6 due to the changes to pat.h, sdt.h and |
565 |
+ the functional modification to cFont::CreateFont(). |
566 |
+ |
567 |
++2015-01-18: Version 2.0.6 + backport of systemd support from versions 2.1.6 and 2.1.7 |
568 |
++ |
569 |
++- Added support for systemd (thanks to Christopher Reimer). To activate this you |
570 |
++ need to add "SDNOTIFY=1" to the 'make' call. |
571 |
++ |
572 |
++2015-01-18: Version 2.0.6 + backport of reading command line arguments from files, from version 2.1$ |
573 |
++ |
574 |
++- VDR now reads command line options from *.conf files in /etc/vdr/conf.d (thanks |
575 |
++ to Lars Hanisch). See vdr.1 and vdr.5 for details. |
576 |
++ |
577 |
+ 2015-01-20: Version 2.0.7 |
578 |
+ |
579 |
+ - Fixed a possible division by zero in frame rate detection. |
580 |
+diff -Naur vdr-2.0.7.orig/Make.config.template vdr-2.0.7/Make.config.template |
581 |
+--- vdr-2.0.7.orig/Make.config.template 2015-01-23 09:07:52.765656646 +0100 |
582 |
++++ vdr-2.0.7/Make.config.template 2015-01-23 09:08:15.775654963 +0100 |
583 |
+@@ -38,6 +38,7 @@ |
584 |
+ |
585 |
+ #VIDEODIR = /srv/vdr/video |
586 |
+ #CONFDIR = /var/lib/vdr |
587 |
++#ARGSDIR = /etc/vdr/conf.d |
588 |
+ #CACHEDIR = /var/cache/vdr |
589 |
+ |
590 |
+ # Overrides for preset/legacy configurations: |
591 |
+diff -Naur vdr-2.0.7.orig/Makefile vdr-2.0.7/Makefile |
592 |
+--- vdr-2.0.7.orig/Makefile 2015-01-23 09:07:52.778656645 +0100 |
593 |
++++ vdr-2.0.7/Makefile 2015-01-23 09:11:11.158642134 +0100 |
594 |
+@@ -31,6 +31,7 @@ |
595 |
+ DESTDIR ?= |
596 |
+ VIDEODIR ?= /srv/vdr/video |
597 |
+ CONFDIR ?= /var/lib/vdr |
598 |
++ARGSDIR ?= /etc/vdr/conf.d |
599 |
+ CACHEDIR ?= /var/cache/vdr |
600 |
+ |
601 |
+ PREFIX ?= /usr/local |
602 |
+@@ -66,7 +67,7 @@ |
603 |
+ |
604 |
+ SILIB = $(LSIDIR)/libsi.a |
605 |
+ |
606 |
+-OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\ |
607 |
++OBJS = args.o audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\ |
608 |
+ dvbplayer.o dvbspu.o dvbsubtitle.o eit.o eitscan.o epg.o filter.o font.o i18n.o interface.o keys.o\ |
609 |
+ lirc.o menu.o menuitems.o nit.o osdbase.o osd.o pat.o player.o plugin.o\ |
610 |
+ receiver.o recorder.o recording.o remote.o remux.o ringbuffer.o sdt.o sections.o shutdown.o\ |
611 |
+@@ -93,12 +94,18 @@ |
612 |
+ DEFINES += -DBIDI |
613 |
+ LIBS += $(shell pkg-config --libs fribidi) |
614 |
+ endif |
615 |
++ifdef SDNOTIFY |
616 |
++INCLUDES += $(shell pkg-config --cflags libsystemd-daemon) |
617 |
++DEFINES += -DSDNOTIFY |
618 |
++LIBS += $(shell pkg-config --libs libsystemd-daemon) |
619 |
++endif |
620 |
+ |
621 |
+ LIRC_DEVICE ?= /var/run/lirc/lircd |
622 |
+ |
623 |
+ DEFINES += -DLIRC_DEVICE=\"$(LIRC_DEVICE)\" |
624 |
+ DEFINES += -DVIDEODIR=\"$(VIDEODIR)\" |
625 |
+ DEFINES += -DCONFDIR=\"$(CONFDIR)\" |
626 |
++DEFINES += -DARGSDIR=\"$(ARGSDIR)\" |
627 |
+ DEFINES += -DCACHEDIR=\"$(CACHEDIR)\" |
628 |
+ DEFINES += -DRESDIR=\"$(RESDIR)\" |
629 |
+ DEFINES += -DPLUGINDIR=\"$(LIBDIR)\" |
630 |
+@@ -143,6 +150,7 @@ |
631 |
+ @echo "mandir=$(MANDIR)" >> $@ |
632 |
+ @echo "configdir=$(CONFDIR)" >> $@ |
633 |
+ @echo "videodir=$(VIDEODIR)" >> $@ |
634 |
++ @echo "argsdir=$(ARGSDIR)" >> $@ |
635 |
+ @echo "cachedir=$(CACHEDIR)" >> $@ |
636 |
+ @echo "resdir=$(RESDIR)" >> $@ |
637 |
+ @echo "libdir=$(LIBDIR)" >> $@ |
638 |
+@@ -260,6 +268,7 @@ |
639 |
+ install-dirs: |
640 |
+ @mkdir -p $(DESTDIR)$(VIDEODIR) |
641 |
+ # @mkdir -p $(DESTDIR)$(CONFDIR) |
642 |
++ @mkdir -p $(DESTDIR)$(ARGSDIR) |
643 |
+ # @mkdir -p $(DESTDIR)$(CACHEDIR) |
644 |
+ @mkdir -p $(DESTDIR)$(RESDIR) |
645 |
+ |
646 |
+diff -Naur vdr-2.0.7.orig/args.c vdr-2.0.7/args.c |
647 |
+--- vdr-2.0.7.orig/args.c 1970-01-01 01:00:00.000000000 +0100 |
648 |
++++ vdr-2.0.7/args.c 2015-01-23 09:08:15.775654963 +0100 |
649 |
+@@ -0,0 +1,129 @@ |
650 |
++/* |
651 |
++ * args.c: Read arguments from files |
652 |
++ * |
653 |
++ * See the main source file 'vdr.c' for copyright information and |
654 |
++ * how to reach the author. |
655 |
++ * |
656 |
++ * Original version written by Lars Hanisch <dvb@×××××××××××.de>. |
657 |
++ * |
658 |
++ * $Id$ |
659 |
++ */ |
660 |
++ |
661 |
++#include "args.h" |
662 |
++#include <unistd.h> |
663 |
++ |
664 |
++cArgs::cArgs(const char *Argv0) |
665 |
++{ |
666 |
++ argv0 = Argv0; |
667 |
++ argc = 0; |
668 |
++ argv = NULL; |
669 |
++} |
670 |
++ |
671 |
++cArgs::~cArgs(void) |
672 |
++{ |
673 |
++ if (argv != NULL) |
674 |
++ delete [] argv; |
675 |
++} |
676 |
++ |
677 |
++bool cArgs::AddArg(const char *s) |
678 |
++{ |
679 |
++ if (inVdrSection) |
680 |
++ args.Append(strdup(s)); |
681 |
++ else if (*lastArg == NULL) |
682 |
++ return false; |
683 |
++ else |
684 |
++ lastArg = cString::sprintf("%s %s", *lastArg, s); |
685 |
++ return true; |
686 |
++} |
687 |
++ |
688 |
++bool cArgs::ReadDirectory(const char *Directory) |
689 |
++{ |
690 |
++ if (argv != NULL) |
691 |
++ delete [] argv; |
692 |
++ argc = 0; |
693 |
++ argv = NULL; |
694 |
++ args.Clear(); |
695 |
++ lastArg = NULL; |
696 |
++ inVdrSection = false; |
697 |
++ cFileNameList files(Directory, false); |
698 |
++ if (files.Size() == 0) |
699 |
++ return false; |
700 |
++ for (int i = 0; i < files.Size(); i++) { |
701 |
++ const char *fileName = files.At(i); |
702 |
++ if (startswith(fileName, ".") || !endswith(fileName, ".conf")) |
703 |
++ continue; |
704 |
++ cString fullFileName = AddDirectory(Directory, fileName); |
705 |
++ struct stat fs; |
706 |
++ if ((access(*fullFileName, F_OK) != 0) || (stat(*fullFileName, &fs) != 0) || S_ISDIR(fs.st_mode)) |
707 |
++ continue; |
708 |
++ bool ok = true; |
709 |
++ int line = 0; |
710 |
++ FILE *f = fopen(*fullFileName, "r"); |
711 |
++ if (f) { |
712 |
++ char *s; |
713 |
++ cReadLine ReadLine; |
714 |
++ while ((s = ReadLine.Read(f)) != NULL) { |
715 |
++ line++; |
716 |
++ s = stripspace(skipspace(s)); |
717 |
++ if (!isempty(s) && (s[0] != '#')) { |
718 |
++ if (startswith(s, "[") && endswith(s, "]")) { |
719 |
++ s[strlen(s) - 1] = 0; |
720 |
++ s++; |
721 |
++ if (*lastArg) { |
722 |
++ args.Append(strdup(*lastArg)); |
723 |
++ lastArg = NULL; |
724 |
++ } |
725 |
++ if (strcmp(s, "vdr") == 0) |
726 |
++ inVdrSection = true; |
727 |
++ else { |
728 |
++ inVdrSection = false; |
729 |
++ lastArg = cString::sprintf("--plugin=%s", s); |
730 |
++ } |
731 |
++ } |
732 |
++ else { |
733 |
++ if ((strlen(s) > 2) && (s[0] == '-') && (s[1] != '-')) { // short option, split at first space |
734 |
++ char *p = strchr(s, ' '); |
735 |
++ if (p == NULL) { |
736 |
++ ok = AddArg(s); |
737 |
++ if (!ok) |
738 |
++ break; |
739 |
++ } |
740 |
++ else { |
741 |
++ *p = 0; |
742 |
++ p++; |
743 |
++ ok = AddArg(s); |
744 |
++ if (!ok) |
745 |
++ break; |
746 |
++ ok = AddArg(p); |
747 |
++ if (!ok) |
748 |
++ break; |
749 |
++ } |
750 |
++ } |
751 |
++ else { |
752 |
++ ok = AddArg(s); |
753 |
++ if (!ok) |
754 |
++ break; |
755 |
++ } |
756 |
++ } |
757 |
++ } |
758 |
++ } |
759 |
++ fclose(f); |
760 |
++ } |
761 |
++ if (!ok) { |
762 |
++ esyslog("ERROR: args file %s, line %d", *fullFileName, line); |
763 |
++ return false; |
764 |
++ } |
765 |
++ } |
766 |
++ if (*lastArg) { |
767 |
++ args.Append(strdup(*lastArg)); |
768 |
++ lastArg = NULL; |
769 |
++ } |
770 |
++ argv = new char*[args.Size() + 1]; |
771 |
++ argv[0] = strdup(*argv0); |
772 |
++ argc = 1; |
773 |
++ for (int i = 0; i < args.Size(); i++) { |
774 |
++ argv[argc] = args.At(i); |
775 |
++ argc++; |
776 |
++ } |
777 |
++ return true; |
778 |
++} |
779 |
+diff -Naur vdr-2.0.7.orig/args.h vdr-2.0.7/args.h |
780 |
+--- vdr-2.0.7.orig/args.h 1970-01-01 01:00:00.000000000 +0100 |
781 |
++++ vdr-2.0.7/args.h 2015-01-23 09:08:15.775654963 +0100 |
782 |
+@@ -0,0 +1,34 @@ |
783 |
++/* |
784 |
++ * args.h: Read arguments from files |
785 |
++ * |
786 |
++ * See the main source file 'vdr.c' for copyright information and |
787 |
++ * how to reach the author. |
788 |
++ * |
789 |
++ * Original version written by Lars Hanisch <dvb@×××××××××××.de>. |
790 |
++ * |
791 |
++ * $Id$ |
792 |
++ */ |
793 |
++ |
794 |
++#ifndef __ARGS_H |
795 |
++#define __ARGS_H |
796 |
++ |
797 |
++#include "tools.h" |
798 |
++ |
799 |
++class cArgs { |
800 |
++private: |
801 |
++ cString argv0; |
802 |
++ cStringList args; |
803 |
++ cString lastArg; |
804 |
++ bool inVdrSection; |
805 |
++ int argc; |
806 |
++ char **argv; |
807 |
++ bool AddArg(const char *s); |
808 |
++public: |
809 |
++ cArgs(const char *Argv0); |
810 |
++ ~cArgs(void); |
811 |
++ bool ReadDirectory(const char *Directory); |
812 |
++ int GetArgc(void) const { return argc; }; |
813 |
++ char **GetArgv(void) const { return argv; }; |
814 |
++ }; |
815 |
++ |
816 |
++#endif //__ARGS_H |
817 |
+diff -Naur vdr-2.0.7.orig/interface.c vdr-2.0.7/interface.c |
818 |
+--- vdr-2.0.7.orig/interface.c 2015-01-23 09:07:52.765656646 +0100 |
819 |
++++ vdr-2.0.7/interface.c 2015-01-23 09:08:15.775654963 +0100 |
820 |
+@@ -10,6 +10,9 @@ |
821 |
+ #include "interface.h" |
822 |
+ #include <ctype.h> |
823 |
+ #include <stdlib.h> |
824 |
++#ifdef SDNOTIFY |
825 |
++#include <systemd/sd-daemon.h> |
826 |
++#endif |
827 |
+ #include <unistd.h> |
828 |
+ #include "i18n.h" |
829 |
+ #include "status.h" |
830 |
+@@ -159,6 +162,9 @@ |
831 |
+ bool known = Keys.KnowsRemote(Remote->Name()); |
832 |
+ dsyslog("remote control %s - %s", Remote->Name(), known ? "keys known" : "learning keys"); |
833 |
+ if (!known) { |
834 |
++#ifdef SDNOTIFY |
835 |
++ sd_notify(0, "READY=1\nSTATUS=Learning keys..."); |
836 |
++#endif |
837 |
+ cSkinDisplayMenu *DisplayMenu = Skins.Current()->DisplayMenu(); |
838 |
+ DisplayMenu->SetMenuCategory(mcUnknown); |
839 |
+ char Headline[256]; |
840 |
+diff -Naur vdr-2.0.7.orig/vdr.1 vdr-2.0.7/vdr.1 |
841 |
+--- vdr-2.0.7.orig/vdr.1 2015-01-23 09:07:52.770656646 +0100 |
842 |
++++ vdr-2.0.7/vdr.1 2015-01-23 09:08:15.776654963 +0100 |
843 |
+@@ -178,6 +178,10 @@ |
844 |
+ Read resource files from \fIdir\fR |
845 |
+ (default is to read them from the config directory). |
846 |
+ .TP |
847 |
++.BI \-\-showargs[= dir ] |
848 |
++Read command line arguments from \fIdir\fR (default is \fI/etc/vdr/conf.d\fR), |
849 |
++display them to the console and exit. |
850 |
++.TP |
851 |
+ .BI \-s\ cmd ,\ \-\-shutdown= cmd |
852 |
+ Call \fIcmd\fR to shutdown the computer. See the file \fIINSTALL\fR for more |
853 |
+ information. |
854 |
+@@ -213,6 +217,10 @@ |
855 |
+ .BI \-w\ sec ,\ \-\-watchdog= sec |
856 |
+ Activate the watchdog timer with a timeout of \fIsec\fR seconds. |
857 |
+ A value of \fB0\fR (default) disables the watchdog. |
858 |
++.P |
859 |
++If started without any options, vdr tries to read command line options |
860 |
++from files named '*.conf' in the directory /etc/vdr/conf.d. Files are |
861 |
++read in alphabetical order. See vdr(5) for details. |
862 |
+ .SH SIGNALS |
863 |
+ .TP |
864 |
+ .B SIGINT, SIGTERM |
865 |
+diff -Naur vdr-2.0.7.orig/vdr.5 vdr-2.0.7/vdr.5 |
866 |
+--- vdr-2.0.7.orig/vdr.5 2015-01-23 09:07:52.772656646 +0100 |
867 |
++++ vdr-2.0.7/vdr.5 2015-01-23 09:08:15.776654963 +0100 |
868 |
+@@ -889,6 +889,33 @@ |
869 |
+ just 16 bit wide. The internal representation in VDR allows for 32 bit to |
870 |
+ be used, so that external tools can generate EPG data that is guaranteed |
871 |
+ not to collide with the ids of existing data. |
872 |
++.SS COMMANDLINE OPTIONS |
873 |
++If started without any options, vdr tries to read any files in the directory |
874 |
++/etc/vdr/conf.d with names that do not begin with a '.' and that end with '.conf'. |
875 |
++These files are read in alphabetical order. The format of these files is |
876 |
++ |
877 |
++# comment |
878 |
++.br |
879 |
++[name] |
880 |
++.br |
881 |
++-a |
882 |
++.br |
883 |
++-b 123 |
884 |
++.br |
885 |
++--long |
886 |
++.br |
887 |
++--longarg=123 |
888 |
++.br |
889 |
++ |
890 |
++Any lines that begin with '#' as the first non-whitespace character are considered |
891 |
++comments and are ignored. |
892 |
++A command line option file consists of one or more sections, indicated by '[name]', |
893 |
++where 'name' is either the fixed word 'vdr' (if this section contains options for |
894 |
++the main VDR program) or the name of the plugin this section applies to. |
895 |
++Each option must be written on a separate line, including the leading '-' (for |
896 |
++a short option) or '--' (for a long option). If the option has additional arguments, |
897 |
++they have to be written on the same line as the option itself, separated from the |
898 |
++option with a blank (short option) or equal sign (long option). |
899 |
+ .SH SEE ALSO |
900 |
+ .BR vdr (1) |
901 |
+ .SH AUTHOR |
902 |
+diff -Naur vdr-2.0.7.orig/vdr.c vdr-2.0.7/vdr.c |
903 |
+--- vdr-2.0.7.orig/vdr.c 2015-01-23 09:07:52.772656646 +0100 |
904 |
++++ vdr-2.0.7/vdr.c 2015-01-23 09:08:15.776654963 +0100 |
905 |
+@@ -34,8 +34,12 @@ |
906 |
+ #include <stdlib.h> |
907 |
+ #include <sys/capability.h> |
908 |
+ #include <sys/prctl.h> |
909 |
++#ifdef SDNOTIFY |
910 |
++#include <systemd/sd-daemon.h> |
911 |
++#endif |
912 |
+ #include <termios.h> |
913 |
+ #include <unistd.h> |
914 |
++#include "args.h" |
915 |
+ #include "audio.h" |
916 |
+ #include "channels.h" |
917 |
+ #include "config.h" |
918 |
+@@ -186,6 +190,7 @@ |
919 |
+ #define DEFAULTWATCHDOG 0 // seconds |
920 |
+ #define DEFAULTVIDEODIR VIDEODIR |
921 |
+ #define DEFAULTCONFDIR dd(CONFDIR, VideoDirectory) |
922 |
++#define DEFAULTARGSDIR dd(ARGSDIR, "/etc/vdr/conf.d") |
923 |
+ #define DEFAULTCACHEDIR dd(CACHEDIR, VideoDirectory) |
924 |
+ #define DEFAULTRESDIR dd(RESDIR, ConfigDirectory) |
925 |
+ #define DEFAULTPLUGINDIR PLUGINDIR |
926 |
+@@ -223,6 +228,15 @@ |
927 |
+ VdrUser = VDR_USER; |
928 |
+ #endif |
929 |
+ |
930 |
++ cArgs *Args = NULL; |
931 |
++ if (argc == 1) { |
932 |
++ Args = new cArgs(argv[0]); |
933 |
++ if (Args->ReadDirectory(DEFAULTARGSDIR)) { |
934 |
++ argc = Args->GetArgc(); |
935 |
++ argv = Args->GetArgv(); |
936 |
++ } |
937 |
++ } |
938 |
++ |
939 |
+ SetVideoDirectory(VideoDirectory); |
940 |
+ cPluginManager PluginManager(DEFAULTPLUGINDIR); |
941 |
+ |
942 |
+@@ -250,6 +264,7 @@ |
943 |
+ { "port", required_argument, NULL, 'p' }, |
944 |
+ { "record", required_argument, NULL, 'r' }, |
945 |
+ { "resdir", required_argument, NULL, 'r' | 0x100 }, |
946 |
++ { "showargs", optional_argument, NULL, 's' | 0x200 }, |
947 |
+ { "shutdown", required_argument, NULL, 's' }, |
948 |
+ { "split", no_argument, NULL, 's' | 0x100 }, |
949 |
+ { "terminal", required_argument, NULL, 't' }, |
950 |
+@@ -422,6 +437,19 @@ |
951 |
+ case 's' | 0x100: |
952 |
+ Setup.SplitEditedFiles = 1; |
953 |
+ break; |
954 |
++ case 's' | 0x200: { |
955 |
++ const char *ArgsDir = optarg ? optarg : DEFAULTARGSDIR; |
956 |
++ cArgs Args(argv[0]); |
957 |
++ if (!Args.ReadDirectory(ArgsDir)) { |
958 |
++ fprintf(stderr, "vdr: can't read arguments from directory: %s\n", ArgsDir); |
959 |
++ return 2; |
960 |
++ } |
961 |
++ int c = Args.GetArgc(); |
962 |
++ char **v = Args.GetArgv(); |
963 |
++ for (int i = 1; i < c; i++) |
964 |
++ printf("%s\n", v[i]); |
965 |
++ return 0; |
966 |
++ } |
967 |
+ case 't': Terminal = optarg; |
968 |
+ if (access(Terminal, R_OK | W_OK) < 0) { |
969 |
+ fprintf(stderr, "vdr: can't access terminal: %s\n", Terminal); |
970 |
+@@ -535,6 +563,8 @@ |
971 |
+ " -s CMD, --shutdown=CMD call CMD to shutdown the computer\n" |
972 |
+ " --split split edited files at the editing marks (only\n" |
973 |
+ " useful in conjunction with --edit)\n" |
974 |
++ " --showargs[=DIR] print the arguments read from DIR and exit\n" |
975 |
++ " (default: %s)\n" |
976 |
+ " -t TTY, --terminal=TTY controlling tty\n" |
977 |
+ " -u USER, --user=USER run as user USER; only applicable if started as\n" |
978 |
+ " root\n" |
979 |
+@@ -557,6 +587,7 @@ |
980 |
+ DEFAULTLOCDIR, |
981 |
+ DEFAULTSVDRPPORT, |
982 |
+ DEFAULTRESDIR, |
983 |
++ DEFAULTARGSDIR, |
984 |
+ DEFAULTVIDEODIR, |
985 |
+ DEFAULTWATCHDOG |
986 |
+ ); |
987 |
+@@ -837,6 +868,10 @@ |
988 |
+ alarm(WatchdogTimeout); // Initial watchdog timer start |
989 |
+ } |
990 |
+ |
991 |
++#ifdef SDNOTIFY |
992 |
++ sd_notify(0, "READY=1\nSTATUS=Ready"); |
993 |
++#endif |
994 |
++ |
995 |
+ // Main program loop: |
996 |
+ |
997 |
+ #define DELETE_MENU ((IsInfoMenu &= (Menu == NULL)), delete Menu, Menu = NULL) |
998 |
|
999 |
diff --git a/media-video/vdr/metadata.xml b/media-video/vdr/metadata.xml |
1000 |
index f9813be524f..62b1c32b1a8 100644 |
1001 |
--- a/media-video/vdr/metadata.xml |
1002 |
+++ b/media-video/vdr/metadata.xml |
1003 |
@@ -8,16 +8,25 @@ |
1004 |
<use> |
1005 |
<flag name="alternatechannel">Use alternate channel on record</flag> |
1006 |
<flag name="bidi">fribidi support, for languages, written from right to left</flag> |
1007 |
+ <flag name="ddepgentry">remove duplicate EPG entries</flag> |
1008 |
+ <flag name="dvlvidprefer">controls video-dir choice on recording</flag> |
1009 |
<flag name="graphtft">support for vdr-graphtft plugin up from version 0.1.7</flag> |
1010 |
<flag name="html">Install HTML documentation</flag> |
1011 |
+ <flag name="jumpplay">Enables automatic jumping over cut marks while watching a recording</flag> |
1012 |
+ <flag name="jumpingseconds">skip seconds in played records</flag> |
1013 |
<flag name="kbd">enable keyboard support as remote device</flag> |
1014 |
<flag name="mainmenuhooks">Allows to replace main menu entries by some special plugins (like epgsearch, extrecmenu, ...)</flag> |
1015 |
<flag name="menuorg">Enables support for the <pkg>media-plugins/vdr-menuorg</pkg></flag> |
1016 |
<flag name="menuselection">adds support for menu hotkeys of double digits</flag> |
1017 |
<flag name="naludump">Removes NALU fill data from h.264-Streams of TS files</flag> |
1018 |
+ <flag name="permashift">permanent timeshift by recording live TV on hard disk, need plugin <pkg>media-plugins/vdr-permashift</pkg></flag> |
1019 |
<flag name="permashift_v1">permanent timeshift by recording live TV on RAM, need plugin >=mediaplugins/vdr-permashift-1</flag> |
1020 |
<flag name="pinplugin">Support for <pkg>media-plugins/vdr-pin</pkg></flag> |
1021 |
<flag name="resumereset">rreset resume of EOF</flag> |
1022 |
+ <flag name="rotor">Enable support for plugin <pkg>media-plugins/vdr-rotor</pkg> for dish-positioner.</flag> |
1023 |
<flag name="ttxtsubs">support for <pkg>media-plugins/vdr-ttxtsubs</pkg></flag> |
1024 |
+ <flag name="vasarajanauloja">replacement for the liemikuutio patch, adds some nice must haves features</flag> |
1025 |
+ <flag name="wareagleicon">Replace original icon set in menu</flag> |
1026 |
+ <flag name="yaepg">Enables support for the vdr-yaepg plugin</flag> |
1027 |
</use> |
1028 |
</pkgmetadata> |
1029 |
|
1030 |
diff --git a/media-video/vdr/vdr-2.0.6-r1.ebuild b/media-video/vdr/vdr-2.0.6-r1.ebuild |
1031 |
new file mode 100644 |
1032 |
index 00000000000..63de150c12f |
1033 |
--- /dev/null |
1034 |
+++ b/media-video/vdr/vdr-2.0.6-r1.ebuild |
1035 |
@@ -0,0 +1,277 @@ |
1036 |
+# Copyright 1999-2015 Gentoo Foundation |
1037 |
+# Distributed under the terms of the GNU General Public License v2 |
1038 |
+ |
1039 |
+EAPI=5 |
1040 |
+ |
1041 |
+inherit eutils flag-o-matic multilib toolchain-funcs |
1042 |
+ |
1043 |
+# Switches supported by extensions-patch |
1044 |
+EXT_PATCH_FLAGS="alternatechannel ddepgentry dvlvidprefer graphtft |
1045 |
+ jumpplay jumpingseconds mainmenuhooks menuorg naludump permashift permashift_v1 |
1046 |
+ pinplugin rotor ttxtsubs vasarajanauloja wareagleicon yaepg" |
1047 |
+ |
1048 |
+# names of the use-flags |
1049 |
+EXT_PATCH_FLAGS_RENAMED="" |
1050 |
+ |
1051 |
+# names ext-patch uses internally, here only used for maintainer checks |
1052 |
+EXT_PATCH_FLAGS_RENAMED_EXT_NAME="" |
1053 |
+ |
1054 |
+IUSE="bidi debug html vanilla ${EXT_PATCH_FLAGS} ${EXT_PATCH_FLAGS_RENAMED}" |
1055 |
+ |
1056 |
+MY_PV="${PV%_p*}" |
1057 |
+MY_P="${PN}-${MY_PV}" |
1058 |
+S="${WORKDIR}/${MY_P}" |
1059 |
+ |
1060 |
+EXT_P="extpng-${P}-gentoo-edition-v6" |
1061 |
+ |
1062 |
+DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB" |
1063 |
+HOMEPAGE="http://www.tvdr.de/" |
1064 |
+SRC_URI="ftp://ftp.tvdr.de/vdr/${MY_P}.tar.bz2 |
1065 |
+ https://dev.gentoo.org/~hd_brummy/distfiles/${EXT_P}.patch.bz2" |
1066 |
+ |
1067 |
+KEYWORDS="amd64 ~arm ~ppc x86" |
1068 |
+SLOT="0" |
1069 |
+LICENSE="GPL-2" |
1070 |
+ |
1071 |
+REQUIRED_USE=" |
1072 |
+ permashift? ( !permashift_v1 ) |
1073 |
+ permashift_v1? ( !permashift )" |
1074 |
+ |
1075 |
+COMMON_DEPEND="virtual/jpeg:* |
1076 |
+ sys-libs/libcap |
1077 |
+ >=media-libs/fontconfig-2.4.2 |
1078 |
+ >=media-libs/freetype-2" |
1079 |
+ |
1080 |
+DEPEND="${COMMON_DEPEND} |
1081 |
+ >=virtual/linuxtv-dvb-headers-5.3 |
1082 |
+ sys-devel/gettext" |
1083 |
+ |
1084 |
+RDEPEND="${COMMON_DEPEND} |
1085 |
+ dev-lang/perl |
1086 |
+ >=media-tv/gentoo-vdr-scripts-2.5_rc1 |
1087 |
+ media-fonts/corefonts |
1088 |
+ bidi? ( dev-libs/fribidi )" |
1089 |
+ |
1090 |
+CONF_DIR=/etc/vdr |
1091 |
+CAP_FILE=${S}/capabilities.sh |
1092 |
+CAPS="# Capabilities of the vdr-executable for use by startscript etc." |
1093 |
+ |
1094 |
+pkg_setup() { |
1095 |
+ use debug && append-flags -g |
1096 |
+ |
1097 |
+ PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins" |
1098 |
+ |
1099 |
+ tc-export CC CXX AR |
1100 |
+} |
1101 |
+ |
1102 |
+add_cap() { |
1103 |
+ local arg |
1104 |
+ for arg; do |
1105 |
+ CAPS="${CAPS}\n${arg}=1" |
1106 |
+ done |
1107 |
+} |
1108 |
+ |
1109 |
+enable_patch() { |
1110 |
+ local arg ARG_UPPER |
1111 |
+ for arg; do |
1112 |
+ ARG_UPPER=$(echo $arg|tr '[:lower:]' '[:upper:]') |
1113 |
+ echo "${ARG_UPPER} = 1" >> Make.config |
1114 |
+ |
1115 |
+ # codesnippet to bring the extpng defines into the vdr.pc CXXFLAGS CFLAGS |
1116 |
+ echo "-DUSE_${ARG_UPPER}" >> "${T}"/defines.tmp |
1117 |
+ cat "${T}"/defines.tmp | tr \\\012 ' ' > "${T}"/defines.IUSE |
1118 |
+ export DEFINES_IUSE=$( cat ${T}/defines.IUSE ) |
1119 |
+ done |
1120 |
+} |
1121 |
+ |
1122 |
+extensions_add_make_conf() |
1123 |
+{ |
1124 |
+ # copy all ifdef for extensions-patch to Make.config |
1125 |
+ sed -e '1,/need to touch the following:/d' \ |
1126 |
+ -e '/need to touch the following/,/^$/d' \ |
1127 |
+ Make.config.template >> Make.config |
1128 |
+} |
1129 |
+ |
1130 |
+extensions_all_defines() { |
1131 |
+ # extract all possible settings for extensions-patch |
1132 |
+ sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?//' -e 's/ .*//' \ |
1133 |
+ Make.config.template \ |
1134 |
+ | sort \ |
1135 |
+ | tr '[:upper:]' '[:lower:]' |
1136 |
+} |
1137 |
+ |
1138 |
+lang_po() { |
1139 |
+ LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' ) |
1140 |
+} |
1141 |
+ |
1142 |
+src_prepare() { |
1143 |
+ # apply maintainace-patches |
1144 |
+ ebegin "Changing paths for gentoo" |
1145 |
+ |
1146 |
+ local DVBDIR=/usr/include |
1147 |
+ local i |
1148 |
+ for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do |
1149 |
+ [[ -d ${i} ]] || continue |
1150 |
+ if [[ -f ${i}/linux/dvb/dmx.h ]]; then |
1151 |
+ einfo "Found DVB header files in ${i}" |
1152 |
+ DVBDIR=${i} |
1153 |
+ break |
1154 |
+ fi |
1155 |
+ done |
1156 |
+ |
1157 |
+ # checking for s2api headers |
1158 |
+ local api_version |
1159 |
+ api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h) |
1160 |
+ api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h) |
1161 |
+ |
1162 |
+ if [[ ${api_version:-0} -lt 5*3 ]]; then |
1163 |
+ eerror "DVB header files do not contain s2api support or too old for ${P}" |
1164 |
+ eerror "You cannot compile VDR against old dvb-header" |
1165 |
+ die "DVB headers too old" |
1166 |
+ fi |
1167 |
+ |
1168 |
+ cat > Make.config <<-EOT |
1169 |
+ # |
1170 |
+ # Generated by ebuild ${PF} |
1171 |
+ # |
1172 |
+ PREFIX = /usr |
1173 |
+ DVBDIR = ${DVBDIR} |
1174 |
+ PLUGINLIBDIR = ${PLUGIN_LIBDIR} |
1175 |
+ CONFDIR = ${CONF_DIR} |
1176 |
+ VIDEODIR = /var/vdr/video |
1177 |
+ LOCDIR = \$(PREFIX)/share/locale |
1178 |
+ INCDIR = \$(PREFIX)/include |
1179 |
+ |
1180 |
+ DEFINES += -DCONFDIR=\"\$(CONFDIR)\" |
1181 |
+ INCLUDES += -I\$(DVBDIR) |
1182 |
+ |
1183 |
+ # >=vdr-1.7.36-r1; parameter only used for compiletime on vdr |
1184 |
+ # PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new) |
1185 |
+ LIBDIR = ${PLUGIN_LIBDIR} |
1186 |
+ PCDIR = /usr/$(get_libdir)/pkgconfig |
1187 |
+ EOT |
1188 |
+ eend 0 |
1189 |
+ |
1190 |
+ # support languages, written from right to left |
1191 |
+ BUILD_PARAMS+=" BIDI=$(usex bidi 1 0)" |
1192 |
+ |
1193 |
+ epatch "${FILESDIR}/${PN}-2.0.6_gentoo.patch" |
1194 |
+ |
1195 |
+ if ! use vanilla; then |
1196 |
+ |
1197 |
+ # Now apply extensions patch |
1198 |
+ epatch "${WORKDIR}/${EXT_P}.patch" |
1199 |
+ |
1200 |
+ # This allows us to start even if some plugin does not exist |
1201 |
+ # or is not loadable. |
1202 |
+ enable_patch PLUGINMISSING |
1203 |
+ enable_patch CHANNELBIND |
1204 |
+ |
1205 |
+ if [[ -n ${VDR_MAINTAINER_MODE} ]]; then |
1206 |
+ einfo "Doing maintainer checks:" |
1207 |
+ |
1208 |
+ # we do not support these patches |
1209 |
+ # (or have them already hard enabled) |
1210 |
+ local IGNORE_PATCHES="pluginmissing channelbind" |
1211 |
+ |
1212 |
+ extensions_all_defines > "${T}"/new.IUSE |
1213 |
+ echo $EXT_PATCH_FLAGS $EXT_PATCH_FLAGS_RENAMED_EXT_NAME \ |
1214 |
+ $IGNORE_PATCHES | \ |
1215 |
+ tr ' ' '\n' |sort > "${T}"/old.IUSE |
1216 |
+ local DIFFS=$(diff -u "${T}"/old.IUSE "${T}"/new.IUSE|grep '^[+-][^+-]') |
1217 |
+ if [[ -z ${DIFFS} ]]; then |
1218 |
+ einfo "EXT_PATCH_FLAGS is up to date." |
1219 |
+ else |
1220 |
+ ewarn "IUSE differences!" |
1221 |
+ local diff |
1222 |
+ for diff in $DIFFS; do |
1223 |
+ ewarn "$diff" |
1224 |
+ done |
1225 |
+ fi |
1226 |
+ fi |
1227 |
+ |
1228 |
+ ebegin "Enabling selected patches" |
1229 |
+ local flag |
1230 |
+ for flag in $EXT_PATCH_FLAGS; do |
1231 |
+ use $flag && enable_patch ${flag} |
1232 |
+ done |
1233 |
+ |
1234 |
+ eend 0 |
1235 |
+ |
1236 |
+ extensions_add_make_conf |
1237 |
+ |
1238 |
+ # add defined use-flags compile options to vdr.pc |
1239 |
+ sed -e "s:\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR):\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR) \$(DEFINES_IUSE):" \ |
1240 |
+ -i Makefile |
1241 |
+ |
1242 |
+ ebegin "Make depend" |
1243 |
+ emake .dependencies >/dev/null |
1244 |
+ eend $? "make depend failed" |
1245 |
+ fi |
1246 |
+ |
1247 |
+ epatch_user |
1248 |
+ |
1249 |
+ add_cap CAP_UTF8 |
1250 |
+ |
1251 |
+ add_cap CAP_IRCTRL_RUNTIME_PARAM \ |
1252 |
+ CAP_VFAT_RUNTIME_PARAM \ |
1253 |
+ CAP_CHUID \ |
1254 |
+ CAP_SHUTDOWN_AUTO_RETRY |
1255 |
+ |
1256 |
+ echo -e ${CAPS} > "${CAP_FILE}" |
1257 |
+ |
1258 |
+ # LINGUAS support |
1259 |
+ einfo "\n \t VDR supports the LINGUAS values" |
1260 |
+ |
1261 |
+ lang_po |
1262 |
+ |
1263 |
+ einfo "\t Please set one of this values in your sytem make.conf" |
1264 |
+ einfo "\t LINGUAS=\"${LING_PO}\"\n" |
1265 |
+ |
1266 |
+ if [[ -z ${LINGUAS} ]]; then |
1267 |
+ einfo "\n \t No values in LINGUAS=" |
1268 |
+ einfo "\t You will get only english text on OSD \n" |
1269 |
+ fi |
1270 |
+ |
1271 |
+ strip-linguas ${LING_PO} en |
1272 |
+} |
1273 |
+ |
1274 |
+src_install() { |
1275 |
+# # trick makefile not to create a videodir by supplying it with an existing |
1276 |
+# # directory |
1277 |
+ emake \ |
1278 |
+ VIDEODIR="/" \ |
1279 |
+ DESTDIR="${D}" install || die "emake install failed" |
1280 |
+ |
1281 |
+ keepdir "${PLUGIN_LIBDIR}" |
1282 |
+ |
1283 |
+ keepdir "${CONF_DIR}"/plugins |
1284 |
+ keepdir "${CONF_DIR}"/themes |
1285 |
+ |
1286 |
+ if use html; then |
1287 |
+ dohtml *.html |
1288 |
+ fi |
1289 |
+ |
1290 |
+ dodoc MANUAL INSTALL README* HISTORY CONTRIBUTORS |
1291 |
+ |
1292 |
+ insinto /usr/share/vdr |
1293 |
+ doins "${CAP_FILE}" |
1294 |
+ |
1295 |
+ if use alternatechannel; then |
1296 |
+ insinto /etc/vdr |
1297 |
+ doins "${FILESDIR}"/channel_alternative.conf |
1298 |
+ fi |
1299 |
+ |
1300 |
+ chown -R vdr:vdr "${D}/${CONF_DIR}" |
1301 |
+} |
1302 |
+ |
1303 |
+pkg_postinst() { |
1304 |
+ elog "It is a good idea to run vdrplugin-rebuild now." |
1305 |
+ |
1306 |
+ elog "To get nice symbols in OSD we recommend to install" |
1307 |
+ elog "\t1. emerge media-fonts/vdrsymbols-ttf" |
1308 |
+ elog "\t2. select font VDRSymbolsSans in Setup" |
1309 |
+ elog "" |
1310 |
+ elog "To get an idea how to proceed now, have a look at our vdr-guide:" |
1311 |
+ elog "\thttps://wiki.gentoo.org/wiki/VDR" |
1312 |
+} |
1313 |
|
1314 |
diff --git a/media-video/vdr/vdr-2.0.7.ebuild b/media-video/vdr/vdr-2.0.7.ebuild |
1315 |
new file mode 100644 |
1316 |
index 00000000000..f5d9d5ed815 |
1317 |
--- /dev/null |
1318 |
+++ b/media-video/vdr/vdr-2.0.7.ebuild |
1319 |
@@ -0,0 +1,288 @@ |
1320 |
+# Copyright 1999-2015 Gentoo Foundation |
1321 |
+# Distributed under the terms of the GNU General Public License v2 |
1322 |
+ |
1323 |
+EAPI=5 |
1324 |
+ |
1325 |
+inherit eutils flag-o-matic multilib toolchain-funcs |
1326 |
+ |
1327 |
+# Switches supported by extensions-patch |
1328 |
+EXT_PATCH_FLAGS="alternatechannel ddepgentry dvlvidprefer graphtft |
1329 |
+ jumpplay jumpingseconds mainmenuhooks menuorg naludump permashift permashift_v1 |
1330 |
+ pinplugin rotor ttxtsubs vasarajanauloja wareagleicon yaepg" |
1331 |
+ |
1332 |
+# names of the use-flags |
1333 |
+EXT_PATCH_FLAGS_RENAMED="" |
1334 |
+ |
1335 |
+# names ext-patch uses internally, here only used for maintainer checks |
1336 |
+EXT_PATCH_FLAGS_RENAMED_EXT_NAME="" |
1337 |
+ |
1338 |
+IUSE="bidi debug html systemd vanilla ${EXT_PATCH_FLAGS} ${EXT_PATCH_FLAGS_RENAMED}" |
1339 |
+ |
1340 |
+MY_PV="${PV%_p*}" |
1341 |
+MY_P="${PN}-${MY_PV}" |
1342 |
+S="${WORKDIR}/${MY_P}" |
1343 |
+ |
1344 |
+EXT_P="extpng-${PN}-2.0.6-gentoo-edition-v6" |
1345 |
+ |
1346 |
+DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB" |
1347 |
+HOMEPAGE="http://www.tvdr.de/" |
1348 |
+SRC_URI="ftp://ftp.tvdr.de/vdr/${MY_P}.tar.bz2 |
1349 |
+ https://dev.gentoo.org/~hd_brummy/distfiles/${EXT_P}.patch.bz2" |
1350 |
+ |
1351 |
+KEYWORDS="~arm ~amd64 ~ppc ~x86" |
1352 |
+SLOT="0" |
1353 |
+LICENSE="GPL-2" |
1354 |
+ |
1355 |
+REQUIRED_USE=" |
1356 |
+ permashift? ( !permashift_v1 ) |
1357 |
+ permashift_v1? ( !permashift )" |
1358 |
+ |
1359 |
+COMMON_DEPEND="virtual/jpeg:* |
1360 |
+ sys-libs/libcap |
1361 |
+ >=media-libs/fontconfig-2.4.2 |
1362 |
+ >=media-libs/freetype-2" |
1363 |
+ |
1364 |
+DEPEND="${COMMON_DEPEND} |
1365 |
+ >=virtual/linuxtv-dvb-headers-5.3 |
1366 |
+ sys-devel/gettext" |
1367 |
+ |
1368 |
+RDEPEND="${COMMON_DEPEND} |
1369 |
+ dev-lang/perl |
1370 |
+ >=media-tv/gentoo-vdr-scripts-2.5 |
1371 |
+ media-fonts/corefonts |
1372 |
+ bidi? ( dev-libs/fribidi ) |
1373 |
+ systemd? ( sys-apps/systemd )" |
1374 |
+ |
1375 |
+CONF_DIR=/etc/vdr |
1376 |
+CAP_FILE=${S}/capabilities.sh |
1377 |
+CAPS="# Capabilities of the vdr-executable for use by startscript etc." |
1378 |
+ |
1379 |
+pkg_setup() { |
1380 |
+ use debug && append-flags -g |
1381 |
+ |
1382 |
+ PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins" |
1383 |
+ |
1384 |
+ tc-export CC CXX AR |
1385 |
+} |
1386 |
+ |
1387 |
+add_cap() { |
1388 |
+ local arg |
1389 |
+ for arg; do |
1390 |
+ CAPS="${CAPS}\n${arg}=1" |
1391 |
+ done |
1392 |
+} |
1393 |
+ |
1394 |
+enable_patch() { |
1395 |
+ local arg ARG_UPPER |
1396 |
+ for arg; do |
1397 |
+ ARG_UPPER=$(echo $arg|tr '[:lower:]' '[:upper:]') |
1398 |
+ echo "${ARG_UPPER} = 1" >> Make.config |
1399 |
+ |
1400 |
+ # codesnippet to bring the extpng defines into the vdr.pc CXXFLAGS CFLAGS |
1401 |
+ echo "-DUSE_${ARG_UPPER}" >> "${T}"/defines.tmp |
1402 |
+ cat "${T}"/defines.tmp | tr \\\012 ' ' > "${T}"/defines.IUSE |
1403 |
+ export DEFINES_IUSE=$( cat ${T}/defines.IUSE ) |
1404 |
+ done |
1405 |
+} |
1406 |
+ |
1407 |
+extensions_add_make_conf() |
1408 |
+{ |
1409 |
+ # copy all ifdef for extensions-patch to Make.config |
1410 |
+ sed -e '1,/need to touch the following:/d' \ |
1411 |
+ -e '/need to touch the following/,/^$/d' \ |
1412 |
+ Make.config.template >> Make.config |
1413 |
+} |
1414 |
+ |
1415 |
+extensions_all_defines() { |
1416 |
+ # extract all possible settings for extensions-patch |
1417 |
+ sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?//' -e 's/ .*//' \ |
1418 |
+ Make.config.template \ |
1419 |
+ | sort \ |
1420 |
+ | tr '[:upper:]' '[:lower:]' |
1421 |
+} |
1422 |
+ |
1423 |
+lang_po() { |
1424 |
+ LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' ) |
1425 |
+} |
1426 |
+ |
1427 |
+src_prepare() { |
1428 |
+ # apply maintainace-patches |
1429 |
+ ebegin "Changing paths for gentoo" |
1430 |
+ |
1431 |
+ local DVBDIR=/usr/include |
1432 |
+ local i |
1433 |
+ for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do |
1434 |
+ [[ -d ${i} ]] || continue |
1435 |
+ if [[ -f ${i}/linux/dvb/dmx.h ]]; then |
1436 |
+ einfo "Found DVB header files in ${i}" |
1437 |
+ DVBDIR=${i} |
1438 |
+ break |
1439 |
+ fi |
1440 |
+ done |
1441 |
+ |
1442 |
+ # checking for s2api headers |
1443 |
+ local api_version |
1444 |
+ api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h) |
1445 |
+ api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h) |
1446 |
+ |
1447 |
+ if [[ ${api_version:-0} -lt 5*3 ]]; then |
1448 |
+ eerror "DVB header files do not contain s2api support or too old for ${P}" |
1449 |
+ eerror "You cannot compile VDR against old dvb-header" |
1450 |
+ die "DVB headers too old" |
1451 |
+ fi |
1452 |
+ |
1453 |
+ cat > Make.config <<-EOT |
1454 |
+ # |
1455 |
+ # Generated by ebuild ${PF} |
1456 |
+ # |
1457 |
+ PREFIX = /usr |
1458 |
+ DVBDIR = ${DVBDIR} |
1459 |
+ PLUGINLIBDIR = ${PLUGIN_LIBDIR} |
1460 |
+ CONFDIR = ${CONF_DIR} |
1461 |
+ VIDEODIR = /var/vdr/video |
1462 |
+ LOCDIR = \$(PREFIX)/share/locale |
1463 |
+ INCDIR = \$(PREFIX)/include |
1464 |
+ |
1465 |
+ DEFINES += -DCONFDIR=\"\$(CONFDIR)\" |
1466 |
+ INCLUDES += -I\$(DVBDIR) |
1467 |
+ |
1468 |
+ # >=vdr-1.7.36-r1; parameter only used for compiletime on vdr |
1469 |
+ # PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new) |
1470 |
+ LIBDIR = ${PLUGIN_LIBDIR} |
1471 |
+ PCDIR = /usr/$(get_libdir)/pkgconfig |
1472 |
+ EOT |
1473 |
+ eend 0 |
1474 |
+ |
1475 |
+ # support languages, written from right to left |
1476 |
+ BUILD_PARAMS+=" BIDI=$(usex bidi 1 0)" |
1477 |
+ |
1478 |
+ # systemd support |
1479 |
+ use systemd && BUILD_PARAMS+=" SDNOTIFY=$(usex systemd 1 0)" |
1480 |
+ |
1481 |
+ if ! use vanilla; then |
1482 |
+ |
1483 |
+ # Now apply extensions patch |
1484 |
+ epatch "${WORKDIR}/${EXT_P}.patch" |
1485 |
+ |
1486 |
+ # This allows us to start even if some plugin does not exist |
1487 |
+ # or is not loadable. |
1488 |
+ enable_patch PLUGINMISSING |
1489 |
+ enable_patch CHANNELBIND |
1490 |
+ |
1491 |
+ if [[ -n ${VDR_MAINTAINER_MODE} ]]; then |
1492 |
+ einfo "Doing maintainer checks:" |
1493 |
+ |
1494 |
+ # we do not support these patches |
1495 |
+ # (or have them already hard enabled) |
1496 |
+ local IGNORE_PATCHES="pluginmissing channelbind" |
1497 |
+ |
1498 |
+ extensions_all_defines > "${T}"/new.IUSE |
1499 |
+ echo $EXT_PATCH_FLAGS $EXT_PATCH_FLAGS_RENAMED_EXT_NAME \ |
1500 |
+ $IGNORE_PATCHES | \ |
1501 |
+ tr ' ' '\n' |sort > "${T}"/old.IUSE |
1502 |
+ local DIFFS=$(diff -u "${T}"/old.IUSE "${T}"/new.IUSE|grep '^[+-][^+-]') |
1503 |
+ if [[ -z ${DIFFS} ]]; then |
1504 |
+ einfo "EXT_PATCH_FLAGS is up to date." |
1505 |
+ else |
1506 |
+ ewarn "IUSE differences!" |
1507 |
+ local diff |
1508 |
+ for diff in $DIFFS; do |
1509 |
+ ewarn "$diff" |
1510 |
+ done |
1511 |
+ fi |
1512 |
+ fi |
1513 |
+ |
1514 |
+ ebegin "Enabling selected patches" |
1515 |
+ local flag |
1516 |
+ for flag in $EXT_PATCH_FLAGS; do |
1517 |
+ use $flag && enable_patch ${flag} |
1518 |
+ done |
1519 |
+ |
1520 |
+ eend 0 |
1521 |
+ |
1522 |
+ extensions_add_make_conf |
1523 |
+ |
1524 |
+ # add defined use-flags compile options to vdr.pc |
1525 |
+ sed -e "s:\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR):\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR) \$(DEFINES_IUSE):" \ |
1526 |
+ -i Makefile |
1527 |
+ |
1528 |
+ ebegin "Make depend" |
1529 |
+ emake .dependencies >/dev/null |
1530 |
+ eend $? "make depend failed" |
1531 |
+ fi |
1532 |
+ |
1533 |
+ epatch "${FILESDIR}/${PN}-2.0.6-r2_gentoo.patch" |
1534 |
+ |
1535 |
+ # backport from vdr-2.1.7 for better systemd support |
1536 |
+ if use vanilla; then |
1537 |
+ epatch "${FILESDIR}/${P}_systemd_argsdir_vanilla.patch" |
1538 |
+ else |
1539 |
+ epatch "${FILESDIR}/${P}_systemd_argsdir.patch" |
1540 |
+ fi |
1541 |
+ |
1542 |
+ epatch_user |
1543 |
+ |
1544 |
+ add_cap CAP_UTF8 |
1545 |
+ |
1546 |
+ add_cap CAP_IRCTRL_RUNTIME_PARAM \ |
1547 |
+ CAP_VFAT_RUNTIME_PARAM \ |
1548 |
+ CAP_CHUID \ |
1549 |
+ CAP_SHUTDOWN_AUTO_RETRY |
1550 |
+ |
1551 |
+ echo -e ${CAPS} > "${CAP_FILE}" |
1552 |
+ |
1553 |
+ # LINGUAS support |
1554 |
+ einfo "\n \t VDR supports the LINGUAS values" |
1555 |
+ |
1556 |
+ lang_po |
1557 |
+ |
1558 |
+ einfo "\t Please set one of this values in your sytem make.conf" |
1559 |
+ einfo "\t LINGUAS=\"${LING_PO}\"\n" |
1560 |
+ |
1561 |
+ if [[ -z ${LINGUAS} ]]; then |
1562 |
+ einfo "\n \t No values in LINGUAS=" |
1563 |
+ einfo "\t You will get only english text on OSD \n" |
1564 |
+ fi |
1565 |
+ |
1566 |
+ strip-linguas ${LING_PO} en |
1567 |
+} |
1568 |
+ |
1569 |
+src_install() { |
1570 |
+# # trick makefile not to create a videodir by supplying it with an existing |
1571 |
+# # directory |
1572 |
+ emake \ |
1573 |
+ VIDEODIR="/" \ |
1574 |
+ DESTDIR="${D}" install || die "emake install failed" |
1575 |
+ |
1576 |
+ keepdir "${PLUGIN_LIBDIR}" |
1577 |
+ |
1578 |
+ # backup for plugins they don't be able to create this dir |
1579 |
+ keepdir "${CONF_DIR}"/plugins |
1580 |
+ |
1581 |
+ if use html; then |
1582 |
+ dohtml *.html |
1583 |
+ fi |
1584 |
+ |
1585 |
+ dodoc MANUAL INSTALL README* HISTORY CONTRIBUTORS |
1586 |
+ |
1587 |
+ insinto /usr/share/vdr |
1588 |
+ doins "${CAP_FILE}" |
1589 |
+ |
1590 |
+ if use alternatechannel; then |
1591 |
+ insinto /etc/vdr |
1592 |
+ doins "${FILESDIR}"/channel_alternative.conf |
1593 |
+ fi |
1594 |
+ |
1595 |
+ chown -R vdr:vdr "${D}/${CONF_DIR}" |
1596 |
+} |
1597 |
+ |
1598 |
+pkg_postinst() { |
1599 |
+ elog "It is a good idea to run vdrplugin-rebuild now." |
1600 |
+ |
1601 |
+ elog "To get nice symbols in OSD we recommend to install" |
1602 |
+ elog "\t1. emerge media-fonts/vdrsymbols-ttf" |
1603 |
+ elog "\t2. select font VDRSymbolsSans in Setup" |
1604 |
+ elog "" |
1605 |
+ elog "To get an idea how to proceed now, have a look at our vdr-guide:" |
1606 |
+ elog "\thttps://wiki.gentoo.org/wiki/VDR" |
1607 |
+} |