diff options
Diffstat (limited to 'japanese/mecab-ipadic')
-rw-r--r-- | japanese/mecab-ipadic/Makefile | 53 | ||||
-rw-r--r-- | japanese/mecab-ipadic/pkg-plist | 9 |
2 files changed, 39 insertions, 23 deletions
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 |