# -*- 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: Portfile 138753 2015-07-18 04:30:09Z hum@macports.org $ PortSystem 1.0 name extractopinion version 1.2 revision 2 categories textproc japanese maintainers hum openmaintainer description an opinion extraction tool for Japanese texts long_description ${name} is ${description}. homepage http://alaginrc.nict.go.jp/opinion/index.html platforms darwin license {BSD LGPL GPL} master_sites http://alaginrc.nict.go.jp/opinion/src/ checksums rmd160 abbfb97605e4316349f279332d3785af3c39d9a0 \ sha256 09c0a2ca339bc5b50afccecbf0b130aec9d15445155ee36fa6605a02952db3cb patchfiles patch-extract.sh.diff \ patch-makemdl.sh.diff \ patch-crftrain.sh.diff \ patch-lib_tsv.pm.diff \ patch-perl.diff depends_lib port:crfpp \ port:libiconv \ port:gawk \ port:p5.22-text-csv_xs \ port:juman6 \ port:knp3 use_configure no variant universal {} pre-build { copy ${filespath}/Makefile ${worksrcpath} } build.args CC=${configure.cc} CFLAGS="${configure.cflags} [get_canonical_archflags]" destroot { foreach script {_extract _train extract makemdl} { reinplace -locale C "s|dir=`cd \$\(dirname \$0\) && pwd`|dir=${prefix}/share/${distname}|" \ ${worksrcpath}/${script}.sh } reinplace -locale C "s|dir=|#dir=|" ${worksrcpath}/conf.sh foreach script {pol/out2tsv pol/par2dat pol/tsv2par \ src/makefv src/otag2tsv src/out2tsv src/tsv2tag src/tsvconv \ typ/makefv typ/out2tsv typ/tsvconv \ xpr/otag2tsv xpr/tsv2tag} { reinplace -locale C "s|/usr/bin/gawk|${prefix}/bin/gawk|" ${worksrcpath}/${script}.awk } foreach script {extract.sh lib/in2tsv.pl lib/tsv2out.pl makemdl.sh \ makemodel/csv/csv2tsv.pl makemodel/csv/csv2tsv.sh} { reinplace -locale C "s|@prefix@|${prefix}|" ${worksrcpath}/${script} } copy ${worksrcpath}/extract.sh ${destroot}${prefix}/bin/extractopinion.sh copy ${worksrcpath}/makemdl.sh ${destroot}${prefix}/bin/extractopinion-makemdl.sh copy ${worksrcpath} ${destroot}${prefix}/share } livecheck.type regex livecheck.url ${homepage} livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"