From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 6 13:40:20 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EDC416A41F for ; Tue, 6 Sep 2005 13:40:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCE8043D48 for ; Tue, 6 Sep 2005 13:40:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j86DeJCr003086 for ; Tue, 6 Sep 2005 13:40:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j86DeJ4f003082; Tue, 6 Sep 2005 13:40:19 GMT (envelope-from gnats) Resent-Date: Tue, 6 Sep 2005 13:40:19 GMT Resent-Message-Id: <200509061340.j86DeJ4f003082@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Oleg Sharoiko Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5833416A41F for ; Tue, 6 Sep 2005 13:31:27 +0000 (GMT) (envelope-from os@asterix.r61.net) Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8B4F43D46 for ; Tue, 6 Sep 2005 13:31:26 +0000 (GMT) (envelope-from os@asterix.r61.net) Received: from asterix.r61.net (mail.r61.net [195.208.245.249]) by mail.r61.net (8.13.4/8.13.4) with ESMTP id j86DVEE4073713; Tue, 6 Sep 2005 17:31:14 +0400 (MSD) (envelope-from os@asterix.r61.net) Received: from asterix.r61.net (localhost [127.0.0.1]) by asterix.r61.net (8.13.4/8.13.4) with ESMTP id j86DVEIT073710; Tue, 6 Sep 2005 17:31:14 +0400 (MSD) (envelope-from os@asterix.r61.net) Received: (from os@localhost) by asterix.r61.net (8.13.4/8.13.4/Submit) id j86DVD9j073709; Tue, 6 Sep 2005 17:31:13 +0400 (MSD) (envelope-from os) Message-Id: <200509061331.j86DVD9j073709@asterix.r61.net> Date: Tue, 6 Sep 2005 17:31:13 +0400 (MSD) From: Oleg Sharoiko To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: aragorn+ports@teaser.fr Subject: ports/85795: [PATCH] Fix mail/milter-greylist with sendmail from ports and add option to bild it with libspf2 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Oleg Sharoiko List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2005 13:40:20 -0000 >Number: 85795 >Category: ports >Synopsis: [PATCH] Fix mail/milter-greylist with sendmail from ports and add option to bild it with libspf2 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 06 13:40:19 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Oleg Sharoiko >Release: FreeBSD 5.4-RELEASE-p1 i386 >Organization: Computer Center of Rostov State University >Environment: System: FreeBSD asterix.r61.net 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #0: Sat May 14 10:12:27 MSD 2005 and@asterix.rsu.ru:/usr/obj/usr/src/sys/asterix.2xp4.RELENG_5_4.2005-05-14 i386 >Description: When sendmail has been installed from ports but not from the base system mail/milter-greylist can not find libmilter. Attached patch fixes this by adding WITH_SENDMAIL_BASE and WITH_SENDMAIL_PORT options. The default is to use base sendmail in case it has milter support and mail/sendmail otherwise. Pathc also adds optional support for building with libspf2 >How-To-Repeat: Install base system without sendmail Install sendmail from mail/sendmail Try to build mail/milter-greylist >Fix: --- Makefile.orig Tue Sep 6 17:02:22 2005 +++ Makefile Tue Sep 6 17:16:46 2005 @@ -15,24 +15,59 @@ MAINTAINER= aragorn+ports@teaser.fr COMMENT= Easy-to-use greylist milter for sendmail +CONFLICTS= milter-greylist-devel-[1-9]*.* + +## +# Use the following quirks to choose which sendmail to use (ports or system): +# +# WITH_SENDMAIL_BASE=yes +# or +# WITH_SENDMAIL_PORT=yes +# +# If unspecified, check for an up-to-date system version but give an +# installed port preference over it. +# + MAN5= greylist.conf.5 MAN8= milter-greylist.8 +.include + +.if !defined(WITH_SENDMAIL_BASE) && \ + !defined(WITH_SENDMAIL_PORT) && \ + !exists(${LOCALBASE}/lib/libmilter.a) +WITH_SENDMAIL_BASE=yes +.endif + +.if defined(WITH_SENDMAIL_BASE) +.if exists(/usr/lib/libmilter.a) +MILTERBASE= /usr +.else +BROKEN= "Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes" +.endif +.else +BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail +MILTERBASE?= ${LOCALBASE} +.endif + +.if defined(WITH_LIBSPF2) +BUILD_DEPENDS+= ${LOCALBASE}/lib/libspf2.so:${PORTSDIR}/mail/libspf2 +CONFIGURE_ARGS+= --with-libspf2=${LOCALBASE} +.endif + CFLAGS+= ${PTHREAD_CFLAGS} LIBS+= ${PTHREAD_LIBS} GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS+= --with-user=smmsp -CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LIBS="${LIBS}" +CONFIGURE_ARGS+= --with-user=smmsp --with-libmilter=${MILTERBASE} +CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LIBS="${LIBS} " ALL_TARGET= milter-greylist USE_RC_SUBR= yes RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} -CONFLICTS= milter-greylist-devel-[1-9]*.* - post-extract: @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${FILESDIR}/milter-greylist.sh > ${WRKSRC}/milter-greylist.sh @@ -73,4 +108,4 @@ @${CAT} ${PKGMESSAGE} -.include +.include >Release-Note: >Audit-Trail: >Unformatted: