aboutsummaryrefslogtreecommitdiffstats
path: root/mail/pflogstats
diff options
context:
space:
mode:
authorerwin <erwin@FreeBSD.org>2003-06-21 17:01:54 +0800
committererwin <erwin@FreeBSD.org>2003-06-21 17:01:54 +0800
commitb272442126613dfd91d6b5d26fc111499875aefb (patch)
tree5be59bdb7cf371d0af021832e4005662f1819ddb /mail/pflogstats
parent873a8183008e57af9a1ded187ad8a907c8b95f82 (diff)
downloadfreebsd-ports-gnome-b272442126613dfd91d6b5d26fc111499875aefb.tar.gz
freebsd-ports-gnome-b272442126613dfd91d6b5d26fc111499875aefb.tar.zst
freebsd-ports-gnome-b272442126613dfd91d6b5d26fc111499875aefb.zip
Fix for perl 5.005_03
Simplified from: PR: 52094 Submitted by: Mathieu Arnold <m@absolight.net> Approved by: maintainer
Diffstat (limited to 'mail/pflogstats')
-rw-r--r--mail/pflogstats/Makefile21
-rw-r--r--mail/pflogstats/files/patch-pflogstats.pl72
-rw-r--r--mail/pflogstats/files/patch-sqwmstats.pl43
-rw-r--r--mail/pflogstats/pkg-plist16
4 files changed, 133 insertions, 19 deletions
diff --git a/mail/pflogstats/Makefile b/mail/pflogstats/Makefile
index 547faf65dd9e..6b0f8a05a61d 100644
--- a/mail/pflogstats/Makefile
+++ b/mail/pflogstats/Makefile
@@ -22,26 +22,25 @@ NO_BUILD= yes
USE_PERL5= yes
USE_REINPLACE= yes
-.include <bsd.port.pre.mk>
-
-.if ${PERL_LEVEL} < 500601
-IGNORE= Port requires perl 5.6.1 or later. Install lang/perl5 then try again
-.endif
-
post-patch:
# fix location of PERL
- @${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|' ${WRKSRC}/*.pl
+ @${REINPLACE_CMD} -e 's|/usr/bin/perl \-W|${PERL}|' ${WRKSRC}/*.pl ${WRKSRC}/*.pm
@${REINPLACE_CMD} -e 's|/usr/local/lib/pflogstats|${SITE_PERL}/Pflogstats|' ${WRKSRC}/*.pl
+# patch for perl < 5.6.0
+ ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1);$$1/;' \
+ -e '$$_="" if /require 5/;' \
+ -e '$$_="" if /use warnings/;' \
+ ${WRKSRC}/*.pm
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.pl ${PREFIX}/bin/${PORTNAME}
@${MKDIR} ${PREFIX}/lib/perl5/site_perl/${PERL_VER}/Pflogstats
- ${INSTALL_DATA} ${WRKSRC}/pflogstats-*.pm ${SITE_PERL}/Pflogstats
+ ${INSTALL_DATA} ${WRKSRC}/pflogstats-*.pm ${PREFIX}/lib/perl5/site_perl/${PERL_VER}/Pflogstats
.if !defined(NOPORTDOCS)
- @${MKDIR} ${PREFIX}/share/doc/pflogstats
+ @${MKDIR} ${DOCSDIR}
.for i in README INSTALL ChangeLog BUGS TODO LICENSE CREDITS
- ${INSTALL_DATA} ${WRKSRC}/$i ${PREFIX}/share/doc/pflogstats
+ ${INSTALL_DATA} ${WRKSRC}/$i ${DOCSDIR}
.endfor
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/mail/pflogstats/files/patch-pflogstats.pl b/mail/pflogstats/files/patch-pflogstats.pl
new file mode 100644
index 000000000000..dba4dd60db96
--- /dev/null
+++ b/mail/pflogstats/files/patch-pflogstats.pl
@@ -0,0 +1,72 @@
+--- pflogstats.pl.orig Fri Apr 4 15:29:35 2003
++++ pflogstats.pl Mon May 12 10:37:46 2003
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -W
++#!/usr/bin/perl
+
+ ###
+ # Project: pflogstats
+@@ -30,10 +30,7 @@
+ # ***** Sorry for some coding confusion, this is a developer version *****
+
+ # Minium required Perl version
+-require 5.6.0;
+-
+-#use warnings; # to be done later
+-#use strict; # to be done later
++require 5.00503;
+
+ # Global used Perl modules
+ use Time::Local;
+@@ -43,8 +40,9 @@
+
+
+ ## Name and version
+-my $release = "20030404.AERAsec";
+-our $progName = "pflogstats.pl";
++use vars qw{$release $progName};
++$release = "20030404.AERAsec";
++$progName = "pflogstats.pl";
+
+
+ ## Defines before module loader
+@@ -62,9 +60,7 @@
+ ## Define global variables
+
+ # option handling
+-our %options;
+-our %opts;
+-our %types;
++use vars qw{%options %opts %types};
+
+ # Default value
+ $types{'default'} = 0;
+@@ -73,11 +69,12 @@
+ $types{'test_verp_mung'} = 0;
+
+ # module hooks
+-our %hooks;
++use vars qw{%hooks};
+
+ # Format options
+-our @opt_format; # from option parsing
+-our %format; # used format
++use vars qw{@opt_format %format};
++# @opt_format; # from option parsing
++# %format; # used format
+
+ my @opt_types;
+ my $isoDateTime;
+@@ -143,10 +140,10 @@
+ #exit 0;
+
+ # Number formats
+-our %numberformat;
++use vars qw{%numberformat};
+
+ # Time range of logdata
+-our ($timemin, $timemax);
++use vars qw{$timemin, $timemax};
+ my ($time);
+
+
diff --git a/mail/pflogstats/files/patch-sqwmstats.pl b/mail/pflogstats/files/patch-sqwmstats.pl
new file mode 100644
index 000000000000..ce584bf269b3
--- /dev/null
+++ b/mail/pflogstats/files/patch-sqwmstats.pl
@@ -0,0 +1,43 @@
+--- sqwmstats.pl.orig Fri Apr 4 15:29:35 2003
++++ sqwmstats.pl Mon May 12 10:38:01 2003
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -W
++#!/usr/bin/perl
+
+ ###
+ # Project: pflogstats
+@@ -32,28 +32,27 @@
+ ###
+
+
+-use warnings;
+ use strict;
+
+ ## Name and version
+-my $release = "0.03";
+-our $progName = "sqwmstats.pl";
++use vars qw{$release $progName};
++$release = "0.03";
++$progName = "sqwmstats.pl";
+
+
+ ## Define global variables
+
+ # option handling
+-our %options;
+-our %opts;
++use vars qw{%options %opts};
+
+ $options{'help|h|?'} = \$opts{'help'};
+ $options{"version"} = \$opts{'version'};
+
+ # module hooks
+-our %hooks;
++use vars qw{%hooks};
+
+ # Number formats
+-our %numberformat;
++use vars qw{%numberformat};
+
+ ## Module loader
+ # General
diff --git a/mail/pflogstats/pkg-plist b/mail/pflogstats/pkg-plist
index 4f6e29eebaa9..22a9f91ac447 100644
--- a/mail/pflogstats/pkg-plist
+++ b/mail/pflogstats/pkg-plist
@@ -10,12 +10,12 @@ bin/pflogstats
%%SITE_PERL%%/Pflogstats/pflogstats-statistics-reject.pm
%%SITE_PERL%%/Pflogstats/pflogstats-statistics-uce.pm
%%SITE_PERL%%/Pflogstats/pflogstats-template.pm
-%%PORTDOCS%%share/doc/pflogstats/BUGS
-%%PORTDOCS%%share/doc/pflogstats/CREDITS
-%%PORTDOCS%%share/doc/pflogstats/ChangeLog
-%%PORTDOCS%%share/doc/pflogstats/INSTALL
-%%PORTDOCS%%share/doc/pflogstats/LICENSE
-%%PORTDOCS%%share/doc/pflogstats/README
-%%PORTDOCS%%share/doc/pflogstats/TODO
-%%PORTDOCS%%@dirrm share/doc/pflogstats
+%%PORTDOCS%%%%DOCSDIR%%/BUGS
+%%PORTDOCS%%%%DOCSDIR%%/CREDITS
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%SITE_PERL%%/Pflogstats