On 09/28/15 20:57, Vincent Gross wrote:
> Hi fellow porters,
> 
> I'm polishing a diff for archivers/p5-Archive-Zip, and I need some clues
> to fix a perl module path problem during make regress: 
> 
> 
> ===> p5-Archive-Zip-1.53 depends on: zip-* -> zip-3.0p0
> ===> p5-Archive-Zip-1.53 depends on: p5-Test-Pod-* -> p5-Test-Pod-1.51
> ===>  Regression tests for p5-Archive-Zip-1.53
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" 
> "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 
> 'blib/arch')" t/*.t
> t/01_compile.t ................ ok
> t/02_main.t ................... ok
> t/03_ex.t ..................... ok
> t/04_readmember.t ............. ok
> t/05_tree.t ................... ok
> t/06_update.t ................. ok
> t/07_filenames_of_0.t ......... ok
> t/08_readmember_record_sep.t .. ok
> t/09_output_record_sep.t ...... ok
> Can't locate t/common.pm in @INC (you may need to install the t::common 
> module) (@INC contains: 
> /home/dermiste/OpenBSD-src/ports/pobj/p5-Archive-Zip-1.53/Archive-Zip-1.53/blib/lib
>  
> /home/dermiste/OpenBSD-src/ports/pobj/p5-Archive-Zip-1.53/Archive-Zip-1.53/blib/arch
>  /usr/local/libdata/perl5/site_perl/amd64-openbsd 
> /usr/libdata/perl5/site_perl/amd64-openbsd /usr/local/libdata/perl5/site_perl 
> /usr/libdata/perl5/site_perl /usr/libdata/perl5/amd64-openbsd/5.20.2 
> /usr/local/libdata/perl5/amd64-openbsd/5.20.2 /usr/libdata/perl5 
> /usr/local/libdata/perl5) at t/10_chmod.t line 14.
> BEGIN failed--compilation aborted at t/10_chmod.t line 14.
> t/10_chmod.t .................. 
> Dubious, test returned 2 (wstat 512, 0x200)
> No subtests run 
> t/11_explorer.t ............... ok
> t/12_bug_47223.t .............. skipped: Only required on Win32.
> t/13_bug_46303.t .............. ok
> t/14_leading_separator.t ...... ok
> t/15_decrypt.t ................ ok
> t/16_decrypt.t ................ ok
> t/17_101092.t ................. ok
> t/18_bug_92205.t .............. ok
> t/19_bug_101240.t ............. ok
> t/20_bug_github11.t ........... ok
> t/21_zip64.t .................. ok
> t/22_deflated_dir.t ........... ok
> 
> Test Summary Report
> -------------------
> t/10_chmod.t                (Wstat: 512 Tests: 0 Failed: 0)
>   Non-zero exit status: 2
>   Parse errors: No plan found in TAP output
> Files=22, Tests=290, 18 wallclock secs ( 0.38 usr  0.47 sys + 11.15 cusr  
> 4.81 csys = 16.81 CPU)
> Result: FAIL
> Failed 1/22 test programs. 0/290 subtests failed.
> *** Error 255 in 
> /home/dermiste/OpenBSD-src/ports/pobj/p5-Archive-Zip-1.53/Archive-Zip-1.53 
> (Makefile:945 'test_dynamic')
> 
> 
> When listing WRKSRC contents, I can see the file t/common.pm.
> 
> So, what is the proper way to add WRKSRC to @INC during tests ?
> 
> Cheers,
> 
> --
> Vincent Gross
> 
> 

Was working on this myself...
So what you want is result below, have attached what I did to get this far.

$ make test
===> p5-Archive-Zip-1.53 depends on: zip-* -> zip-3.0p0
===> p5-Archive-Zip-1.53 depends on: p5-Test-Pod-* -> p5-Test-Pod-1.51
===>  Regression tests for p5-Archive-Zip-1.53
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM"
"-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0,
'blib/lib', 'blib/arch')" -It t/*.t
t/01_compile.t ................ ok
t/02_main.t ................... ok
t/03_ex.t ..................... ok
t/04_readmember.t ............. ok
t/05_tree.t ................... ok
t/06_update.t ................. ok
t/07_filenames_of_0.t ......... ok
t/08_readmember_record_sep.t .. ok
t/09_output_record_sep.t ...... ok
t/10_chmod.t .................. ok
t/11_explorer.t ............... ok
t/12_bug_47223.t .............. skipped: Only required on Win32.
t/13_bug_46303.t .............. ok
t/14_leading_separator.t ...... ok
t/15_decrypt.t ................ ok
t/16_decrypt.t ................ ok
t/17_101092.t ................. ok
t/18_bug_92205.t .............. ok
t/19_bug_101240.t ............. ok
t/20_bug_github11.t ........... ok
t/21_zip64.t .................. ok
t/22_deflated_dir.t ........... ok
All tests successful.
Files=22, Tests=291,  9 wallclock secs ( 0.13 usr  0.37 sys +  2.92 cusr
 3.44 csys =  6.86 CPU)
Result: PASS







Index: Makefile
===================================================================
RCS file: /home/cvs/ports/archivers/p5-Archive-Zip/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile	10 Mar 2013 22:28:04 -0000	1.26
+++ Makefile	28 Sep 2015 20:20:15 -0000
@@ -4,8 +4,7 @@ COMMENT=	perl interface to ZIP files
 
 MODULES=	cpan
 
-DISTNAME=	Archive-Zip-1.30
-REVISION=	1
+DISTNAME=	Archive-Zip-1.53
 
 CATEGORIES=	archivers
 
@@ -13,5 +12,10 @@ CATEGORIES=	archivers
 PERMIT_PACKAGE_CDROM=	Yes
 
 TEST_DEPENDS = archivers/zip devel/p5-Test-Pod
+
+TEST_FLAGS +=	TEST_FILES="-It t/*.t"
+
+post-build:
+	find ${WRKSRC}/blib -type f \( -name "FAQ.pod" -o -name "*.orig" \) -print0 | xargs -0 rm
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/archivers/p5-Archive-Zip/distinfo,v
retrieving revision 1.13
diff -u -p -r1.13 distinfo
--- distinfo	4 Apr 2013 16:03:56 -0000	1.13
+++ distinfo	28 Sep 2015 20:20:26 -0000
@@ -1,2 +1,2 @@
-SHA256 (Archive-Zip-1.30.tar.gz) = +LRy/3e3I45CO8s1GWiszFYvnSBwD78tjtKmX6D6Yxg=
-SIZE (Archive-Zip-1.30.tar.gz) = 197179
+SHA256 (Archive-Zip-1.53.tar.gz) = xm8839GWXUfYSvHje5l+F9P4xfLM7/wekNBNZAAUJLk=
+SIZE (Archive-Zip-1.53.tar.gz) = 189493
Index: patches/patch-lib_Archive_Zip_Member_pm
===================================================================
RCS file: /home/cvs/ports/archivers/p5-Archive-Zip/patches/patch-lib_Archive_Zip_Member_pm,v
retrieving revision 1.1
diff -u -p -r1.1 patch-lib_Archive_Zip_Member_pm
--- patches/patch-lib_Archive_Zip_Member_pm	15 Oct 2010 18:50:23 -0000	1.1
+++ patches/patch-lib_Archive_Zip_Member_pm	27 Nov 2014 11:48:55 -0000
@@ -2,20 +2,20 @@ $OpenBSD: patch-lib_Archive_Zip_Member_p
 
 http://rt.cpan.org/Public/Bug/Display.html?id=61930
 
---- lib/Archive/Zip/Member.pm.orig	Tue Jun 30 12:51:10 2009
-+++ lib/Archive/Zip/Member.pm	Fri Oct 15 19:04:27 2010
-@@ -282,7 +282,7 @@ sub _mapPermissionsToUnix {
-     if ( $format == FA_AMIGA ) {
+--- lib/Archive/Zip/Member.pm.orig	Wed Oct 22 05:11:13 2014
++++ lib/Archive/Zip/Member.pm	Thu Nov 27 11:48:15 2014
+@@ -295,7 +295,7 @@ sub _mapPermissionsToUnix {
+     if ($format == FA_AMIGA) {
          $attribs = $attribs >> 17 & 7;                         # Amiga RWE bits
          $mode    = $attribs << 6 | $attribs << 3 | $attribs;
 -        return $mode;
 +        return sprintf("%d", $mode);
      }
  
-     if ( $format == FA_THEOS ) {
-@@ -304,7 +304,10 @@ sub _mapPermissionsToUnix {
-         || $format == FA_TANDEM )
-     {
+     if ($format == FA_THEOS) {
+@@ -315,7 +315,10 @@ sub _mapPermissionsToUnix {
+         || $format == FA_QDOS
+         || $format == FA_TANDEM) {
          $mode = $attribs >> 16;
 -        return $mode if $mode != 0 or not $self->localExtraField;
 +        if( $mode != 0 or not $self->localExtraField) {
@@ -25,11 +25,11 @@ http://rt.cpan.org/Public/Bug/Display.ht
  
          # warn("local extra field is: ", $self->localExtraField, "\n");
  
-@@ -340,9 +343,13 @@ sub _mapPermissionsToUnix {
+@@ -351,9 +354,13 @@ sub _mapPermissionsToUnix {
  
      # keep previous $mode setting when its "owner"
      # part appears to be consistent with DOS attribute flags!
--    return $mode if ( $mode & 0700 ) == ( 0400 | $attribs << 6 );
+-    return $mode if ($mode & 0700) == (0400 | $attribs << 6);
 +    if( ( $mode & 0700 ) == ( 0400 | $attribs << 6 )) {
 +       $mode = sprintf("%d", $mode);
 +        return sprintf("%d", $mode);
Index: patches/patch-t_10_chmod_t
===================================================================
RCS file: patches/patch-t_10_chmod_t
diff -N patches/patch-t_10_chmod_t
--- patches/patch-t_10_chmod_t	15 Oct 2010 18:50:23 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-t_10_chmod_t,v 1.1 2010/10/15 18:50:23 sthen Exp $
-
-http://rt.cpan.org/Public/Bug/Display.html?id=61930
-
---- t/10_chmod.t.orig	Tue Jun 30 12:51:11 2009
-+++ t/10_chmod.t	Fri Oct 15 19:04:27 2010
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl
-+#!/usr/bin/perl -T
- 
- use strict;
- BEGIN {
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/archivers/p5-Archive-Zip/pkg/PLIST,v
retrieving revision 1.7
diff -u -p -r1.7 PLIST
--- pkg/PLIST	21 Nov 2006 18:33:09 -0000	1.7
+++ pkg/PLIST	27 Nov 2014 12:31:05 -0000
@@ -6,7 +6,6 @@ ${P5SITE}/Archive/Zip.pm
 ${P5SITE}/Archive/Zip/Archive.pm
 ${P5SITE}/Archive/Zip/BufferedFileHandle.pm
 ${P5SITE}/Archive/Zip/DirectoryMember.pm
-@comment ${P5SITE}/Archive/Zip/FAQ.pod
 ${P5SITE}/Archive/Zip/FileMember.pm
 ${P5SITE}/Archive/Zip/Member.pm
 ${P5SITE}/Archive/Zip/MemberRead.pm

Reply via email to