[99540] trunk/dports/textproc

hum at macports.org hum at macports.org
Fri Nov 9 05:38:00 PST 2012


Revision: 99540
          http://trac.macports.org//changeset/99540
Author:   hum at macports.org
Date:     2012-11-09 05:38:00 -0800 (Fri, 09 Nov 2012)
Log Message:
-----------
New port: kakarot @0.2 - a Japanese dependency parser to search the entire tree, which is based on cabocha at 0.64.

Added Paths:
-----------
    trunk/dports/textproc/kakarot/
    trunk/dports/textproc/kakarot/Portfile
    trunk/dports/textproc/kakarot/files/
    trunk/dports/textproc/kakarot/files/patch-configure.diff
    trunk/dports/textproc/kakarot/files/patch-src_postkak.h.diff

Added: trunk/dports/textproc/kakarot/Portfile
===================================================================
--- trunk/dports/textproc/kakarot/Portfile	                        (rev 0)
+++ trunk/dports/textproc/kakarot/Portfile	2012-11-09 13:38:00 UTC (rev 99540)
@@ -0,0 +1,82 @@
+# -*- 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
+# $Id$
+
+PortSystem          1.0
+PortGroup           github 1.0
+
+github.setup        yu-hatva kakarot c0c690cb45264446c7c0b3a2c32008a5888e4cee
+version             0.2
+
+categories          textproc japanese
+maintainers         hum openmaintainer
+
+description         a Japanese dependency parser to search the entire tree
+
+long_description    ${name} is ${description}.
+
+platforms           darwin
+license             {GPL BSD Permissive}
+
+# kakarot is based on CaboCha.
+set cabocha_version 0.64
+set cabocha_distname cabocha-${cabocha_version}
+distfiles-append    ${cabocha_distname}${extract.suffix}:cabocha
+dist_subdir         cabocha
+master_sites-append googlecode:cabocha
+
+checksums           ${distname}${extract.suffix} \
+                    rmd160  b10df477e9b8d161bc6f1e78c0f94770216b6ae4 \
+                    sha256  48659fa55d0e2fc3b709042bc128d7e9e40e76323a6b40be607ca023a61dd5d6 \
+                    ${cabocha_distname}${extract.suffix} \
+                    rmd160  b6e0a3f7cb4829e26b8b86ca2e2ab6131ab22a12 \
+                    sha256  034b5540b36e12dea9b41c37252784b85abbb9f831c4a0ec6de8dc74b52a04d8
+
+depends_lib         port:crfpp \
+                    port:libiconv \
+                    port:mecab-base \
+                    port:mecab-utf8
+
+worksrcdir          ${cabocha_distname}
+
+set cabocha_srcpath ${worksrcpath}/src
+set kakarot_srcpath ${workpath}/${github.author}-${github.project}-[string range ${github.version} 0 6]
+
+post-extract {
+    foreach f {kakarot.h postkak.h} {
+        copy ${kakarot_srcpath}/${f} ${cabocha_srcpath}
+    }
+}
+
+patchfiles          patch-configure.diff \
+                    patch-src_postkak.h.diff
+
+post-patch {
+    system -W ${cabocha_srcpath} "patch < ${kakarot_srcpath}/patchfile"
+    reinplace "s|@prefix@|${prefix}|g" ${cabocha_srcpath}/postkak.h
+}
+
+configure.args      --with-charset=UTF8
+
+build.args          LIBS="-liconv -lcrfpp -lmecab"
+
+set kakarot_bin     ${prefix}/bin/kakarot
+set kakarot_lib     ${prefix}/lib/libkakarot.dylib
+set kakarotrc       ${prefix}/etc/kakarotrc
+
+post-destroot {
+    move ${destroot}${prefix}/bin/cabocha            ${destroot}${kakarot_bin}
+    move ${destroot}${prefix}/lib/libcabocha.4.dylib ${destroot}${kakarot_lib}
+    move ${destroot}${prefix}/lib/cabocha            ${destroot}${prefix}/lib/kakarot
+    move ${destroot}${prefix}/etc/cabocharc          ${destroot}${kakarotrc}
+    reinplace "s|lib/cabocha|lib/kakarot|g"          ${destroot}${kakarotrc}
+    system "install_name_tool -id ${kakarot_lib} ${destroot}${kakarot_lib}"
+    foreach path [list ${kakarot_bin} ${kakarot_lib}] {
+        system "install_name_tool -change ${prefix}/lib/libcabocha.4.dylib ${kakarot_lib} ${destroot}${path}"
+    }
+    xinstall -m 644 ${kakarot_srcpath}/kakeval.txt   ${destroot}${prefix}/lib/kakarot
+    foreach path {bin/cabocha-config include lib/libcabocha.a lib/libcabocha.la lib/libcabocha.dylib libexec share} {
+        delete ${destroot}${prefix}/${path}
+    }
+}
+
+livecheck.type      none


Property changes on: trunk/dports/textproc/kakarot/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/kakarot/files/patch-configure.diff
===================================================================
--- trunk/dports/textproc/kakarot/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/textproc/kakarot/files/patch-configure.diff	2012-11-09 13:38:00 UTC (rev 99540)
@@ -0,0 +1,24 @@
+--- configure.orig	2012-02-22 15:08:12.000000000 +0900
++++ configure	2012-03-08 01:07:49.000000000 +0900
+@@ -17559,8 +17559,8 @@
+ 
+ 
+ if test -n "$GCC"; then
+-   CFLAGS="-O3  -Wno-deprecated -Wall"
+-   CXXFLAGS="-O3 -Wno-deprecated -Wall"
++   CFLAGS="$CFLAGS -O3  -Wno-deprecated -Wall"
++   CXXFLAGS="$CXXFLAGS -O3 -Wno-deprecated -Wall"
+ fi
+ 
+ 
+--- configure.orig	2012-11-08 00:54:19.000000000 +0900
++++ configure	2012-11-08 01:00:16.000000000 +0900
+@@ -18471,7 +18471,7 @@
+ 
+ 
+ 
+-CABOCHA_DEFAULT_RC="$sysconfdir/cabocharc"
++CABOCHA_DEFAULT_RC="$sysconfdir/kakarotrc"
+ CABOCHA_TXTMODEL_LIST=`(cd model; echo *.txt)`
+ CABOCHA_MODEL_LIST=`(cd model; echo *.txt | sed s/.txt/.model/g)`
+ 

Added: trunk/dports/textproc/kakarot/files/patch-src_postkak.h.diff
===================================================================
--- trunk/dports/textproc/kakarot/files/patch-src_postkak.h.diff	                        (rev 0)
+++ trunk/dports/textproc/kakarot/files/patch-src_postkak.h.diff	2012-11-09 13:38:00 UTC (rev 99540)
@@ -0,0 +1,29 @@
+--- src/postkak.h.orig	2012-11-06 09:19:23.000000000 +0900
++++ src/postkak.h	2012-11-08 01:16:02.000000000 +0900
+@@ -117,7 +117,7 @@
+  char buf[50];
+  char str[30];
+  float f;
+- char fname[200] = "kakeval.txt";
++ char fname[200] = "@prefix@/lib/kakarot/kakeval.txt";
+  char* s;
+  if ((s = getenv("KAKAROT_EVAL_INIT_FILE")))
+    strcpy(fname, s);
+@@ -131,7 +131,7 @@
+    forr(i, 0, MAXPARS-1) {
+      if (!strcmp(parnames[i], str)) {
+        *paradrs[i] = f;
+-       if (LDBG) printf("set: %d(%s) to: %f\n", i, str, f);
++//       if (LDBG) printf("set: %d(%s) to: %f\n", i, str, f);
+        break;
+      }
+    }
+@@ -140,7 +140,7 @@
+  interpolate();
+ 
+ 
+- readAnswers();
++// readAnswers();
+ }
+ 
+  //****
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121109/853feb70/attachment.html>


More information about the macports-changes mailing list