<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[133890] trunk/dports/textproc</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/133890">133890</a></dd>
<dt>Author</dt> <dd>hum@macports.org</dd>
<dt>Date</dt> <dd>2015-03-14 17:40:40 -0700 (Sat, 14 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>New port: mecab-ipadic-neologd @ 20150315 - Neologism dictionary for MeCab</pre>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/textproc/mecab-ipadic-neologd/</li>
<li><a href="#trunkdportstextprocmecabipadicneologdPortfile">trunk/dports/textproc/mecab-ipadic-neologd/Portfile</a></li>
<li>trunk/dports/textproc/mecab-ipadic-neologd/files/</li>
<li><a href="#trunkdportstextprocmecabipadicneologdfilespatchmakeshdiff">trunk/dports/textproc/mecab-ipadic-neologd/files/patch-make.sh.diff</a></li>
<li><a href="#trunkdportstextprocmecabipadicneologdfilespatchtestshdiff">trunk/dports/textproc/mecab-ipadic-neologd/files/patch-test.sh.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportstextprocmecabipadicneologdPortfile"></a>
<div class="addfile"><h4>Added: trunk/dports/textproc/mecab-ipadic-neologd/Portfile (0 => 133890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/textproc/mecab-ipadic-neologd/Portfile                                (rev 0)
+++ trunk/dports/textproc/mecab-ipadic-neologd/Portfile        2015-03-15 00:40:40 UTC (rev 133890)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+# -*- 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
+PortGroup           github 1.0
+
+github.setup        neologd mecab-ipadic-neologd ae5886767977c5baa0d34017928d9cd752d0330d
+version             20150315
+set dic_version     20150313
+categories          textproc japanese
+license             Apache-2
+platforms           darwin
+supported_archs     noarch
+maintainers         hum openmaintainer
+
+description         Neologism dictionary for MeCab
+long_description    mecab-ipadic-neologd is customized system dictionary for \
+                    MeCab. This dictionary includes many neologisms (new word), \
+                    which are \extracted from many language resources on the Web. \
+                    When you analyze the Web documents, it's better to use this \
+                    system dictionary and default one (ipadic) together.
+
+dist_subdir         mecab
+
+checksums           rmd160  07968c2d46b4ac2e065e5f6e08708641fb481d8c \
+                    sha256  1354ea3752ad2db58a7ef6878f9dae49d76e5f88516e032293858bb2743096ca
+
+depends_lib         port:mecab-base
+
+depends_build       port:mecab-ipadic-utf8 \
+                    port:libiconv \
+                    port:xz
+
+patchfiles          patch-make.sh.diff \
+                    patch-test.sh.diff
+
+post-patch {
+    reinplace &quot;s|@PREFIX@|${prefix}|g&quot; ${worksrcpath}/libexec/test-mecab-ipadic-neologd.sh
+}
+
+use_configure       no
+
+build {
+    system -W ${worksrcpath} ./libexec/make-mecab-ipadic-neologd.sh
+    system -W ${worksrcpath} ./libexec/test-mecab-ipadic-neologd.sh
+}
+
+destroot.dir        ${worksrcpath}/build/mecab-ipadic-2.7.0-20070801-neologd-${dic_version}
+
+post-destroot {
+    move ${destroot}${prefix}/lib/mecab/dic/${name} \
+        ${destroot}${prefix}/lib/mecab/dic/neologd-utf8
+    # install additional documents
+    set docdir      ${prefix}/share/doc/${name}
+    xinstall -d ${destroot}${docdir}
+    xinstall -m 644 -W ${worksrcpath} \
+        COPYING README.ja.md README.md \
+        ${destroot}${docdir}
+    xinstall -m 644 ${destroot.dir}/COPYING ${destroot}${docdir}/COPYING-ipadic
+} 
</ins></span></pre></div>
<a id="trunkdportstextprocmecabipadicneologdfilespatchmakeshdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/textproc/mecab-ipadic-neologd/files/patch-make.sh.diff (0 => 133890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/textproc/mecab-ipadic-neologd/files/patch-make.sh.diff                                (rev 0)
+++ trunk/dports/textproc/mecab-ipadic-neologd/files/patch-make.sh.diff        2015-03-15 00:40:40 UTC (rev 133890)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+--- libexec/make-mecab-ipadic-neologd.sh.orig        2015-03-15 09:34:32.000000000 +0900
++++ libexec/make-mecab-ipadic-neologd.sh        2015-03-15 09:36:27.000000000 +0900
+@@ -86,11 +86,11 @@
+ echo &quot;${ECHO_PREFIX} Encode the character encoding of system dictionary resources from EUC_JP to UTF-8&quot;
+ sed -i -e &quot;s|${MECAB_DIC_DIR}/ipadic|${INSTALL_DIR_PATH}|p&quot; ${NEOLOGD_DIC_DIR}/Makefile

+-find ${NEOLOGD_DIC_DIR} -type f | xargs file | grep &quot;.csv&quot; | cut -d: -f1 | xargs -t -I{} ${BASEDIR}/../libexec/iconv_euc_to_utf8.sh {}
+-find ${NEOLOGD_DIC_DIR} -type f | xargs file | grep &quot;.csv&quot; | grep -v &quot;.utf8&quot; | cut -d: -f1 | xargs -t -I{} rm {}
+-find ${NEOLOGD_DIC_DIR} -type f | xargs file | grep &quot;.def&quot; | cut -d: -f1 | xargs -t -I{} ${BASEDIR}/../libexec/iconv_euc_to_utf8.sh {}
+-find ${NEOLOGD_DIC_DIR} -type f | xargs file | grep &quot;.def&quot; | grep -v &quot;.utf8&quot; | cut -d: -f1 | xargs -t -I{} rm {}
+-find ${NEOLOGD_DIC_DIR} -type f | xargs file | grep  &quot;.utf8&quot; | cut -d: -f1 |  sed -e &quot;s|.utf8||&quot; |  xargs -t -I{} mv {}.utf8 {}
++find . -type f | xargs file | grep &quot;.csv&quot; | cut -d: -f1 | xargs -t -I{} ${BASEDIR}/../libexec/iconv_euc_to_utf8.sh {}
++find . -type f | xargs file | grep &quot;.csv&quot; | grep -v &quot;.utf8&quot; | cut -d: -f1 | xargs -t -I{} rm {}
++find . -type f | xargs file | grep &quot;.def&quot; | cut -d: -f1 | xargs -t -I{} ${BASEDIR}/../libexec/iconv_euc_to_utf8.sh {}
++find . -type f | xargs file | grep &quot;.def&quot; | grep -v &quot;.utf8&quot; | cut -d: -f1 | xargs -t -I{} rm {}
++find . -type f | xargs file | grep  &quot;.utf8&quot; | cut -d: -f1 |  sed -e &quot;s|.utf8||&quot; |  xargs -t -I{} mv {}.utf8 {}

+ echo &quot;${ECHO_PREFIX} Copy user dictionary resource&quot;
+ SEED_FILE_NAME=mecab-user-dict-seed.${YMD}.csv
</ins></span></pre></div>
<a id="trunkdportstextprocmecabipadicneologdfilespatchtestshdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/textproc/mecab-ipadic-neologd/files/patch-test.sh.diff (0 => 133890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/textproc/mecab-ipadic-neologd/files/patch-test.sh.diff                                (rev 0)
+++ trunk/dports/textproc/mecab-ipadic-neologd/files/patch-test.sh.diff        2015-03-15 00:40:40 UTC (rev 133890)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+--- libexec/test-mecab-ipadic-neologd.sh.orig        2015-03-09 19:36:37.000000000 +0900
++++ libexec/test-mecab-ipadic-neologd.sh        2015-03-14 23:47:54.000000000 +0900
+@@ -21,8 +21,8 @@

+ echo &quot;$ECHO_PREFIX Start..&quot;

+-echo &quot;$ECHO_PREFIX Replace timestamp from 'git clone' date to 'git commit' date&quot;
+-${BASEDIR}/../misc/git-set-file-times
++#echo &quot;$ECHO_PREFIX Replace timestamp from 'git clone' date to 'git commit' date&quot;
++#${BASEDIR}/../misc/git-set-file-times

+ YMD=`ls -c \`find ${BASEDIR}/../seed/mecab-user-dict-seed.*.csv.xz\` | head -1 | egrep -o '[0-9]{8}' | tail -1`
+ if [ ! -e ${BASEDIR}/../build/mecab-ipadic-2.7.0-20070801-neologd-${YMD} ]; then
+@@ -36,36 +36,37 @@

+ echo &quot;$ECHO_PREFIX Get buzz phrases&quot;

+-curl http://searchranking.yahoo.co.jp/realtime_buzz/ -o &quot;/tmp/realtime_buzz.html&quot;
+-sed -i -e &quot;/\n/d&quot; /tmp/realtime_buzz.html
+-cat /tmp/realtime_buzz.html | perl -ne '$l = $_;  if ($l =~ m|&lt;h3&gt;&lt;a href=&quot;http://rdsig\.yahoo\.co\.jp.+?&quot;&gt;(.+)&lt;/a&gt;&lt;/h3&gt;|g){ print $1.&quot;\n&quot;;}' &gt; /tmp/buzz_phrase
++mkdir -p tmp
++curl http://searchranking.yahoo.co.jp/realtime_buzz/ -o &quot;./tmp/realtime_buzz.html&quot;
++sed -i -e &quot;/\n/d&quot; ./tmp/realtime_buzz.html
++cat ./tmp/realtime_buzz.html | perl -ne '$l = $_;  if ($l =~ m|&lt;h3&gt;&lt;a href=&quot;http://rdsig\.yahoo\.co\.jp.+?&quot;&gt;(.+)&lt;/a&gt;&lt;/h3&gt;|g){ print $1.&quot;\n&quot;;}' &gt; ./tmp/buzz_phrase

+-PHRASE_FILE=/tmp/buzz_phrase
++PHRASE_FILE=./tmp/buzz_phrase
+ if [ ! -s ${PHRASE_FILE} ]; then
+    PHRASE_FILE=&quot;&quot;#${BASEDIR}/../misc/buzz_phrase_201402181610
+ fi

+ echo &quot;$ECHO_PREFIX Get difference between default system dictionary and mecab-ipadic-neologd&quot;

+-cat /tmp/buzz_phrase| mecab -Owakati &gt; /tmp/buzz_phrase_tokenized_using_defdic
+-cat /tmp/buzz_phrase| mecab -Owakati -d ${MECAB_DIC_DIR} &gt; /tmp/buzz_phrase_tokenized_using_neologismdic
+-/usr/bin/diff -y -W60 --side-by-side --suppress-common-lines /tmp/buzz_phrase_tokenized_using_defdic /tmp/buzz_phrase_tokenized_using_neologismdic &gt; /tmp/buzz_phrase_tokenized_diff
++cat ./tmp/buzz_phrase| mecab -Owakati -d @PREFIX@/lib/mecab/dic/ipadic-utf8 &gt; ./tmp/buzz_phrase_tokenized_using_defdic
++cat ./tmp/buzz_phrase| mecab -Owakati -d ${MECAB_DIC_DIR} &gt; ./tmp/buzz_phrase_tokenized_using_neologismdic
++/usr/bin/diff -y -W60 --side-by-side --suppress-common-lines ./tmp/buzz_phrase_tokenized_using_defdic ./tmp/buzz_phrase_tokenized_using_neologismdic &gt; ./tmp/buzz_phrase_tokenized_diff

+-if [ -s /tmp/buzz_phrase_tokenized_diff ]; then
++if [ -s ./tmp/buzz_phrase_tokenized_diff ]; then
+     echo &quot;$ECHO_PREFIX Tokenize phrase using default system dictionary&quot;
+-    echo &quot;default system dictonary&quot; &gt; /tmp/buzz_phrase_tokenized_using_defdic
+-    cat /tmp/buzz_phrase| mecab -Owakati &gt;&gt; /tmp/buzz_phrase_tokenized_using_defdic
++    echo &quot;default system dictonary&quot; &gt; ./tmp/buzz_phrase_tokenized_using_defdic
++    cat ./tmp/buzz_phrase| mecab -Owakati -d @PREFIX@/lib/mecab/dic/ipadic-utf8 &gt;&gt; ./tmp/buzz_phrase_tokenized_using_defdic

+     echo &quot;$ECHO_PREFIX Tokenize phrase using mecab-ipadic-neologd&quot;
+-    echo &quot;mecab-ipadic-neologd&quot; &gt; /tmp/buzz_phrase_tokenized_using_neologismdic
+-    cat /tmp/buzz_phrase| mecab -Owakati -d ${MECAB_DIC_DIR} &gt;&gt; /tmp/buzz_phrase_tokenized_using_neologismdic
++    echo &quot;mecab-ipadic-neologd&quot; &gt; ./tmp/buzz_phrase_tokenized_using_neologismdic
++    cat ./tmp/buzz_phrase| mecab -Owakati -d ${MECAB_DIC_DIR} &gt;&gt; ./tmp/buzz_phrase_tokenized_using_neologismdic

+     echo &quot;$ECHO_PREFIX Get result of diff&quot;
+-    /usr/bin/diff -y -W60 --side-by-side --suppress-common-lines /tmp/buzz_phrase_tokenized_using_defdic /tmp/buzz_phrase_tokenized_using_neologismdic &gt; /tmp/buzz_phrase_tokenized_diff
++    /usr/bin/diff -y -W60 --side-by-side --suppress-common-lines ./tmp/buzz_phrase_tokenized_using_defdic ./tmp/buzz_phrase_tokenized_using_neologismdic &gt; ./tmp/buzz_phrase_tokenized_diff

+     echo &quot;$ECHO_PREFIX Please check difference between default system dictionary and mecab-ipadic-neologd&quot;
+     echo &quot;&quot;
+-    cat /tmp/buzz_phrase_tokenized_diff
++    cat ./tmp/buzz_phrase_tokenized_diff
+     echo &quot;&quot;
+ else
+     echo &quot;$ECHO_PREFIX Something wrong. You shouldn't install mecab-ipadic-neologd yet.&quot;
</ins></span></pre>
</div>
</div>

</body>
</html>