Ticket #29433: Portfile.diff

File Portfile.diff, 5.3 KB (added by humem (humem), 13 years ago)
  • Portfile

    old new  
    44PortSystem          1.0
    55
    66name                julius
    7 version             4.1.5.1
     7version             4.2
    88categories          audio japanese
    99platforms           darwin
    1010maintainers         nomaintainer
    11 supported_archs     noarch
    1211license             BSD
    1312
    1413description         Large Vocabulary Continuous Speech Recognition (LVCSR) Engine
     14
    1515long_description    "Julius" is an open-source high-performance large vocabulary \
    1616                    continuous speech recognition (LVCSR) decoder software for \
    1717                    speech-related researchers and developers. \
    1818                    Based on word N-gram and triphone context-dependent HMM, \
    1919                    it can perform almost real-time decoding on most current \
    2020                    PCs with small amount of memory.
    21 homepage            http://julius.sourceforge.jp/
    22 master_sites        sourceforge_jp:julius/50318/:julius \
    23                     sourceforge_jp:julius/51158/:dictation_kit
    2421
    25 distfiles           ${distname}${extract.suffix}:julius
     22homepage            http://julius.sourceforge.jp/
     23master_sites        sourceforge_jp:julius/51820/
    2624
    2725checksums           ${distname}${extract.suffix} \
    28                          sha1    bf746719ea05095ead4be70cf27b52ae77ed5b37 \
    29                          rmd160  904738b1f5cd26bf42fe29f10961d42217be0e86
     26                    sha1    94b262d1682ec26a250aa294d10389663041040f \
     27                    rmd160  ac5aa9f514deabf357404ded261be67f8dcfd34e
    3028
    31 patchfiles          patch-configure.in.diff
     29patchfiles          patch-configure.diff
    3230
    33 use_autoconf        yes
     31# Note: '--enable-words-int' should be declared ahead of '--with-mictype'.
     32variant words_int description {Use integer for word ID to extend vocabulary limit} {
     33    configure.args-append    --enable-words-int
     34    notes-append "
     35        An executable built with '--enable-words-int' fails to convert\
     36        2-bytes bingrams, and it cannot start with the dictation-kit.
     37        If you'd like to use the dictation-kit, you may replace its\
     38        2-bytes bingram with a 4-bytes one."
     39}
    3440
    35 pre-configure {
    36     foreach dir { mkgshmm gramtools jcontrol julius libjulius libsent } {
    37         ui_debug "Running autoconf in ${dir}"
    38         system "cd ${worksrcpath}/$dir && ${prefix}/bin/autoconf"
    39     }
     41platform darwin 10 {
     42    depends_lib-append       port:portaudio
     43    configure.args-append    --with-mictype=portaudio
     44}
     45
     46destroot.target-append  install.man
     47destroot.destdir    prefix=${destroot}${prefix}
     48
     49post-destroot {
     50    xinstall -d ${destroot}${prefix}/share/doc/${name}
     51    xinstall -m 644 -W ${worksrcpath} \
     52        00readme-ja.txt \
     53        00readme.txt \
     54        ChangeLog \
     55        LICENSE.txt \
     56        Release-ja.txt \
     57        Release.txt \
     58        Sample.jconf \
     59        ${destroot}${prefix}/share/doc/${name}
    4060}
    4161
    4262default_variants    +kit
     
    4464set kit_name        dictation-kit
    4565set kit_version     v4.1
    4666set dictation_kit   ${kit_name}-${kit_version}
     67set kit_distfile    ${dictation_kit}${extract.suffix}
    4768
    4869variant kit description {Add dictation kit and a demo script} {
    49     distfiles-append    ${dictation_kit}${extract.suffix}:dictation_kit
    50 
    51     checksums-append    ${dictation_kit}${extract.suffix} \
    52                             sha1    7fd6fd6de13cd18c9ab811266da9d548d57c422a \
    53                             rmd160  9f8603f95cbb363cb8a92189198837f81c4968dd
     70    distfiles-append    ${kit_distfile}:kit
     71    master_sites-append sourceforge_jp:julius/51930/:kit
     72    checksums-append    ${kit_distfile} \
     73                        sha1    7fd6fd6de13cd18c9ab811266da9d548d57c422a \
     74                        rmd160  9f8603f95cbb363cb8a92189198837f81c4968dd
    5475
    5576    post-destroot {
    5677        # copy the dictation kit.
    57         set lib_inst     ${prefix}/lib/${name}
    58         set lib_dest     ${destroot}${lib_inst}
    59         file mkdir       ${lib_dest}
    60         copy ${workpath}/${dictation_kit}/model      ${lib_dest}
    61         copy ${workpath}/${dictation_kit}/fast.jconf ${lib_dest}
     78        set lib_dest     ${destroot}${prefix}/lib/${name}
     79        xinstall -d ${lib_dest}
     80        xinstall -m 644 -W ${workpath}/${dictation_kit} \
     81            fast.jconf \
     82            light.jconf \
     83            ${lib_dest}
     84        copy ${workpath}/${dictation_kit}/model ${lib_dest}
    6285        # configure the dictation kit.
    6386        set conf_dest    ${lib_dest}/fast.jconf
    64         reinplace "s| model/| ${lib_inst}/model/|g"  ${conf_dest}
     87        reinplace "s| model/| ${prefix}/lib/${name}/model/|g"    ${conf_dest}
    6588        reinplace "s|#-charconv from to|-charconv EUC-JP UTF-8|" ${conf_dest}
    6689        # configure an executable demo script file.
    6790        set script_name  julius_demo
    6891        set script_dest  ${destroot}${prefix}/bin/${script_name}
    6992        xinstall -m 755  ${filespath}/${script_name} ${script_dest}
    7093        reinplace "s|@prefix@|${prefix}|g"           ${script_dest}
    71         reinplace "s|@lib_inst@|${lib_inst}|g"       ${script_dest}
     94        # copy documentation.
     95        set kit_docdir   ${destroot}${prefix}/share/doc/${name}/${kit_name}
     96        xinstall -d ${kit_docdir}
     97        xinstall -m 644 -W ${workpath}/${dictation_kit} \
     98            00readme.txt \
     99            HOWTO.txt \
     100            TROUBLE.txt \
     101            ${kit_docdir}
    72102    }
    73103}
    74104