1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; c-basic-offset: 4 -*- |
---|
2 | # $Id: Portfile 92087 2012-04-17 22:18:29Z mmoll@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | |
---|
7 | set realname graph-tool |
---|
8 | name py-${realname} |
---|
9 | version 2.2.16 |
---|
10 | categories python science |
---|
11 | platforms darwin |
---|
12 | license GPL-3 |
---|
13 | maintainers skewed.de:tiago mmoll |
---|
14 | description Efficient python graph module |
---|
15 | long_description graph-tool is an efficient python module for manipulation \ |
---|
16 | and statistical analysis of graphs. The internal data \ |
---|
17 | structures and most algorithms are implemented in C++ with \ |
---|
18 | the Boost Graph Library. |
---|
19 | homepage http://graph-tool.skewed.de |
---|
20 | # Latest release (2.2.16.2) doesn't compile with current compilers |
---|
21 | # We'll switch back to a regular release once it comes out. |
---|
22 | # master_sites http://downloads.skewed.de/graph-tool/ |
---|
23 | # use_bzip2 yes |
---|
24 | # checksums md5 6d471b18ebe8dd4e8a475d73d4e63d9a \ |
---|
25 | # sha1 c6cb13ac916be652fe49637e336885471f51d698 \ |
---|
26 | # rmd160 a76074ef55ed438541430830c00ae83e2d103144 |
---|
27 | fetch.type git |
---|
28 | git.url git://git.skewed.de/graph-tool |
---|
29 | git.branch ed7b3bc99df5440978bd258c70171cec806f5534 |
---|
30 | distname ${realname}-${version} |
---|
31 | |
---|
32 | python.versions 25 26 27 31 32 |
---|
33 | python.default_version 27 |
---|
34 | |
---|
35 | # graph-tool relies on Boost.Python, so make sure it is installed. |
---|
36 | pre-fetch { |
---|
37 | if {![file exists ${prefix}/lib/libboost_python-mt.dylib]} { |
---|
38 | return -code error "Please reinstall boost with one of the python variants enabled." |
---|
39 | } |
---|
40 | } |
---|
41 | |
---|
42 | if {$subport != $name} { |
---|
43 | pre-configure { |
---|
44 | system "cd ${worksrcpath} && ./autogen.sh" |
---|
45 | } |
---|
46 | universal_variant no |
---|
47 | depends_build-append port:autoconf port:automake |
---|
48 | depends_lib-append port:boost \ |
---|
49 | port:cairomm \ |
---|
50 | port:cgal \ |
---|
51 | port:expat \ |
---|
52 | path:bin/dot:graphviz \ |
---|
53 | port:py${python.version}-numpy \ |
---|
54 | port:py${python.version}-scipy |
---|
55 | use_configure yes |
---|
56 | configure.env-append PYTHON=${python.bin} \ |
---|
57 | PYTHON_VERSION=${python.branch} \ |
---|
58 | PYTHON_CPPFLAGS=-I${python.include} \ |
---|
59 | PYTHON_LDFLAGS="-L${python.libdir}/.. -lpython${python.branch}" |
---|
60 | configure.cflags-append -I${prefix}/include |
---|
61 | configure.cxxflags-append -I${prefix}/include |
---|
62 | configure.ldflags-append -L${prefix}/lib |
---|
63 | configure.args-append --with-boost=${prefix} |
---|
64 | build.cmd make |
---|
65 | build.target all |
---|
66 | destroot.cmd make |
---|
67 | destroot.destdir DESTDIR=${destroot} |
---|
68 | # this port does not compile with either of these compilers or with FSF gcc4x |
---|
69 | # if {${configure.compiler} == "llvm-gcc-4.2" || ${configure.compiler} == "clang" } { |
---|
70 | # depends_lib-append port:apple-gcc42 |
---|
71 | # configure.compiler apple-gcc-4.2 |
---|
72 | # } |
---|
73 | |
---|
74 | post-destroot { |
---|
75 | xinstall -d ${destroot}${python.pkgd} |
---|
76 | file rename ${destroot}${prefix}/lib/python${python.branch}/site-packages/graph_tool \ |
---|
77 | ${destroot}${python.pkgd} |
---|
78 | file rename ${destroot}${prefix}/doc/graph-tool \ |
---|
79 | ${destroot}${prefix}/share/doc/py${python.version}-graph-tool |
---|
80 | } |
---|
81 | } |
---|
82 | |
---|
83 | if {$name == $subport} { |
---|
84 | livecheck.type regex |
---|
85 | livecheck.url $homepage |
---|
86 | livecheck.regex Version (\[0-9.\]+) of graph-tool |
---|
87 | } else { |
---|
88 | livecheck.type none |
---|
89 | } |
---|