aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authortota <tota@FreeBSD.org>2016-03-26 19:42:55 +0800
committertota <tota@FreeBSD.org>2016-03-26 19:42:55 +0800
commit957adc66843cadb0d43dbf7b7e8d81ccbe787acb (patch)
tree8cb433440bfb73d1b488a693a26a0423528437c4 /japanese
parent44982eab401bfb7709eeb2aabe6809da520c4006 (diff)
downloadfreebsd-ports-gnome-957adc66843cadb0d43dbf7b7e8d81ccbe787acb.tar.gz
freebsd-ports-gnome-957adc66843cadb0d43dbf7b7e8d81ccbe787acb.tar.zst
freebsd-ports-gnome-957adc66843cadb0d43dbf7b7e8d81ccbe787acb.zip
- Separate japanese/mecab-ipadic into three slave ports
to identify character set by means of package name * japanese/mecab-ipadic-eucjp * japanese/mecab-ipadic-sjis * japanese/mecab-ipadic-utf8 (default) - Set default character set to UTF-8 - Unbreak mecab-ipadic-sjis - Bump PORTREVISION PR: 200325 Submitted by: Koichiro IWAO (meta+ports_AT_vmeta_DOT_jp) Approved by: maintainer timeout (> 8 weeks)
Diffstat (limited to 'japanese')
-rw-r--r--japanese/Makefile3
-rw-r--r--japanese/mecab-ipadic-eucjp/Makefile10
-rw-r--r--japanese/mecab-ipadic-sjis/Makefile10
-rw-r--r--japanese/mecab-ipadic-utf8/Makefile10
-rw-r--r--japanese/mecab-ipadic/Makefile53
-rw-r--r--japanese/mecab-ipadic/pkg-plist9
6 files changed, 72 insertions, 23 deletions
diff --git a/japanese/Makefile b/japanese/Makefile
index 81c89860e2f8..78b067ee02f0 100644
--- a/japanese/Makefile
+++ b/japanese/Makefile
@@ -161,6 +161,9 @@
SUBDIR += man-doc
SUBDIR += mecab
SUBDIR += mecab-ipadic
+ SUBDIR += mecab-ipadic-eucjp
+ SUBDIR += mecab-ipadic-sjis
+ SUBDIR += mecab-ipadic-utf8
SUBDIR += mg
SUBDIR += mh
SUBDIR += migemo
diff --git a/japanese/mecab-ipadic-eucjp/Makefile b/japanese/mecab-ipadic-eucjp/Makefile
new file mode 100644
index 000000000000..b401b0dc2fe1
--- /dev/null
+++ b/japanese/mecab-ipadic-eucjp/Makefile
@@ -0,0 +1,10 @@
+# Created by: Koichiro IWAO <meta+ports@vmeta.jp>
+# $FreeBSD$
+
+PKGNAMESUFFIX= -eucjp
+
+COMMENT= Japanese Morphological Dictionary for MeCab (EUC-JP)
+
+MASTERDIR= ${.CURDIR}/../mecab-ipadic
+
+.include "${MASTERDIR}/Makefile"
diff --git a/japanese/mecab-ipadic-sjis/Makefile b/japanese/mecab-ipadic-sjis/Makefile
new file mode 100644
index 000000000000..ab18aa5ffada
--- /dev/null
+++ b/japanese/mecab-ipadic-sjis/Makefile
@@ -0,0 +1,10 @@
+# Created by: Koichiro IWAO <meta+ports@vmeta.jp>
+# $FreeBSD$
+
+PKGNAMESUFFIX= -sjis
+
+COMMENT= Japanese Morphological Dictionary for MeCab (Shift JIS)
+
+MASTERDIR= ${.CURDIR}/../mecab-ipadic
+
+.include "${MASTERDIR}/Makefile"
diff --git a/japanese/mecab-ipadic-utf8/Makefile b/japanese/mecab-ipadic-utf8/Makefile
new file mode 100644
index 000000000000..eac47a4ed958
--- /dev/null
+++ b/japanese/mecab-ipadic-utf8/Makefile
@@ -0,0 +1,10 @@
+# Created by: Koichiro IWAO <meta+ports@vmeta.jp>
+# $FreeBSD$
+
+PKGNAMESUFFIX= -utf8
+
+COMMENT= Japanese Morphological Dictionary for MeCab (UTF-8)
+
+MASTERDIR= ${.CURDIR}/../mecab-ipadic
+
+.include "${MASTERDIR}/Makefile"
diff --git a/japanese/mecab-ipadic/Makefile b/japanese/mecab-ipadic/Makefile
index 812dd0601790..a451ad6626eb 100644
--- a/japanese/mecab-ipadic/Makefile
+++ b/japanese/mecab-ipadic/Makefile
@@ -3,13 +3,29 @@
PORTNAME= mecab-ipadic
DISTVERSION= 2.7.0-20070801
+PORTREVISION= 1
CATEGORIES= japanese textproc
MASTER_SITES= GOOGLE_CODE
PROJECTHOST= mecab
MAINTAINER= yasu@utahime.org
-COMMENT= Japanese Morphological Dictionary for MeCab
+COMMENT?= MeCab IPA dictionary meta-port
+.if empty(PKGNAMESUFFIX)
+USES= metaport
+OPTIONS_RADIO= CHARSET
+OPTIONS_RADIO_CHARSET= EUCJP SHIFTJIS UTF8
+OPTIONS_DEFAULT= UTF8
+
+EUCJP_DESC= Use EUC-JP as dictionary charset.
+SHIFTJIS_DESC= Use SHIFT-JIS as dictionary charset.
+UTF8_DESC= Use UTF-8 as dictionary charset.
+EUCJP_RUN_DEPENDS= ${LOCALBASE}/lib/mecab/dic/ipadic/char.bin:${PORTSDIR}/japanese/mecab-ipadic-eucjp
+SHIFTJIS_RUN_DEPENDS= ${LOCALBASE}/lib/mecab/dic/ipadic/char.bin:${PORTSDIR}/japanese/mecab-ipadic-sjis
+UTF8_RUN_DEPENDS= ${LOCALBASE}/lib/mecab/dic/ipadic/char.bin:${PORTSDIR}/japanese/mecab-ipadic-utf8
+.endif
+
+.if !empty(PKGNAMESUFFIX)
LICENSE= NAIST ICOT
LICENSE_COMB= multi
LICENSE_NAME_NAIST= NAIST
@@ -26,21 +42,30 @@ USE_PERL5= build
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-dicdir=${PREFIX}/lib/mecab/dic/ipadic
-OPTIONS_RADIO= CHARSET
-OPTIONS_RADIO_CHARSET= EUCJP SHIFTJIS UTF8
-
-EUCJP_DESC= Use EUC-JP as dictionary charset.
-SHIFTJIS_DESC= Use SHIFT-JIS as dictionary charset.
-UTF8_DESC= Use UTF-8 as dictionary charset.
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MEUCJP}
+.if ${PKGNAMESUFFIX:S,-,,} == "eucjp"
CONFIGURE_ARGS+= --with-charset=euc-jp
-.elif ${PORT_OPTIONS:MSHIFTJIS}
-CONFIGURE_ARGS+= --with-charset=shift_jis
-.elif ${PORT_OPTIONS:MUTF8}
+CONFLICTS= ja-mecab-ipadic-utf8-[0-9]* ja-mecab-ipadic-sjis-[0-9]*
+.elif ${PKGNAMESUFFIX:S,-,,} == "sjis"
+CONFIGURE_ARGS+= --with-charset=shiftjis
+CONFLICTS= ja-mecab-ipadic-eucjp-[0-9]* ja-mecab-ipadic-utf8-[0-9]*
+.elif ${PKGNAMESUFFIX:S,-,,} == "utf8"
CONFIGURE_ARGS+= --with-charset=utf-8
+CONFLICTS= ja-mecab-ipadic-eucjp-[0-9]* ja-mecab-ipadic-sjis-[0-9]*
.endif
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
+
+PLIST_FILES= \
+ lib/mecab/dic/ipadic/char.bin \
+ lib/mecab/dic/ipadic/dicrc \
+ lib/mecab/dic/ipadic/left-id.def \
+ lib/mecab/dic/ipadic/matrix.bin \
+ lib/mecab/dic/ipadic/pos-id.def \
+ lib/mecab/dic/ipadic/rewrite.def \
+ lib/mecab/dic/ipadic/right-id.def \
+ lib/mecab/dic/ipadic/sys.dic \
+ lib/mecab/dic/ipadic/unk.dic
+
+.endif # !empty(PKGNAMESUFFIX)
+
.include <bsd.port.mk>
diff --git a/japanese/mecab-ipadic/pkg-plist b/japanese/mecab-ipadic/pkg-plist
deleted file mode 100644
index 2660c7e5ebf0..000000000000
--- a/japanese/mecab-ipadic/pkg-plist
+++ /dev/null
@@ -1,9 +0,0 @@
-lib/mecab/dic/ipadic/char.bin
-lib/mecab/dic/ipadic/dicrc
-lib/mecab/dic/ipadic/left-id.def
-lib/mecab/dic/ipadic/matrix.bin
-lib/mecab/dic/ipadic/pos-id.def
-lib/mecab/dic/ipadic/rewrite.def
-lib/mecab/dic/ipadic/right-id.def
-lib/mecab/dic/ipadic/sys.dic
-lib/mecab/dic/ipadic/unk.dic