summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-12-11 17:53:27 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-12-11 17:53:27 +0100
commitc3a3e22d43ae5b81fdec750283b3fe64ec794695 (patch)
tree41b4719072c91c7460519050a3f1ee9c734042dc
parentb4b7d73745f75b3617d791106a1875f70ffa628c (diff)
try to fix cross-compile on Darwin
-rw-r--r--package/python2/Makefile8
-rw-r--r--package/python2/patches/patch-setup_py29
2 files changed, 28 insertions, 9 deletions
diff --git a/package/python2/Makefile b/package/python2/Makefile
index 96452b025..3f24b5b5d 100644
--- a/package/python2/Makefile
+++ b/package/python2/Makefile
@@ -5,12 +5,12 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= python2
PKG_VERSION:= 2.7
-PKG_RELEASE:= 4
+PKG_RELEASE:= 5
PKG_MD5SUM:= 35f56b092ecf39a6bd59d64f142aae0f
PKG_DESCR:= Python scripting language (Version 2)
PKG_SECTION:= lang
-PKG_DEPENDS:= libpthread zlib
-PKG_BUILDDEP:= zlib
+PKG_DEPENDS:= libpthread zlib libffi
+PKG_BUILDDEP:= zlib libffi
PKG_URL:= http://www.python.org/
PKG_SITES:= http://www.python.org/ftp/python/${PKG_VERSION}/
@@ -46,7 +46,7 @@ post-extract:
${CP} ${WRKBUILD}/python ${STAGING_TOOLS}/bin/hostpython
${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
- $(MAKE) -C ${WRKBUILD} distclean
+ $(MAKE) -C ${WRKBUILD} clean
pre-configure:
$(SED) "s#@@CPU_ARCH@@#$(CPU_ARCH)#" ${WRKBUILD}/configure
diff --git a/package/python2/patches/patch-setup_py b/package/python2/patches/patch-setup_py
index 20739d746..9b86cf560 100644
--- a/package/python2/patches/patch-setup_py
+++ b/package/python2/patches/patch-setup_py
@@ -1,6 +1,7 @@
+diff -Nur Python-2.7.orig/setup.py Python-2.7/setup.py
--- Python-2.7.orig/setup.py 2010-06-27 14:36:16.000000000 +0200
-+++ Python-2.7/setup.py 2010-11-04 22:25:30.000000000 +0100
-@@ -21,7 +21,7 @@ from distutils.spawn import find_executa
++++ Python-2.7/setup.py 2010-12-11 02:28:23.000000000 +0100
+@@ -21,7 +21,7 @@
COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
# This global variable is used to hold the list of modules to be disabled.
@@ -9,7 +10,7 @@
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
-@@ -307,36 +307,6 @@ class PyBuildExt(build_ext):
+@@ -307,48 +307,14 @@
ext_filename = os.path.join(
self.build_lib,
self.get_ext_filename(self.get_ext_fullname(ext.name)))
@@ -45,8 +46,12 @@
- self.failed.append(ext.name)
def get_platform(self):
- # Get value of sys.platform
-@@ -347,8 +317,8 @@ class PyBuildExt(build_ext):
+- # Get value of sys.platform
+- for platform in ['cygwin', 'beos', 'darwin', 'atheos', 'osf1']:
+- if sys.platform.startswith(platform):
+- return platform
+- return sys.platform
++ return 'linux'
def detect_modules(self):
# Ensure that /usr/local is always used
@@ -57,3 +62,17 @@
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
+@@ -398,11 +364,8 @@
+ # lib_dirs and inc_dirs are used to search for files;
+ # if a file is found in one of those directories, it can
+ # be assumed that no additional -I,-L directives are needed.
+- lib_dirs = self.compiler.library_dirs + [
+- '/lib64', '/usr/lib64',
+- '/lib', '/usr/lib',
+- ]
+- inc_dirs = self.compiler.include_dirs + ['/usr/include']
++ lib_dirs = self.compiler.library_dirs
++ inc_dirs = self.compiler.include_dirs
+ exts = []
+ missing = []
+