# -*- 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 # $Id$ PortSystem 1.0 name mecab-base version 0.996 revision 1 categories textproc japanese maintainers hum openmaintainer description yet another part-of-speech and morphological analyzer long_description The base analyzer of MeCab, ${description}. homepage http://mecab.sourceforge.net/ platforms darwin license {GPL LGPL BSD} dist_subdir mecab distname mecab-${version} master_sites googlecode:mecab checksums rmd160 a06fa0c0eb44eef8c45171b769b43c655971ac4a \ sha256 e073325783135b72e666145c781bb48fada583d5224fb2490fb6c1403ba69c59 depends_lib port:libiconv patchfiles patch-configure.diff configure.args --mandir=${prefix}/share/man \ --with-libiconv-prefix=${prefix} test.run yes test.target check post-destroot { # set the default dictionary path to sysdic. reinplace s|ipadic|sysdic| ${destroot}${prefix}/etc/mecabrc # install additional documents. set dest_doc ${destroot}${prefix}/share/doc/mecab xinstall -d ${dest_doc} eval xinstall -m 644 [glob ${worksrcpath}/doc/*.html] ${dest_doc} eval xinstall -m 644 [glob ${worksrcpath}/doc/*.png] ${dest_doc} eval xinstall -m 644 [glob ${worksrcpath}/doc/*.css] ${dest_doc} copy ${worksrcpath}/doc/doxygen ${dest_doc} copy ${worksrcpath}/doc/en ${dest_doc} # install examples. set dest_ex ${destroot}${prefix}/share/examples xinstall -d ${dest_ex} copy ${worksrcpath}/example ${dest_ex}/mecab } # deactivate any old mecab port. pre-activate { if {[file exists ${prefix}/bin/mecab] && ![catch {set vers [lindex [registry_active mecab] 0]}] && ([vercmp [lindex $vers 1] 0.98] < 0 || [vercmp [lindex $vers 1] 0.98] == 0 && [vercmp [lindex $vers 2] 1] < 1)} { registry_deactivate_composite mecab "" [list ports_nodepcheck 1] } } platform darwin 8 { configure.env-append MACOSX_DEPLOYMENT_TARGET=10.4 } variant utf8only description {Build with UTF-8 only} { configure.args-append --enable-utf8-only } variant dartsclone description {Use darts-clone instead of darts} { post-patch { # darts.h is taken from http://darts-clone.googlecode.com/files/darts-clone-0.32g.tar.gz. copy -force ${filespath}/darts.h ${worksrcpath}/src } }