Fix the whole python building process to do proper crosscompiling for all python

modules in openwrt. Thanks to ryd for helping to make this possible.
(Only numpy is completly broken now because it has dependencies which
where pervioulsy taken from the build system)



git-svn-id: svn://svn.openwrt.org/openwrt/packages@12821 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
lars
2008-10-02 15:33:26 +00:00
parent 40daf3db15
commit 1a7ebdeb62
22 changed files with 409 additions and 176 deletions

View File

@ -15,6 +15,7 @@ PKG_SOURCE_URL:=http://downloads.sourceforge.net/numpy/
PKG_MD5SUM:=8f011e9d7697da570efaac61c51725e0
include $(INCLUDE_DIR)/package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
define Package/numpy
SUBMENU:=Python
@ -22,7 +23,7 @@ define Package/numpy
CATEGORY:=Languages
TITLE:=numpy
URL:=http://numpy.sf.net
DEPENDS:=python-core @TARGET_x86||TARGET_olpc||TARGET_uml
DEPENDS:=python-core @TARGET_x86||TARGET_olpc||TARGET_uml @BROKEN
endef
define Package/numpy/description
@ -31,7 +32,6 @@ endef
define Build/Compile
cd $(PKG_BUILD_DIR) ; $(CONFIGURE_VARS) $(MAKE_VARS) python2.5 ./setup.py install --prefix="$(PKG_INSTALL_DIR)/usr"
sed -i "s/UCS4/UCS2/g" $(PKG_INSTALL_DIR)/usr/lib/python2.5/site-packages/numpy/core/multiarray.so
endef
define Package/numpy/install

View File

@ -44,7 +44,7 @@ diff -urN numpy-1.0.4/numpy/core/setup.py numpy-1.0.4.patched/numpy/core/setup.p
diff -urN numpy-1.0.4/numpy/distutils/unixccompiler.py numpy-1.0.4.patched/numpy/distutils/unixccompiler.py
--- numpy-1.0.4/numpy/distutils/unixccompiler.py 2007-11-07 22:05:15.000000000 +0000
+++ numpy-1.0.4.patched/numpy/distutils/unixccompiler.py 2008-05-25 11:07:14.000000000 +0100
@@ -9,11 +9,35 @@
@@ -9,11 +9,36 @@
from numpy.distutils.ccompiler import replace_method
import log
@ -62,6 +62,7 @@ diff -urN numpy-1.0.4/numpy/distutils/unixccompiler.py numpy-1.0.4.patched/numpy
+ if output_progname == "_configtest":
+ self.spawn(['gcc', '-lm', '-o',output_progname]+objects, display = "")
+ else:
+ print "#### Running " + str(CCompiler.EXECUTABLE)
+ self.link(CCompiler.EXECUTABLE, objects,
+ self.executable_filename(output_progname), output_dir,
+ libraries, library_dirs, runtime_library_dirs, None,