aboutsummaryrefslogtreecommitdiff
path: root/mail/spamass-milter
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2010-08-26 12:04:31 +0000
committerPav Lucistnik <pav@FreeBSD.org>2010-08-26 12:04:31 +0000
commitf9f768bba36cfb344f19ef5a2272d65c48b3f575 (patch)
tree19d0faa1e1c0a5112d83db4683764f5f872824a9 /mail/spamass-milter
parentd2b1d8d274922e9de5d1c89da14d9806798f5ad6 (diff)
downloadports-f9f768bba36cfb344f19ef5a2272d65c48b3f575.tar.gz
ports-f9f768bba36cfb344f19ef5a2272d65c48b3f575.zip
Notes
Diffstat (limited to 'mail/spamass-milter')
-rw-r--r--mail/spamass-milter/Makefile20
-rw-r--r--mail/spamass-milter/files/extra-patch-addauth9
-rw-r--r--mail/spamass-milter/files/extra-patch-options (renamed from mail/spamass-milter/files/extra-patch-rejecttext2)2
-rw-r--r--mail/spamass-milter/files/extra-patch-rejecttext2a11
4 files changed, 16 insertions, 26 deletions
diff --git a/mail/spamass-milter/Makefile b/mail/spamass-milter/Makefile
index e01468dcf344..a6f039841d0e 100644
--- a/mail/spamass-milter/Makefile
+++ b/mail/spamass-milter/Makefile
@@ -27,17 +27,22 @@ OPTIONS= ADDAUTH_PATCH "Bypass checks for SMTP AUTH connections" off \
.include <bsd.port.pre.mk>
+ORIG_ARGS= fd:mMp:P:r:u:D:i:b:B:e:x
+NEW_ARGS:= ${ORIG_ARGS}
+
.if defined(WITH_ADDAUTH_PATCH)
-EXTRA_PATCHES= ${FILESDIR}/extra-patch-addauth
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-addauth
+NEW_ARGS:= ${NEW_ARGS}a
.endif
.if defined(WITH_REJECTTEXT_PATCH)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rejecttext1
-.if defined(WITH_ADDAUTH_PATCH)
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rejecttext2a
-.else
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rejecttext2
+NEW_ARGS:= ${NEW_ARGS}R:
.endif
+
+# extra-patch-options is modified in pre-patch
+.if ${ORIG_ARGS} != ${NEW_ARGS}
+EXTRA_PATCHES+= ${WRKDIR}/extra-patch-options
.endif
.if exists(${LOCALBASE}/lib/libldap.so)
@@ -86,6 +91,11 @@ SUB_FILES= pkg-message
MAN1= spamass-milter.1
+pre-patch:
+.if ${ORIG_ARGS} != ${NEW_ARGS}
+ @${SED} -e 's|%NEW_ARGS%|${NEW_ARGS}|' ${FILESDIR}/extra-patch-options > ${WRKDIR}/extra-patch-options
+.endif
+
post-patch:
@${SED} -e's,%%PREFIX%%,${PREFIX},g' \
${FILESDIR}/activation.txt > ${WRKDIR}/activation.txt
diff --git a/mail/spamass-milter/files/extra-patch-addauth b/mail/spamass-milter/files/extra-patch-addauth
index 59957119362d..3112e97ef2f2 100644
--- a/mail/spamass-milter/files/extra-patch-addauth
+++ b/mail/spamass-milter/files/extra-patch-addauth
@@ -22,15 +22,6 @@ diff -u orig/spamass-milter.cpp spamass-milter.cpp
#if defined(__FreeBSD__) /* popen bug - see PR bin/50770 */
static pthread_mutex_t popen_mutex = PTHREAD_MUTEX_INITIALIZER;
-@@ -181,7 +182,7 @@
- main(int argc, char* argv[])
- {
- int c, err = 0;
-- const char *args = "fd:mMp:P:r:u:D:i:b:B:e:x";
-+ const char *args = "fd:mMp:P:r:u:D:i:b:B:e:xa";
- char *sock = NULL;
- bool dofork = false;
- char *pidfilename = NULL;
@@ -196,6 +197,9 @@
/* Process command line options */
while ((c = getopt(argc, argv, args)) != -1) {
diff --git a/mail/spamass-milter/files/extra-patch-rejecttext2 b/mail/spamass-milter/files/extra-patch-options
index 569156e3e71a..748292e22a0f 100644
--- a/mail/spamass-milter/files/extra-patch-rejecttext2
+++ b/mail/spamass-milter/files/extra-patch-options
@@ -5,7 +5,7 @@
{
int c, err = 0;
- const char *args = "fd:mMp:P:r:u:D:i:b:B:e:x";
-+ const char *args = "fd:mMp:P:r:R:u:D:i:b:B:e:x";
++ const char *args = "%NEW_ARGS%";
char *sock = NULL;
bool dofork = false;
char *pidfilename = NULL;
diff --git a/mail/spamass-milter/files/extra-patch-rejecttext2a b/mail/spamass-milter/files/extra-patch-rejecttext2a
deleted file mode 100644
index eb0bd7a25311..000000000000
--- a/mail/spamass-milter/files/extra-patch-rejecttext2a
+++ /dev/null
@@ -1,11 +0,0 @@
---- spamass-milter.cpp.ORIG 2006-06-17 11:06:30.000000000 +0200
-+++ spamass-milter.cpp 2006-06-17 11:10:11.000000000 +0200
-@@ -181,7 +182,7 @@
- main(int argc, char* argv[])
- {
- int c, err = 0;
-- const char *args = "fd:mMp:P:r:u:D:i:b:B:e:xa";
-+ const char *args = "fd:mMp:P:r:R:u:D:i:b:B:e:xa";
- char *sock = NULL;
- bool dofork = false;
- char *pidfilename = NULL;