Changeset 22311
- Timestamp:
- Feb 26, 2007, 3:11:44 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dports/textproc/chasen/Portfile
r19815 r22311 1 1 # $Id$ 2 3 set ipa ipadic-2.7.04 2 5 3 PortSystem 1.0 6 4 name chasen 7 5 version 2.3.3 8 revision 2 9 categories textproc 6 revision 3 7 set ipa ipadic-2.7.0 8 categories textproc japanese 10 9 maintainers takanori@macports.org 11 10 description Japanese morphological analysis system … … 42 41 default_variants +ipadic 43 42 44 depends_lib port:darts lib:libiconv:libiconv 43 depends_lib port:darts port:libiconv 44 depends_build port:nkf 45 45 46 46 post-extract { … … 49 49 } 50 50 51 configure.args-append --libexecdir=${prefix}/lib --with-darts=${prefix}/include --with-libiconv=${prefix} 51 configure.args --libexecdir=${prefix}/lib --with-darts=${prefix}/include --with-libiconv=${prefix} 52 53 test.run yes 54 test.target check 52 55 53 56 post-destroot { … … 59 62 60 63 variant ipadic { 61 # Japanese dictionary for ChaSen 62 distfiles-append ${ipa}.tar.gz:ipadic 63 extract.only-append ${ipa}.tar.gz 64 post-destroot { 65 system "cd ${workpath}/${ipa} && ./configure --with-dicdir=${prefix}/lib/chasen/dic --with-mkchadic=${destroot}${prefix}/lib/chasen --with-chasenrc-path=${destroot}${prefix}/etc/chasenrc && DYLD_LIBRARY_PATH=${destroot}${prefix}/lib make && make install DESTDIR=${destroot}" 64 # Japanese dictionaries for ChaSen 65 distfiles-append ${ipa}.tar.gz:ipadic 66 extract.only-append ${ipa}.tar.gz 67 post-destroot { 68 foreach {enc c} {UTF-8 w EUC-JP e Shift_JIS s} { 69 file mkdir ${workpath}/${ipa}-${enc} 70 system "(cd ${workpath}/${ipa}; tar cf - .) | (cd ${workpath}/${ipa}-${enc}; tar xf -)" 71 reinplace "s|PACKAGE=ipadic|PACKAGE=ipadic-${enc}|" ${workpath}/${ipa}-${enc}/configure 72 reinplace "s|/makemat|/makemat -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in 73 reinplace "s|/makeda|/makeda -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in 74 foreach f [glob ${workpath}/${ipa}-${enc}/*.cha ${workpath}/${ipa}-${enc}/*.dic ${workpath}/${ipa}-${enc}/chasenrc.in] { 75 system "mv ${f} ${f}_ && ${prefix}/bin/nkf --ic=EUC-JP --oc=${enc} ${f}_ > ${f}" 76 } 77 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}" 78 } 79 system "ln -sf chasenrc-EUC-JP ${destroot}${prefix}/etc/chasenrc" 66 80 67 81 xinstall -m 755 -d ${destroot}${prefix}/share/doc/ipadic/doc 68 82 69 xinstall -m 644 -W ${workpath}/${ipa} AUTHORS COPYING ChangeLog INSTALL INSTALL-ja NEWS README ${destroot}${prefix}/share/doc/ipadic 70 xinstall -m 644 ${workpath}/${ipa}/doc/ipadic-ja.pdf ${destroot}${prefix}/share/doc/ipadic/doc 71 } 83 xinstall -m 644 -W ${workpath}/${ipa} AUTHORS COPYING ChangeLog INSTALL INSTALL-ja NEWS README ${destroot}${prefix}/share/doc/ipadic 84 xinstall -m 644 ${workpath}/${ipa}/doc/ipadic-ja.pdf ${destroot}${prefix}/share/doc/ipadic/doc 85 } 86 87 post-activate { 88 ui_msg "\nDue to historical reasons, the default encoding of ChaSen is set to EUC-JP." 89 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" 90 ui_msg " UTF-8) chasen -r ${prefix}/etc/chasenrc-UTF-8 -i w <input>" 91 ui_msg " Shift_JIS) chasen -r ${prefix}/etc/chasenrc-Shift_JIS -i s <input>\n" 92 } 72 93 } 94 95 livecheck.check regex 96 livecheck.url http://chasen.naist.jp/hiki/ChaSen/?%C3%E3%E4%A5%A4%CE%C7%DB%C9%DB 97 livecheck.regex ${name}-(\[0-9.a-z\]+)\\.tar
Note: See TracChangeset
for help on using the changeset viewer.