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$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name dualist |
---|
7 | version 0.1 |
---|
8 | categories java textproc |
---|
9 | platforms darwin |
---|
10 | maintainers gmail.com:hiroshi.umemoto openmaintainer |
---|
11 | license Apache-2.0 |
---|
12 | |
---|
13 | description An interactive machine learning system for building classifiers quickly. |
---|
14 | |
---|
15 | long_description DUALIST is an interactive machine learning system for building classifiers \ |
---|
16 | quickly. It does so by asking \"questions\" of the user in the form of both data \ |
---|
17 | instances (e.g., text documents) and features (e.g., words or phrases). It \ |
---|
18 | utilizes active and semi-supervised learning to quickly train a multinomial \ |
---|
19 | naive Bayes classifier for this setting. |
---|
20 | |
---|
21 | homepage http://code.google.com/p/dualist/ |
---|
22 | master_sites googlecode:${name} |
---|
23 | |
---|
24 | checksums sha1 7a2fc1fd432c71e2575a1514a946bbf68652fdfa \ |
---|
25 | rmd160 8b4ca3fcd3ec42eeda43235c246390f07a849998 |
---|
26 | |
---|
27 | depends_run port:play |
---|
28 | |
---|
29 | use_zip yes |
---|
30 | worksrcdir ${name} |
---|
31 | |
---|
32 | set java_home /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home |
---|
33 | |
---|
34 | pre-configure { |
---|
35 | if {![file exists ${java_home}]} { |
---|
36 | ui_error "Java 1.6 is required, but not located at ${java_home}" |
---|
37 | return -code error "Java 1.6 missing" |
---|
38 | } |
---|
39 | } |
---|
40 | |
---|
41 | use_configure no |
---|
42 | universal_variant no |
---|
43 | |
---|
44 | build.cmd true |
---|
45 | |
---|
46 | set share_java_dir ${prefix}/share/java |
---|
47 | set dualist_dir ${share_java_dir}/${worksrcdir} |
---|
48 | |
---|
49 | destroot { |
---|
50 | # Copy the distribution. |
---|
51 | xinstall -m 755 -d ${destroot}${share_java_dir} |
---|
52 | copy ${worksrcpath} ${destroot}${share_java_dir} |
---|
53 | |
---|
54 | # Configure working directories. |
---|
55 | xinstall -m 1777 -d ${destroot}${dualist_dir}/tmp |
---|
56 | system "chmod 1777 ${destroot}${dualist_dir}/public/results" |
---|
57 | destroot.keepdirs ${destroot}${dualist_dir}/tmp \ |
---|
58 | ${destroot}${dualist_dir}/public/results |
---|
59 | |
---|
60 | # Install an extra script for this port. |
---|
61 | xinstall -m 755 ${filespath}/dualist ${destroot}${prefix}/bin |
---|
62 | reinplace "s|@prefix@|${prefix}|g" ${destroot}${prefix}/bin/dualist |
---|
63 | reinplace "s|@java_home@|${java_home}|g" ${destroot}${prefix}/bin/dualist |
---|
64 | |
---|
65 | notes "To try DUALIST, run 'dualist' and open http://localhost:9000/." |
---|
66 | } |
---|
67 | |
---|
68 | post-deactivate { |
---|
69 | ui_msg "To revert the system after uninstalling the port," |
---|
70 | ui_msg "delete the dualist directory:" |
---|
71 | ui_msg " $ sudo rm -rf ${dualist_dir}" |
---|
72 | } |
---|
73 | |
---|
74 | variant mecab description {Use MeCab to analyze Japanese texts} { |
---|
75 | depends_lib-append port:mecab-java |
---|
76 | patchfiles-append patch-mecab.diff |
---|
77 | |
---|
78 | post-extract { |
---|
79 | xinstall -m 644 -W ${filespath} \ |
---|
80 | Makefile \ |
---|
81 | SimpleMecabPipe.java \ |
---|
82 | ${worksrcpath} |
---|
83 | system "ln -s ${prefix}/share/java/mecab.jar ${worksrcpath}/lib/" |
---|
84 | } |
---|
85 | |
---|
86 | post-patch { |
---|
87 | reinplace "s|@java_home@|${java_home}|g" ${worksrcpath}/Makefile |
---|
88 | } |
---|
89 | |
---|
90 | build.cmd make |
---|
91 | |
---|
92 | post-destroot { |
---|
93 | # Install an extra script for this variant. |
---|
94 | xinstall -m 755 ${filespath}/dualist-mecab ${destroot}${prefix}/bin |
---|
95 | reinplace "s|@prefix@|${prefix}|g" ${destroot}${prefix}/bin/dualist-mecab |
---|
96 | reinplace "s|@java_home@|${java_home}|g" ${destroot}${prefix}/bin/dualist-mecab |
---|
97 | |
---|
98 | notes-append "For Japanese texts, run 'dualist-mecab' instead of 'dualist'." |
---|
99 | } |
---|
100 | } |
---|
101 | |
---|
102 | livecheck.type regex |
---|
103 | livecheck.url http://code.google.com/p/dualist/downloads/list |
---|
104 | livecheck.regex ${name}-(\[0-9.\]+)\.zip |
---|