aboutsummaryrefslogtreecommitdiff
path: root/mail/milter-callback
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2013-05-29 17:35:50 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2013-05-29 17:35:50 +0000
commitec1033c1c441ff13de10482a0f015a4d736505cf (patch)
tree29c02282482e620c51aba4d31d897a6cd1f97978 /mail/milter-callback
parent34db843c6db66fdf518434c6ada8e8f7226fd0a4 (diff)
downloadports-ec1033c1c441ff13de10482a0f015a4d736505cf.tar.gz
ports-ec1033c1c441ff13de10482a0f015a4d736505cf.zip
Fix build on HEAD by setting USE_GCC=any which I believe is better than marking
it BROKEN if clang is detected. In order to do that handle do-build target since the distribution Makefile includes <bsd.prog.mk> which does not handle USE_GCC=any well.
Notes
Notes: svn path=/head/; revision=319384
Diffstat (limited to 'mail/milter-callback')
-rw-r--r--mail/milter-callback/Makefile19
1 files changed, 15 insertions, 4 deletions
diff --git a/mail/milter-callback/Makefile b/mail/milter-callback/Makefile
index 9918db3a2665..61664b1bf4c6 100644
--- a/mail/milter-callback/Makefile
+++ b/mail/milter-callback/Makefile
@@ -15,16 +15,27 @@ LIB_DEPENDS+= spf2:${PORTSDIR}/mail/libspf2
USE_XZ= yes
USE_RC_SUBR= milter-callback
+USE_GCC= any
SUB_FILES= pkg-message
MAN8= milter-callback.8
-MAKE_ENV+= WITH_SPF=yes
MAKE_JOBS_SAFE= yes
-.if ${CC} == "clang" || ${CXX} == "clang++"
-BROKEN= does not build with clang, uses nested functions
-.endif
+SRC_FILES= cache.c commonprocs.c cpit.c dealwithmxes.c detectlamespf.c \
+ makedecision.c mcspf.c milter-callback.c pgupdate.c \
+ processdirectpart.c processmxpart.c pushhistory.c sigusr1.c
+
+CFLAGS+= -DFREEBSD -DHAVE_NS_TYPE -DWITH_SPF -I${LOCALBASE}/include \
+ -I${WRKSRC} -std=gnu99
+LDFLAGS+= -lmilter -lthr -L${LOCALBASE}/lib -lspf2
+
+do-build:
+.for f in ${SRC_FILES}
+ ${CC} ${CFLAGS} -c ${WRKSRC}/${f} -o ${WRKSRC}/${f:C/\.c/.o/}
+.endfor
+ ${CC} ${LDFLAGS} ${SRC_FILES:C/(.*)\.c/${WRKSRC}\/\1.o/} \
+ -o ${WRKSRC}/${PORTNAME}
post-patch:
@${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|" \