Revision: 60943 http://trac.macports.org/changeset/60943 Author: stromnov@macports.org Date: 2009-11-29 07:59:46 -0800 (Sun, 29 Nov 2009) Log Message: ----------- py26-pymunk: New port. Added Paths: ----------- trunk/dports/python/py26-pymunk/ trunk/dports/python/py26-pymunk/Portfile trunk/dports/python/py26-pymunk/files/ trunk/dports/python/py26-pymunk/files/patch-pymunk-_chipmunk.py.diff trunk/dports/python/py26-pymunk/files/patch-pymunk-libload.py.diff trunk/dports/python/py26-pymunk/files/patch-setup.py.diff Added: trunk/dports/python/py26-pymunk/Portfile =================================================================== --- trunk/dports/python/py26-pymunk/Portfile (rev 0) +++ trunk/dports/python/py26-pymunk/Portfile 2009-11-29 15:59:46 UTC (rev 60943) @@ -0,0 +1,34 @@ +# -*- 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 +# $Id$ + +PortSystem 1.0 +PortGroup python26 1.0 + +name py26-pymunk +version 0.8.4 +maintainers stromnov openmaintainer + +description Python wrapper around the 2d physics library Chipmunk + +long_description ${description} + +platforms darwin + +homepage http://code.google.com/p/pymunk/ +master_sites googlecode:pymunk +distname pymunk-${version} +use_zip yes + +checksums md5 f373e7e7cf416512984c633113acfd2f \ + sha1 5e936e8d902a507cbfa8859bc692c03b90d99539 \ + rmd160 3263d78de9ad299ad54979832f6a8dfd88cf6fd9 + +patchfiles patch-setup.py.diff \ + patch-pymunk-libload.py.diff \ + patch-pymunk-_chipmunk.py.diff + +variant debug description {Build with debug messages} { + patchfiles-delete patch-pymunk-_chipmunk.py.diff +} + +depends_build port:py26-setuptools Property changes on: trunk/dports/python/py26-pymunk/Portfile ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: trunk/dports/python/py26-pymunk/files/patch-pymunk-_chipmunk.py.diff =================================================================== --- trunk/dports/python/py26-pymunk/files/patch-pymunk-_chipmunk.py.diff (rev 0) +++ trunk/dports/python/py26-pymunk/files/patch-pymunk-_chipmunk.py.diff 2009-11-29 15:59:46 UTC (rev 60943) @@ -0,0 +1,11 @@ +--- pymunk/_chipmunk.py.orig 2009-11-29 18:24:38.000000000 +0300 ++++ pymunk/_chipmunk.py 2009-11-29 18:24:53.000000000 +0300 +@@ -4,7 +4,7 @@ + cpVect = Vec2d + + from .libload import load_library +-_lib_debug = True #Set to True to print the Chipmunk path. ++_lib_debug = False #Set to True to print the Chipmunk path. + chipmunk_lib = load_library("chipmunk", print_path=_lib_debug) + + STRING = c_char_p Added: trunk/dports/python/py26-pymunk/files/patch-pymunk-libload.py.diff =================================================================== --- trunk/dports/python/py26-pymunk/files/patch-pymunk-libload.py.diff (rev 0) +++ trunk/dports/python/py26-pymunk/files/patch-pymunk-libload.py.diff 2009-11-29 15:59:46 UTC (rev 60943) @@ -0,0 +1,22 @@ +--- pymunk/libload.py.orig 2009-11-29 18:32:52.000000000 +0300 ++++ pymunk/libload.py 2009-11-29 18:41:21.000000000 +0300 +@@ -2,6 +2,7 @@ + import platform + import sys, imp, os + import ctypes ++import ctypes.util + + def load_library(libname, print_path=True): + # lib gets loaded from: +@@ -33,6 +34,11 @@ + libfn = "lib%s.dylib" % libname + + libfn = os.path.join(path, libfn) ++ ++ if not os.path.exists(libfn): ++ _libfn = ctypes.util.find_library(libname) ++ if _libfn: ++ libfn = _libfn + + if print_path: + print ("Loading chipmunk for %s (%s) [%s]" % (s, arch, libfn)) Added: trunk/dports/python/py26-pymunk/files/patch-setup.py.diff =================================================================== --- trunk/dports/python/py26-pymunk/files/patch-setup.py.diff (rev 0) +++ trunk/dports/python/py26-pymunk/files/patch-setup.py.diff 2009-11-29 15:59:46 UTC (rev 60943) @@ -0,0 +1,20 @@ +--- setup.py.orig 2009-07-29 23:28:10.000000000 +0400 ++++ setup.py 2009-11-29 18:19:38.000000000 +0300 +@@ -73,15 +73,8 @@ + , description='A wrapper for the 2d physics library Chipmunk' + , long_description=long_description + , packages=['pymunk'] #find_packages(exclude=['*.tests']), +- , package_data = {'pymunk': ['chipmunk.dll' +- , 'libchipmunk.so' +- , 'libchipmunk.dylib']} +- , eager_resources = [os.path.join('pymunk','chipmunk.dll') +- , os.path.join('pymunk','libchipmunk.so') +- , os.path.join('pymunk','libchipmunk.dylib')] + #, platforms=['win32'] + , license='MIT License' + , classifiers=classifiers +- , include_package_data = True + , cmdclass={'build_chipmunk':build_chipmunk} +- ) +\ No newline at end of file ++ )