pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/nmh Convert to use options framework.
details: https://anonhg.NetBSD.org/pkgsrc/rev/7f782f1ad2ce
branches: trunk
changeset: 499461:7f782f1ad2ce
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu Sep 22 22:00:41 2005 +0000
description:
Convert to use options framework.
diffstat:
mail/nmh/Makefile | 12 +++---------
mail/nmh/options.mk | 21 +++++++++++++++++++++
2 files changed, 24 insertions(+), 9 deletions(-)
diffs (62 lines):
diff -r 4963ac8dbb47 -r 7f782f1ad2ce mail/nmh/Makefile
--- a/mail/nmh/Makefile Thu Sep 22 21:50:03 2005 +0000
+++ b/mail/nmh/Makefile Thu Sep 22 22:00:41 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.56 2005/03/24 21:12:56 wiz Exp $
+# $NetBSD: Makefile,v 1.57 2005/09/22 22:00:41 jlam Exp $
DISTNAME= nmh-1.0.4
PKGREVISION= 6
@@ -20,11 +20,12 @@
# Locks supported by `mail.local' are ".lock" and flock(2).
.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
# Mail Transport Agent - either "smtp" or "sendmail"
NMH_MTA?= smtp
-GNU_CONFIGURE= # defined
+GNU_CONFIGURE= yes
USE_PKGINSTALL= yes
CONFIGURE_ARGS+= --libdir=${PREFIX}/libexec/nmh
@@ -88,13 +89,6 @@
.endfor
.undef f
-.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
-.endif
-
# This hopefully makes sure the permissions and ownership are right.
pre-install:
${INSTALL_DATA_DIR} ${EGDIR}
diff -r 4963ac8dbb47 -r 7f782f1ad2ce mail/nmh/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/nmh/options.mk Thu Sep 22 22:00:41 2005 +0000
@@ -0,0 +1,21 @@
+# $NetBSD: options.mk,v 1.1 2005/09/22 22:00:42 jlam Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.nmh
+PKG_SUPPORTED_OPTIONS= nmh-backup-hash
+PKG_OPTIONS_LEGACY_VARS+= NMH_HASH_BACKUP:nmh-backup-hash
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Prepend a "#" instead of a "," to the name of a message that is
+### "removed" by rmm.
+###
+.if !empty(PKG_OPTIONS:Mnmh-backup-hash)
+post-configure: nmh-hash-backup
+
+nmh-hash-backup:
+ cd ${WRKSRC}; file=config.h; \
+ ${SED} -e 's/^\(#define *BACKUP_PREFIX\) *.*/\1 "#"/' \
+ $$file > $$file.new; \
+ ${MV} -f $$file.new $$file
+.endif
Home |
Main Index |
Thread Index |
Old Index