source: trunk/dports/textproc/mosesdecoder/Portfile

Last change on this file was 98599, checked in by hum@…, 5 years ago

mosesdecoder: update to 20121007; remove fetch.type git and add checksums; remove patch_jam-files_sanity.jam.diff that was integrated into the upstream; install scripts at /opt/local/libexec/mosesdecoder/scripts; fix bin path in train-model.perl.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1# -*- 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
2# $Id: Portfile 98599 2012-10-09 15:46:33Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        moses-smt mosesdecoder f4471692ba51aeec3cf9867fcabe2c4fc7d4cb33
8version             20121007
9
10categories          textproc
11maintainers         hum openmaintainer
12
13description         a statistical machine translation system
14
15long_description    Moses is a statistical machine translation system that \
16                    allows you to automatically train translation models for \
17                    any language pair. All you need is a collection of \
18                    translated texts (parallel corpus). An efficient search \
19                    algorithm finds quickly the highest probability translation \
20                    among the exponential number of choices.
21
22homepage            http://www.statmt.org/moses/
23platforms           darwin
24license             LGPL
25
26checksums           rmd160  f64d5bc5012cde499569b7b6f2bf1c8877bd91cf \
27                    sha256  bd7db39e836668fff7e75ff6256fb643e21f9fb768e88a6eb7482190d7310939
28
29depends_lib         port:boost \
30                    port:zlib
31
32# binaries are installed at ${libexec_dir}.
33set libexec_dir     ${prefix}/libexec/${name}
34
35# set _EXTERNAL_BINDIR (-external-bin-dir) to ${prefix}/bin.
36patchfiles          patch-train-model.perl.diff
37
38post-patch {
39    set f ${worksrcpath}/scripts/training/train-model.perl
40    reinplace "s|@prefix@|${prefix}|g" ${f}
41    reinplace "s|\$SCRIPTS_ROOTDIR/\\.\\./bin/|${libexec_dir}/|g" ${f}
42}
43
44use_configure       no
45
46build.cmd           ./bjam
47build.target
48build.args          --with-macports=${prefix}
49
50destroot.args       ${build.args} \
51                    --bindir=${destroot}${libexec_dir} \
52                    --includedir=${destroot}${prefix}/include/${name}
53destroot.destdir    --prefix=${destroot}${prefix}
54
55post-destroot {
56    # install scripts.
57    set scripts_dir ${libexec_dir}/scripts
58    set args "${build.args} --install-scripts=${destroot}${scripts_dir}"
59    system -W ${worksrcpath}/scripts "../bjam ${args}"
60    # link some binaries to bin.
61    foreach file {moses moses_chart} {
62        ln -s ${libexec_dir}/${file} ${destroot}${prefix}/bin/${file}
63    }
64}
65
66livecheck.type      none
Note: See TracBrowser for help on using the repository browser.