# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
name chasen-${dicname}-${encoding}
categories textproc japanese
homepage http://sourceforge.jp/projects/${dicname}/
description IPA dictionary of Shift-JIS encoding for ChaSen
long_description ${description}
distname ${dicname}-${version}
master_sites sourceforge_jp:${dicname}/24435
checksums rmd160 5e37c750801df63439032be4954c4b63a44012cb \
sha256 ba2744cc16142159b330075e13eed4565908915ac95a790d38dea540e0963c1c
depends_lib port:chasen-base
if {[file exists ${prefix}/share/doc/chasen/chasen_dartsclone]} {
default_variants +dartsclone
variant dartsclone description {Use darts-clone instead of darts} {}
configure.args --with-chasenrc-path=${destroot}${prefix}/etc/chasen/chasenrc-${dicname}-${encoding}
if {[variant_isset dartsclone]} {
set dartslib "dartsclone"
if {![file exists ${prefix}/share/doc/chasen/chasen_${dartslib}]} {
return -code error "The variant you chose is not compatible with the ChaSen you've installed."
reinplace "s|PACKAGE=${dicname}|PACKAGE=${dicname}-${encoding}|" ${worksrcpath}/configure
reinplace "s|/makemat|/makemat -i ${nkf_encoding}|" ${worksrcpath}/Makefile.in
reinplace "s|/makeda|/makeda -i ${nkf_encoding}|" ${worksrcpath}/Makefile.in
foreach f [glob ${worksrcpath}/*.cha ${worksrcpath}/*.dic ${worksrcpath}/chasenrc.in] {
system "${prefix}/bin/nkf -E -${nkf_encoding} ${f}_ > ${f}"
file mkdir ${destroot}${prefix}/etc/chasen