diff options
Diffstat (limited to 'mail/qmail/Makefile')
-rw-r--r-- | mail/qmail/Makefile | 83 |
1 files changed, 45 insertions, 38 deletions
diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile index 916130a8ff3..74f9a54c7b4 100644 --- a/mail/qmail/Makefile +++ b/mail/qmail/Makefile @@ -176,8 +176,8 @@ PATCHFILES+= ${TLS_PATCH_NAME}:tls .endif PATCH_SITES+= ${MASTER_SITE_LOCAL:S/$/:dns,sendmail_flagf,rfc2821,ldap,mysql,tls,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip/} -PATCH_SITE_SUBDIR+= bdrewery/qmail/:dns,sendmail_flagf,rfc2821,ldap,mysql,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip -PATCH_SITE_SUBDIR+= bdrewery/qmail/:tls +PATCH_SITE_SUBDIR+= bdrewery/qmail/:dns,sendmail_flagf,rfc2821,ldap,mysql,tls,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip +PATCH_SITES+= http://mirror.shatow.net/freebsd/qmail/:DEFAULT,dns,sendmail_flagf,rfc2821,ldap,mysql,tls,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip .if !defined(BARRIER_SMTP_AUTH_PATCH) SMTP_AUTH_VERSION= 0.31 @@ -472,10 +472,10 @@ PATCHFILES+= qmail-discard-double-bounces.patch:doublebounce .if ${PORT_OPTIONS:MSPF_PATCH} . if defined(SLAVE_TLS) || defined(SLAVE_SPAMCONTROL) . if defined(SLAVE_SPAMCONTROL) -SPF_SPAMCONTROL_PATCH= qmail-spf-rc5.patch-spamcontrol-27 -MASTER_SITES+= ${MASTER_SITE_LOCAL:S/$/:spf_spamcontrol/} -MASTER_SITE_SUBDIR+= garga/qmail/:spf_spamcontrol -DISTFILES+= ${SPF_SPAMCONTROL_PATCH}:spf_spamcontrol +SPF_SPAMCONTROL_PATCH= qmail-spf-rc5.patch-spamcontrol-27_2 +PATCH_SITES+= ${MASTER_SITE_LOCAL:S/$/:spf_spamcontrol/} +PATCH_SITE_SUBDIR+= garga/qmail/:spf_spamcontrol +PATCHFILES+= ${SPF_SPAMCONTROL_PATCH}:spf_spamcontrol . else # XXX - Move change out of conflicting Makefile hunk . if ${PORT_OPTIONS:MSMTP_AUTH_PATCH} @@ -506,13 +506,9 @@ DISTFILES+= ${EXT_BIG_TODO_PATCH}:ext_big_todo . endif . if ${PORT_OPTIONS:MSPF_PATCH} -. if defined(SLAVE_TLS) || defined(SLAVE_SPAMCONTROL) -. if defined(SLAVE_SPAMCONTROL) -EXTTODO_PATCH= ext_todo-20030105_spf.patch -. else +. if defined(SLAVE_TLS) # XXX - Move qmail-todo out of conflicting Makefile hunk EXTTODO_PATCH= ext_todo-20030105_spf_tls.patch -. endif MASTER_SITES+= ${MASTER_SITE_LOCAL:S/$/:exttodo/} MASTER_SITE_SUBDIR+= garga/qmail/:exttodo DISTFILES+= ${EXTTODO_PATCH}:exttodo @@ -557,7 +553,11 @@ PATCHFILES+= qmailqueue-patch PATCHFILES+= big-todo.103.patch .endif .if ${PORT_OPTIONS:MBIG_CONCURRENCY_PATCH} +. if defined(SLAVE_SPAMCONTROL) +PATCHFILES+= big-concurrency-spamcontrol-2731.patch +. else PATCHFILES+= big-concurrency.patch +. endif .endif .if !empty(PORT_OPTIONS:MOUTGOINGIP_PATCH) && !empty(PORT_OPTIONS:MQMTPC_PATCH) PATCHFILES+= qmail-1.03-qmtpc_outgoingip_20090630.patch:qmtpc_outgoingip @@ -684,6 +684,40 @@ post-extract: .endif # XXX - Move all the major patch applications to post-extract +# +# Apply main distro patch (which requires building a dependency and +# running a script) before PATCHFILES get applied. +.if defined(SLAVE_SPAMCONTROL) +pre-patch: +. if ${OSVERSION} < 900007 +# Prevent applying utmpx patch + @${ECHO_CMD} > ${WRKSRC}/qbiff.c.patch +. endif + @${ECHO_CMD} ${WRKDIR} > ${WRKSRC}/conf-qmail + @${ECHO_CMD} "# Generated by qmail-spamcontrol FreeBSD port" \ + > ${WRKSRC}/conf-spamcontrol +. for option in ${SELECTED_OPTIONS} + @${ECHO_CMD} ${option} >> ${WRKSRC}/conf-spamcontrol +. endfor + @${ECHO_CMD} "${UCSPISRC}/compile" > ${WRKSRC}/conf-ucspissl + ${ECHO_CMD} "${CC} ${CFLAGS}" > ${UCSPISRC}/src/conf-cc + ${ECHO_CMD} "${CC} ${STRIP} ${LDFLAGS}" > ${UCSPISRC}/src/conf-ld + ${ECHO_CMD} "${PREFIX}" > ${UCSPISRC}/src/conf-home + ${ECHO_CMD} "${PREFIX}/bin" > ${UCSPISRC}/src/conf-tcpbin + ${ECHO_CMD} "/etc/ssl" > ${UCSPISRC}/src/conf-cadir + ${ECHO_CMD} "/etc/ssl/cert.pem" > ${UCSPISRC}/src/conf-cafile + ${ECHO_CMD} "/etc/ssl/dh1024.pem" > ${UCSPISRC}/src/conf-dhfile + @cd ${UCSPISRC} && ${SETENV} ${MAKE_ENV} package/compile + @cd ${WRKSRC} && ${SH} ./install_spamcontrol.sh +# Any rejected patches are a failure + @if [ "`find ${WRKSRC} -name '*.rej' | wc -l`" -ne 0 ]; then \ + ${ECHO_MSG} "===> Failed to apply spamcontrol patch"; \ + ${FALSE}; \ + fi +# Fix trailing whitespace which breaks some patches + ${SED} -i '' -e 's,^\(binm3 binm3+df\) $$,\1,' ${WRKSRC}/Makefile +.endif + post-patch: .if ${PORT_OPTIONS:MSMTP_AUTH_PATCH} @${CP} ${SMTP_AUTH_DIR}/base64.[ch] ${WRKSRC} @@ -710,33 +744,6 @@ post-patch: -e "s,MYSQL_LIBS=.*,MYSQL_LIBS=\`${LOCALBASE}/bin/mysql_config --libs\`," \ ${WRKSRC}/Makefile .elif defined(SLAVE_SPAMCONTROL) -. if ${OSVERSION} < 900007 -# Prevent applying utmpx patch - @${ECHO_CMD} > ${WRKSRC}/qbiff.c.patch -. endif - @${ECHO_CMD} ${WRKDIR} > ${WRKSRC}/conf-qmail - @${ECHO_CMD} "# Generated by qmail-spamcontrol FreeBSD port" \ - > ${WRKSRC}/conf-spamcontrol -. for option in ${SELECTED_OPTIONS} - @${ECHO_CMD} ${option} >> ${WRKSRC}/conf-spamcontrol -. endfor - @${ECHO_CMD} "${UCSPISRC}/compile" > ${WRKSRC}/conf-ucspissl - ${ECHO_CMD} "${CC} ${CFLAGS}" > ${UCSPISRC}/src/conf-cc - ${ECHO_CMD} "${CC} ${STRIP} ${LDFLAGS}" > ${UCSPISRC}/src/conf-ld - ${ECHO_CMD} "${PREFIX}" > ${UCSPISRC}/src/conf-home - ${ECHO_CMD} "${PREFIX}/bin" > ${UCSPISRC}/src/conf-tcpbin - ${ECHO_CMD} "/etc/ssl" > ${UCSPISRC}/src/conf-cadir - ${ECHO_CMD} "/etc/ssl/cert.pem" > ${UCSPISRC}/src/conf-cafile - ${ECHO_CMD} "/etc/ssl/dh1024.pem" > ${UCSPISRC}/src/conf-dhfile - @cd ${UCSPISRC} && ${SETENV} ${MAKE_ENV} package/compile - @cd ${WRKSRC} && ./install_spamcontrol.sh - @${PATCH} -d ${WRKSRC} < ${FILESDIR}/extra-patch-spamcontrol-qmail-smtpd.c -. if ${PORT_OPTIONS:MSPF_PATCH} && defined(SPF_SPAMCONTROL_PATCH) - @${PATCH} -d ${WRKSRC} < ${DISTDIR}/${DIST_SUBDIR}/${SPF_SPAMCONTROL_PATCH} -. if ${PORT_OPTIONS:MEXTTODO_PATCH} && defined(EXTTODO_PATCH) - @${PATCH} -p1 -d ${WRKSRC} < ${DISTDIR}/${DIST_SUBDIR}/${EXTTODO_PATCH} -. endif -. endif . if ${PORT_OPTIONS:MSMTPEXTFORK} @${PATCH} -d ${WRKSRC} < ${DISTDIR}/${DIST_SUBDIR}/${SMTPEXTFORK_PATCH} . if ${PORT_OPTIONS:MXF_QUITASAP} |