finally switch to a sane and reliable method for cross-building
authorMichael Lauer <mickey@vanille-media.de>
Wed, 11 Feb 2004 20:06:33 +0000 (20:06 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Wed, 11 Feb 2004 20:06:33 +0000 (20:06 +0000)
python-distutils based packages. sometimes thinking just pays off... :D

BKrev: 402a8b49FDH3DwNm1r5Bu5teCSnDcg

python/python-native-2.3.3/cross-distutils.patch [new file with mode: 0644]
python/python-native_2.3.3.oe
python/python_2.3.3.oe

diff --git a/python/python-native-2.3.3/cross-distutils.patch b/python/python-native-2.3.3/cross-distutils.patch
new file mode 100644 (file)
index 0000000..e69de29
index 9f4de46..08433a3 100644 (file)
@@ -4,8 +4,8 @@ PRIORITY=optional
 MAINTAINER="Michael Lauer <mickey@Vanille.de>"
 
 SRC_URI = ftp://www.python.org/pub/python/${PV}/Python-${PV}.tar.bz2 \
-          file://${FILESDIR}/bindir-libdir.patch;patch=1
-
+          file://${FILESDIR}/bindir-libdir.patch;patch=1             \
+         file://${FILESDIR}/cross-distutils.patch;patch=1
 S = ${WORKDIR}/Python-${PV}
 
 inherit autotools native
index 4397028..fa2916b 100644 (file)
@@ -18,17 +18,19 @@ inherit autotools
 EXTRA_OECONF = --with-threads --with-pymalloc --with-cyclic-gc
 
 #
-# yes, the following lines are correct. python distutils is executed on the host
-# and it will use the settings from build/include/python2.3/pyconfig.h
+# copy config.h and an appropriate Makefile for distutils.sysconfig
+# which laters uses the information out of these to compile extensions
 #
 do_compile_prepend() {
-       install -m 0644 pyconfig.h ${STAGING_DIR}/build/include/python2.3/
+       install -d ${STAGING_INCDIR}/python2.3/
+       install -d ${STAGING_LIBDIR}/python2.3/config/
+       install -m 0644 pyconfig.h ${STAGING_INCDIR}/python2.3/
        install -m 0644 Makefile Makefile.orig
        install -m 0644 Makefile Makefile.backup
-       sed -e 's,${includedir},${STAGING_DIR}/target/include,' < Makefile.backup > Makefile
+       sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
        install -m 0644 Makefile Makefile.backup
-       sed -e 's,${libdir},${STAGING_DIR}/target/lib,' < Makefile.backup > Makefile
-       install -m 0644 Makefile ${STAGING_DIR}/build/lib/python2.3/config/
+       sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
+       install -m 0644 Makefile ${STAGING_LIBDIR}/python2.3/config/
 }
 
 do_compile() {