diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-22 09:25:21 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-22 09:25:42 +0000 |
commit | ce5b4dbe25d09b5df53913ea9d1be007d5e27151 (patch) | |
tree | bd05844536f672a54e541c4c915c10487f71e227 /community/xmltv | |
parent | 3ba75a44029f0be6bec64c664ebc922143976d43 (diff) | |
download | aports-ce5b4dbe25d09b5df53913ea9d1be007d5e27151.tar.bz2 aports-ce5b4dbe25d09b5df53913ea9d1be007d5e27151.tar.xz |
main/xmltv: fix building with newer perl
Diffstat (limited to 'community/xmltv')
-rw-r--r-- | community/xmltv/APKBUILD | 34 | ||||
-rw-r--r-- | community/xmltv/fix-build.patch | 122 |
2 files changed, 138 insertions, 18 deletions
diff --git a/community/xmltv/APKBUILD b/community/xmltv/APKBUILD index f17e98a07b..f83d1b569c 100644 --- a/community/xmltv/APKBUILD +++ b/community/xmltv/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=xmltv pkgver=0.5.69 -pkgrel=0 +pkgrel=1 pkgdesc="Set of utilities to download tv listings and format them in xml" url="http://xmltv.org/wiki" arch="noarch" @@ -15,29 +15,27 @@ depends_dev="" makedepends="$depends_dev perl-dev" install="" subpackages="$pkgname-doc" -source="http://downloads.sourceforge.net/xmltv/xmltv-$pkgver.tar.bz2" +source="http://downloads.sourceforge.net/xmltv/xmltv-$pkgver.tar.bz2 + fix-build.patch" -_builddir="$srcdir"/xmltv-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/xmltv-$pkgver build() { - cd "$_builddir" - PERL_MM_USE_DEFAULT=1 yes | perl Makefile.PL INSTALLDIRS=vendor || return 1 - make || return 1 + cd "$builddir" + PERL_MM_USE_DEFAULT=1 yes | perl Makefile.PL INSTALLDIRS=vendor + make } +#check() { +# cd "$builddir" +# make check +#} + package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 + cd "$builddir" + make DESTDIR="$pkgdir" install find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete } -sha512sums="b76991bdcf2803f67c0c24b52d44b62ebfc37f177dbfb31a781fefe420ee5a575b522ed6a6669fa9f0462ac866abd382a1b3fe2cf91d3bfab1758f95facd333c xmltv-0.5.69.tar.bz2" +sha512sums="b76991bdcf2803f67c0c24b52d44b62ebfc37f177dbfb31a781fefe420ee5a575b522ed6a6669fa9f0462ac866abd382a1b3fe2cf91d3bfab1758f95facd333c xmltv-0.5.69.tar.bz2 +66e0307a0ad4d1eeccef4a189eb59e4096070cc5165ce8a62206ebe9f43c76a62ac8640c8da3fbf078ddf780dc0ed6fbeeecb43f6550e61bf0a076ff80d8c79e fix-build.patch" diff --git a/community/xmltv/fix-build.patch b/community/xmltv/fix-build.patch new file mode 100644 index 0000000000..1008e8b9fb --- /dev/null +++ b/community/xmltv/fix-build.patch @@ -0,0 +1,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; + |