# -*- 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
categories textproc japanese
description KN parser (Kurohashi-Nagao parser) which detects dependency of Japanese sentences.
long_description ${description}
homepage http://nlp.ist.i.kyoto-u.ac.jp/index.php?KNP
master_sites http://nlp.kuee.kyoto-u.ac.jp/nl-resource/knp/
checksums sha1 9650490cf38bfaacc15a6d81b1b47c9043df8c90 \
rmd160 645882f1638b033f626cb9f77e4ab2af56c98d7e
patchfiles patch-system.diff \
if {${os.major} >= 12 && ${os.platform} eq "darwin"} {
patchfiles-append patch-sed.diff
depends_lib port:juman6 \
configure.args --with-cdb \
--with-juman-prefix=${prefix}/lib/juman6
# Note: compiling with Boehm GC library (--with-boehm-gc) makes the executable cause a segmentation fault.
# install the distribution into ${prefix_knp3}.
set prefix_knp3 ${prefix}/lib/${name}
configure.pre_args --prefix=${prefix_knp3}
# refer to the files of juman6 instead of the standard ones.
configure.cppflags "-I${prefix}/lib/juman6/include -I${prefix}/include"
configure.ldflags "-L${prefix}/lib/juman6/lib -L${prefix}/lib"
# install knp3 as an executable.
ln -s ${prefix_knp3}/bin/knp ${destroot}${prefix}/bin/knp3
set bgh_file /tmp/bunruidb.txt
variant bunruidb description {Use Bunrui Goi Hyou} {
if {[file readable ${bgh_file}]} {
configure.args-append --with-bgh-file=${bgh_file}