source: trunk/dports/python/py-graph-tool/Portfile @ 146296

Last change on this file since 146296 was 146296, checked in by mmoll@…, 5 years ago

py-graph-tool: update version 2.13

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; c-basic-offset: 4 -*-
2# $Id: Portfile 146296 2016-03-04 02:45:08Z mmoll@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           active_variants 1.1
7PortGroup           compiler_blacklist_versions 1.0
8
9set realname        graph-tool
10name                py-${realname}
11version             2.13
12epoch               20160303
13categories          python science
14platforms           darwin
15license             GPL-3
16maintainers         skewed.de:tiago mmoll
17description         Efficient python graph module
18long_description    graph-tool is an efficient python module for manipulation \
19                    and statistical analysis of graphs. The internal data \
20                    structures and most algorithms are implemented in C++ with \
21                    the Boost Graph Library.
22homepage            http://graph-tool.skewed.de
23master_sites        http://downloads.skewed.de/graph-tool/
24use_bzip2           yes
25checksums           md5     eb36e9dccc28c104808100abf45fc8f7 \
26                    sha1    c2e26d1087f41d7d138bd3ce77af1c518367dc13 \
27                    rmd160  eb7dcaefa46c02ed5e1bc2a3be55f94c320764b3
28distname            ${realname}-${version}
29
30python.versions     27 34 35
31python.default_version 27
32
33if {${os.major} <= 12 && ${os.platform} eq "darwin"} {
34    version         2.2.26
35    distname        ${realname}-${version}
36    checksums       md5     317b29de0d3ef715fdc9281e078cfb17 \
37                    sha1    108be4cf6212eb6886f172ea03813187f73e4c3c \
38                    rmd160  cd2e8506522821750d70a97b951254f0a133d218
39} else {
40    if {${name} ne ${subport}} {
41        compiler.blacklist *gcc* {clang < 700} {macports-clang-3.[0-6]}
42        compiler.fallback-append macports-clang-3.7
43        configure.cxxflags-append -std=c++14 -stdlib=libc++
44    }
45}
46
47
48if {${name} ne ${subport}} {
49    universal_variant  no
50    depends_build-append port:pkgconfig
51    depends_lib-append port:boost \
52                       port:cairomm \
53                       port:cgal \
54                       port:expat \
55                       path:bin/dot:graphviz \
56                       port:py${python.version}-numpy \
57                       port:py${python.version}-scipy \
58                       port:py${python.version}-gobject3 \
59                       port:py${python.version}-cairo
60    use_configure      yes
61    # parallel build starts swapping with 8GB of RAM.
62    use_parallel_build no
63
64    # graph-tool relies on Boost.Python, so make sure it is installed.
65    require_active_variants boost python${python.version}
66
67    # PYTHON_EXTRA_LDFLAGS is set to work around incorrect detection of
68    # link flags by configure
69    configure.env-append PYTHON=${python.bin} \
70                         PYTHON_VERSION=${python.branch} \
71                         PYTHON_CPPFLAGS=-I${python.include} \
72                         PYTHON_LDFLAGS="-L${python.libdir}/.. -lpython${python.branch}" \
73                         PYTHON_EXTRA_LDFLAGS="-L${python.libdir}/.. -lpython${python.branch}"
74    configure.cppflags-append -I${prefix}/include -I${python.include}/..
75    configure.ldflags-append -L${prefix}/lib
76    configure.args-append --with-boost=${prefix} --exec-prefix=${python.prefix}
77    # Clang uses the old libstc++ from gcc 4.2 before OS X 10.9. Boost doesn't
78    # include some of the tr1 headers in libstdc++ and defines its own tr1
79    # classes. This causes conflicts with sparsehash which insists on using
80    # the old tr1 headers.
81    if {[string match *gcc* ${configure.compiler}] ||
82        ${os.major} >= 13 && ${os.platform} eq "darwin"} {
83        depends_lib-append port:sparsehash
84    } else {
85        configure.args-append --disable-sparsehash
86    }
87    build.cmd          make
88    build.target       all
89    destroot.cmd       make
90    destroot.destdir   DESTDIR=${destroot}
91
92    variant gtk3 description "Enable interactive drawing with gtk3" {
93        depends_lib-append port:gtk3 \
94                           port:librsvg
95    }
96
97    post-destroot {
98        file rename ${destroot}${prefix}/share/doc/graph-tool \
99            ${destroot}${prefix}/share/doc/py${python.version}-graph-tool
100    }
101}
102
103if {${name} eq ${subport}} {
104    livecheck.type      regex
105    livecheck.url       $homepage
106    livecheck.regex     Download version (\[0-9.\]+)
107} else {
108    livecheck.type      none
109}
Note: See TracBrowser for help on using the repository browser.