[98599] trunk/dports/textproc/mosesdecoder

hum at macports.org hum at macports.org
Tue Oct 9 08:46:33 PDT 2012


Revision: 98599
          http://trac.macports.org//changeset/98599
Author:   hum at macports.org
Date:     2012-10-09 08:46:33 -0700 (Tue, 09 Oct 2012)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/dports/textproc/mosesdecoder/Portfile

Added Paths:
-----------
    trunk/dports/textproc/mosesdecoder/files/patch-train-model.perl.diff

Removed Paths:
-------------
    trunk/dports/textproc/mosesdecoder/files/patch_jam-files_sanity.jam.diff

Modified: trunk/dports/textproc/mosesdecoder/Portfile
===================================================================
--- trunk/dports/textproc/mosesdecoder/Portfile	2012-10-09 15:40:47 UTC (rev 98598)
+++ trunk/dports/textproc/mosesdecoder/Portfile	2012-10-09 15:46:33 UTC (rev 98599)
@@ -4,8 +4,8 @@
 PortSystem          1.0
 PortGroup           github 1.0
 
-github.setup        moses-smt mosesdecoder 4fd980c386b79b1c65baf89c1c19b79db734b8eb
-version             20121005
+github.setup        moses-smt mosesdecoder f4471692ba51aeec3cf9867fcabe2c4fc7d4cb33
+version             20121007
 
 categories          textproc
 maintainers         hum openmaintainer
@@ -23,21 +23,30 @@
 platforms           darwin
 license             LGPL
 
-fetch.type          git
+checksums           rmd160  f64d5bc5012cde499569b7b6f2bf1c8877bd91cf \
+                    sha256  bd7db39e836668fff7e75ff6256fb643e21f9fb768e88a6eb7482190d7310939
 
 depends_lib         port:boost \
                     port:zlib
 
-patchfiles          patch_jam-files_sanity.jam.diff
+# binaries are installed at ${libexec_dir}.
+set libexec_dir     ${prefix}/libexec/${name}
 
+# set _EXTERNAL_BINDIR (-external-bin-dir) to ${prefix}/bin.
+patchfiles          patch-train-model.perl.diff
+
+post-patch {
+    set f ${worksrcpath}/scripts/training/train-model.perl
+    reinplace "s|@prefix@|${prefix}|g" ${f}
+    reinplace "s|\$SCRIPTS_ROOTDIR/\\.\\./bin/|${libexec_dir}/|g" ${f}
+}
+
 use_configure       no
 
 build.cmd           ./bjam
 build.target
 build.args          --with-macports=${prefix}
 
-set libexec_dir     ${prefix}/libexec/${name}
-
 destroot.args       ${build.args} \
                     --bindir=${destroot}${libexec_dir} \
                     --includedir=${destroot}${prefix}/include/${name}
@@ -45,12 +54,9 @@
 
 post-destroot {
     # install scripts.
-    set scripts_dir ${prefix}/share/${name}/scripts
+    set scripts_dir ${libexec_dir}/scripts
     set args "${build.args} --install-scripts=${destroot}${scripts_dir}"
     system -W ${worksrcpath}/scripts "../bjam ${args}"
-    # fix bin path in scripts/training/train-model.perl
-    reinplace "s|\$SCRIPTS_ROOTDIR/\\.\\./bin/|${libexec_dir}/|g" \
-        ${destroot}${scripts_dir}/training/train-model.perl
     # link some binaries to bin.
     foreach file {moses moses_chart} {
         ln -s ${libexec_dir}/${file} ${destroot}${prefix}/bin/${file}

Added: trunk/dports/textproc/mosesdecoder/files/patch-train-model.perl.diff
===================================================================
--- trunk/dports/textproc/mosesdecoder/files/patch-train-model.perl.diff	                        (rev 0)
+++ trunk/dports/textproc/mosesdecoder/files/patch-train-model.perl.diff	2012-10-09 15:46:33 UTC (rev 98599)
@@ -0,0 +1,10 @@
+--- scripts/training/train-model.perl.orig	2012-09-26 00:24:06.000000000 +0900
++++ scripts/training/train-model.perl	2012-10-07 00:21:44.000000000 +0900
+@@ -41,6 +41,7 @@
+    $_SPARSE_TRANSLATION_TABLE,
+    $_DICTIONARY, $_EPPEX, $IGNORE);
+ my $_CORES = 1;
++my $_EXTERNAL_BINDIR = "@prefix@/bin";
+ 
+ my $debug = 0; # debug this script, do not delete any files in debug mode
+ 

Deleted: trunk/dports/textproc/mosesdecoder/files/patch_jam-files_sanity.jam.diff
===================================================================
--- trunk/dports/textproc/mosesdecoder/files/patch_jam-files_sanity.jam.diff	2012-10-09 15:40:47 UTC (rev 98598)
+++ trunk/dports/textproc/mosesdecoder/files/patch_jam-files_sanity.jam.diff	2012-10-09 15:46:33 UTC (rev 98599)
@@ -1,12 +0,0 @@
-Don't delete /dev/null
---- jam-files/sanity.jam.orig	2012-10-06 21:34:09.000000000 -0500
-+++ jam-files/sanity.jam	2012-10-06 21:59:12.000000000 -0500
-@@ -29,7 +29,7 @@
- #Run g++ with empty main and these arguments to see if it passes.  
- rule test_flags ( flags * ) {
-   flags = $(cxxflags) $(ldflags) $(flags) ;
--  local cmd = "bash -c \"g++ "$(flags:J=" ")" -x c++ - <<<'int main() {}' -o /dev/null >/dev/null 2>/dev/null\"" ;
-+  local cmd = "bash -c \"g++ "$(flags:J=" ")" -x c++ - <<<'int main() {}' -o dummy >/dev/null 2>/dev/null\"" ;
-   local ret = [ SHELL $(cmd) : exit-status ] ;
-   if --debug-configuration in [ modules.peek : ARGV ] {
-     echo $(cmd) ;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121009/4fdc48e5/attachment.html>


More information about the macports-changes mailing list