Hi, 

On Wed, 29 May 2019 19:30:52 -0700
Andrew Hewus Fresh wrote:

> On Tue, May 21, 2019 at 08:12:30AM +0200, Charlene Wendling wrote:
> > 
[...]
> 
> This one needs:
> RUN_DEPENDS+=   www/p5-LWP-Protocol-https

Yes, it makes sense indeed.

> and a comment that tests need the network to run, similar to
> p5-WWW-Tumbler. 
> 
> It still doesn't quite seem to work right when I use:
> AutoSearch --engine Ebay -n BSD -s bsd bsd
> 
> it does work though, check out:
> https://www.ebay.com/itm/COMDEX-1999-special-1-4M-preview-release-of-the-NetBSD-operating-system-CD-ROM/333212907390?hash=item4d9509777e:g:GQcAAOSwX1xc2Wjm
> 
> But lots of warnings for:
> Use of uninitialized value in numeric lt (<)
> at /usr/local/libdata/perl5/site_pe rl/WWW/Search/Ebay.pm line 672.
> 
> This patch seems to fix it, but I don't know if it's the right fix or
> if there's some other extenuating reason that the end_date is
> sometimes undefined.  I do see a few wide characters in the output so
> I wonder if it's just not very unicode safe and stuff is going wrong
> due to that.
> 
> 
[...]

I'm sending an updated diff that deals with these issues. There seems
to be a problem in the HTML parsing code. I thought i found out why, but
it appears that's not it. Debug logs seem interesting for upstream though,
so i'll report there - meanwhile your fix and that update are better than
what we have currently :)

Charlène.


> -- 
> andrew - http://afresh1.com
> 
> Hey, I think I see a barn up ahead.
>                       -- The American Astronaut
> 

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/p5-WWW-Search-Ebay/Makefile,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 Makefile
--- Makefile    6 Aug 2017 20:12:57 -0000       1.14
+++ Makefile    1 Jun 2019 18:06:48 -0000
@@ -2,22 +2,28 @@
 
 COMMENT=               backend for searching www.ebay.com
 
-DISTNAME =             WWW-Search-Ebay-3.042
-REVISION =             1
+DISTNAME=              WWW-Search-Ebay-3.052
 CATEGORIES=            www
 
-# perl
+# Perl
 PERMIT_PACKAGE_CDROM=  Yes
 
 MODULES=               cpan
 PKG_ARCH=              *
 
-BUILD_DEPENDS =                devel/p5-Module-Install-AuthorTests
-RUN_DEPENDS=           www/p5-WWW-Search
+BUILD_DEPENDS=         devel/p5-Module-Install-AuthorTests
+
+RUN_DEPENDS=           converters/p5-DateManip \
+                       www/p5-HTML-Tree \
+                       www/p5-LWP-Protocol-https \
+                       www/p5-WWW-Search>=2.517 \
+                       www/p5-libwww
+
+# Tests need network access
 TEST_DEPENDS=          devel/p5-IO-Capture
 
 MAKE_ENV+=             TEST_POD="Yes"
 
-CONFIGURE_STYLE =      modinst
+CONFIGURE_STYLE=       modinst
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/p5-WWW-Search-Ebay/distinfo,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 distinfo
--- distinfo    19 Sep 2015 10:05:48 -0000      1.6
+++ distinfo    1 Jun 2019 18:06:48 -0000
@@ -1,2 +1,2 @@
-SHA256 (WWW-Search-Ebay-3.042.tar.gz) = 
IJnzUNMmnbHXrgb8Tbxbjb5QJ0wlu7dzCnFSYVPER5U=
-SIZE (WWW-Search-Ebay-3.042.tar.gz) = 54585
+SHA256 (WWW-Search-Ebay-3.052.tar.gz) = 
osgshTeJPvhLfwLOQoGN+TW4F7cL0EBrgoE6iA6R0Gg=
+SIZE (WWW-Search-Ebay-3.052.tar.gz) = 54632
Index: patches/patch-lib_WWW_Search_Ebay_pm
===================================================================
RCS file: patches/patch-lib_WWW_Search_Ebay_pm
diff -N patches/patch-lib_WWW_Search_Ebay_pm
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-lib_WWW_Search_Ebay_pm        1 Jun 2019 18:06:48 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+
+Fix for:
+Use of uninitialized value in numeric lt (<) at
+/usr/local/libdata/perl5/site_perl/WWW/Search/Ebay.pm line 672.
+
+Index: lib/WWW/Search/Ebay.pm
+--- lib/WWW/Search/Ebay.pm.orig
++++ lib/WWW/Search/Ebay.pm
+@@ -669,7 +669,7 @@ sub result_as_HTML
+   my $dateNow = ParseDate('now');
+   print STDERR " DDD compare end_date ==$dateEnd==\n" if (DEBUG_DATES || (1 < 
$self->{_debug}));
+   print STDERR " DDD compare date_now ==$dateNow==\n" if (DEBUG_DATES || (1 < 
$self->{_debug}));
+-  if (Date_Cmp($dateEnd, $dateNow) < 0)
++  if ((Date_Cmp($dateEnd, $dateNow) || 0) < 0)
+     {
+     $sEndedColor = 'red';
+     $sEndedWord = 'ended';
+@@ -1040,7 +1040,7 @@ sub _parse_tree
+         &&
+         (0 < $iBids) # Item got any bids
+         &&
+-        (Date_Cmp($enddate, 'now') < 0) # Item is ended
++        ((Date_Cmp($enddate, 'now') || 0) < 0) # Item is ended
+        )
+       {
+       # Item must have been sold!?!

Reply via email to