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