<!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>[116675] trunk/dports/audio/julius</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/116675">116675</a></dd>
<dt>Author</dt> <dd>hum@macports.org</dd>
<dt>Date</dt> <dd>2014-02-02 07:16:51 -0800 (Sun, 02 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>julius: update to the latest dictation kit for v4.3.1; add patch for run-dnn.sh to use Terminal.app instead of xterm.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsaudiojuliusPortfile">trunk/dports/audio/julius/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsaudiojuliusfilespatchrundnnshdiff">trunk/dports/audio/julius/files/patch-run-dnn.sh.diff</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportsaudiojuliusfilesjulius_demo">trunk/dports/audio/julius/files/julius_demo</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsaudiojuliusPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/audio/julius/Portfile (116674 => 116675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/julius/Portfile        2014-02-02 11:25:38 UTC (rev 116674)
+++ trunk/dports/audio/julius/Portfile        2014-02-02 15:16:51 UTC (rev 116675)
</span><span class="lines">@@ -5,6 +5,7 @@
</span><span class="cx"> 
</span><span class="cx"> name                julius
</span><span class="cx"> version             4.3.1
</span><ins>+revision            1
</ins><span class="cx"> categories          audio japanese
</span><span class="cx"> platforms           darwin
</span><span class="cx"> maintainers         hum openmaintainer
</span><span class="lines">@@ -44,8 +45,10 @@
</span><span class="cx"> destroot.target-append  install.man
</span><span class="cx"> destroot.destdir        prefix=${destroot}${prefix}
</span><span class="cx"> 
</span><ins>+set docdir ${prefix}/share/doc/${name}
+
</ins><span class="cx"> post-destroot {
</span><del>-    xinstall -d ${destroot}${prefix}/share/doc/${name}
</del><ins>+    xinstall -d ${destroot}${docdir}
</ins><span class="cx">     xinstall -m 644 -W ${worksrcpath} \
</span><span class="cx">         00readme-ja.txt \
</span><span class="cx">         00readme.txt \
</span><span class="lines">@@ -54,50 +57,65 @@
</span><span class="cx">         Release-ja.txt \
</span><span class="cx">         Release.txt \
</span><span class="cx">         Sample.jconf \
</span><del>-        ${destroot}${prefix}/share/doc/${name}
</del><ins>+        ${destroot}${docdir}
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> default_variants    +kit
</span><span class="cx"> 
</span><span class="cx"> set kit_name        dictation-kit
</span><del>-set kit_version     v4.2.3
-#set kit_version     v${version}
-set dictation_kit   ${kit_name}-${kit_version}
-set kit_distfile    ${dictation_kit}${extract.suffix}
</del><ins>+set kit_version     v${version}
+set dictation_kit   ${kit_name}-${kit_version}-osx
+set kit_distfile    ${dictation_kit}-0130.tgz
</ins><span class="cx"> 
</span><del>-variant kit description {Add dictation kit and a demo script} {
</del><ins>+variant kit description {Add dictation kit} {
</ins><span class="cx">     distfiles-append    ${kit_distfile}:kit
</span><del>-    master_sites-append sourceforge_jp:julius/59050/:kit
</del><ins>+    master_sites-append sourceforge_jp:julius/60416/:kit
</ins><span class="cx">     checksums-append    ${kit_distfile} \
</span><del>-                        rmd160  b869281bf13b5e9a45ae048fca6371ff5eeb75b0 \
-                        sha256  a6f6374d14bcce4bbffc3358f9f6ac289fa4dda2958166fce35ad26c5e0fe404
</del><ins>+                        rmd160  2db607e470a8f2516a9cd0b9a1b8925523b62e9d \
+                        sha256  2ff46d1bd4d8e7690bd568d2973978081460e661085f6b4c2a0a630234a911c1
</ins><span class="cx"> 
</span><ins>+    post-patch {
+        system -W ${workpath}/${dictation_kit} &quot;patch &lt; ${filespath}/patch-run-dnn.sh.diff&quot;
+    }
+
</ins><span class="cx">     post-destroot {
</span><del>-        # copy the dictation kit.
-        set lib_dest     ${destroot}${prefix}/lib/${name}
-        xinstall -d ${lib_dest}
</del><ins>+        # copy model files.
+        set libdir ${prefix}/lib/${name}
+        xinstall -d ${destroot}${libdir}
+        copy ${workpath}/${dictation_kit}/model ${destroot}${libdir}
+        # copy configuration files and set paths.
+        foreach f {am-dnn.jconf am-gmm.jconf dnnclient.conf main.jconf} {
+            xinstall -m 644 ${workpath}/${dictation_kit}/${f} ${destroot}${libdir}
+            reinplace -locale C &quot;s| model/| ${libdir}/model/|g&quot; ${destroot}${libdir}/${f}
+        }
+        # copy executable files and set paths.
+        set libexecdir ${prefix}/libexec/${name}
+        xinstall -d ${destroot}${libexecdir}
+        foreach f {run-dnn.sh run-gmm.sh run.sh} {
+            xinstall -m 755 ${workpath}/${dictation_kit}/${f} ${destroot}${libexecdir}
+            reinplace -locale C &quot;s|\\./bin/|${prefix}/bin/|g&quot; ${destroot}${libexecdir}/${f}
+            reinplace -locale C &quot;s| model/| ${libdir}/model/|g&quot; ${destroot}${libexecdir}/${f}
+            reinplace -locale C -E &quot;s| (\[^\[:space:\]\]+\\.j?conf)| ${libdir}/\\1|g&quot; \
+                ${destroot}${libexecdir}/${f}
+        }
+        xinstall -m 744 -W ${workpath}/${dictation_kit}/bin \
+            dnnclient-gpu.py \
+            dnnclient.py \
+            ${destroot}${prefix}/bin
+        copy ${workpath}/${dictation_kit}/bin/scoring ${destroot}${libexecdir}
+        # copy additioanl documents of the dictation kit.
+        set kit_docdir ${prefix}/share/doc/${name}/${kit_name}
+        xinstall -d ${destroot}${kit_docdir}
</ins><span class="cx">         xinstall -m 644 -W ${workpath}/${dictation_kit} \
</span><del>-            fast.jconf \
-            light.jconf \
-            ${lib_dest}
-        copy ${workpath}/${dictation_kit}/model ${lib_dest}
-        # configure the dictation kit.
-        set conf_dest    ${lib_dest}/fast.jconf
-        reinplace -locale C &quot;s| model/| ${prefix}/lib/${name}/model/|g&quot;    ${conf_dest}
-        reinplace -locale C &quot;s|#-charconv from to|-charconv EUC-JP UTF-8|&quot; ${conf_dest}
-        # configure an executable demo script file.
-        set script_name  julius_demo
-        set script_dest  ${destroot}${prefix}/bin/${script_name}
-        xinstall -m 755  ${filespath}/${script_name} ${script_dest}
-        reinplace -locale C &quot;s|@prefix@|${prefix}|g&quot; ${script_dest}
-        # copy documentation.
-        set kit_docdir   ${destroot}${prefix}/share/doc/${name}/${kit_name}
-        xinstall -d ${kit_docdir}
-        xinstall -m 644 -W ${workpath}/${dictation_kit} \
</del><span class="cx">             00readme.txt \
</span><ins>+            HOWTO-dnn.txt \
</ins><span class="cx">             HOWTO.txt \
</span><ins>+            LICENSE.txt \
</ins><span class="cx">             TROUBLE.txt \
</span><del>-            ${kit_docdir}
</del><ins>+            ${destroot}${kit_docdir}
+        # copy manuals.
+        copy ${workpath}/${dictation_kit}/doc/manuals    ${destroot}${docdir}
+        copy ${workpath}/${dictation_kit}/doc/manuals-ja ${destroot}${docdir}
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkdportsaudiojuliusfilesjulius_demo"></a>
<div class="delfile"><h4>Deleted: trunk/dports/audio/julius/files/julius_demo (116674 => 116675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/julius/files/julius_demo        2014-02-02 11:25:38 UTC (rev 116674)
+++ trunk/dports/audio/julius/files/julius_demo        2014-02-02 15:16:51 UTC (rev 116675)
</span><span class="lines">@@ -1,2 +0,0 @@
</span><del>-#!/bin/sh
-@prefix@/bin/julius -C @prefix@/lib/julius/fast.jconf &quot;$@&quot;
</del></span></pre></div>
<a id="trunkdportsaudiojuliusfilespatchrundnnshdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/audio/julius/files/patch-run-dnn.sh.diff (0 => 116675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/julius/files/patch-run-dnn.sh.diff                                (rev 0)
+++ trunk/dports/audio/julius/files/patch-run-dnn.sh.diff        2014-02-02 15:16:51 UTC (rev 116675)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+--- run-dnn.sh.orig        2014-01-30 20:18:17.000000000 +0900
++++ run-dnn.sh        2014-02-02 23:44:48.000000000 +0900
+@@ -2,8 +2,8 @@

+ ./bin/julius -C main.jconf -C am-dnn.jconf -demo $* &amp;
+ sleep 10
+-xterm -e python ./bin/dnnclient.py dnnclient.conf &amp;
++osascript -e 'tell application &quot;Terminal&quot; to do script &quot;python ./bin/dnnclient.py dnnclient.conf &amp;&quot;'
+ sleep 2
+-xterm -e ./bin/adintool -in mic -out vecnet -server 127.0.0.1 -paramtype FBANK_D_A_Z -veclen 120 -htkconf model/dnn/config.lmfb.40ch.jnas -port 5532 -cvn -cmnload model/dnn/norm.jnas
++osascript -e 'tell application &quot;Terminal&quot; to do script &quot;./bin/adintool -in mic -out vecnet -server 127.0.0.1 -paramtype FBANK_D_A_Z -veclen 120 -htkconf model/dnn/config.lmfb.40ch.jnas -port 5532 -cvn -cmnload model/dnn/norm.jnas&quot;'

+ kill 0
</ins></span></pre>
</div>
</div>

</body>
</html>