From 3deb8d78b810b4173ce22f3f4089c5d766404b0a Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 6 Feb 2006 14:29:23 +0000 Subject: Don't compile in home-grown putenv(3) implementation if the target platform provides an implementation. This fixes build problems caused by the recent DragonFly patch under all operating systems which do not define the argument of putenv(3) as "const" (e.g. Solaris or Mac OS X). --- mail/metamail/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mail/metamail/Makefile b/mail/metamail/Makefile index 4b4c0153eae..4fc0bea999b 100644 --- a/mail/metamail/Makefile +++ b/mail/metamail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2006/02/05 23:09:56 joerg Exp $ +# $NetBSD: Makefile,v 1.40 2006/02/06 14:29:23 tron Exp $ DISTNAME= mm2.7 PKGNAME= metamail-2.7 @@ -40,6 +40,14 @@ SUBST_SED.sys= -e "s|PKG_SYSCONFDIR|\"${PKG_SYSCONFDIR}\"|g" post-patch: ${RM} -f ${WRKDIR}/mm2.7/src/bin/*.orig +pre-configure: + if ${GREP} putenv /usr/include/stdlib.h >/dev/null; \ + then \ + cd ${WRKSRC}/metamail; \ + ${MV} Makefile Makefile.pre-sed; \ + ${SED} -e s/putenv.o//g Makefile.pre-sed >Makefile; \ + fi + pre-install: ${INSTALL_DATA_DIR} ${EGDIR} -- cgit v1.2.3