diff options
-rw-r--r-- | devel/p5-Data-TemporaryBag/Makefile | 4 | ||||
-rw-r--r-- | devel/p5-Data-TemporaryBag/files/500503-TemporaryBag.pm | 31 |
2 files changed, 32 insertions, 3 deletions
diff --git a/devel/p5-Data-TemporaryBag/Makefile b/devel/p5-Data-TemporaryBag/Makefile index 220864b57472..1be67366fb5d 100644 --- a/devel/p5-Data-TemporaryBag/Makefile +++ b/devel/p5-Data-TemporaryBag/Makefile @@ -25,9 +25,7 @@ MAN3= Data::TemporaryBag.3 .include <bsd.port.pre.mk> .if ${PERL_LEVEL} < 500600 -post-patch: - @${PERL} -pi.orig -e 'if($$.==17){s/^our \(/use vars qw(/;s/,//g}' \ - ${WRKSRC}/TemporaryBag.pm +EXTRA_PATCHES= ${PATCHDIR}/500503-TemporaryBag.pm .endif .include <bsd.port.post.mk> diff --git a/devel/p5-Data-TemporaryBag/files/500503-TemporaryBag.pm b/devel/p5-Data-TemporaryBag/files/500503-TemporaryBag.pm new file mode 100644 index 000000000000..18b9ad2c7579 --- /dev/null +++ b/devel/p5-Data-TemporaryBag/files/500503-TemporaryBag.pm @@ -0,0 +1,31 @@ +--- TemporaryBag.pm.orig Sun Nov 10 17:33:03 2002 ++++ TemporaryBag.pm Fri May 23 13:00:03 2003 +@@ -2,7 +2,10 @@ + + use strict; + +-use Fcntl qw/:DEFAULT :seek/; ++use Fcntl qw/:DEFAULT/; ++use constant SEEK_SET => 0; ++use constant SEEK_END => 2; ++use Symbol; + use Carp; + use File::Temp ':mktemp'; + +@@ -14,7 +17,7 @@ + use constant RECENTNESS => 4; + use constant FINGERPRINT => 4; + +-our ($VERSION, $Threshold, $TempPath, $MaxOpen); ++use vars qw($VERSION $Threshold $TempPath $MaxOpen); + + $VERSION = '0.06'; + +@@ -243,6 +246,7 @@ + } + if (defined ($fn = $self->[FILENAME])) { + croak "TemporaryBag object seems to be collapsed " if (!-e $fn) or (!-f _); ++ $fh=gensym; + sysopen($fh, $fn, O_RDWR) or croak "TemporaryBag object seems to be collapsed OP"; + croak "TemporaryBag object seems to be collapsed " if (-l $fn); + binmode $fh; |