[87169] trunk/dports/python

mmoll at macports.org mmoll at macports.org
Sat Nov 12 13:01:37 PST 2011


Revision: 87169
          http://trac.macports.org/changeset/87169
Author:   mmoll at macports.org
Date:     2011-11-12 13:01:33 -0800 (Sat, 12 Nov 2011)
Log Message:
-----------
new port: py-graph-tool

Added Paths:
-----------
    trunk/dports/python/py-graph-tool/
    trunk/dports/python/py-graph-tool/Portfile
    trunk/dports/python/py-graph-tool/files/
    trunk/dports/python/py-graph-tool/files/patch-dl_import.py.diff

Added: trunk/dports/python/py-graph-tool/Portfile
===================================================================
--- trunk/dports/python/py-graph-tool/Portfile	                        (rev 0)
+++ trunk/dports/python/py-graph-tool/Portfile	2011-11-12 21:01:33 UTC (rev 87169)
@@ -0,0 +1,86 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; c-basic-offset: 4 -*-
+# $Id$
+
+PortSystem          1.0
+PortGroup           python 1.0
+
+set realname        graph-tool
+name                py-${realname}
+version             2.2.15
+categories          python science
+platforms           darwin
+license             GPL-3
+maintainers         skewed.de:tiago mmoll
+description         Efficient python graph module
+long_description    graph-tool is an efficient python module for manipulation \
+                    and statistical analysis of graphs. The internal data \
+                    structures and most algorithms are implemented in C++ with \
+                    the Boost Graph Library.
+homepage            http://graph-tool.skewed.de
+master_sites        http://downloads.skewed.de/graph-tool/
+use_bzip2           yes
+
+checksums           md5     24dd4aa307fc64c5988a4d827ee16bbd \
+                    sha1    6498ce3208b8d7b1325dcac38dafb24bb8b9ddfe \
+                    rmd160  c998c1110653a487d2ec1ae5aa27c61004f8e011
+distname            ${realname}-${version}
+patchfiles          patch-dl_import.py.diff
+
+python.versions     25 26 27 31 32
+python.default_version 27
+
+if {$subport != $name} {
+    depends_lib-append port:boost \
+                       port:cgal \
+                       port:expat \
+                       port:graphviz \
+                       port:py${python.version}-numpy \
+                       port:py${python.version}-scipy 
+    use_configure      yes
+    configure.env-append PYTHON=${python.bin} \
+                         PYTHON_VERSION=${python.branch} \
+                         PYTHON_CPPFLAGS=-I${python.include} \
+                         PYTHON_LDFLAGS="-L${python.libdir} -lpython${python.branch}"
+    configure.cflags-append   -I${prefix}/include
+    configure.cxxflags-append -I${prefix}/include
+    configure.ldflags-append -L${prefix}/lib
+    configure.args-append --with-boost=${prefix}
+    build.cmd          make
+    build.target       all
+    destroot.cmd       make
+    destroot.destdir   DESTDIR=${destroot}
+    if {${configure.compiler} == "clang"} {
+        configure.compiler llvm-gcc-4.2
+    }
+    if {${configure.compiler} == "llvm-gcc-4.2" || 
+        ${configure.compiler} == "gcc-4.0" ||
+        ${configure.compiler} == "gcc-4.2" ||
+        ${configure.compiler} == "apple-gcc-4.0" ||
+        ${configure.compiler} == "apple-gcc-4.2" ||
+        ${configure.compiler} == "macports-gcc-4.1" ||
+        ${configure.compiler} == "macports-gcc-4.2" ||
+        ${configure.compiler} == "macports-gcc-4.3"} {
+        configure.cxxflags-append -DCGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
+    }
+}
+
+# not supported by clang at the moment
+variant openmp description {Add support for openmp} {
+    configure.args-append --enable-openmp
+}
+
+post-destroot {
+    xinstall -d ${destroot}${python.pkgd}
+    file rename ${destroot}${prefix}/lib/python${python.branch}/site-packages/graph_tool \
+        ${destroot}${python.pkgd}
+    file rename ${destroot}${prefix}/doc/graph-tool \
+        ${destroot}${prefix}/share/doc/graph-tool 
+}
+
+if {$name == $subport} { 
+    livecheck.type      regex
+    livecheck.url       $homepage
+    livecheck.regex     Version (\[0-9.\]+) of graph-tool
+} else {
+    livecheck.type      none
+}


Property changes on: trunk/dports/python/py-graph-tool/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/python/py-graph-tool/files/patch-dl_import.py.diff
===================================================================
--- trunk/dports/python/py-graph-tool/files/patch-dl_import.py.diff	                        (rev 0)
+++ trunk/dports/python/py-graph-tool/files/patch-dl_import.py.diff	2011-11-12 21:01:33 UTC (rev 87169)
@@ -0,0 +1,47 @@
+diff -rubw ../graph-tool-2.2.15.orig/src/graph_tool/dl_import.py ./src/graph_tool/dl_import.py
+--- ./src/graph_tool/dl_import.py	2011-11-12 12:44:33.000000000 -0600
++++ ./src/graph_tool/dl_import.py	2011-09-02 13:28:49.000000000 -0500
+@@ -20,11 +20,11 @@
+ 
+ import sys
+ try:
+-    from DLFCN import RTLD_LAZY, RTLD_GLOBAL
++    from ctypes import RTLD_GLOBAL
+ except ImportError:
+     # handle strange python installations, by importing from the deprecated dl
+     # module
+-    from dl import RTLD_LAZY, RTLD_GLOBAL
++    from dl import RTLD_GLOBAL
+ 
+ __all__ = ["dl_import"]
+ 
+@@ -41,7 +41,7 @@
+     # work properly across DSO boundaries. See http://gcc.gnu.org/faq.html#dso
+ 
+     orig_dlopen_flags = sys.getdlopenflags()
+-    sys.setdlopenflags(RTLD_LAZY | RTLD_GLOBAL)
++    sys.setdlopenflags(RTLD_GLOBAL)
+ 
+     exec import_expr in local_dict, global_dict
+ 
+diff -rubw ../graph-tool-2.2.15.orig/src/graph_tool/run_action/inline.py ./src/graph_tool/run_action/inline.py
+--- ./src/graph_tool/run_action/inline.py	2011-11-12 12:44:36.000000000 -0600
++++ ./src/graph_tool/run_action/inline.py	2011-09-02 13:28:49.000000000 -0500
+@@ -21,7 +21,7 @@
+ from .. import *
+ from .. import libgraph_tool_core
+ import numpy
+-from .. dl_import import RTLD_LAZY, RTLD_GLOBAL
++from .. dl_import import RTLD_GLOBAL
+ 
+ try:
+     import scipy.weave
+@@ -251,7 +251,7 @@
+     # friends to work properly across DSO boundaries. See
+     # http://gcc.gnu.org/faq.html#dso
+     orig_dlopen_flags = sys.getdlopenflags()
+-    sys.setdlopenflags(RTLD_LAZY | RTLD_GLOBAL)
++    sys.setdlopenflags(RTLD_GLOBAL)
+ 
+     # call weave and pass all the updated kw arguments
+     ret_vals = \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111112/2c653571/attachment.html>


More information about the macports-changes mailing list