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