Changeset 116675


Ignore:
Timestamp:
Feb 2, 2014, 3:16:51 PM (5 years ago)
Author:
hum@…
Message:

julius: update to the latest dictation kit for v4.3.1; add patch for run-dnn.sh to use Terminal.app instead of xterm.

Location:
trunk/dports/audio/julius
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/audio/julius/Portfile

    r116472 r116675  
    66name                julius
    77version             4.3.1
     8revision            1
    89categories          audio japanese
    910platforms           darwin
     
    4546destroot.destdir        prefix=${destroot}${prefix}
    4647
     48set docdir ${prefix}/share/doc/${name}
     49
    4750post-destroot {
    48     xinstall -d ${destroot}${prefix}/share/doc/${name}
     51    xinstall -d ${destroot}${docdir}
    4952    xinstall -m 644 -W ${worksrcpath} \
    5053        00readme-ja.txt \
     
    5558        Release.txt \
    5659        Sample.jconf \
    57         ${destroot}${prefix}/share/doc/${name}
     60        ${destroot}${docdir}
    5861}
    5962
     
    6164
    6265set kit_name        dictation-kit
    63 set kit_version     v4.2.3
    64 #set kit_version     v${version}
    65 set dictation_kit   ${kit_name}-${kit_version}
    66 set kit_distfile    ${dictation_kit}${extract.suffix}
     66set kit_version     v${version}
     67set dictation_kit   ${kit_name}-${kit_version}-osx
     68set kit_distfile    ${dictation_kit}-0130.tgz
    6769
    68 variant kit description {Add dictation kit and a demo script} {
     70variant kit description {Add dictation kit} {
    6971    distfiles-append    ${kit_distfile}:kit
    70     master_sites-append sourceforge_jp:julius/59050/:kit
     72    master_sites-append sourceforge_jp:julius/60416/:kit
    7173    checksums-append    ${kit_distfile} \
    72                         rmd160  b869281bf13b5e9a45ae048fca6371ff5eeb75b0 \
    73                         sha256  a6f6374d14bcce4bbffc3358f9f6ac289fa4dda2958166fce35ad26c5e0fe404
     74                        rmd160  2db607e470a8f2516a9cd0b9a1b8925523b62e9d \
     75                        sha256  2ff46d1bd4d8e7690bd568d2973978081460e661085f6b4c2a0a630234a911c1
     76
     77    post-patch {
     78        system -W ${workpath}/${dictation_kit} "patch < ${filespath}/patch-run-dnn.sh.diff"
     79    }
    7480
    7581    post-destroot {
    76         # copy the dictation kit.
    77         set lib_dest     ${destroot}${prefix}/lib/${name}
    78         xinstall -d ${lib_dest}
    79         xinstall -m 644 -W ${workpath}/${dictation_kit} \
    80             fast.jconf \
    81             light.jconf \
    82             ${lib_dest}
    83         copy ${workpath}/${dictation_kit}/model ${lib_dest}
    84         # configure the dictation kit.
    85         set conf_dest    ${lib_dest}/fast.jconf
    86         reinplace -locale C "s| model/| ${prefix}/lib/${name}/model/|g"    ${conf_dest}
    87         reinplace -locale C "s|#-charconv from to|-charconv EUC-JP UTF-8|" ${conf_dest}
    88         # configure an executable demo script file.
    89         set script_name  julius_demo
    90         set script_dest  ${destroot}${prefix}/bin/${script_name}
    91         xinstall -m 755  ${filespath}/${script_name} ${script_dest}
    92         reinplace -locale C "s|@prefix@|${prefix}|g" ${script_dest}
    93         # copy documentation.
    94         set kit_docdir   ${destroot}${prefix}/share/doc/${name}/${kit_name}
    95         xinstall -d ${kit_docdir}
     82        # copy model files.
     83        set libdir ${prefix}/lib/${name}
     84        xinstall -d ${destroot}${libdir}
     85        copy ${workpath}/${dictation_kit}/model ${destroot}${libdir}
     86        # copy configuration files and set paths.
     87        foreach f {am-dnn.jconf am-gmm.jconf dnnclient.conf main.jconf} {
     88            xinstall -m 644 ${workpath}/${dictation_kit}/${f} ${destroot}${libdir}
     89            reinplace -locale C "s| model/| ${libdir}/model/|g" ${destroot}${libdir}/${f}
     90        }
     91        # copy executable files and set paths.
     92        set libexecdir ${prefix}/libexec/${name}
     93        xinstall -d ${destroot}${libexecdir}
     94        foreach f {run-dnn.sh run-gmm.sh run.sh} {
     95            xinstall -m 755 ${workpath}/${dictation_kit}/${f} ${destroot}${libexecdir}
     96            reinplace -locale C "s|\\./bin/|${prefix}/bin/|g" ${destroot}${libexecdir}/${f}
     97            reinplace -locale C "s| model/| ${libdir}/model/|g" ${destroot}${libexecdir}/${f}
     98            reinplace -locale C -E "s| (\[^\[:space:\]\]+\\.j?conf)| ${libdir}/\\1|g" \
     99                ${destroot}${libexecdir}/${f}
     100        }
     101        xinstall -m 744 -W ${workpath}/${dictation_kit}/bin \
     102            dnnclient-gpu.py \
     103            dnnclient.py \
     104            ${destroot}${prefix}/bin
     105        copy ${workpath}/${dictation_kit}/bin/scoring ${destroot}${libexecdir}
     106        # copy additioanl documents of the dictation kit.
     107        set kit_docdir ${prefix}/share/doc/${name}/${kit_name}
     108        xinstall -d ${destroot}${kit_docdir}
    96109        xinstall -m 644 -W ${workpath}/${dictation_kit} \
    97110            00readme.txt \
     111            HOWTO-dnn.txt \
    98112            HOWTO.txt \
     113            LICENSE.txt \
    99114            TROUBLE.txt \
    100             ${kit_docdir}
     115            ${destroot}${kit_docdir}
     116        # copy manuals.
     117        copy ${workpath}/${dictation_kit}/doc/manuals    ${destroot}${docdir}
     118        copy ${workpath}/${dictation_kit}/doc/manuals-ja ${destroot}${docdir}
    101119    }
    102120}
Note: See TracChangeset for help on using the changeset viewer.