From 81980fa16605ce8ffb4c024b4c248f66fbced741 Mon Sep 17 00:00:00 2001 From: su_v Date: Tue, 2 Sep 2014 04:44:29 +0200 Subject: add more custom portfiles for Leopard and Python 2.5 (bzr r13506.1.49) --- .../python/py25-numpy/files/patch-setup.py.diff | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 packaging/macosx/ports/python/py25-numpy/files/patch-setup.py.diff (limited to 'packaging/macosx/ports/python/py25-numpy/files/patch-setup.py.diff') diff --git a/packaging/macosx/ports/python/py25-numpy/files/patch-setup.py.diff b/packaging/macosx/ports/python/py25-numpy/files/patch-setup.py.diff new file mode 100644 index 000000000..04e3cdd7a --- /dev/null +++ b/packaging/macosx/ports/python/py25-numpy/files/patch-setup.py.diff @@ -0,0 +1,34 @@ +--- numpy/core/setup.py.orig 2009-04-05 04:09:20.000000000 -0400 ++++ numpy/core/setup.py 2009-04-08 19:53:45.000000000 -0400 +@@ -309,7 +309,14 @@ + if isinstance(d,str): + target_f.write('#define %s\n' % (d)) + else: +- target_f.write('#define %s %s\n' % (d[0],d[1])) ++ if d[0]!='SIZEOF_LONG' and d[0]!='SIZEOF_PY_INTPTR_T': ++ target_f.write('#define %s %s\n' % (d[0],d[1])) ++ else: ++ target_f.write('#ifdef __LP64__\n') ++ target_f.write('#define %s %s\n' % (d[0],8)) ++ target_f.write('#else\n') ++ target_f.write('#define %s %s\n' % (d[0],4)) ++ target_f.write('#endif\n') + + # define inline to our keyword, or nothing + target_f.write('#ifndef __cplusplus\n') +@@ -393,7 +393,14 @@ + if isinstance(d,str): + target_f.write('#define %s\n' % (d)) + else: +- target_f.write('#define %s %s\n' % (d[0],d[1])) ++ if d[0]!='NPY_SIZEOF_LONG' and d[0]!='NPY_SIZEOF_PY_INTPTR_T': ++ target_f.write('#define %s %s\n' % (d[0],d[1])) ++ else: ++ target_f.write('#ifdef __LP64__\n') ++ target_f.write('#define %s %s\n' % (d[0],8)) ++ target_f.write('#else\n') ++ target_f.write('#define %s %s\n' % (d[0],4)) ++ target_f.write('#endif\n') + + # define NPY_INLINE to recognized keyword + target_f.write('#define NPY_INLINE %s\n' % inline) -- cgit v1.2.3