Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --- pkgsrc/mail/nmh/Makefile 2001/02/17 18:24:57 1.39 +++ pkgsrc/mail/nmh/Makefile 2023/10/24 22:09:47 1.117 @@ -1,81 +1,101 @@ -# $NetBSD: Makefile,v 1.39 2001/02/17 18:24:57 wiz Exp $ -# FreeBSD Id: Makefile,v 1.2 1997/08/04 06:51:28 markm Exp -# +# $NetBSD: Makefile,v 1.117 2023/10/24 22:09:47 wiz Exp $ -DISTNAME= nmh-1.0.4 +DISTNAME= nmh-1.8 +PKGREVISION= 2 CATEGORIES= mail -MASTER_SITES= ftp://ftp.mhost.com/pub/nmh/ \ - ftp://ftp.gw.com/pub/unix/mail/mh/nmh/ +MASTER_SITES= https://download.savannah.nongnu.org/releases/nmh/ -MAINTAINER= kim@tac.nyc.ny.us -HOMEPAGE= http://www.mhost.com/nmh/ +MAINTAINER= leot@NetBSD.org +HOMEPAGE= https://www.nongnu.org/nmh/ COMMENT= Cleaned up MH mailer suite +LICENSE= modified-bsd -CONFLICTS= ja-mh-* +CONFLICTS= ja-mh-[0-9]* +CONFLICTS+= ja-mh6-[0-9]* -# We choose DOT_LOCKING in our patches because ".lock" files are -# the most common locking mechanism supported by mail software. -# It also works well over NFS. - -# Locks supported by `mail.local' are ".lock" and flock(2). +USE_TOOLS+= lex +USE_FEATURES+= strnlen .include "../../mk/bsd.prefs.mk" +.include "options.mk" + # Mail Transport Agent - either "smtp" or "sendmail" NMH_MTA?= smtp -GNU_CONFIGURE= # defined -CONFIGURE_ARGS+= --libdir=${PREFIX}/libexec/nmh -CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/nmh -CONFIGURE_ARGS+= --enable-nmh-pop -CONFIGURE_ARGS+= --with-mts=${NMH_MTA} +GNU_CONFIGURE= yes -.ifdef NMH_EDITOR -CONFIGURE_ARGS+= --with-editor=${NMH_EDITOR} -.endif - -.ifdef NMH_PAGER -CONFIGURE_ARGS+= --with-pager=${NMH_PAGER} -.endif - -.if defined(KERBEROS) && ${KERBEROS} == 4 -USE_KERBEROS= # defined -CONFIGURE_ARGS+= --with-krb4 -.else -CONFIGURE_ARGS+= --without-krb4 -.endif +GNU_CONFIGURE_LIBDIR= ${PREFIX}/libexec/nmh +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE} +CONFIGURE_ARGS+= --with-mts=${NMH_MTA:Q} +CONFIGURE_ARGS+= --without-readline DOCDIR= share/doc/nmh +EGDIR= ${PREFIX}/share/examples/nmh +INSTALLATION_DIRS= ${DOCDIR} ${EGDIR} -BUILD_DEFS+= NMH_MTA NMH_EDITOR NMH_PAGER NMH_HASH_BACKUP +BUILD_DEFS+= NMH_MTA NMH_EDITOR NMH_PAGER NMH_HASH_BACKUP PKG_SYSCONFBASE -# Since we patch the autoconf files as well as their outputs, avoid attempt -# to regenerate header input files with 'autoheader' by Makefile. -post-patch: - ${TOUCH} ${WRKSRC}/stamp-h.in - -.if defined(NMH_HASH_BACKUP) && (${NMH_HASH_BACKUP} == yes) -post-configure: - ${MV} ${WRKSRC}/config.h ${WRKSRC}/config.h.bak - ${SED} -e 's/^\(#define *BACKUP_PREFIX\) *.*/\1 "#"/' \ - < ${WRKSRC}/config.h.bak > ${WRKSRC}/config.h +PKG_SYSCONFSUBDIR= nmh +CONF_FILES= # empty +.for f in MailAliases \ + components \ + digestcomps \ + distcomps \ + forwcomps \ + mhical.12hour \ + mhical.24hour \ + mhl.body \ + mhl.digest \ + mhl.format \ + mhl.forward \ + mhl.headers \ + mhl.reply \ + mhl.replywithoutbody \ + mhn.defaults \ + mhshow.marker \ + mts.conf \ + rcvdistcomps \ + rcvdistcomps.outbox \ + replcomps \ + replgroupcomps \ + rmmproc.messageid \ + scan.MMDDYY \ + scan.YYYYMMDD \ + scan.curses \ + scan.default \ + scan.highlighted \ + scan.mailx \ + scan.nomime \ + scan.size \ + scan.time \ + scan.timely \ + scan.unseen +CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} +.endfor + +# The configure script checks for arc4random(), but the program uses +# arc4random_buf(); netbsd-5 (and presumably earlier) and some Darwin +# versions has the one but not the other. Just disable it, because all +# it's using the randomness for is message-ids. +.if !empty(MACHINE_PLATFORM:MNetBSD-[1-5].*-*) || \ + !empty(MACHINE_PLATFORM:MDarwin-[1-9].*-*) || \ + !empty(MACHINE_PLATFORM:MDarwin-1[0-2].*-*) +CONFIGURE_ENV+= ac_cv_func_arc4random=no .endif -# ABOUT CONFIGURATION FILES: -# - mhn.defaults is generated by nmh during make; we don't use that -# copy because its contents depend on what happened to be installed -# on the build system; we want a reliably reconstructable package -# - mhn.defaults and mts.conf are only created if they don't exist; -# the PLIST only has mhn.defaults.dist and mts.conf.dist, so that -# local modifications to the configuration files won't get lost on -# upgrading the package +TEST_TARGET= check post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/${DOCDIR} - for f in `${GREP} '^${DOCDIR}/' ${PKGDIR}/PLIST`; do \ - ${INSTALL_DATA} ${WRKSRC}/`basename $$f` ${PREFIX}/${DOCDIR}; \ - done - ${INSTALL_DATA} ${FILESDIR}/mhn.defaults.dist ${PREFIX}/etc/nmh - PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL + ${INSTALL_DATA} ${FILESDIR}/mhn.defaults.dist \ + ${DESTDIR}${EGDIR}/mhn.defaults + +.if ${OPSYS} == "Linux" +.include "../../databases/gdbm_compat/buildlink3.mk" +CONFIGURE_ARGS+= --with-ndbm='gdbm_compat -lgdbm' +CONFIGURE_ARGS+= --with-ndbmheader=ndbm.h +.endif +.include "../../converters/libiconv/buildlink3.mk" +.include "../../mk/terminfo.buildlink3.mk" .include "../../mk/bsd.pkg.mk"