source: trunk/dports/textproc/mecab-base/Portfile

Last change on this file was 113818, checked in by hum@…, 4 years ago

mecab-base: install doc and examples according to the standard file hierarchy; clean up livecheck; update maintainers.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 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 113818 2013-11-24 11:13:36Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                mecab-base
7version             0.996
8revision            1
9categories          textproc japanese
10maintainers         hum openmaintainer
11
12description         yet another part-of-speech and morphological analyzer
13long_description    The base analyzer of MeCab, ${description}.
14
15homepage            http://mecab.sourceforge.net/
16platforms           darwin
17license             {GPL LGPL BSD}
18
19dist_subdir         mecab
20distname            mecab-${version}
21
22master_sites        googlecode:mecab
23checksums           rmd160  a06fa0c0eb44eef8c45171b769b43c655971ac4a \
24                    sha256  e073325783135b72e666145c781bb48fada583d5224fb2490fb6c1403ba69c59
25
26depends_lib         port:libiconv
27
28patchfiles          patch-configure.diff
29
30configure.args      --mandir=${prefix}/share/man \
31                    --with-libiconv-prefix=${prefix}
32
33test.run            yes
34test.target         check
35
36post-destroot {
37    # set the default dictionary path to sysdic.
38    reinplace s|ipadic|sysdic| ${destroot}${prefix}/etc/mecabrc
39
40    # install additional documents.
41    set dest_doc ${destroot}${prefix}/share/doc/mecab
42    xinstall -d ${dest_doc}
43    eval xinstall -m 644 [glob ${worksrcpath}/doc/*.html] ${dest_doc}
44    eval xinstall -m 644 [glob ${worksrcpath}/doc/*.png]  ${dest_doc}
45    eval xinstall -m 644 [glob ${worksrcpath}/doc/*.css]  ${dest_doc}
46    copy ${worksrcpath}/doc/doxygen ${dest_doc}
47    copy ${worksrcpath}/doc/en      ${dest_doc}
48
49    # install examples.
50    set dest_ex  ${destroot}${prefix}/share/examples
51    xinstall -d ${dest_ex}
52    copy ${worksrcpath}/example     ${dest_ex}/mecab
53}
54
55# deactivate any old mecab port.
56pre-activate {
57    if {[file exists ${prefix}/bin/mecab]
58        && ![catch {set vers [lindex [registry_active mecab] 0]}]
59        && ([vercmp [lindex $vers 1] 0.98] < 0 ||
60            [vercmp [lindex $vers 1] 0.98] == 0
61            && [vercmp [lindex $vers 2] 1] < 1)} {
62        registry_deactivate_composite mecab "" [list ports_nodepcheck 1]
63    }
64}
65
66platform darwin 8 {
67    configure.env-append    MACOSX_DEPLOYMENT_TARGET=10.4
68}
69
70variant utf8only description {Build with UTF-8 only} {
71    configure.args-append   --enable-utf8-only
72}
73
74variant dartsclone description {Use darts-clone instead of darts} {
75    post-patch {
76        # darts.h is taken from http://darts-clone.googlecode.com/files/darts-clone-0.32g.tar.gz.
77        copy -force ${filespath}/darts.h ${worksrcpath}/src
78    }
79}
Note: See TracBrowser for help on using the repository browser.