summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2017-11-09 20:34:16 +0000
committerMark Felder <feld@FreeBSD.org>2017-11-09 20:34:16 +0000
commit9282a1a244feec8674e775273a3ae396e77717e6 (patch)
tree409250cdbd3b19ad526ce4f1580ff91da611c6aa
parentRegenerate patch-warnings so that it applies with stricter patch(1) (diff)
devel/p5-Log-Dispatch-File-Rolling: Fix compatibility with Log-Dispatch 2.67
MFH: 2017Q4
-rw-r--r--devel/p5-Log-Dispatch-File-Rolling/Makefile6
-rw-r--r--devel/p5-Log-Dispatch-File-Rolling/files/patch-Log-Dispatch-File-Rolling-pm-fix-append-mode12
-rw-r--r--devel/p5-Log-Dispatch-File-Rolling/files/patch-lib_Log_Dispatch_File_Rolling.pm24
3 files changed, 27 insertions, 15 deletions
diff --git a/devel/p5-Log-Dispatch-File-Rolling/Makefile b/devel/p5-Log-Dispatch-File-Rolling/Makefile
index b243874e57bb..6be029145e7d 100644
--- a/devel/p5-Log-Dispatch-File-Rolling/Makefile
+++ b/devel/p5-Log-Dispatch-File-Rolling/Makefile
@@ -2,7 +2,7 @@
PORTNAME= Log-Dispatch-File-Rolling
PORTVERSION= 1.09
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
@@ -12,9 +12,9 @@ COMMENT= Object for logging to date/time/pid stamped files
LICENSE= ART20
-BUILD_DEPENDS= p5-Log-Dispatch>=2.37:devel/p5-Log-Dispatch \
+BUILD_DEPENDS= p5-Log-Dispatch>=2.67:devel/p5-Log-Dispatch \
p5-Log-Log4perl>=1.38:devel/p5-Log-Log4perl
-RUN_DEPENDS= p5-Log-Dispatch>=2.37:devel/p5-Log-Dispatch \
+RUN_DEPENDS= p5-Log-Dispatch>=2.67:devel/p5-Log-Dispatch \
p5-Log-Log4perl>=1.38:devel/p5-Log-Log4perl
USES= dos2unix perl5
diff --git a/devel/p5-Log-Dispatch-File-Rolling/files/patch-Log-Dispatch-File-Rolling-pm-fix-append-mode b/devel/p5-Log-Dispatch-File-Rolling/files/patch-Log-Dispatch-File-Rolling-pm-fix-append-mode
deleted file mode 100644
index 95c50c3c0bdf..000000000000
--- a/devel/p5-Log-Dispatch-File-Rolling/files/patch-Log-Dispatch-File-Rolling-pm-fix-append-mode
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/Log/Dispatch/File/Rolling.pm 2014-01-27 05:37:14.000000000 -0500
-+++ lib/Log/Dispatch/File/Rolling.pm 2017-06-16 15:18:22.956608000 -0400
-@@ -39,7 +39,8 @@
- my $self = bless {}, $class;
-
- # only append mode is supported
-- $p{mode} = 'append';
-+ $p{mode} = 'append'; # Specifies append for Log::Dispatch::File 2.37 through 2.58
-+ $self->{mode} = '>>'; # Specifies append for Log::Dispatch::File 2.59+ (no longer done by _basic_init)
-
- # base class initialization
- $self->_basic_init(%p);
diff --git a/devel/p5-Log-Dispatch-File-Rolling/files/patch-lib_Log_Dispatch_File_Rolling.pm b/devel/p5-Log-Dispatch-File-Rolling/files/patch-lib_Log_Dispatch_File_Rolling.pm
new file mode 100644
index 000000000000..9fbad260295f
--- /dev/null
+++ b/devel/p5-Log-Dispatch-File-Rolling/files/patch-lib_Log_Dispatch_File_Rolling.pm
@@ -0,0 +1,24 @@
+--- lib/Log/Dispatch/File/Rolling.pm.orig 2017-11-09 20:22:14 UTC
++++ lib/Log/Dispatch/File/Rolling.pm
+@@ -39,7 +39,8 @@ sub new {
+ my $self = bless {}, $class;
+
+ # only append mode is supported
+- $p{mode} = 'append';
++ $p{mode} = 'append'; # Specifies append for Log::Dispatch::File 2.37 through 2.58
++ $self->{mode} = '>>'; # Specifies append for Log::Dispatch::File 2.59+ (no longer done by _basic_init)
+
+ # base class initialization
+ $self->_basic_init(%p);
+@@ -63,7 +64,10 @@ sub new {
+ }
+
+ $self->{rolling_fh_pid} = $$;
+- $self->_make_handle();
++ # _make_handle() was removed in Log::Dispatch::File 2.67
++ # $self->_make_handle();
++ $self->_open_file()
++ unless $self->{close_after_write} || $self->{lazy_open};
+
+ return $self;
+ }