aboutsummaryrefslogtreecommitdiffstats
path: root/mail/razor-agents
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2002-11-04 01:58:33 +0800
committerleeym <leeym@FreeBSD.org>2002-11-04 01:58:33 +0800
commitce2cd75646fe64f9ea1c10e5cdce876dad65cb69 (patch)
treef884da2a4f4d2486f482e3c1224a3cc2f89ae5eb /mail/razor-agents
parent2949eb4bbd28988d80ba9cad4932ce6829e7eb2a (diff)
downloadfreebsd-ports-gnome-ce2cd75646fe64f9ea1c10e5cdce876dad65cb69.tar.gz
freebsd-ports-gnome-ce2cd75646fe64f9ea1c10e5cdce876dad65cb69.tar.zst
freebsd-ports-gnome-ce2cd75646fe64f9ea1c10e5cdce876dad65cb69.zip
1. fix "an undefined value as a symbol reference" problem on perl-5.005
2. use PERL_MAJOR/PERL_MINOR to determine BUILD_DEPENDS Submitted by: Steven Champeon <schampeo@hesketh.com> Requested by: Chris Johnson <dcj-dated-1034983846.dgfgmdcm@palomine.net> Reviewed by: ijliao (mentor) Approved by: ijliao (mentor)
Diffstat (limited to 'mail/razor-agents')
-rw-r--r--mail/razor-agents/Makefile19
-rw-r--r--mail/razor-agents/files/patch-lib::Razor2::Client::Agent.pm17
2 files changed, 28 insertions, 8 deletions
diff --git a/mail/razor-agents/Makefile b/mail/razor-agents/Makefile
index 4dafd72bf427..d0e19bad8b5e 100644
--- a/mail/razor-agents/Makefile
+++ b/mail/razor-agents/Makefile
@@ -7,6 +7,7 @@
PORTNAME= razor-agents
PORTVERSION= 2.20
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= razor
@@ -20,13 +21,6 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/DNS.pm:${PORTSDI
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/URI/Escape.pm:${PORTSDIR}/net/p5-URI
RUN_DEPENDS= ${BUILD_DEPENDS}
-.if exists(/usr/local/lib/perl5/${PERL_VER}/Test/More.pm)
-# Test::Simple is default module in perl-5.8.0 or above
-.else
-TEST_MORE= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Test/More.pm:${PORTSDIR}/devel/p5-Test-Simple
-BUILD_DEPENDS+= ${TEST_MORE}
-.endif
-
PERL_CONFIGURE= yes
MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
@@ -37,4 +31,13 @@ MAN5= razor-agents.5 razor-whitelist.5 razor-agent.conf.5
post-install:
@${PREFIX}/bin/razor-client
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+PERL_MAJOR=${PERL_VER:C|^([1-9]+).*|\1|}
+PERL_MINOR=${PERL_VER:C|^[1-9]+\.0*([1-9]+).*|\1|}
+
+.if ${PERL_MAJOR} < 5 || ${PERL_MAJOR} == 5 && ${PERL_MINOR} < 8
+BUILD_DEPENDS+= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Test/More.pm:${PORTSDIR}/devel/p5-Test-Simple
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/mail/razor-agents/files/patch-lib::Razor2::Client::Agent.pm b/mail/razor-agents/files/patch-lib::Razor2::Client::Agent.pm
new file mode 100644
index 000000000000..808e3d7eed0f
--- /dev/null
+++ b/mail/razor-agents/files/patch-lib::Razor2::Client::Agent.pm
@@ -0,0 +1,17 @@
+--- lib/Razor2/Client/Agent.pm.orig Sun Nov 3 21:07:21 2002
++++ lib/Razor2/Client/Agent.pm Sun Nov 3 21:08:17 2002
+@@ -753,10 +753,11 @@
+ foreach my $file (@ARGV) {
+ my $fh;
+ my @message = ();
+- if (ref $file) {
+- $fh = $file
++ if ($file eq '-') {
++ $fh = \*STDIN;
+ } else {
+- open $fh, "<$file" or return $self->error("Can't open $file: $!");
++ open FH, "<$file" or return $self->error("Can't open $file: $!");
++ $fh = \*FH;
+ }
+ next unless defined(my $line = <$fh>);
+ if ($line =~ /^From /) {