Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Feb 2014 18:54:56 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r342358 - head/mail/nmh
Message-ID:  <201402021854.s12IsuF9084721@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Sun Feb  2 18:54:56 2014
New Revision: 342358
URL: http://svnweb.freebsd.org/changeset/ports/342358
QAT: https://qat.redports.org/buildarchive/r342358/

Log:
  Clean up nmh port.
  
  - Convert to USES
  - Stage support
  - Convert more options to OptionsNG
  - Add TLS option
  - Update to use pkg-message instead of pkg-install for final message
  - Add WITH_DEBUG support
  - Add LICENSE directive
  
  PR:		186380
  Submitted by:	Mikhail <mp39590@gmail.com>

Modified:
  head/mail/nmh/Makefile
  head/mail/nmh/pkg-install
  head/mail/nmh/pkg-plist

Modified: head/mail/nmh/Makefile
==============================================================================
--- head/mail/nmh/Makefile	Sun Feb  2 18:53:04 2014	(r342357)
+++ head/mail/nmh/Makefile	Sun Feb  2 18:54:56 2014	(r342358)
@@ -10,30 +10,23 @@ MASTER_SITE_SUBDIR=	nmh
 MAINTAINER=	cy@FreeBSD.org
 COMMENT=	A cleaned up MH mailer suite
 
-USE_GMAKE=	yes
+LICENSE=	BSD3CLAUSE
+
+USES=		gmake
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--libdir=${PREFIX}/libexec/nmh \
-		--sysconfdir=${PREFIX}/etc/nmh
+		--sysconfdir=${PREFIX}/etc/nmh \
+		--docdir=${DOCSDIR}
+
 .ifdef NMH_EDITOR
 CONFIGURE_ARGS+=	--with-editor=${NMH_EDITOR}
 .endif
 .ifdef NMH_MASQUERADE
 CONFIGURE_ARGS+=	--enable-masquerade="${NMH_MASQUERADE}"
 .endif
-.ifndef NMH_LOCKING
-NMH_LOCKING=FLOCK_LOCKING
-.endif
-.ifdef NMH_MTS
-CONFIGURE_ARGS+=	--with-mts=${NMH_MTS}
-.endif
 .ifdef NMH_PAGER
 CONFIGURE_ARGS+=	--with-pager=${NMH_PAGER}
 .endif
-.ifdef NMH_POP
-CONFIGURE_ARGS+=	--${NMH_POP}-pop
-.else
-CONFIGURE_ARGS+=	--enable-pop
-.endif
 .ifdef NMH_SMTPSERVERS
 CONFIGURE_ARGS+=	--with-smtpservers="${NMH_SMTPSERVERS}"
 .endif
@@ -43,43 +36,55 @@ CONFIGURE_ARGS+=	${NMH_EXTRA_CONFIGURE_A
 .endif
 MAKE_JOBS_UNSAFE=	yes
 
-CFLAGS+=	-D${NMH_LOCKING} -O
+OPTIONS_DEFINE=	DOCS HASH_BKP SASL2 TLS REPLYFILTER
+OPTIONS_SINGLE=	MTS LOCKING
+OPTIONS_SINGLE_MTS=	SMTP SENDMAIL
+OPTIONS_SINGLE_LOCKING=	DOT FCNTL FLOCK LOCKF
+
+SASL2_DESC=	SASL2 support
+SASL2_CONFIGURE_ON=	--with-cyrus-sasl
+SASL2_LIB_DEPENDS=	libsasl2.so:${PORTSDIR}/security/cyrus-sasl2
+SASL2_LDFLAGS=-L${LOCALBASE}/lib
+SASL2_CPPFLAGS=-I${LOCALBASE}/include
+HASH_BKP_DESC=	Use hash as backup prefix (default is a comma)
+HASH_BKP_CONFIGURE_ON=	--with-hash-backup
+REPLYFILTER_DESC=	Install dependencies for contrib/replyfilter
+REPLYFILTER_RUN_DEPENDS=	p5-MIME-Tools>=0:${PORTSDIR}/mail/p5-MIME-Tools \
+				p5-Mail-Tools>=0:${PORTSDIR}/mail/p5-Mail-Tools
+
+SMTP_DESC=	Use remote SMTP
+SMTP_CONFIGURE_ON=	--with-mts=smtp
+SENDMAIL_DESC=	Use local sendmail
+SENDMAIL_CONFIGURE_ON=	--with-mts=sendmail
+
+DOT_DESC=	Dot file locking
+DOT_CONFIGURE_ON=	--with-locking=dot
+FCNTL_DESC=	fcntl() file locking
+FCNTL_CONFIGURE_ON=	--with-locking=fcntl
+FLOCK_DESC=	flock() file locking
+FLOCK_CONFIGURE_ON=	--with-locking=flock
+LOCKF_DESC=	lockf file locking
+LOCKF_CONFIGURE_ON=	--with-locking=lockf
 
-CONFIGURE_ARGS+=	--docdir=${DOCSDIR}
+OPTIONS_DEFAULT=	SMTP DOT
 
-OPTIONS_DEFINE=	SASL2
-SASL2_DESC=	Cyrus SASL2 support
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MSASL2}
-LIB_DEPENDS+=		sasl2:${PORTSDIR}/security/cyrus-sasl2
-CONFIGURE_ARGS+=	--with-cyrus-sasl
-CONFIGURE_ENV+=		LDFLAGS=-L"${PREFIX}"/lib CPPFLAGS=" -I${PREFIX}/include"
-.endif
-
-MAN1=	ali.1 anno.1 burst.1 comp.1 dist.1 flist.1 flists.1 fnext.1 \
-	folder.1 folders.1 forw.1 fprev.1 inc.1 install-mh.1 mark.1 \
-	mh-chart.1 mhbuild.1 mhl.1 mhlist.1 mhmail.1 mhn.1 \
-	mhparam.1 mhpath.1 mhshow.1 mhstore.1 msgchk.1 msh.1 \
-	next.1 new.1 nmh.1 packf.1 pick.1 prev.1 prompter.1 rcvdist.1 \
-	rcvpack.1 rcvstore.1 rcvtty.1 refile.1 repl.1 rmf.1 rmm.1 \
-	scan.1 send.1 sendfiles.1 show.1 slocal.1 \
-	sortm.1 unseen.1 whatnow.1 whom.1
-
-MAN5=	mh-alias.5 mh-draft.5 mh-format.5 mh-mail.5 mh-profile.5 \
-	mh-sequence.5 mh-tailor.5 mts.conf.5
+.if ${PORT_OPTIONS:MTLS}
+CONFIGURE_ARGS+=	--with-tls
+USE_OPENSSL=	yes
+.endif
 
-MLINKS=	mh-profile.5 mh_profile.5
+.if defined(WITH_DEBUG)
+CONFIGURE_ARGS+=	--enable-debug
+LDFLAGS+=	-g
+DEBUG_FLAGS+=	-O0 -Wall -Wextra -g
+.endif
 
-MAN8=	ap.8 conflict.8 dp.8 fmtdump.8 post.8
 CONFLICTS=	ja-mh-[0-9]*
 
 post-patch:
 	@${REINPLACE_CMD} -e "s|autoconf|${AUTOCONF}|;\
 		s|autoheader|${AUTOHEADER}|" ${WRKSRC}/Makefile.in
 
-post-install:
-	@PKG_PREFIX='${PREFIX}' ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-
 .include <bsd.port.mk>

Modified: head/mail/nmh/pkg-install
==============================================================================
--- head/mail/nmh/pkg-install	Sun Feb  2 18:53:04 2014	(r342357)
+++ head/mail/nmh/pkg-install	Sun Feb  2 18:54:56 2014	(r342358)
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-case "$2" in
-  ""|POST-INSTALL)
-    echo "Changing ${PKG_PREFIX}/bin/inc to group 'mail'"
-    chgrp mail ${PKG_PREFIX}/bin/inc
-
-    echo "Enabling setgid for ${PKG_PREFIX}/bin/inc"
-    chmod g+s ${PKG_PREFIX}/bin/inc
-
-    for file in ${PKG_PREFIX}/etc/nmh/*-dist ; do
-      b=`basename $file -dist`
-      if [ \! -f ${PKG_PREFIX}/etc/nmh/$b ] ; then
-	cp $file ${PKG_PREFIX}/etc/nmh/$b
-	chmod u+w ${PKG_PREFIX}/etc/nmh/$b
-      fi
-    done
- 
-    cat <<EOF
-=============================================================
-
-Some files you might need to customize include the following:
-
-    ${PKG_PREFIX}/etc/nmh/mhn.defaults - For example, you may
-        want to adjust the programs used to handle various MIME
-        content types.
-
-    ${PKG_PREFIX}/etc/nmh/mts.conf - For example, you may need
-        to adjust the "servers" setting if you don't have a
-        locally installed sendmail (or other MTA).
-
-=============================================================
-EOF
-  ;;
-esac

Modified: head/mail/nmh/pkg-plist
==============================================================================
--- head/mail/nmh/pkg-plist	Sun Feb  2 18:53:04 2014	(r342357)
+++ head/mail/nmh/pkg-plist	Sun Feb  2 18:54:56 2014	(r342358)
@@ -10,7 +10,11 @@ bin/folder
 bin/folders
 bin/forw
 bin/fprev
+@group mail
+@mode 2755
 bin/inc
+@mode
+@group
 bin/install-mh
 bin/mark
 bin/mhbuild
@@ -92,7 +96,6 @@ etc/nmh/replcomps-dist
 @unexec if cmp -s %D/etc/nmh/replgroupcomps %D/etc/nmh/replgroupcomps-dist; then rm -f %D/etc/nmh/replgroupcomps; else echo 'Local changes: %D/etc/nmh/replgroupcomps (not removed)' >&2; fi
 etc/nmh/replgroupcomps-dist
 @exec [ -f %D/etc/nmh/replgroupcomps ] || cp %D/etc/nmh/replgroupcomps-dist %D/etc/nmh/replgroupcomps
-@unexec if cmp -s %D/etc/nmh/scan.MMDDYY %D/etc/nmh/scan-dist; then rm -f %D/etc/nmh/scan; else echo 'Local changes: %D/etc/nmh/scan (not removed)' >&2; fi
 @unexec if cmp -s %D/etc/nmh/scan.MMDDYY %D/etc/nmh/scan.MMDDYY-dist; then rm -f %D/etc/nmh/scan.MMDDYY; else echo 'Local changes: %D/etc/nmh/scan.MMDDYY (not removed)' >&2; fi
 etc/nmh/scan.MMDDYY-dist
 @exec [ -f %D/etc/nmh/scan.MMDDYY ] || cp %D/etc/nmh/scan.MMDDYY-dist %D/etc/nmh/scan.MMDDYY
@@ -134,30 +137,95 @@ libexec/nmh/rcvtty
 libexec/nmh/slocal
 libexec/nmh/spost
 libexec/nmh/viamail
-%%DOCSDIR%%/README.about
-%%DOCSDIR%%/MAILING-LISTS
-%%DOCSDIR%%/README.SASL
-%%DOCSDIR%%/COPYRIGHT
-%%DOCSDIR%%/README.manpages
-%%DOCSDIR%%/MAIL.FILTERING
-%%DOCSDIR%%/NEWS
-%%DOCSDIR%%/README-components
-%%DOCSDIR%%/README-ATTACHMENTS
-%%DOCSDIR%%/COMPLETION-ZSH
-%%DOCSDIR%%/README
-%%DOCSDIR%%/README-HOOKS
-%%DOCSDIR%%/FAQ
-%%DOCSDIR%%/contrib/build_nmh
-%%DOCSDIR%%/contrib/nmh.spec
-%%DOCSDIR%%/contrib/replyfilter
-%%DOCSDIR%%/DIFFERENCES
-%%DOCSDIR%%/COMPLETION-BASH
-%%DOCSDIR%%/README.developers
-%%DOCSDIR%%/COMPLETION-TCSH
-%%DOCSDIR%%/INSTALL
-%%DOCSDIR%%/TODO
-%%DOCSDIR%%/VERSION
+man/man1/ali.1.gz
+man/man1/anno.1.gz
+man/man1/burst.1.gz
+man/man1/comp.1.gz
+man/man1/dist.1.gz
+man/man1/flist.1.gz
+man/man1/flists.1.gz
+man/man1/fnext.1.gz
+man/man1/folder.1.gz
+man/man1/folders.1.gz
+man/man1/forw.1.gz
+man/man1/fprev.1.gz
+man/man1/inc.1.gz
+man/man1/install-mh.1.gz
+man/man1/mark.1.gz
+man/man1/mh-chart.1.gz
+man/man1/mhbuild.1.gz
+man/man1/mhl.1.gz
+man/man1/mhlist.1.gz
+man/man1/mhmail.1.gz
+man/man1/mhn.1.gz
+man/man1/mhparam.1.gz
+man/man1/mhpath.1.gz
+man/man1/mhshow.1.gz
+man/man1/mhstore.1.gz
+man/man1/msgchk.1.gz
+man/man1/msh.1.gz
+man/man1/new.1.gz
+man/man1/next.1.gz
+man/man1/nmh.1.gz
+man/man1/packf.1.gz
+man/man1/pick.1.gz
+man/man1/prev.1.gz
+man/man1/prompter.1.gz
+man/man1/rcvdist.1.gz
+man/man1/rcvpack.1.gz
+man/man1/rcvstore.1.gz
+man/man1/rcvtty.1.gz
+man/man1/refile.1.gz
+man/man1/repl.1.gz
+man/man1/rmf.1.gz
+man/man1/rmm.1.gz
+man/man1/scan.1.gz
+man/man1/send.1.gz
+man/man1/sendfiles.1.gz
+man/man1/show.1.gz
+man/man1/slocal.1.gz
+man/man1/sortm.1.gz
+man/man1/unseen.1.gz
+man/man1/whatnow.1.gz
+man/man1/whom.1.gz
+man/man5/mh-alias.5.gz
+man/man5/mh-draft.5.gz
+man/man5/mh-format.5.gz
+man/man5/mh-mail.5.gz
+man/man5/mh-profile.5.gz
+man/man5/mh-sequence.5.gz
+man/man5/mh-tailor.5.gz
+man/man5/mh_profile.5.gz
+man/man5/mts.conf.5.gz
+man/man8/ap.8.gz
+man/man8/conflict.8.gz
+man/man8/dp.8.gz
+man/man8/fmtdump.8.gz
+man/man8/post.8.gz
+%%PORTDOCS%%%%DOCSDIR%%/README.about
+%%PORTDOCS%%%%DOCSDIR%%/MAILING-LISTS
+%%PORTDOCS%%%%DOCSDIR%%/README.SASL
+%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
+%%PORTDOCS%%%%DOCSDIR%%/README.manpages
+%%PORTDOCS%%%%DOCSDIR%%/MAIL.FILTERING
+%%PORTDOCS%%%%DOCSDIR%%/NEWS
+%%PORTDOCS%%%%DOCSDIR%%/README-components
+%%PORTDOCS%%%%DOCSDIR%%/README-ATTACHMENTS
+%%PORTDOCS%%%%DOCSDIR%%/COMPLETION-ZSH
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README-HOOKS
+%%PORTDOCS%%%%DOCSDIR%%/FAQ
+%%PORTDOCS%%%%DOCSDIR%%/contrib/build_nmh
+%%PORTDOCS%%%%DOCSDIR%%/contrib/nmh.spec
+%%PORTDOCS%%%%DOCSDIR%%/contrib/replyfilter
+%%PORTDOCS%%%%DOCSDIR%%/DIFFERENCES
+%%PORTDOCS%%%%DOCSDIR%%/COMPLETION-BASH
+%%PORTDOCS%%%%DOCSDIR%%/README.developers
+%%PORTDOCS%%%%DOCSDIR%%/COMPLETION-TCSH
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%PORTDOCS%%%%DOCSDIR%%/VERSION
 @dirrmtry etc/nmh
 @dirrm libexec/nmh
-@dirrm %%DOCSDIR%%/contrib
-@dirrm %%DOCSDIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/contrib
+%%PORTDOCS%%@dirrm %%DOCSDIR%%



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