From owner-freebsd-ports@FreeBSD.ORG Tue Jan 4 10:58:10 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EFDA16A4CE; Tue, 4 Jan 2005 10:58:10 +0000 (GMT) Received: from brain.cc.rsu.ru (brain.cc.rsu.ru [195.208.252.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id 991D043D39; Tue, 4 Jan 2005 10:57:01 +0000 (GMT) (envelope-from os@brain.cc.rsu.ru) Received: from brain.cc.rsu.ru (localhost [127.0.0.1]) by brain.cc.rsu.ru (8.13.1/8.12.9) with ESMTP id j04AuoJ4062889; Tue, 4 Jan 2005 13:56:50 +0300 (MSK) (envelope-from os@brain.cc.rsu.ru) Received: (from os@localhost) by brain.cc.rsu.ru (8.13.1/8.12.9/Submit) id j04AuhPD062888; Tue, 4 Jan 2005 13:56:43 +0300 (MSK) (envelope-from os) Date: Tue, 4 Jan 2005 13:56:43 +0300 (MSK) Message-Id: <200501041056.j04AuhPD062888@brain.cc.rsu.ru> To: FreeBSD-gnats-submit@freebsd.org From: Oleg Sharoiko X-send-pr-version: 3.113 X-GNATS-Notify: cc: dinoex@freebsd.org cc: ports@freebsd.org Subject: [patch] mail/sendmail doesn't build when base system has no NIS X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Oleg Sharoiko List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2005 10:58:10 -0000 >Submitter-Id: current-users >Originator: Oleg Sharoiko >Organization: Computer Center of Rostov State University >Confidential: no >Synopsis: [patch] mail/sendmail doesn't build when base system has no NIS >Severity: serious >Priority: medium >Category: ports >Class: sw-bug >Release: FreeBSD 5.3-STABLE i386 >Environment: System: FreeBSD wolf.os.rsu.ru 5.3-STABLE FreeBSD 5.3-STABLE #0: Sat Jan 1 21:36:31 MSK 2005 os@wolf.os.rsu.ru:/usr/obj/usr/src/sys/wolf.os.i686.RELENG_5.2005-01-01 i386 >Description: Base system can now be built without NIS (NO_NIS in make.conf) but mail/sendmail assumes NIS always present. When base system has no NIS sendmail fails to build. >How-To-Repeat: Compile base system with NO_NIS Try to build mail/sendmail >Fix: Here is a simple patch, which adds SENDMAIL_WITHOUT_NIS knob. It lacks auto-detection of NIS absence - I don't know how to implement it. But this patch should be sufficient to fix sendmail build when base system has no NIS. The proposed patch replaces `-DNEWDB -DNIS -DMAP_REGEX' with `-DNEWDB -DMAP_REGEX'. Maybe it should be broader like s/-DNIS// but I prefer more conservative approach as there are less chances it will break anything. On the other hand there are chances that broader patch will work even when options are changed. diff -u -r sendmail.orig/Makefile sendmail/Makefile --- sendmail.orig/Makefile Tue Jan 4 13:00:02 2005 +++ sendmail/Makefile Tue Jan 4 13:21:25 2005 @@ -39,6 +39,7 @@ # Options to define Features: # SENDMAIL_WITHOUT_IPV6=yes # SENDMAIL_WITHOUT_MILTER=yes +# SENDMAIL_WITHOUT_NIS=yes # SENDMAIL_WITHOUT_SHMEM=yes # SENDMAIL_WITH_TLS=yes # SENDMAIL_WITH_SMTPS=yes @@ -273,10 +274,16 @@ @${ECHO_CMD} "DEPENDENCY NOTE: SENDMAIL_WITH_SOCKETMAP will be enabled to support SENDMAIL_WITH_CYRUSLOOKUP" .endif +SED_SCRIPT= -e "s;\`-pthread\';\`${PTHREAD_LIBS}\';" \ + -e "s;\`-O\';\`${CFLAGS}\';" + +.if defined(SENDMAIL_WITHOUT_NIS) +SED_SCRIPT+= -e "s;\`-DNEWDB -DNIS -DMAP_REGEX\';\`-DNEWDB -DMAP_REGEX\';" +.endif + do-configure: @${MV} ${WRKSRC}/devtools/OS/FreeBSD ${WRKSRC}/devtools/OS/FreeBSD.sed - ${SED} -e "s;\`-pthread\';\`${PTHREAD_LIBS}\';" \ - -e "s;\`-O\';\`${CFLAGS}\';" \ + ${SED} ${SED_SCRIPT} \ ${WRKSRC}/devtools/OS/FreeBSD.sed \ > ${WRKSRC}/devtools/OS/FreeBSD ${SED} -e "s=%%PREFIX%%=${PREFIX}=g" \