Ignore:
Timestamp:
Jul 11, 2007, 6:58:29 PM (13 years ago)
Author:
takanori@…
Message:

Untabify.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/textproc/chasen/Portfile

    r26922 r26923  
    11# $Id$
    22
    3 PortSystem        1.0
    4 name              chasen
    5 version           2.4.1
    6 set ipa           ipadic-2.7.0
    7 categories        textproc japanese
    8 maintainers       takanori@macports.org
    9 description       Japanese morphological analysis system
    10 long_description  ChaSen is a tool to analyze a text according to a set of dictionaries that \
    11                   specifies grammer, part of speech of words, and so on. Because ChaSen itself \
    12                   has no dictionaries, we need explicit dictionaries to use. IPADIC is such a \
    13                   set of dictionaries that specifies Japanese language. \
    14                   \
    15                   This version of chasen treats encoding of input as EUC-JP, and its output is \
    16                   encoded as EUC-JP by default.
    17 platforms         darwin
    18 homepage          http://chasen-legacy.sourceforge.jp/
    19 set sfjpid_chasen 26168
    20 set sfjpid_ipadic 24435
    21 master_sites      http://keihanna.dl.sourceforge.jp/chasen-legacy/${sfjpid_chasen}/:chasen \
    22                   http://osdn.dl.sourceforge.jp/chasen-legacy/${sfjpid_chasen}/:chasen \
    23                   http://keihanna.dl.sourceforge.jp/ipadic/${sfjpid_ipadic}/:ipadic \
    24                   http://osdn.dl.sourceforge.jp/ipadic/${sfjpid_ipadic}/:ipadic \
    25                   http://chasen.naist.jp/stable/ipadic/:ipadic
    26 distfiles         ${distname}.tar.gz:chasen
    27 patchfiles        patch-configure.diff
    28 checksums         ${name}-${version}.tar.gz md5 ae383d8d9554ae1631f6550d3b1396cc \
    29                                             sha1 2dca85bc4cd7b3f77e9729f0b75c884be6ac29d5 \
    30                                             rmd160 cf614af761e0b3175daaffcebabaa9c13da00cae \
    31                   ${ipa}.tar.gz md5 f36d315cae25b086a889b7090c674977 \
    32                                 sha1 52784d8abb3361eafec83ab543be63cf087f9eb2 \
    33                                 rmd160 5e37c750801df63439032be4954c4b63a44012cb
     3PortSystem      1.0
     4name            chasen
     5version         2.4.1
     6set ipa         ipadic-2.7.0
     7categories      textproc japanese
     8maintainers     takanori@macports.org
     9description     Japanese morphological analysis system
     10long_description \
     11                ChaSen is a tool to analyze a text according to a set of dictionaries that \
     12                specifies grammer, part of speech of words, and so on. Because ChaSen itself \
     13                has no dictionaries, we need explicit dictionaries to use. IPADIC is such a \
     14                set of dictionaries that specifies Japanese language. \
     15                \
     16                This version of chasen treats encoding of input as EUC-JP, and its output is \
     17                encoded as EUC-JP by default.
     18platforms       darwin
     19homepage        http://chasen-legacy.sourceforge.jp/
     20set sfjpid_chasen   26168
     21set sfjpid_ipadic   24435
     22master_sites    http://keihanna.dl.sourceforge.jp/chasen-legacy/${sfjpid_chasen}/:chasen \
     23                http://osdn.dl.sourceforge.jp/chasen-legacy/${sfjpid_chasen}/:chasen \
     24                http://keihanna.dl.sourceforge.jp/ipadic/${sfjpid_ipadic}/:ipadic \
     25                http://osdn.dl.sourceforge.jp/ipadic/${sfjpid_ipadic}/:ipadic \
     26                http://chasen.naist.jp/stable/ipadic/:ipadic
     27distfiles       ${distname}.tar.gz:chasen
     28patchfiles      patch-configure.diff
     29checksums       ${name}-${version}.tar.gz md5 ae383d8d9554ae1631f6550d3b1396cc \
     30                                          sha1 2dca85bc4cd7b3f77e9729f0b75c884be6ac29d5 \
     31                                          rmd160 cf614af761e0b3175daaffcebabaa9c13da00cae \
     32                ${ipa}.tar.gz md5 f36d315cae25b086a889b7090c674977 \
     33                              sha1 52784d8abb3361eafec83ab543be63cf087f9eb2 \
     34                              rmd160 5e37c750801df63439032be4954c4b63a44012cb
    3435
    35 default_variants  +ipadic
     36default_variants    +ipadic
    3637
    37 depends_lib     port:darts port:libiconv
    38 depends_build   port:nkf
     38depends_lib     port:darts port:libiconv
     39depends_build   port:nkf
    3940
    40 post-extract    {
    41                 foreach f {tests/test-chasen.sh tests/test-dic.sh} {
    42                         file attributes ${worksrcpath}/${f} -permissions 0755
    43                 }
     41post-extract {
     42    foreach f {tests/test-chasen.sh tests/test-dic.sh} {
     43        file attributes ${worksrcpath}/${f} -permissions 0755
     44    }
    4445}
    4546
    46 configure.args  --libexecdir=${prefix}/lib --with-darts=${prefix}/include --with-libiconv=${prefix}
     47configure.args  --libexecdir=${prefix}/lib --with-darts=${prefix}/include --with-libiconv=${prefix}
    4748
    48 test.run        yes
    49 test.target     check
     49test.run        yes
     50test.target     check
    5051
    51 post-destroot   {
    52                 xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/doc
     52post-destroot {
     53    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/doc
    5354
    54                 xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog INSTALL NEWS README ${destroot}${prefix}/share/doc/${name}
    55                 xinstall -m 644 ${worksrcpath}/doc/manual-j.pdf ${destroot}${prefix}/share/doc/${name}/doc
     55    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog INSTALL NEWS README ${destroot}${prefix}/share/doc/${name}
     56    xinstall -m 644 ${worksrcpath}/doc/manual-j.pdf ${destroot}${prefix}/share/doc/${name}/doc
    5657}
    5758
    58 variant ipadic  {
    59         # Japanese dictionaries for ChaSen
    60         distfiles-append ${ipa}.tar.gz:ipadic
    61         post-destroot {
    62                 foreach {enc c} {UTF-8 w EUC-JP e Shift_JIS s} {
    63                         file mkdir ${workpath}/${ipa}-${enc}
    64                         system "(cd ${workpath}/${ipa}; tar cf - .) | (cd ${workpath}/${ipa}-${enc}; tar xf -)"
    65                         reinplace "s|PACKAGE=ipadic|PACKAGE=ipadic-${enc}|" ${workpath}/${ipa}-${enc}/configure
    66                         reinplace "s|/makemat|/makemat -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in
    67                         reinplace "s|/makeda|/makeda -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in
    68                         foreach f [glob ${workpath}/${ipa}-${enc}/*.cha ${workpath}/${ipa}-${enc}/*.dic ${workpath}/${ipa}-${enc}/chasenrc.in] {
    69                                 system "mv ${f} ${f}_ && ${prefix}/bin/nkf --ic=EUC-JP --oc=${enc} ${f}_ > ${f}"
    70                         }
    71                         system "cd ${workpath}/${ipa}-${enc} && ./configure --with-dicdir=${prefix}/lib/chasen/dic --with-mkchadic=${destroot}${prefix}/lib/chasen --with-chasenrc-path=${destroot}${prefix}/etc/chasenrc-${enc} && DYLD_LIBRARY_PATH=${destroot}${prefix}/lib make && make install DESTDIR=${destroot}"
    72                 }
    73                 system "ln -sf chasenrc-EUC-JP ${destroot}${prefix}/etc/chasenrc"
     59variant ipadic {
     60    # Japanese dictionaries for ChaSen
     61    distfiles-append ${ipa}.tar.gz:ipadic
     62    post-destroot {
     63        foreach {enc c} {UTF-8 w EUC-JP e Shift_JIS s} {
     64            file mkdir ${workpath}/${ipa}-${enc}
     65            system "(cd ${workpath}/${ipa}; tar cf - .) | (cd ${workpath}/${ipa}-${enc}; tar xf -)"
     66            reinplace "s|PACKAGE=ipadic|PACKAGE=ipadic-${enc}|" ${workpath}/${ipa}-${enc}/configure
     67            reinplace "s|/makemat|/makemat -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in
     68            reinplace "s|/makeda|/makeda -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in
     69            foreach f [glob ${workpath}/${ipa}-${enc}/*.cha ${workpath}/${ipa}-${enc}/*.dic ${workpath}/${ipa}-${enc}/chasenrc.in] {
     70                system "mv ${f} ${f}_ && ${prefix}/bin/nkf --ic=EUC-JP --oc=${enc} ${f}_ > ${f}"
     71            }
     72            system "cd ${workpath}/${ipa}-${enc} && ./configure --with-dicdir=${prefix}/lib/chasen/dic --with-mkchadic=${destroot}${prefix}/lib/chasen --with-chasenrc-path=${destroot}${prefix}/etc/chasenrc-${enc} && DYLD_LIBRARY_PATH=${destroot}${prefix}/lib make && make install DESTDIR=${destroot}"
     73        }
     74        system "ln -sf chasenrc-EUC-JP ${destroot}${prefix}/etc/chasenrc"
    7475
    75                 xinstall -m 755 -d ${destroot}${prefix}/share/doc/chasen-ipadic/doc
     76        xinstall -m 755 -d ${destroot}${prefix}/share/doc/chasen-ipadic/doc
    7677
    77                 xinstall -m 644 -W ${workpath}/${ipa} AUTHORS COPYING ChangeLog INSTALL INSTALL-ja NEWS README ${destroot}${prefix}/share/doc/chasen-ipadic
    78                 xinstall -m 644 ${workpath}/${ipa}/doc/ipadic-ja.pdf ${destroot}${prefix}/share/doc/chasen-ipadic/doc
    79         }
     78        xinstall -m 644 -W ${workpath}/${ipa} AUTHORS COPYING ChangeLog INSTALL INSTALL-ja NEWS README ${destroot}${prefix}/share/doc/chasen-ipadic
     79        xinstall -m 644 ${workpath}/${ipa}/doc/ipadic-ja.pdf ${destroot}${prefix}/share/doc/chasen-ipadic/doc
     80    }
    8081
    81         post-activate   {
    82                 ui_msg "\nDue to historical reasons, the default encoding of ChaSen is set to EUC-JP."
    83                 ui_msg "If you'd like to handle text files written in UTF-8 or Shift_JIS, you may use -r and -i options.\n"
    84                 ui_msg "  UTF-8)     chasen -r ${prefix}/etc/chasenrc-UTF-8 -i w <input>"
    85                 ui_msg "  Shift_JIS) chasen -r ${prefix}/etc/chasenrc-Shift_JIS -i s <input>\n"
    86         }
     82    post-activate {
     83        ui_msg "\nDue to historical reasons, the default encoding of ChaSen is set to EUC-JP."
     84        ui_msg "If you'd like to handle text files written in UTF-8 or Shift_JIS, you may use -r and -i options.\n"
     85        ui_msg "  UTF-8)     chasen -r ${prefix}/etc/chasenrc-UTF-8 -i w <input>"
     86        ui_msg "  Shift_JIS) chasen -r ${prefix}/etc/chasenrc-Shift_JIS -i s <input>\n"
     87    }
    8788}
    8889
    8990livecheck.check regex
    90 livecheck.url   http://chasen-legacy.sourceforge.jp/
     91livecheck.url   http://chasen-legacy.sourceforge.jp/
    9192livecheck.regex ${name}-(\[0-9.a-z\-\]+)
Note: See TracChangeset for help on using the changeset viewer.