aboutsummaryrefslogtreecommitdiffstats
path: root/community/xmltv/fix-build.patch
blob: 1008e8b9fbe852df9bc20a206900ff8df24e6839 (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
From a4a0c83a99401ba748ae8e70855ace636f611311 Mon Sep 17 00:00:00 2001
From: Nick Morrott <knowledgejunkie@gmail.com>
Date: Mon, 6 Mar 2017 12:55:16 +0000
Subject: [PATCH] Allow building on Perl versions 5.24.1+

Perl versions 5.24.1+ no longer include '.' in @INC. However, we need
access to XMLTV::Ask::Term at configuration time, so provide relative path
to this library.
---
 Makefile.PL | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.PL b/Makefile.PL
index f43f69a5..86d59e2a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -251,7 +251,7 @@ elsif ($opt_default) {
     *ask = sub { print "$_[0] $_[2]\n"; $_[2] };
 }
 else {
-    require 'lib/Ask/Term.pm';
+    require './lib/Ask/Term.pm';
     *ask = \&XMLTV::Ask::Term::ask_boolean;
 }
 
From 8930f8f281427e261667265969d88b778bb2f2c9 Mon Sep 17 00:00:00 2001
From: Nick Morrott <knowledgejunkie@gmail.com>
Date: Sat, 15 Jul 2017 21:25:33 +0000
Subject: [PATCH] Fix build failures in Perl 5.26+ caused by 'use POSIX
 'tmpnam'

POSIX 'tmpnam' was deprecated in Perl 5.24 and removed in Perl 5.26, and is
actually unused in the code.
---
 filter/tv_to_latex | 1 -
 filter/tv_to_text  | 1 -
 2 files changed, 2 deletions(-)

diff --git a/filter/tv_to_latex b/filter/tv_to_latex
index 32db73a8..0cf02fed 100755
--- a/filter/tv_to_latex
+++ b/filter/tv_to_latex
@@ -37,7 +37,6 @@ spurious blank lines in the output.
 use strict;
 use XMLTV::Version '$Id$ ';
 use IO::File;
-use POSIX 'tmpnam';
 use Getopt::Long;
 
 # Use Log::TraceMessages if installed.
diff --git a/filter/tv_to_text b/filter/tv_to_text
index 648cacfb..762067b6 100755
--- a/filter/tv_to_text
+++ b/filter/tv_to_text
@@ -34,7 +34,6 @@ use warnings;
 use XMLTV::Version '$Id$ ';
 use IO::File;
 use Date::Manip;
-use POSIX 'tmpnam';
 use Getopt::Long;
 
 BEGIN {
 From d2f2537b41e740c20b93db169697c3e3e3c42286 Mon Sep 17 00:00:00 2001
From: Nick Morrott <knowledgejunkie@gmail.com>
Date: Fri, 24 Feb 2017 22:35:58 +0000
Subject: [PATCH] Allow building on Perl versions 5.24.1+

Perl versions 5.24.1+ no longer include '.' in @INC. However, we need
access to some libraries included in the XMLTV source at build time so
"use lib '.'" for these specific instances.
---
 filter/tv_grep.PL     | 3 +++
 grab/it/tv_grab_it.PL | 4 ++++
 lib/XMLTV.pm.PL       | 4 ++++
 3 files changed, 11 insertions(+)

diff --git a/filter/tv_grep.PL b/filter/tv_grep.PL
index a0c0c28d..48fa17f2 100644
--- a/filter/tv_grep.PL
+++ b/filter/tv_grep.PL
@@ -12,6 +12,9 @@
 
 use IO::File;
 use XMLTV;
+
+# Perl 5.24.1+ does not include '.' in @INC but we need some libs during build
+use lib '.';
 require 'filter/Grep.pm';
 
 my $out = shift @ARGV; die "no output file given" if not defined $out;
diff --git a/grab/it/tv_grab_it.PL b/grab/it/tv_grab_it.PL
index 5ebbd886..546c1693 100644
--- a/grab/it/tv_grab_it.PL
+++ b/grab/it/tv_grab_it.PL
@@ -354,7 +354,11 @@ close IN_FH or die "cannot close $in: $!";
 
 # stuff for setting share dir
 die "usage: $_ output_file share_dir" if @ARGV != 2;
+
+# Perl 5.24.1+ does not include '.' in @INC but we need some libs during build
+use lib '.';
 require 'lib/set_share_dir.pl';
+
 #warn "faccio $ARGV[0] $ARGV[1]\n";
 #set_share_dir('grab/it/tv_grab_it.in2', $ARGV[0], $ARGV[1]);
 copy( 'grab/it/tv_grab_it.in2', $ARGV[0] );
diff --git a/lib/XMLTV.pm.PL b/lib/XMLTV.pm.PL
index f64c2146..c525bc26 100644
--- a/lib/XMLTV.pm.PL
+++ b/lib/XMLTV.pm.PL
@@ -9,7 +9,11 @@ sub print_list( $$ );
 
 my $out = shift @ARGV; die "no output file given" if not defined $out;
 my $in = 'lib/XMLTV.pm.in';
+
+# Perl 5.24.1+ does not include '.' in @INC but we need some libs during build
+use lib '.';
 require $in;
+
 open(IN_FH, $in) or die "cannot read $in: $!";
 die if not @XMLTV::Channel_Handlers; die if not @XMLTV::Programme_Handlers;