[86585] trunk/dports/textproc

takanori at macports.org takanori at macports.org
Fri Oct 28 19:06:17 PDT 2011


Revision: 86585
          http://trac.macports.org/changeset/86585
Author:   takanori at macports.org
Date:     2011-10-28 19:06:15 -0700 (Fri, 28 Oct 2011)
Log Message:
-----------
chasen:
 - Split ChaSen into chasen (meta), chasen-base, and chasen dictionaries.
 - Add support for NAIST JDICs.
 - From now on, UTF-8 based ChaSen (chasen-utf8) is also installed by default.
 - If you wish you can use darts-clone instead of darts. (+dartsclone)

Ticket #31553. Thanks to hum@!

Modified Paths:
--------------
    trunk/dports/textproc/chasen/Portfile

Added Paths:
-----------
    trunk/dports/textproc/chasen/files/chasen.in
    trunk/dports/textproc/chasen-base/
    trunk/dports/textproc/chasen-base/Portfile
    trunk/dports/textproc/chasen-base/files/
    trunk/dports/textproc/chasen-base/files/patch-configure.diff
    trunk/dports/textproc/chasen-ipadic/
    trunk/dports/textproc/chasen-ipadic/Portfile
    trunk/dports/textproc/chasen-ipadic-sjis/
    trunk/dports/textproc/chasen-ipadic-sjis/Portfile
    trunk/dports/textproc/chasen-ipadic-utf8/
    trunk/dports/textproc/chasen-ipadic-utf8/Portfile
    trunk/dports/textproc/chasen-naist-jdic/
    trunk/dports/textproc/chasen-naist-jdic/Portfile
    trunk/dports/textproc/chasen-naist-jdic-sjis/
    trunk/dports/textproc/chasen-naist-jdic-sjis/Portfile
    trunk/dports/textproc/chasen-naist-jdic-utf8/
    trunk/dports/textproc/chasen-naist-jdic-utf8/Portfile

Removed Paths:
-------------
    trunk/dports/textproc/chasen/files/patch-configure.diff

Modified: trunk/dports/textproc/chasen/Portfile
===================================================================
--- trunk/dports/textproc/chasen/Portfile	2011-10-29 02:00:40 UTC (rev 86584)
+++ trunk/dports/textproc/chasen/Portfile	2011-10-29 02:06:15 UTC (rev 86585)
@@ -1,101 +1,100 @@
+# -*- 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$
 
-PortSystem      1.0
+PortSystem          1.0
 
-name            chasen
-version         2.4.4
-set ipa         ipadic-2.7.0
-categories      textproc japanese
-maintainers     takanori openmaintainer
-description     Japanese morphological analysis system
-long_description \
-                ChaSen is a tool to analyze a text according to a set of dictionaries that \
-                specifies grammer, part of speech of words, and so on. Because ChaSen itself \
-                has no dictionaries, we need explicit dictionaries to use. IPADIC is such a \
-                set of dictionaries that specifies Japanese language. \
-                \
-                This version of chasen treats encoding of input as EUC-JP, and its output is \
-                encoded as EUC-JP by default.
-platforms       darwin
-license         BSD Restrictive/Distributable
-homepage        http://chasen-legacy.sourceforge.jp/
-#master_sites   sourceforge_jp:chasen-legacy/32224/:chasen \
-#               sourceforge_jp:ipadic/24435/:ipadic
-set sfjpid_chasen   32224
-set sfjpid_ipadic   24435
-master_sites    http://keihanna.dl.sourceforge.jp/chasen-legacy/${sfjpid_chasen}/:chasen \
-                http://osdn.dl.sourceforge.jp/chasen-legacy/${sfjpid_chasen}/:chasen \
-                http://keihanna.dl.sourceforge.jp/ipadic/${sfjpid_ipadic}/:ipadic \
-                http://osdn.dl.sourceforge.jp/ipadic/${sfjpid_ipadic}/:ipadic \
-                http://chasen.naist.jp/stable/ipadic/:ipadic
-distfiles       ${distname}.tar.gz:chasen
-patchfiles      patch-configure.diff
-checksums       ${name}-${version}.tar.gz md5 42b20d41a33e1f5e7a05cc56aaa548b0 \
-                                          sha1 3328e6667d6b74955b6c4b1b49a7d97805e4de8c \
-                                          rmd160 ceb4a7c064ba5bf0d356d6db0e64b644b88dbc54 \
-                ${ipa}.tar.gz md5 f36d315cae25b086a889b7090c674977 \
-                              sha1 52784d8abb3361eafec83ab543be63cf087f9eb2 \
-                              rmd160 5e37c750801df63439032be4954c4b63a44012cb
+name                chasen
+version             2.4.4
+revision            1
+categories          textproc japanese
+platforms           darwin
+maintainers         takanori hum openmaintainer
+license             BSD
 
-depends_lib     port:darts \
-                port:libiconv
-depends_build   port:nkf
+homepage            http://chasen-legacy.sourceforge.jp/
+description         Japanese morphological analysis system
+long_description    ChaSen is a tool to analyze a text according to a set of dictionaries that \
+                    specifies grammar, part of speech of words, and so on. \
+                    This port depends on ChaSen base analyzer and a Japanese dictionary.
 
-default_variants    +ipadic
+distfiles
 
-post-extract {
-    foreach f {tests/test-chasen.sh tests/test-dic.sh} {
-        file attributes ${worksrcpath}/${f} -permissions 0755
+depends_lib         port:chasen-base
+
+use_configure       no
+supported_archs     noarch
+
+build {}
+
+variant eucjp description {Enable EUC-JP encoding} {}
+
+variant utf8 description {Add chasen-utf8 for UTF-8 texts} {
+    post-destroot {
+        set encoding     utf8
+        set nkf_encoding w
+        set script  ${destroot}${prefix}/bin/chasen-${encoding}
+        xinstall -m 755 ${filespath}/chasen.in         ${script}
+        reinplace "s|@NKF_ENCODING@|${nkf_encoding}|"  ${script}
+        reinplace "s|@RC_FILE@|${prefix}/etc/chasen/chasenrc-${encoding}|" \
+            ${script}
     }
+    notes-append  "You can run 'chasen-utf8' for UTF-8 texts."
 }
 
-configure.args  --libexecdir=${prefix}/lib --with-darts=${prefix}/include --with-libiconv=${prefix}
+variant sjis description {Add chasen-sjis for Shift-JIS texts} {
+    post-destroot {
+        set encoding     sjis
+        set nkf_encoding s
+        set script  ${destroot}${prefix}/bin/chasen-${encoding}
+        xinstall -m 755 ${filespath}/chasen.in         ${script}
+        reinplace "s|@NKF_ENCODING@|${nkf_encoding}|"  ${script}
+        reinplace "s|@RC_FILE@|${prefix}/etc/chasen/chasenrc-${encoding}|" \
+            ${script}
+    }
+    notes-append  "You can run 'chasen-sjis' for Shift-JIS texts."
+}
 
-use_parallel_build  yes
+default_variants    +eucjp +utf8
 
-test.run        yes
-test.target     check
+set dicname         ipadic
 
-post-destroot {
-    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/doc
-
-    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog INSTALL NEWS README ${destroot}${prefix}/share/doc/${name}
-    xinstall -m 644 ${worksrcpath}/doc/manual-j.pdf ${destroot}${prefix}/share/doc/${name}/doc
+variant ipadic conflicts naistjdic description {Use ipadic} {
+    set dicname         ipadic
+    if {[variant_isset eucjp]} {
+        depends_lib-append  port:chasen-${dicname}
+    }
+    foreach encoding {utf8 sjis} {
+        if {[variant_isset ${encoding}]} {
+            depends_lib-append  port:chasen-${dicname}-${encoding}
+        }
+    }
 }
 
-variant ipadic description {Install ipadic} {
-    # Japanese dictionaries for ChaSen
-    distfiles-append ${ipa}.tar.gz:ipadic
-    post-destroot {
-        foreach {enc c} {UTF-8 w EUC-JP e Shift_JIS s} {
-            file mkdir ${workpath}/${ipa}-${enc}
-            system "(cd ${workpath}/${ipa}; tar cf - .) | (cd ${workpath}/${ipa}-${enc}; tar xf -)"
-            reinplace "s|PACKAGE=ipadic|PACKAGE=ipadic-${enc}|" ${workpath}/${ipa}-${enc}/configure
-            reinplace "s|/makemat|/makemat -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in
-            reinplace "s|/makeda|/makeda -i ${c}|" ${workpath}/${ipa}-${enc}/Makefile.in
-            foreach f [glob ${workpath}/${ipa}-${enc}/*.cha ${workpath}/${ipa}-${enc}/*.dic ${workpath}/${ipa}-${enc}/chasenrc.in] {
-                system "mv ${f} ${f}_ && ${prefix}/bin/nkf --ic=EUC-JP --oc=${enc} ${f}_ > ${f}"
-            }
-            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}"
+variant naistjdic conflicts ipadic description {Use naist-jdic} {
+    set dicname         naist-jdic
+    if {[variant_isset eucjp]} {
+        depends_lib-append  port:chasen-${dicname}
+    }
+    foreach encoding {utf8 sjis} {
+        if {[variant_isset ${encoding}]} {
+            depends_lib-append  port:chasen-${dicname}-${encoding}
         }
-        ln -s chasenrc-EUC-JP ${destroot}${prefix}/etc/chasenrc
+    }
+}
 
-        xinstall -m 755 -d ${destroot}${prefix}/share/doc/chasen-ipadic/doc
+if {![variant_isset naistjdic]} {
+    default_variants    +ipadic
+}
 
-        xinstall -m 644 -W ${workpath}/${ipa} AUTHORS COPYING ChangeLog INSTALL INSTALL-ja NEWS README ${destroot}${prefix}/share/doc/chasen-ipadic
-        xinstall -m 644 ${workpath}/${ipa}/doc/ipadic-ja.pdf ${destroot}${prefix}/share/doc/chasen-ipadic/doc
+destroot {
+    set dest_chasen ${destroot}${prefix}/etc/chasen
+    file mkdir ${dest_chasen}
+    ln -s chasenrc-${dicname} ${dest_chasen}/chasenrc
+    foreach encoding {utf8 sjis} {
+        if {[variant_isset ${encoding}]} {
+            ln -s chasenrc-${dicname}-${encoding} ${dest_chasen}/chasenrc-${encoding}
+        }
     }
-
-    notes-append "
-        Due to historical reasons, the default encoding of ChaSen is set to EUC-JP.\
-        If you'd like to handle text files written in UTF-8 or Shift_JIS, you may use\
-        -r and -i options.
-        
-        UTF-8)     chasen -r ${prefix}/etc/chasenrc-UTF-8 -i w <input>
-        Shift_JIS) chasen -r ${prefix}/etc/chasenrc-Shift_JIS -i s <input>
-        "
 }
 
-livecheck.type  regex
-livecheck.url   http://sourceforge.jp/projects/chasen-legacy/releases/rss
-livecheck.regex <title>${name}.* - ${name}-(\[0-9.a-z\-\]+)</title>
+livecheck.type  none

Added: trunk/dports/textproc/chasen/files/chasen.in
===================================================================
--- trunk/dports/textproc/chasen/files/chasen.in	                        (rev 0)
+++ trunk/dports/textproc/chasen/files/chasen.in	2011-10-29 02:06:15 UTC (rev 86585)
@@ -0,0 +1,2 @@
+#!/bin/sh
+chasen -i @NKF_ENCODING@ -r @RC_FILE@ "$@"

Deleted: trunk/dports/textproc/chasen/files/patch-configure.diff
===================================================================
--- trunk/dports/textproc/chasen/files/patch-configure.diff	2011-10-29 02:00:40 UTC (rev 86584)
+++ trunk/dports/textproc/chasen/files/patch-configure.diff	2011-10-29 02:06:15 UTC (rev 86585)
@@ -1,27 +0,0 @@
---- configure.orig	2007-03-22 17:23:24.000000000 +0900
-+++ configure	2007-03-24 12:14:40.000000000 +0900
-@@ -22318,8 +22318,8 @@
- 
- 
- 
--{ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
--echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6; }
-+{ echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5
-+echo $ECHO_N "checking for libiconv in -liconv... $ECHO_C" >&6; }
- if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-@@ -22338,11 +22338,11 @@
- #ifdef __cplusplus
- extern "C"
- #endif
--char iconv ();
-+char libiconv ();
- int
- main ()
- {
--return iconv ();
-+return libiconv ();
-   ;
-   return 0;
- }

Added: trunk/dports/textproc/chasen-base/Portfile
===================================================================
--- trunk/dports/textproc/chasen-base/Portfile	                        (rev 0)
+++ trunk/dports/textproc/chasen-base/Portfile	2011-10-29 02:06:15 UTC (rev 86585)
@@ -0,0 +1,79 @@
+# -*- 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$
+
+PortSystem          1.0
+
+name                chasen-base
+version             2.4.4
+categories          textproc japanese
+platforms           darwin
+maintainers         takanori hum openmaintainer
+license             BSD
+
+homepage            http://chasen-legacy.sourceforge.jp/
+description         Japanese morphological analysis system
+long_description    The base analyzer of ChaSen, ${description}.
+
+dist_subdir         chasen
+distname            chasen-${version}
+
+master_sites        sourceforge_jp:chasen-legacy/32224
+
+checksums           rmd160  ceb4a7c064ba5bf0d356d6db0e64b644b88dbc54 \
+                    sha256  09e41f681097f87ba6c953d3724c34c1826c3cfa590898a2166fb310a006f932
+
+patchfiles          patch-configure.diff
+
+depends_build       port:darts
+depends_lib         port:libiconv
+
+variant dartsclone description {Use darts-clone instead of darts} {
+    depends_build-replace    s|port:darts|port:darts-clone|
+}
+
+post-extract {
+    foreach f {tests/test-chasen.sh tests/test-dic.sh} {
+        file attributes ${worksrcpath}/${f} -permissions 0755
+    }
+}
+
+configure.args      --libexecdir=${prefix}/lib \
+                    --sysconfdir=${prefix}/etc/chasen \
+                    --with-darts=${prefix}/include \
+                    --with-libiconv=${prefix}
+
+test.run            yes
+test.target         check
+
+post-destroot {
+    set docdir ${destroot}${prefix}/share/doc/chasen
+    file mkdir ${docdir}
+    xinstall -m 644 -W ${worksrcpath} \
+        AUTHORS COPYING ChangeLog NEWS README doc/manual-j.pdf \
+        ${docdir}
+
+    if {[variant_isset dartsclone]} {
+        set dartslib "dartsclone"
+    } else {
+        set dartslib "darts"
+    }
+    # this file indicates which version of chasen is installed
+    set fh [open [file join ${docdir} chasen_${dartslib}] w 0644]
+    puts ${fh} "This version of ChaSen depends on the ${dartslib} library."
+    close ${fh}
+}
+
+# deactivate any old chasen port.
+pre-activate {
+    if {[file exists ${prefix}/bin/chasen]
+        && ![catch {set vers [lindex [registry_active chasen] 0]}]
+        && ([rpm-vercomp [lindex $vers 1] 2.4.4] < 0 ||
+            [rpm-vercomp [lindex $vers 1] 2.4.4] == 0
+            && [rpm-vercomp [lindex $vers 2] 1] < 1)} {
+        registry_deactivate chasen "" [list ports_nodepcheck 1]
+    }
+}
+
+livecheck.type      regex
+livecheck.url       http://sourceforge.jp/projects/chasen-legacy/releases
+livecheck.regex     chasen-(\[0-9.a-z\-\]+)\\.tar


Property changes on: trunk/dports/textproc/chasen-base/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/chasen-base/files/patch-configure.diff
===================================================================
--- trunk/dports/textproc/chasen-base/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/textproc/chasen-base/files/patch-configure.diff	2011-10-29 02:06:15 UTC (rev 86585)
@@ -0,0 +1,27 @@
+--- configure.orig	2008-07-23 13:15:55.000000000 +0900
++++ configure	2011-10-02 20:57:04.000000000 +0900
+@@ -22780,8 +22780,8 @@
+ 
+ 
+ 
+-{ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5
++echo $ECHO_N "checking for libiconv in -liconv... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -22800,11 +22800,11 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char iconv ();
++char libiconv ();
+ int
+ main ()
+ {
+-return iconv ();
++return libiconv ();
+   ;
+   return 0;
+ }

Added: trunk/dports/textproc/chasen-ipadic/Portfile
===================================================================
--- trunk/dports/textproc/chasen-ipadic/Portfile	                        (rev 0)
+++ trunk/dports/textproc/chasen-ipadic/Portfile	2011-10-29 02:06:15 UTC (rev 86585)
@@ -0,0 +1,62 @@
+# -*- 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$
+
+PortSystem          1.0
+
+set dicname         ipadic
+name                chasen-${dicname}
+version             2.7.0
+categories          textproc japanese
+maintainers         takanori hum openmaintainer
+homepage            http://sourceforge.jp/projects/${dicname}/
+description         IPA dictionary of EUC-JP encoding for ChaSen
+long_description    ${description}
+platforms           darwin
+license             BSD
+
+dist_subdir         chasen
+distname            ${dicname}-${version}
+
+master_sites        sourceforge_jp:${dicname}/24435
+
+checksums           rmd160  5e37c750801df63439032be4954c4b63a44012cb \
+                    sha256  ba2744cc16142159b330075e13eed4565908915ac95a790d38dea540e0963c1c
+
+depends_lib         port:chasen-base
+
+if {[file exists ${prefix}/share/doc/chasen/chasen_dartsclone]} {
+    default_variants    +dartsclone
+}
+
+variant dartsclone description {Use darts-clone instead of darts} {}
+
+supported_archs     noarch
+configure.args      --with-chasenrc-path=${destroot}${prefix}/etc/chasen/chasenrc-${dicname}
+
+pre-configure {
+    if {[variant_isset dartsclone]} {
+        set dartslib "dartsclone"
+    } else {
+        set dartslib "darts"
+    }
+    if {![file exists ${prefix}/share/doc/chasen/chasen_${dartslib}]} {
+        return -code error "The variant you chose is not compatible with the ChaSen you've installed."
+    }
+}
+
+use_parallel_build  no
+
+pre-destroot {
+    file mkdir ${destroot}${prefix}/etc/chasen
+}
+
+post-destroot {
+    file mkdir ${destroot}${prefix}/share/doc/chasen-${dicname}
+    xinstall -m 644 -W ${worksrcpath} \
+        AUTHORS COPYING ChangeLog NEWS README doc/${dicname}-ja.pdf \
+        ${destroot}${prefix}/share/doc/chasen-${dicname}
+}
+
+livecheck.type      regex
+livecheck.url       http://sourceforge.jp/projects/${dicname}/releases
+livecheck.regex     ${dicname}-(\[0-9.a-z\-\]+)\\.tar


Property changes on: trunk/dports/textproc/chasen-ipadic/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/chasen-ipadic-sjis/Portfile
===================================================================
--- trunk/dports/textproc/chasen-ipadic-sjis/Portfile	                        (rev 0)
+++ trunk/dports/textproc/chasen-ipadic-sjis/Portfile	2011-10-29 02:06:15 UTC (rev 86585)
@@ -0,0 +1,67 @@
+# -*- 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$
+
+PortSystem          1.0
+
+set dicname         ipadic
+set encoding        sjis
+set nkf_encoding    s
+name                chasen-${dicname}-${encoding}
+version             2.7.0
+categories          textproc japanese
+maintainers         takanori hum openmaintainer
+homepage            http://sourceforge.jp/projects/${dicname}/
+description         IPA dictionary of Shift-JIS encoding for ChaSen
+long_description    ${description}
+platforms           darwin
+license             BSD
+
+dist_subdir         chasen
+distname            ${dicname}-${version}
+
+master_sites        sourceforge_jp:${dicname}/24435
+
+checksums           rmd160  5e37c750801df63439032be4954c4b63a44012cb \
+                    sha256  ba2744cc16142159b330075e13eed4565908915ac95a790d38dea540e0963c1c
+
+depends_build       port:nkf
+depends_lib         port:chasen-base
+
+if {[file exists ${prefix}/share/doc/chasen/chasen_dartsclone]} {
+    default_variants    +dartsclone
+}
+
+variant dartsclone description {Use darts-clone instead of darts} {}
+
+supported_archs     noarch
+configure.args      --with-chasenrc-path=${destroot}${prefix}/etc/chasen/chasenrc-${dicname}-${encoding}
+
+pre-configure {
+    if {[variant_isset dartsclone]} {
+        set dartslib "dartsclone"
+    } else {
+        set dartslib "darts"
+    }
+    if {![file exists ${prefix}/share/doc/chasen/chasen_${dartslib}]} {
+        return -code error "The variant you chose is not compatible with the ChaSen you've installed."
+    }
+}
+
+use_parallel_build  no
+
+post-patch {
+    reinplace "s|PACKAGE=${dicname}|PACKAGE=${dicname}-${encoding}|" ${worksrcpath}/configure
+    reinplace "s|/makemat|/makemat -i ${nkf_encoding}|"              ${worksrcpath}/Makefile.in
+    reinplace "s|/makeda|/makeda -i ${nkf_encoding}|"                ${worksrcpath}/Makefile.in
+    foreach f [glob ${worksrcpath}/*.cha ${worksrcpath}/*.dic ${worksrcpath}/chasenrc.in] {
+        move ${f} ${f}_
+        system "${prefix}/bin/nkf -E -${nkf_encoding} ${f}_ > ${f}"
+        delete ${f}_
+    }
+}
+
+pre-destroot {
+    file mkdir ${destroot}${prefix}/etc/chasen
+}
+
+livecheck.type      none


Property changes on: trunk/dports/textproc/chasen-ipadic-sjis/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/chasen-ipadic-utf8/Portfile
===================================================================
--- trunk/dports/textproc/chasen-ipadic-utf8/Portfile	                        (rev 0)
+++ trunk/dports/textproc/chasen-ipadic-utf8/Portfile	2011-10-29 02:06:15 UTC (rev 86585)
@@ -0,0 +1,67 @@
+# -*- 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$
+
+PortSystem          1.0
+
+set dicname         ipadic
+set encoding        utf8
+set nkf_encoding    w
+name                chasen-${dicname}-${encoding}
+version             2.7.0
+categories          textproc japanese
+maintainers         takanori hum openmaintainer
+homepage            http://sourceforge.jp/projects/${dicname}/
+description         IPA dictionary of UTF-8 encoding for ChaSen
+long_description    ${description}
+platforms           darwin
+license             BSD
+
+dist_subdir         chasen
+distname            ${dicname}-${version}
+
+master_sites        sourceforge_jp:${dicname}/24435
+
+checksums           rmd160  5e37c750801df63439032be4954c4b63a44012cb \
+                    sha256  ba2744cc16142159b330075e13eed4565908915ac95a790d38dea540e0963c1c
+
+depends_build       port:nkf
+depends_lib         port:chasen-base
+
+if {[file exists ${prefix}/share/doc/chasen/chasen_dartsclone]} {
+    default_variants    +dartsclone
+}
+
+variant dartsclone description {Use darts-clone instead of darts} {}
+
+supported_archs     noarch
+configure.args      --with-chasenrc-path=${destroot}${prefix}/etc/chasen/chasenrc-${dicname}-${encoding}
+
+pre-configure {
+    if {[variant_isset dartsclone]} {
+        set dartslib "dartsclone"
+    } else {
+        set dartslib "darts"
+    }
+    if {![file exists ${prefix}/share/doc/chasen/chasen_${dartslib}]} {
+        return -code error "The variant you chose is not compatible with the ChaSen you've installed."
+    }
+}
+
+use_parallel_build  no
+
+post-patch {
+    reinplace "s|PACKAGE=${dicname}|PACKAGE=${dicname}-${encoding}|" ${worksrcpath}/configure
+    reinplace "s|/makemat|/makemat -i ${nkf_encoding}|"              ${worksrcpath}/Makefile.in
+    reinplace "s|/makeda|/makeda -i ${nkf_encoding}|"                ${worksrcpath}/Makefile.in
+    foreach f [glob ${worksrcpath}/*.cha ${worksrcpath}/*.dic ${worksrcpath}/chasenrc.in] {
+        move ${f} ${f}_
+        system "${prefix}/bin/nkf -E -${nkf_encoding} ${f}_ > ${f}"
+        delete ${f}_
+    }
+}
+
+pre-destroot {
+    file mkdir ${destroot}${prefix}/etc/chasen
+}
+
+livecheck.type      none


Property changes on: trunk/dports/textproc/chasen-ipadic-utf8/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/chasen-naist-jdic/Portfile
===================================================================
--- trunk/dports/textproc/chasen-naist-jdic/Portfile	                        (rev 0)
+++ trunk/dports/textproc/chasen-naist-jdic/Portfile	2011-10-29 02:06:15 UTC (rev 86585)
@@ -0,0 +1,62 @@
+# -*- 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$
+
+PortSystem          1.0
+
+set dicname         naist-jdic
+name                chasen-${dicname}
+version             0.4.3
+categories          textproc japanese
+maintainers         takanori hum openmaintainer
+homepage            http://sourceforge.jp/projects/${dicname}/
+description         NAIST Japanese dictionary of EUC-JP encoding for ChaSen
+long_description    ${description}
+platforms           darwin
+license             BSD
+
+dist_subdir         chasen
+distname            ${dicname}-${version}
+
+master_sites        sourceforge_jp:${dicname}/31880
+
+checksums           rmd160  6d32e07e9fce6096a93603d148b6ee71a0a912c9 \
+                    sha256  f4b830877b51c770cb8491efb6e7bccf0c9011d3682351e5507eb864b0729bb1
+
+depends_lib         port:chasen-base
+
+if {[file exists ${prefix}/share/doc/chasen/chasen_dartsclone]} {
+    default_variants    +dartsclone
+}
+
+variant dartsclone description {Use darts-clone instead of darts} {}
+
+supported_archs     noarch
+configure.args      --with-chasenrc-path=${destroot}${prefix}/etc/chasen/chasenrc-${dicname}
+
+pre-configure {
+    if {[variant_isset dartsclone]} {
+        set dartslib "dartsclone"
+    } else {
+        set dartslib "darts"
+    }
+    if {![file exists ${prefix}/share/doc/chasen/chasen_${dartslib}]} {
+        return -code error "The variant you chose is not compatible with the ChaSen you've installed."
+    }
+}
+
+use_parallel_build  no
+
+pre-destroot {
+    file mkdir ${destroot}${prefix}/etc/chasen
+}
+
+post-destroot {
+    file mkdir ${destroot}${prefix}/share/doc/chasen-${dicname}
+    xinstall -m 644 -W ${worksrcpath} \
+        AUTHORS COPYING ChangeLog NEWS README \
+        ${destroot}${prefix}/share/doc/chasen-${dicname}
+}
+
+livecheck.type      regex
+livecheck.url       http://sourceforge.jp/projects/${dicname}/releases
+livecheck.regex     >${dicname}-(\[0-9.a-z\-\]+)\\.tar


Property changes on: trunk/dports/textproc/chasen-naist-jdic/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/chasen-naist-jdic-sjis/Portfile
===================================================================
--- trunk/dports/textproc/chasen-naist-jdic-sjis/Portfile	                        (rev 0)
+++ trunk/dports/textproc/chasen-naist-jdic-sjis/Portfile	2011-10-29 02:06:15 UTC (rev 86585)
@@ -0,0 +1,67 @@
+# -*- 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$
+
+PortSystem          1.0
+
+set dicname         naist-jdic
+set encoding        sjis
+set nkf_encoding    s
+name                chasen-${dicname}-${encoding}
+version             0.4.3
+categories          textproc japanese
+maintainers         takanori hum openmaintainer
+homepage            http://sourceforge.jp/projects/${dicname}/
+description         NAIST Japanese dictionary of Shift-JIS encoding for ChaSen
+long_description    ${description}
+platforms           darwin
+license             BSD
+
+dist_subdir         chasen
+distname            ${dicname}-${version}
+
+master_sites        sourceforge_jp:${dicname}/31880
+
+checksums           rmd160  6d32e07e9fce6096a93603d148b6ee71a0a912c9 \
+                    sha256  f4b830877b51c770cb8491efb6e7bccf0c9011d3682351e5507eb864b0729bb1
+
+depends_build       port:nkf
+depends_lib         port:chasen-base
+
+if {[file exists ${prefix}/share/doc/chasen/chasen_dartsclone]} {
+    default_variants    +dartsclone
+}
+
+variant dartsclone description {Use darts-clone instead of darts} {}
+
+supported_archs     noarch
+configure.args      --with-chasenrc-path=${destroot}${prefix}/etc/chasen/chasenrc-${dicname}-${encoding}
+
+pre-configure {
+    if {[variant_isset dartsclone]} {
+        set dartslib "dartsclone"
+    } else {
+        set dartslib "darts"
+    }
+    if {![file exists ${prefix}/share/doc/chasen/chasen_${dartslib}]} {
+        return -code error "The variant you chose is not compatible with the ChaSen you've installed."
+    }
+}
+
+use_parallel_build  no
+
+post-patch {
+    reinplace "s|PACKAGE=${dicname}|PACKAGE=${dicname}-${encoding}|" ${worksrcpath}/configure
+    reinplace "s|/makemat|/makemat -i ${nkf_encoding}|"              ${worksrcpath}/Makefile.in
+    reinplace "s|/makeda|/makeda -i ${nkf_encoding}|"                ${worksrcpath}/Makefile.in
+    foreach f [glob ${worksrcpath}/*.cha ${worksrcpath}/*.dic ${worksrcpath}/chasenrc.in] {
+        move ${f} ${f}_
+        system "${prefix}/bin/nkf -E -${nkf_encoding} ${f}_ > ${f}"
+        delete ${f}_
+    }
+}
+
+pre-destroot {
+    file mkdir ${destroot}${prefix}/etc/chasen
+}
+
+livecheck.type      none


Property changes on: trunk/dports/textproc/chasen-naist-jdic-sjis/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/chasen-naist-jdic-utf8/Portfile
===================================================================
--- trunk/dports/textproc/chasen-naist-jdic-utf8/Portfile	                        (rev 0)
+++ trunk/dports/textproc/chasen-naist-jdic-utf8/Portfile	2011-10-29 02:06:15 UTC (rev 86585)
@@ -0,0 +1,67 @@
+# -*- 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$
+
+PortSystem          1.0
+
+set dicname         naist-jdic
+set encoding        utf8
+set nkf_encoding    w
+name                chasen-${dicname}-${encoding}
+version             0.4.3
+categories          textproc japanese
+maintainers         takanori hum openmaintainer
+homepage            http://sourceforge.jp/projects/${dicname}/
+description         NAIST Japanese dictionary of UTF-8 encoding for ChaSen
+long_description    ${description}
+platforms           darwin
+license             BSD
+
+dist_subdir         chasen
+distname            ${dicname}-${version}
+
+master_sites        sourceforge_jp:${dicname}/31880
+
+checksums           rmd160  6d32e07e9fce6096a93603d148b6ee71a0a912c9 \
+                    sha256  f4b830877b51c770cb8491efb6e7bccf0c9011d3682351e5507eb864b0729bb1
+
+depends_build       port:nkf
+depends_lib         port:chasen-base
+
+if {[file exists ${prefix}/share/doc/chasen/chasen_dartsclone]} {
+    default_variants    +dartsclone
+}
+
+variant dartsclone description {Use darts-clone instead of darts} {}
+
+supported_archs     noarch
+configure.args      --with-chasenrc-path=${destroot}${prefix}/etc/chasen/chasenrc-${dicname}-${encoding}
+
+pre-configure {
+    if {[variant_isset dartsclone]} {
+        set dartslib "dartsclone"
+    } else {
+        set dartslib "darts"
+    }
+    if {![file exists ${prefix}/share/doc/chasen/chasen_${dartslib}]} {
+        return -code error "The variant you chose is not compatible with the ChaSen you've installed."
+    }
+}
+
+use_parallel_build  no
+
+post-patch {
+    reinplace "s|PACKAGE=${dicname}|PACKAGE=${dicname}-${encoding}|" ${worksrcpath}/configure
+    reinplace "s|/makemat|/makemat -i ${nkf_encoding}|"              ${worksrcpath}/Makefile.in
+    reinplace "s|/makeda|/makeda -i ${nkf_encoding}|"                ${worksrcpath}/Makefile.in
+    foreach f [glob ${worksrcpath}/*.cha ${worksrcpath}/*.dic ${worksrcpath}/chasenrc.in] {
+        move ${f} ${f}_
+        system "${prefix}/bin/nkf -E -${nkf_encoding} ${f}_ > ${f}"
+        delete ${f}_
+    }
+}
+
+pre-destroot {
+    file mkdir ${destroot}${prefix}/etc/chasen
+}
+
+livecheck.type      none


Property changes on: trunk/dports/textproc/chasen-naist-jdic-utf8/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111028/71568aed/attachment-0001.html>


More information about the macports-changes mailing list