File: it_dvb_linux_warning

package info (click to toggle)
xmltv 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,352 kB
  • sloc: perl: 36,795; xml: 5,017; sh: 153; makefile: 18
file content (42 lines) | stat: -rw-r--r-- 1,351 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Description: Adds a warning to tv_grab_it_dvb for users without Linux::DVB installed, directing them to the Debian package (if available).
Forwarded: not-needed
Author: Chris Butler <chrisb@debian.org>
Last-Update: 2010-05-23

--- a/grab/it_dvb/tv_grab_it_dvb.in
+++ b/grab/it_dvb/tv_grab_it_dvb.in
@@ -76,7 +76,12 @@
 
 =head1 CAVEATS
 
-This grabber relies on the linux dvb api, and therefore does not run under windows.
+This grabber relies on the linux dvb api, and therefore does not run under
+other operating systems.
+
+For Debian users: this means the package does not depend on the Linux::DVB perl
+package, as this would make it uninstallable on the Debian kFreeBSD and HURD
+ports. Please install the liblinux-dvb-perl package to use this grabber. 
 
 =head1 EXAMPLES
 
@@ -106,7 +111,6 @@
 
 
 use File::Slurp;
-use Linux::DVB;
 use Time::HiRes;
 use IO::Select;
 
@@ -153,6 +157,12 @@
     *d = \&Log::TraceMessages::d;
     Log::TraceMessages::check_argv();
     }
+
+    eval { require Linux::DVB; Linux::DVB->import(); };
+    if ($@) {
+	die ($^O eq 'linux') ? "tv_grab_it_dvb requires the Linux::DVB module, which is not installed by\ndefault. Please install the liblinux-dvb-perl package to use this grabber."
+			     : "tv_grab_it_dvb requires the Linux::DVB module, which is not available for $^O.";
+    }
 }
 
 my $DEBUG = 0;