diff options
-rw-r--r-- | textproc/p5-Text-RecordParser/Makefile | 16 | ||||
-rw-r--r-- | textproc/p5-Text-RecordParser/distinfo | 4 | ||||
-rw-r--r-- | textproc/p5-Text-RecordParser/files/5.005-bin::tablify | 25 | ||||
-rw-r--r-- | textproc/p5-Text-RecordParser/files/5.005-t::02-filename-fh.t | 34 | ||||
-rw-r--r-- | textproc/p5-Text-RecordParser/pkg-plist | 1 |
5 files changed, 75 insertions, 5 deletions
diff --git a/textproc/p5-Text-RecordParser/Makefile b/textproc/p5-Text-RecordParser/Makefile index 91eae2d4165..19cef957cd6 100644 --- a/textproc/p5-Text-RecordParser/Makefile +++ b/textproc/p5-Text-RecordParser/Makefile @@ -5,7 +5,7 @@ # $FreeBSD$ PORTNAME= Text-RecordParser -PORTVERSION= 0.05 +PORTVERSION= 0.06 CATEGORIES= textproc perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITE_SUBDIR= Text @@ -14,17 +14,27 @@ PKGNAMEPREFIX= p5- MAINTAINER= lars@thegler.dk COMMENT= Read record-oriented files -BUILD_DEPENDS= ${SITE_PERL}/IO/Scalar.pm:${PORTSDIR}/devel/p5-IO-stringy +BUILD_DEPENDS= ${SITE_PERL}/IO/Scalar.pm:${PORTSDIR}/devel/p5-IO-stringy \ + ${SITE_PERL}/Text/TabularDisplay.pm:${PORTSDIR}/textproc/p5-Text-TabularDisplay RUN_DEPENDS= ${BUILD_DEPENDS} PERL_CONFIGURE= yes +MAN1= tablify.1 MAN3= Text::RecordParser.3 .include <bsd.port.pre.mk> +.if ${PERL_LEVEL} <= 500503 +# make PREFIX-clean under perl 5.005_03 +post-configure: + ${PERL} -pi -e 's,/usr/local/,\$$(PREFIX)/,g' ${WRKSRC}/Makefile +.endif + .if ${PERL_LEVEL} < 500601 -EXTRA_PATCHES= ${PATCHDIR}/5.005-RecordParser.pm +EXTRA_PATCHES= ${PATCHDIR}/5.005-RecordParser.pm \ + ${PATCHDIR}/5.005-bin::tablify \ + ${PATCHDIR}/5.005-t::02-filename-fh.t .endif .include <bsd.port.post.mk> diff --git a/textproc/p5-Text-RecordParser/distinfo b/textproc/p5-Text-RecordParser/distinfo index 1bf77514aad..8bc8afef406 100644 --- a/textproc/p5-Text-RecordParser/distinfo +++ b/textproc/p5-Text-RecordParser/distinfo @@ -1,2 +1,2 @@ -MD5 (Text-RecordParser-0.05.tar.gz) = 42e51787b91fc120ad7f8fa04a97da2e -SIZE (Text-RecordParser-0.05.tar.gz) = 11930 +MD5 (Text-RecordParser-0.06.tar.gz) = 8450f9fc8a82cfa28dbdc9abc4f3169b +SIZE (Text-RecordParser-0.06.tar.gz) = 17843 diff --git a/textproc/p5-Text-RecordParser/files/5.005-bin::tablify b/textproc/p5-Text-RecordParser/files/5.005-bin::tablify new file mode 100644 index 00000000000..862f0f421c7 --- /dev/null +++ b/textproc/p5-Text-RecordParser/files/5.005-bin::tablify @@ -0,0 +1,25 @@ +--- bin/tablify.orig Mon May 17 22:08:20 2004 ++++ bin/tablify Mon May 17 22:15:35 2004 +@@ -283,18 +283,18 @@ + + my $fh; + if ( my $pager = $ENV{'PAGER'} ) { +- open $fh, "| $pager"; ++ open FH, "| $pager"; + } + else { +- $fh = \*STDOUT; ++ *FH = *STDOUT; + } + +-print $fh ++print FH + ( $i ) + ? $tab->render . sprintf("\n$i record%s returned\n", $i > 1 ? 's' : '') + : "No records returned\n"; + +-close $fh; ++close FH; + + # ------------------------------------------------------------------- + diff --git a/textproc/p5-Text-RecordParser/files/5.005-t::02-filename-fh.t b/textproc/p5-Text-RecordParser/files/5.005-t::02-filename-fh.t new file mode 100644 index 00000000000..cce03c9a5da --- /dev/null +++ b/textproc/p5-Text-RecordParser/files/5.005-t::02-filename-fh.t @@ -0,0 +1,34 @@ +--- t/02-filename-fh.t.orig Mon May 17 22:16:08 2004 ++++ t/02-filename-fh.t Mon May 17 22:19:17 2004 +@@ -40,15 +40,15 @@ + { + my $p = Text::RecordParser->new; + +- open my $fh, "<$Bin/data/simpsons.cvs"; +- is ( ref $p->fh( $fh ), 'GLOB', 'fh is a filehandle' ); ++ open FH, "<$Bin/data/simpsons.cvs"; ++ is ( ref $p->fh( \*FH ), 'GLOB', 'fh is a filehandle' ); + + # + # Cause an error by closing the existing fh. + # +- close $fh; +- open my $fh2, "<$Bin/data/simpsons.tab"; +- eval { $p->fh( $fh2 ) }; ++ close FH; ++ open FH2, "<$Bin/data/simpsons.tab"; ++ eval { $p->fh( \*FH2 ) }; + my $err = $@; + like ( $err, qr/can't close existing/i, 'fh catches bad close' ); + +@@ -105,8 +105,8 @@ + is( $rec->{'instrument'}, 'drums', 'instrument = "drums"' ); + + my $filename = "$Bin/data/simpsons.csv"; +- open my $fh, "<$filename" or die "Can't read '$filename': $!"; +- is ( $p->data( $fh ), 1, 'data accepts a filehandle' ); ++ open FH, "<$filename" or die "Can't read '$filename': $!"; ++ is ( $p->data( \*FH ), 1, 'data accepts a filehandle' ); + is ( UNIVERSAL::isa( $p->fh, 'GLOB' ), 1, 'fh is a GLOB' ); + } + diff --git a/textproc/p5-Text-RecordParser/pkg-plist b/textproc/p5-Text-RecordParser/pkg-plist index f7e65f869c2..795b42a4217 100644 --- a/textproc/p5-Text-RecordParser/pkg-plist +++ b/textproc/p5-Text-RecordParser/pkg-plist @@ -1,3 +1,4 @@ +bin/tablify %%SITE_PERL%%/Text/RecordParser.pm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Text/RecordParser/.packlist @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Text/RecordParser |