ports/175258: [PATCH] japanese/mecab: add license information etc.

Yasuhiro KIMURA yasu at utahime.org
Thu Jan 24 00:52:10 UTC 2013


WITH_CHARSET is OptionsNG-fied using OPTIONS_RADIO. So please commit
attached patch instead of previous ones.

Regards.

-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile	(revision 310845)
+++ Makefile	(working copy)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	mecab
-# Date created:		2 April 2003
-# Whom:			Akinori MUSHA aka knu <knu at idaemons.org>
-#
+# Created by: Akinori MUSHA aka knu <knu at idaemons.org>
 # $FreeBSD$
-#
 
 PORTNAME=	mecab
 PORTVERSION=	0.994
@@ -13,6 +9,12 @@
 MAINTAINER=	clsung at FreeBSD.org
 COMMENT=	Yet Another Part-of-Speech and Morphological Analyzer
 
+LICENSE=	BSD GPLv2 LGPL21
+LICENSE_COMB=	dual
+LICENSE_FILE_BSD=	${WRKSRC}/BSD
+LICENSE_FILE_GPLv2=	${WRKSRC}/GPL
+LICENSE_FILE_LGPL21=	${WRKSRC}/LGPL
+
 USE_AUTOTOOLS=	libtool
 USE_ICONV=	yes
 USE_PERL5_BUILD=	yes
@@ -22,17 +24,29 @@
 CPPFLAGS+=	${PTHREAD_CFLAGS} -I ${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-# Default charset (euc-jp/shift_jis/utf-8)
-.if defined(WITH_CHARSET)
-CONFIGURE_ARGS+=	--with-charset=${WITH_CHARSET}
-.endif
-
 MAN1=		mecab.1
 
 DOCS=		AUTHORS README doc/*.html
 
+OPTIONS_DEFINE=	DOCS
+OPTIONS_DEFAULT=	DOCS
+OPTIONS_RADIO=	CHARSET
+OPTIONS_RADIO_CHARSET=	EUCJP SHIFTJIS UTF8
+EUCJP_DESC=	Use EUC-JP as default charset.
+SHIFTJIS_DESC=	Use SHIFT-JIS as default charset.
+UTF8_DESC=	Use UTF-8 as default charset.
+
 .include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
+.if ${PORT_OPTIONS:MEUCJP}
+CONFIGURE_ARGS+=	--with-charset=euc-jp
+.elif ${PORT_OPTIONS:MSHIFTJIS}
+CONFIGURE_ARGS+=	--with-charset=shift_jis
+.elif ${PORT_OPTIONS:MUTF8}
+CONFIGURE_ARGS+=	--with-charset=utf-8
+.endif
+
 post-patch:
 	${REINPLACE_CMD} -e 's/-lpthread/${PTHREAD_LIBS}/g' \
 			 -e 's/-O3/${CFLAGS}/' ${WRKSRC}/${CONFIGURE_SCRIPT}
@@ -48,7 +62,7 @@
 	@if [ ! -f ${PREFIX}/etc/mecabrc ]; then \
 		${INSTALL_DATA} ${PREFIX}/etc/mecabrc.dist ${PREFIX}/etc/mecabrc; \
 	fi
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${DOCSDIR}
 .for f in ${DOCS}
 	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/
Index: pkg-descr
===================================================================
--- pkg-descr	(revision 310845)
+++ pkg-descr	(working copy)
@@ -1,4 +1,4 @@
 MeCab: Yet Another Part-of-Speech and Morphological Analyzer
 
 Author:	Taku Kudo <taku at chasen.org>
-WWW:	http://mecab.sourceforge.net/
+WWW:	https://code.google.com/p/mecab/


More information about the freebsd-ports-bugs mailing list