Date: Sat, 7 May 2011 01:54:31 +0200 From: Torfinn Ingolfsen <tingox@gmail.com> To: FreeBSD Ports ML <freebsd-ports@freebsd.org>, multimedia@freebsd.org Subject: p5-xmltv - patches to re-enable and update tv_grab_no Message-ID: <BANLkTikQcRMEgH5R6JuXLjWew%2BYfrYg=ww@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hi, p5-xmltv currently only contains one "grabber" for Norway (tv_grab_no_gfeed). The grabber is great, but unfortunately it only has listings for a limited number of the TV channels available here. So, I use the tv_grab_no grabber in addition. It is old, the author has deprecated it, and you must write the config file manually[1] because the "get channels" doesn't work anymore. But - tv_grab_no works, and it has more channels than tv_grab_no_gfeed. Attached is two patches which does the following: - re-enables the tv_grab_no grabber - corrects the URL the grabber uses - adds a some more channels to the grabber Simply put the two files in the ./files directory (yes, patch-Makefile.PL replaces the one currently there) and your port is updated. I haven't fixed pkg-plist, but that should be simple enough. Any interest in updating the port with this? References: 1) the web site changed, the new URL is http://www.dagbladet.no/mobil/tv/ and I can't figure out how to get a listing of available channels from it. -- Regards, Torfinn Ingolfsen [-- Attachment #2 --] $FreeBSD$ --- Makefile.PL.orig +++ Makefile.PL @@ -86,8 +86,8 @@ # Manual page constants, shouldn't really be needed, but work # around bugs and make sure this stuff is the same across # MakeMaker versions. - INSTALLMAN1DIR => "$location/share/man/man1", - INSTALLMAN3DIR => "$location/share/man/man3", + INSTALLMAN1DIR => "$location/man/man1", + INSTALLMAN3DIR => "$location/man/man3", MAN3EXT => '3', # Directory to install into when making Windows binary dist. @@ -624,12 +624,12 @@ # # depreciate tv_grab_no as it is no longer supported (per author, cwattengard@gmail.com) # has been replaced by tv_grab_no_gfeed -# -# { name => 'tv_grab_no', -# blurb => 'Grabber for Norway', -# exes => [ 'grab/no/tv_grab_no' ], -# prereqs => { 'HTML::Entities' => 1.27 }, -# }, + + { name => 'tv_grab_no', + blurb => 'Grabber for Norway', + exes => [ 'grab/no/tv_grab_no' ], + prereqs => { 'HTML::Entities' => 1.27 }, + }, { name => 'tv_grab_pt', blurb => 'Grabber for Portugal', @@ -804,14 +804,14 @@ # Guess a default value for {install} based on whether # prerequisites were found. # - $info->{install} = (not $info->{exclude}) && ($opt_yes || not $info->{missing}); + $info->{install} = 1;(not $info->{exclude}) && ($opt_yes || not $info->{missing}); print STDERR ($s, ' ' x (1 + $width - length $s), $info->{install} ? '[yes]' : '[no]', "\n"); } print STDERR "\n"; - if (not ask(0, 'Do you want to proceed with this configuration?', 1)) { + if (1 or not ask(0, 'Do you want to proceed with this configuration?', 1)) { # Need to set {install} for each component by prompting. foreach my $info (@opt_components) { my $missing = $info->{missing}; @@ -840,8 +840,8 @@ die; } - $info->{install} = - ask(0, $msg, not $missing); + $info->{install} = 1; + # ask(0, $msg, not $missing); } } } @@ -1045,8 +1045,8 @@ } # Remove existing non-working 'uninstall' target. - $inherited =~ s!^uninstall\s:.*$!!m - or die "no uninstall target in: $inherited"; + $inherited =~ s!^uninstall\s::?.*?\n\t+.*$!!m; + $inherited =~ s!^uninstall\s:.*$!!m; # For each *_install create a corresponding _uninstall. my $targets = ::targets($inherited); @@ -1099,7 +1099,7 @@ # Generate plain text documentation from pod. perl -e "chdir 'blib/script' or die; foreach (<*>) { system qq'pod2text <\$$_ >$location/doc/man/\$$_.txt' }" # Remove 'real' manual pages, not needed on Windows. - perl -MExtUtils::Command -e rm_rf $location/man $location/share/man + perl -MExtUtils::Command -e rm_rf $location/man $location/man # My MakeMaker creates this dud directory. perl -MExtUtils::Command -e rm_rf $location/5.8.0 rmdir $location/share/doc [-- Attachment #3 --] $FreeBSD$ --- grab/no/tv_grab_no.orig +++ grab/no/tv_grab_no @@ -72,7 +72,7 @@ # initializations use strict; -use XMLTV::Version '$Id: tv_grab_no,v 1.23 2010/09/02 05:07:40 rmeden Exp $ '; +use XMLTV::Version '$Id: tv_grab_no,v 1.24 2011/05/07 01:17:27 tingox@gmail.com Exp $ '; use XMLTV::Capabilities qw/baseline manualconfig cache/; use XMLTV::Description 'Norway'; use Getopt::Long; @@ -137,7 +137,7 @@ 63 => 'ztv.no', 37 => 'tv4.se', 68 => '3plus.dk', - 12 => 'dr1.dr.dk', + 101 => 'dr1.dr.dk', 58 => 'dr2.dr.dk', 6 => 'svt1.svt.se', 7 => 'svt2.svt.se', @@ -211,7 +211,33 @@ 90 => 'tv6.viasat.no', 91 => 'hd.canalplus.no', 92 => 'film3.canalplus.no', - 93 => 'film.tv2.no' + 93 => 'film.tv2.no', + 94 => 'nyhet.tv2.no', + 95 => 'sport.tv2.no', + 96 => 'silver.nonstop.tv', + 97 => 'history.viasat.no', + 98 => 'nrk3.nrk.no', + 99 => 'femtv.no', + 100 => '4.viasat.no', + 102 => 'naturecrime.viasat.no', + 103 => 'drama.canalplus.no', + 104 => 'first.canalplus.no', + 105 => 'comedy.canalplus.no', + 106 => 'sport1.canalplus.no', + 107 => 'zebra.tv2.no', + 108 => 'filmhd.canalplus.no', + 109 => 'action.canalplus.no', + 110 => 'hits.canalplus.no', + 111 => 'sporthd.canalplus.no', + 112 => 'nrksuper.nrk.no', + 113 => 'golf.viasat.no', + 114 => 'aljazeera.int', + 115 => 'entertainment.bbc.co.uk', + 116 => 'sporthd.viasat.no', + 117 => 'lifestyle.bbc.co.uk', + 118 => 'knowledge.bbc.co.uk', + 119 => 'bbchd.bbc.co.uk', + 120 => 'hd.eurosport.no' ); sub process_summary_page( $$$ ); @@ -312,8 +338,8 @@ my $writer = new XMLTV::Writer(%w_args); # TODO: standardize these things between grabbers. $writer->start - ({ 'source-info-url' => 'http://fredag.dagbladet.no/tv/', - 'source-data-url' => 'http://fredag.dagbladet.no/tv/', + ({ 'source-info-url' => 'http://www.dagbladet.no/mobil/tv/', + 'source-data-url' => 'http://www.dagbladet.no/mobil/tv/', 'generator-info-name' => 'XMLTV', 'generator-info-url' => 'http://xmltv.org/', });
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikQcRMEgH5R6JuXLjWew%2BYfrYg=ww>
