source: trunk/dports/textproc/knp3/Portfile

Last change on this file was 154219, checked in by ryandesign@…, 13 months ago

knp3: Rebuild to link with TinySVM's shared library.

Also fix capitalization of TinySVM dependency.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1# -*- 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
2# $Id: Portfile 154219 2016-10-24 15:12:32Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                knp3
7version             3.01
8revision            2
9categories          textproc japanese
10maintainers         hum openmaintainer
11
12description         KN parser (Kurohashi-Nagao parser) which detects dependency of Japanese sentences.
13long_description    ${description}
14
15homepage            http://nlp.ist.i.kyoto-u.ac.jp/index.php?KNP
16platforms           darwin
17license             BSD
18
19master_sites        http://nlp.kuee.kyoto-u.ac.jp/nl-resource/knp/
20dist_subdir         knp
21distname            knp-${version}
22checksums           sha1    9650490cf38bfaacc15a6d81b1b47c9043df8c90 \
23                    rmd160  645882f1638b033f626cb9f77e4ab2af56c98d7e
24
25patchfiles          patch-system.diff \
26                    patch-dict.diff
27
28if {${os.major} >= 12 && ${os.platform} eq "darwin"} {
29    patchfiles-append patch-sed.diff
30}
31
32depends_lib         port:juman6 \
33                    port:tinycdb \
34                    port:TinySVM \
35                    port:crfpp
36
37configure.args      --with-cdb \
38                    --with-svm \
39                    --with-crf \
40                    --with-juman-prefix=${prefix}/lib/juman6
41
42# Note: compiling with Boehm GC library (--with-boehm-gc) makes the executable cause a segmentation fault.
43
44# install the distribution into ${prefix_knp3}.
45set prefix_knp3     ${prefix}/lib/${name}
46configure.pre_args  --prefix=${prefix_knp3}
47
48# refer to the files of juman6 instead of the standard ones.
49configure.cppflags  "-I${prefix}/lib/juman6/include -I${prefix}/include"
50configure.ldflags   "-L${prefix}/lib/juman6/lib -L${prefix}/lib"
51
52use_parallel_build  no
53
54# install knp3 as an executable.
55post-destroot {
56    ln -s ${prefix_knp3}/bin/knp ${destroot}${prefix}/bin/knp3
57}
58
59set bgh_file        /tmp/bunruidb.txt
60variant bunruidb description {Use Bunrui Goi Hyou} {
61    if {[file readable ${bgh_file}]} {
62        configure.args-append --with-bgh-file=${bgh_file}
63    } else {
64        pre-configure {
65            ui_error "To enable the use of Bunrui DB, purchase a license of Bunrui Goi Hyou"
66            ui_error "and put the DB file in ${bgh_file}."
67            return -code error "Bunrui Goi Hyou is not available at ${bgh_file}"
68        }
69    }
70}
71
72livecheck.type      none
Note: See TracBrowser for help on using the repository browser.