Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jun 2004 01:12:57 +0900 (JST)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        aragorn+ports@teaser.fr
Subject:   ports/68281: add SPF support for milter-greylist
Message-ID:  <200406241612.i5OGCvYO017907@lyrics.mahoroba.org>
Resent-Message-ID: <200406241620.i5OGK3iU096402@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         68281
>Category:       ports
>Synopsis:       add SPF support for milter-greylist
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 24 16:20:03 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Hajimu UMEMOTO
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Internet Mutual Aid Society, Yokohama
>Environment:
System: FreeBSD lyrics.mahoroba.org 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Mon Jun 7 18:35:24 JST 2004 root@lyrics.mahoroba.org:/ad0s3/usr/obj/usr/src/sys/LYRICS i386

>Description:
Though milter-greylist supports SPF but the port doesn't.

>How-To-Repeat:
building ports/mail/milter-greylist

>Fix:
Following patch added two options; WITH_SPF and WITH_SPF_ALT.
WITH_SPF uses libspf and WITH_SPF_ALT uses libspf-alt.

diff -urN milter-greylist/Makefile.orig milter-greylist/Makefile
--- milter-greylist/Makefile.orig	Thu Jun 17 01:28:55 2004
+++ milter-greylist/Makefile	Thu Jun 24 19:55:14 2004
@@ -20,12 +20,31 @@
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ARGS+=	--with-user=smmsp
+CFLAGS+=	${PTHREAD_CFLAGS}
+CONFIGURE_ENV+=	LIBS="${PTHREAD_LIBS} "
 
 ALL_TARGET=	milter-greylist
 
 USE_RC_SUBR=	yes
 RC_SCRIPTS_SUB=	PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
 
+OPTIONS=	SPF		"Enable SPF support using libspf"	off \
+		SPF_ALT		"Enable SPF support using libspf-alt"	off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_SPF) && defined(WITH_SPF_ALT)
+BROKEN=		"Multiple SPF supports selected.  Run 'make config' again!"
+.endif
+.if defined(WITH_SPF)
+LIB_DEPENDS+=	spf.1:${PORTSDIR}/mail/libspf
+CONFIGURE_ARGS+=--with-libspf=${LOCALBASE}
+.endif
+.if defined(WITH_SPF_ALT)
+LIB_DEPENDS+=	spf_alt.1:${PORTSDIR}/mail/libspf-alt
+CONFIGURE_ARGS+=--with-libspf_alt=${LOCALBASE}
+.endif
+
 post-extract:
 	@${SED}	${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
 		${FILESDIR}/milter-greylist.sh > ${WRKSRC}/milter-greylist.sh
@@ -46,4 +65,4 @@
 .endif
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -urN milter-greylist/files/patch-Makefile.in.orig milter-greylist/files/patch-Makefile.in
--- milter-greylist/files/patch-Makefile.in.orig	Tue Jun 15 14:14:15 2004
+++ milter-greylist/files/patch-Makefile.in	Thu Jun 24 19:58:56 2004
@@ -1,18 +1,7 @@
---- Makefile.in.orig	Tue Jun  8 17:57:34 2004
-+++ Makefile.in	Sat Jun 12 10:47:56 2004
-@@ -29,9 +29,9 @@
- # OF THE POSSIBILITY OF SUCH DAMAGE.
- #
- 
--CFLAGS= 	@CFLAGS@ -D_BSD_SOURCE
--LDFLAGS=	@LDFLAGS@
--LIBS= 		@LIBS@
-+CFLAGS= 	@CFLAGS@ -D_BSD_SOURCE -pthread
-+LDFLAGS=	@LDFLAGS@ -pthread
-+LIBS= 		-lmilter
- prefix=		@prefix@
- exec_prefix=	@exec_prefix@
- SYSCONFDIR=	@sysconfdir@
+Index: Makefile.in
+diff -u Makefile.in.orig Makefile.in
+--- Makefile.in.orig	Wed Jun  9 00:57:34 2004
++++ Makefile.in	Thu Jun 24 19:58:13 2004
 @@ -80,23 +80,7 @@
  	${INSTALL} -m 755 milter-greylist ${BINDIR}
  	${INSTALL} -m 644 milter-greylist.8 ${MANDIR}/man8
diff -urN /dev/null milter-greylist/files/patch-configure
--- /dev/null	Thu Jan  1 09:00:00 1970
+++ milter-greylist/files/patch-configure	Thu Jun 24 19:38:20 2004
@@ -0,0 +1,12 @@
+Index: configure
+diff -u configure.orig configure
+--- configure.orig	Sat Jun 12 16:58:32 2004
++++ configure	Thu Jun 24 19:38:06 2004
+@@ -6322,6 +6322,7 @@
+ 
+ fi
+ 
++LIBS=$ac_check_lib_save_LIBS
+ 
+ # Check for libmilter. For sendmail-8.12.1, -lsm is required too.
+ # This uses a gross hack on the second AC_CHECK_LIB first argument, but using

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406241612.i5OGCvYO017907>