summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2008-05-03 12:05:26 +0000
committerXin LI <delphij@FreeBSD.org>2008-05-03 12:05:26 +0000
commit13dedba6c4e54df76259dd7329eba1ec7b5a8532 (patch)
tree6fe6cb8103725737380dd70624c09abebef031ee /mail
parentAdd GTKWave 3.1.9 port. (diff)
Work around for clamav 0.93 related build issues by disabling related parts that
is no longer available in newer clamav versions. PR: ports/123350 Approved by: maintainer
Notes
Notes: svn path=/head/; revision=212530
Diffstat (limited to 'mail')
-rw-r--r--mail/p5-Mail-ClamAV/Makefile4
-rw-r--r--mail/p5-Mail-ClamAV/files/patch-ClamAV.pm124
-rw-r--r--mail/p5-Mail-ClamAV/files/patch-README47
-rw-r--r--mail/p5-Mail-ClamAV/files/patch-t__Mail-ClamAV.t21
4 files changed, 189 insertions, 7 deletions
diff --git a/mail/p5-Mail-ClamAV/Makefile b/mail/p5-Mail-ClamAV/Makefile
index 3f45548f1372..5e7faaca6980 100644
--- a/mail/p5-Mail-ClamAV/Makefile
+++ b/mail/p5-Mail-ClamAV/Makefile
@@ -7,7 +7,7 @@
PORTNAME= Mail-ClamAV
PORTVERSION= 0.20
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
@@ -26,8 +26,6 @@ PERL_CONFIGURE= yes
MAN3= Mail::ClamAV.3
-BROKEN= Doesn't build with clamav-0.93
-
post-install:
@${CAT} ${PKGMESSAGE}
diff --git a/mail/p5-Mail-ClamAV/files/patch-ClamAV.pm b/mail/p5-Mail-ClamAV/files/patch-ClamAV.pm
index 13ed5d038a43..575326b8f63e 100644
--- a/mail/p5-Mail-ClamAV/files/patch-ClamAV.pm
+++ b/mail/p5-Mail-ClamAV/files/patch-ClamAV.pm
@@ -1,5 +1,5 @@
---- ClamAV.pm.orig 2007-02-20 11:42:16.000000000 -0200
-+++ ClamAV.pm 2007-12-18 14:31:54.000000000 -0200
+--- ./ClamAV.pm.orig 2007-02-20 05:42:16.000000000 -0800
++++ ./ClamAV.pm 2008-05-02 17:22:26.382239887 -0700
@@ -73,10 +73,6 @@
CL_ESUPPORT
CL_ELOCKDB
@@ -11,7 +11,15 @@
CL_SCAN_RAW
CL_SCAN_ARCHIVE
CL_SCAN_MAIL
-@@ -169,12 +165,9 @@
+@@ -88,7 +84,6 @@
+ CL_SCAN_MAILURL
+ CL_SCAN_BLOCKMAX
+ CL_SCAN_ALGORITHMIC
+- CL_SCAN_PHISHING_DOMAINLIST
+ CL_SCAN_PHISHING_BLOCKSSL
+
+ CL_SCAN_PHISHING_BLOCKCLOAK
+@@ -169,12 +164,9 @@
VERSION => $VERSION,
PREFIX => 'clamav_perl_',
NAME => "Mail::ClamAV",
@@ -27,7 +35,60 @@
use Inline C => <<'END_OF_C';
#include <stdio.h>
#include <string.h>
-@@ -496,13 +489,7 @@
+@@ -210,12 +202,10 @@
+
+ /* set defaults for limits */
+ c->limits.maxreclevel = 5;
+- c->limits.maxmailrec = 10;
+ c->limits.maxfiles = 1000;
+ c->limits.maxfilesize = 1024 * 1028 * 10; /* 10 Megs */
+
+ /* XXX need to figure out a nice default */
+- c->limits.maxratio = 200;
+ c->limits.archivememlim = 1;
+
+ if (S_ISDIR(st.st_mode)) {
+@@ -290,19 +280,6 @@
+ return SvClam(self)->limits.maxreclevel;
+ }
+
+-int clamav_perl_maxmailrec(SV *self, ...)
+-{
+- Inline_Stack_Vars;
+- if (Inline_Stack_Items > 1) {
+- SV *max;
+- if (Inline_Stack_Items > 2)
+- croak("Invalid number of arguments to maxmailrec()");
+- max = Inline_Stack_Item(1);
+- SvClam(self)->limits.maxmailrec = SvIV(max);
+- }
+- return SvClam(self)->limits.maxmailrec;
+-}
+-
+ int clamav_perl_maxfiles(SV *self, ...)
+ {
+ Inline_Stack_Vars;
+@@ -329,19 +306,6 @@
+ return SvClam(self)->limits.maxfilesize;
+ }
+
+-int clamav_perl_maxratio(SV *self, ...)
+-{
+- Inline_Stack_Vars;
+- if (Inline_Stack_Items > 1) {
+- SV *max;
+- if (Inline_Stack_Items > 2)
+- croak("Invalid number of arguments to maxratio()");
+- max = Inline_Stack_Item(1);
+- SvClam(self)->limits.maxratio = (long int)SvIV(max);
+- }
+- return SvClam(self)->limits.maxratio;
+-}
+-
+ int clamav_perl_archivememlim(SV *self, ...)
+ {
+ Inline_Stack_Vars;
+@@ -496,13 +460,7 @@
if (strEQ("CL_ESUPPORT", name)) return CL_ESUPPORT;
if (strEQ("CL_ELOCKDB", name)) return CL_ELOCKDB;
@@ -41,3 +102,58 @@
if (strEQ("CL_DB_PHISHING", name)) return CL_DB_PHISHING;
if (strEQ("CL_DB_ACONLY", name)) return CL_DB_ACONLY;
if (strEQ("CL_DB_PHISHING_URLS", name)) return CL_DB_PHISHING_URLS;
+@@ -522,7 +480,6 @@
+ if (strEQ("CL_SCAN_MAILURL", name)) return CL_SCAN_MAILURL;
+ if (strEQ("CL_SCAN_BLOCKMAX", name)) return CL_SCAN_BLOCKMAX;
+ if (strEQ("CL_SCAN_ALGORITHMIC", name)) return CL_SCAN_ALGORITHMIC;
+- if (strEQ("CL_SCAN_PHISHING_DOMAINLIST", name)) return CL_SCAN_PHISHING_DOMAINLIST;
+ if (strEQ("CL_SCAN_PHISHING_BLOCKSSL", name)) return CL_SCAN_PHISHING_BLOCKSSL;
+ if (strEQ("CL_SCAN_PHISHING_BLOCKCLOAK", name)) return CL_SCAN_PHISHING_BLOCKCLOAK;
+ if (strEQ("CL_SCAN_ELF", name)) return CL_SCAN_ELF;
+@@ -602,11 +559,9 @@
+
+ # Set some limits (only applies to scan())
+ $c->maxreclevel(4);
+- $c->maxmailrec(4);
+ $c->maxfiles(20);
+ $c->maxfilesize(1024 * 1024 * 20); # 20 megs
+ $c->archivememlim(0); # limit memory usage for bzip2 (0/1)
+- $c->maxratio(0);
+
+ # Scan a filehandle (scandesc in clamav)
+ # scan(FileHandle or path, Bitfield of options)
+@@ -701,10 +656,6 @@
+
+ Enable algorithmic detection of viruses.
+
+-=item CL_SCAN_PHISHING_DOMAINLIST
+-
+-Phishing module: restrict URL scanning to domains from .pdf (RECOMMENDED).
+-
+ =item CL_SCAN_PHISHING_BLOCKSSL
+
+ Phishing module: always block SSL mismatches in URLs.
+@@ -890,10 +841,6 @@
+
+ Sets the maximum recursion level into archives [default 5].
+
+-=item maxmailrec
+-
+-Sets the maximum recursion level into emails [default 10].
+-
+ =item maxfiles
+
+ Maximum number of files that will be scanned [default 1000]. A value of zero
+@@ -904,12 +851,6 @@
+ Maximum file size that will be scanned in bytes [default 10M]. A value of zero
+ disables the check.
+
+-=item maxratio
+-
+-Maximum compression ratio. So if this is set to 200, libclamav will give up
+-decompressing a file if it reaches 200x its compressed size [default 200]. A
+-value of zero disables the check.
+-
+ =item archivememlim
+
+ Turns on/off memory usage limits for bzip2. [default 1]
diff --git a/mail/p5-Mail-ClamAV/files/patch-README b/mail/p5-Mail-ClamAV/files/patch-README
new file mode 100644
index 000000000000..d18c49c2330f
--- /dev/null
+++ b/mail/p5-Mail-ClamAV/files/patch-README
@@ -0,0 +1,47 @@
+--- ./README.orig 2007-02-20 05:40:55.000000000 -0800
++++ ./README 2008-05-02 17:22:26.385238336 -0700
+@@ -27,11 +27,9 @@
+ # Set some limits (only applies to scan())
+ # Only relevant for archives
+ $c->maxreclevel(4);
+- $c->maxmailrec(4);
+ $c->maxfiles(20);
+ $c->maxfilesize(1024 * 1024 * 20); # 20 megs
+ $c->archivememlim(0); # limit memory usage for bzip2 (0/1)
+- $c->maxratio(0);
+
+ # Scan a filehandle (scandesc in clamav)
+ # scan(FileHandle or path, Bitfield of options)
+@@ -107,10 +105,6 @@
+ CL_SCAN_ALGORITHMIC
+ Enable algorithmic detection of viruses.
+
+- CL_SCAN_PHISHING_DOMAINLIST
+- Phishing module: restrict URL scanning to domains from .pdf
+- (RECOMMENDED).
+-
+ CL_SCAN_PHISHING_BLOCKSSL
+ Phishing module: always block SSL mismatches in URLs.
+
+@@ -239,9 +233,6 @@
+ maxreclevel
+ Sets the maximum recursion level into archives [default 5].
+
+- maxmailrec
+- Sets the maximum recursion level into emails [default 10].
+-
+ maxfiles
+ Maximum number of files that will be scanned [default 1000]. A value of
+ zero disables the check.
+@@ -250,11 +241,6 @@
+ Maximum file size that will be scanned in bytes [default 10M]. A value
+ of zero disables the check.
+
+- maxratio
+- Maximum compression ratio. So if this is set to 200, libclamav will
+- give up decompressing a file if it reaches 200x its compressed size
+- [default 200]. A value of zero disables the check.
+-
+ archivememlim
+ Turns on/off memory usage limits for bzip2. [default 1]
+
diff --git a/mail/p5-Mail-ClamAV/files/patch-t__Mail-ClamAV.t b/mail/p5-Mail-ClamAV/files/patch-t__Mail-ClamAV.t
new file mode 100644
index 000000000000..a2d138a9babf
--- /dev/null
+++ b/mail/p5-Mail-ClamAV/files/patch-t__Mail-ClamAV.t
@@ -0,0 +1,21 @@
+--- ./t/Mail-ClamAV.t.orig 2007-02-20 05:35:41.000000000 -0800
++++ ./t/Mail-ClamAV.t 2008-05-02 17:35:11.841874518 -0700
+@@ -44,10 +44,6 @@
+ CL_ESUPPORT
+ CL_ELOCKDB
+
+- CL_ENCINIT
+- CL_ENCLOAD
+- CL_ENCIO
+-
+ CL_SCAN_RAW
+ CL_SCAN_ARCHIVE
+ CL_SCAN_MAIL
+@@ -59,7 +55,6 @@
+ CL_SCAN_MAILURL
+ CL_SCAN_BLOCKMAX
+ CL_SCAN_ALGORITHMIC
+- CL_SCAN_PHISHING_DOMAINLIST
+ CL_SCAN_PHISHING_BLOCKSSL
+
+ CL_SCAN_PHISHING_BLOCKCLOAK