Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2005 19:29:06 -0400
From:      Yarema <yds@CoolRat.org>
To:        pav@FreeBSD.org
Cc:        ports@FreeBSD.org
Subject:   ports/misc/gkrellweather2/files/patch-GrabWeather
Message-ID:  <7C21C1CF9AA41F47E0AF1425@tramp.coolrat.org>

next in thread | raw e-mail | index | archive | help
--==========AF437C133B62877472B0==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

I had noticed that my gkrellweather2 had stopped grabbing weather updates.. 
Looking at the source code I noticed that the GrabWeather perl script was 
using wget(1), but the port had no RUN_DEPENDS for wget(1).  Attached is my 
proposed patch to solve this in a FreeBSD specific way.  I just adapted all 
the wget(1) options to fetch(1) so now the script works without having to 
depend on either wget(1) or p5-LWP.

-- 
Yarema
http://yds.CoolRat.org
--==========AF437C133B62877472B0==========
Content-Type: text/plain; charset=us-ascii; name=patch-GrabWeather
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=patch-GrabWeather; size=622

--- GrabWeather.orig	Sun Feb 27 08:54:47 2005
+++ GrabWeather	Sun Feb 27 08:54:47 2005
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 # Grabs the latest local weather conditions from the 
@@ -40,8 +40,7 @@
 # Is LWP installed?
 eval { require LWP::UserAgent };
 if ($@) {
-  my $cmd = qq{wget --proxy=off --passive-ftp --tries=0 --quiet } .
-            qq{--output-document=$home/$ReportDir/$HTMLFileName $URL};
+  my $cmd = qq{fetch -d -p -1 -q -o $home/$ReportDir/$HTMLFileName $URL};
   `$cmd` == 0 or die "unable to fetch weather: $?";
 } else {
   $ENV{FTP_PASSIVE} = 1; # LWP uses Net::FTP internally.

--==========AF437C133B62877472B0==========--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7C21C1CF9AA41F47E0AF1425>