source: trunk/dports/textproc/word2vec/Portfile

Last change on this file was 132384, checked in by hum@…, 2 years ago

word2vec: update to 20150131 (r42)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 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 132384 2015-01-31 07:49:17Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                word2vec
7version             20150131
8categories          textproc
9maintainers         hum openmaintainer
10
11description         Tool for computing continuous distributed representations of words
12
13long_description    This tool provides an efficient implementation of the \
14                    continuous bag-of-words and skip-gram architectures for \
15                    computing vector representations of words. These \
16                    representations can be subsequently used in many natural \
17                    language processing applications and for further research.
18
19homepage            https://code.google.com/p/word2vec/
20platforms           darwin
21license             Apache-2
22
23fetch.type          svn
24svn.url             http://word2vec.googlecode.com/svn/trunk
25svn.revision        42
26worksrcdir          trunk
27
28depends_run         port:wget
29
30patchfiles          patch-malloc.diff \
31                    patch-compute-accuracy.c.diff \
32                    patch-demo.diff
33
34use_configure       no
35variant universal   {}
36
37configure.optflags  -O3
38
39build.args          CC="${configure.cc}" \
40                    CFLAGS="${configure.cflags} [get_canonical_archflags] -lm -pthread -Wall -funroll-loops"
41
42destroot {
43    set execdir ${prefix}/libexec/${name}
44    xinstall -d ${destroot}${execdir}
45    xinstall -m 755 -W ${worksrcpath} \
46        word2vec word2phrase distance word-analogy compute-accuracy \
47        demo-analogy.sh demo-classes.sh demo-phrase-accuracy.sh \
48        demo-phrases.sh demo-word-accuracy.sh demo-word.sh \
49        ${destroot}${execdir}
50    set exdir ${prefix}/share/examples/${name}
51    xinstall -d ${destroot}${exdir}
52    xinstall -m 644 -W ${worksrcpath} \
53        questions-phrases.txt questions-words.txt \
54        ${destroot}${exdir}
55    # fix demo scripts.
56    foreach f [glob ${destroot}${execdir}/demo-*.sh] {
57        reinplace "s|@EXECDIR@|${execdir}|g" ${f}
58        reinplace "s|@EXDIR@|${exdir}|g" ${f}
59    }
60    set docdir ${prefix}/share/doc/${name}
61    xinstall -d ${destroot}${docdir}
62    xinstall -m 644 -W ${worksrcpath} \
63        LICENSE README.txt \
64        ${destroot}${docdir}
65}
66
67variant mt description {disabled: Apply multiple threads patch} {}
68
69livecheck.type      regex
70livecheck.url       https://code.google.com/p/word2vec/source/list
71livecheck.version   ${svn.revision}
72livecheck.regex     r(\\d+)
Note: See TracBrowser for help on using the repository browser.