summaryrefslogtreecommitdiff
path: root/textproc/p5-Text-RecordParser
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2004-05-18 14:07:14 +0000
committerErwin Lansing <erwin@FreeBSD.org>2004-05-18 14:07:14 +0000
commit36c44ea8b9788e7e6d460e4a3eb85fd199843d00 (patch)
treed82a617013c00e65f65d22a7705a45660389255a /textproc/p5-Text-RecordParser
parentAdd p5-Text-TabularDisplay 1.18, display text in formatted table output. (diff)
- Update to 0.06.
- Now depends on the new port textproc/p5-Text-TabularDisplay - Make PREFIX-clean under perl 5.005_03. PR: 66807 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=109437
Diffstat (limited to 'textproc/p5-Text-RecordParser')
-rw-r--r--textproc/p5-Text-RecordParser/Makefile16
-rw-r--r--textproc/p5-Text-RecordParser/distinfo4
-rw-r--r--textproc/p5-Text-RecordParser/files/5.005-bin::tablify25
-rw-r--r--textproc/p5-Text-RecordParser/files/5.005-t::02-filename-fh.t34
-rw-r--r--textproc/p5-Text-RecordParser/pkg-plist1
5 files changed, 75 insertions, 5 deletions
diff --git a/textproc/p5-Text-RecordParser/Makefile b/textproc/p5-Text-RecordParser/Makefile
index 91eae2d41654..19cef957cd6d 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 1bf77514aadf..8bc8afef406f 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 000000000000..862f0f421c7d
--- /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 000000000000..cce03c9a5da1
--- /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 f7e65f869c27..795b42a4217f 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