ports/175206: [PATCH] mail/bsfilter: adopt OptionsNG and trim makefile header

KIMURA Yasuhiro yasu at utahime.org
Fri Jan 11 15:04:05 UTC 2013


License information is added. So please commit attached patch instead
of original one.

Regards.
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile	(revision 310228)
+++ Makefile	(working copy)
@@ -1,9 +1,4 @@
-# New ports collection makefile for:    bsfilter
-# Date created:         1 Mar 2004
-# Whom:                 Masafumi Otsune <info at otsune.com>
-#
 # $FreeBSD$
-#
 
 PORTNAME=	bsfilter
 PORTVERSION=	1.0.17
@@ -15,26 +10,32 @@
 MAINTAINER=	info at otsune.com
 COMMENT=	Bayesian spam filter written in Ruby
 
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
+
 RUN_DEPENDS=	${RUBY_ARCHLIBDIR}/gdbm.so:${PORTSDIR}/databases/ruby-gdbm
 
 NO_BUILD=	yes
 USE_RUBY=	yes
 
-OPTIONS=	CHASEN "Japanese Morphological Analysis Support" Off \
-		MECAB "Part-of-Speech and Morphological Analyzer" Off
+OPTIONS_DEFINE=	CHASEN DOCS MECAB
+OPTIONS_DEFAULT=	DOCS
 
-.include <bsd.port.pre.mk>
+CHASEN_DESC=	Japanese Morphological Analysis Support
+MECAB_DESC=	Part-of-Speech and Morphological Analyzer
 
-.if defined(WITH_CHASEN)
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MCHASEN}
 RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/chasen.so:${PORTSDIR}/japanese/ruby-chasen
 .endif
-.if defined(WITH_MECAB)
+.if ${PORT_OPTIONS:MMECAB}
 RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/MeCab.so:${PORTSDIR}/japanese/ruby-mecab
 .endif
 
 do-install:
 	@${INSTALL_SCRIPT} ${WRKSRC}/bsfilter/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${EXAMPLESDIR}
 .for FILE in bsfilter.conf.sample dot-qmail.sample
 	@${INSTALL_DATA} ${FILESDIR}/${FILE} ${EXAMPLESDIR}
@@ -47,4 +48,4 @@
 post-install:
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>


More information about the freebsd-ports-bugs mailing list