python-2.5.1: fix cross compile
authorFelix Domke <tmbinc@elitedvb.ne>
Thu, 28 Jun 2007 21:47:08 +0000 (21:47 +0000)
committerFelix Domke <tmbinc@elitedvb.ne>
Thu, 28 Jun 2007 21:47:08 +0000 (21:47 +0000)
packages/python/python-2.5.1/crosscompile.patch
packages/python/python_2.5.1.bb

index 63ba12f..c4fa772 100644 (file)
@@ -103,3 +103,17 @@ diff -Naur Python-2.5/setup.py Python-2.5-patched/setup.py
          #
          # The following modules are all pretty straightforward, and compile
          # on pretty much any POSIXish platform.
+--- Python-2.5.1/setup.py      2007-06-27 18:22:04.000000000 +0200
++++ Python-2.5.1/setup.py      2007-06-27 20:29:23.000000000 +0200
+@@ -1138,6 +1139,11 @@
+         # Call the method for detecting whether _tkinter can be compiled
+         self.detect_tkinter(inc_dirs, lib_dirs)
++      
++      additional_dir = os.getenv( "PYTHON_LIBDIR" )
++      for x in self.extensions:
++          x.library_dirs.append(additional_dir)
++          x.runtime_library_dirs.append(additional_dir)
+     def detect_tkinter_darwin(self, inc_dirs, lib_dirs):
+         # The _tkinter module, using frameworks. Since frameworks are quite
index 70d94fd..53fb45e 100644 (file)
@@ -44,7 +44,9 @@ do_compile() {
                   HOSTPYTHON=${STAGING_BINDIR}/python \
                   STAGING_LIBDIR=${STAGING_LIBDIR} \
                   STAGING_INCDIR=${STAGING_INCDIR} \
-                  BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS}
+                  PYTHON_LIBDIR=${S} \
+                  BUILD_SYS=${BUILD_SYS} \
+                  HOST_SYS=${HOST_SYS}
 }
 
 do_stage() {
@@ -57,7 +59,8 @@ do_install() {
         oe_runmake HOSTPGEN=${STAGING_BINDIR}/pgen \
                    HOSTPYTHON=${STAGING_BINDIR}/python \
                    STAGING_LIBDIR=${STAGING_LIBDIR} \
-                   STAGING_INCDIR=${STAGING_INCDIR} \
+                  STAGING_INCDIR=${STAGING_INCDIR} \
+                  PYTHON_LIBDIR=${S} \
                   BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
                   DESTDIR=${D} install
 }