Ticket #46347: Portfile

File Portfile, 3.3 KB (added by jul_bsd@…, 9 years ago)
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$
3
4PortSystem          1.0
5
6PortGroup           python 1.0
7
8PortGroup           github 1.0
9
10## no release
11github.setup        ThibaultReuille graphiti 0.1
12name                opengraphiti
13homepage            http://www.opengraphiti.com
14categories-append   devel
15platforms           darwin
16license             BSD
17maintainers         yahoo.fr:jul_bsd openmaintainer
18description         OpenGraphiti project : Data visualization engine
19long_description    ${description}
20
21## no Glut/glut.h in freeglut... missing port?
22## next release will switch glut to glfw
23depends_lib         port:glew \
24                    port:freeglut \
25                    port:glm port:raindance \
26                    port:py${python.version}-pyopencl \
27                    port:py${python.version}-semanticnet \
28                    port:py${python.version}-zmq
29#depends_run         port:g++ port:python27
30depends_run         port:python27
31#miss: py-svg 0.2.1 pygeoip (!= py-geoip)
32#optional: emscripten
33
34master_sites        https://github.com/ThibaultReuille/graphiti/archive/
35version             20141028
36distname            54b0b621eab539cffc966bf8004c81f9cbc350b7
37worksrcdir          graphiti-${distname}
38
39checksums           rmd160  a56d5c1d687830fc1e87b3562942517670d76c68 \
40                    sha256  abafb17a60ff72e06aba6bd0c52f2a63e1237311d7bc07da3cf479ef985d26b8
41
42use_configure       no
43
44build.cmd           make
45build.target        all
46
47post-patch {
48    reinplace "s|G_INCLUDES := -I./ -I../ -I../raindance/Lib/glm-0.9.5.4|G_INCLUDES := -I./ -I../ -I${prefix}/include|" ${worksrcpath}/Makefile
49    reinplace "s|( cd ../raindance && make )|#( cd ../raindance && make )|" ${worksrcpath}/Makefile
50    reinplace "s|^import leap|#import leap|" ${worksrcpath}/Scripts/__init__.py
51## FIXME! neither effective??? => have to symlink in your current directory
52    #reinplace "s|sys.path.insert(0, \"./\")|sys.path.insert(0, \"${prefix}/share/${name}/\")|" ${worksrcpath}/Scripts/start.py
53    ## https://stackoverflow.com/questions/10095037/why-use-sys-path-appendpath-instead-of-sys-path-insert1-path
54    reinplace "s|sys.path.insert(0, \"./\")|sys.path.append(\"${prefix}/share/${name}/\")|" ${worksrcpath}/Scripts/start.py
55}
56
57destroot {
58    xinstall -d ${destroot}${prefix}/bin
59    xinstall -m 755 ${worksrcpath}/graphiti ${destroot}${prefix}/bin/
60
61    xinstall -d ${destroot}${prefix}/include/${name}
62    xinstall -m 644 ${worksrcpath}/Pack.hh ${destroot}${prefix}/include/${name}/
63    copy ${worksrcpath}/API ${destroot}${prefix}/include/${name}/
64    copy ${worksrcpath}/Core ${destroot}${prefix}/include/${name}/
65    copy ${worksrcpath}/Entities ${destroot}${prefix}/include/${name}/
66    copy ${worksrcpath}/Resources ${destroot}${prefix}/include/${name}/
67    copy ${worksrcpath}/Visualizers ${destroot}${prefix}/include/${name}/
68
69    xinstall -d ${destroot}${prefix}/share/${name}
70    copy ${worksrcpath}/Scripts ${destroot}${prefix}/share/${name}/
71    copy ${worksrcpath}/LICENSE ${destroot}${prefix}/share/${name}/
72    copy ${worksrcpath}/Javascript ${destroot}${prefix}/share/${name}/
73}
74
75notes "
76Example usage can be found here
77https://github.com/ThibaultReuille/semanticnet/wiki
78http://labs.opendns.com/category/opengraphiti/
79"
80
81livecheck.type          none