--- python-2.5.4-r2.ebuild.old 2009-05-07 03:05:30.000000000 +0300 +++ python-2.5.4-r2.ebuild 2009-05-07 02:55:58.000000000 +0300 @@ -64,6 +64,21 @@ fi EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" + + if tc-is-cross-compiler ; then + # Change setup.py to respect the SYSROOT environment variable + epatch "${FILESDIR}/python-2.5.2-cross-setup-sysroot.patch" + fi + # Compilation of the ctypes extension fails for archs that do not have FFI_CLOSURES. + # This fixes the compilation and makes ctypes also available to those archs. + epatch "${FILESDIR}/${P}"-enable-ctypes-module.patch + # Add a libdirname to enable python cross-compiling and add a user specifyable libdir + epatch "${FILESDIR}/${P}"-cross-Makefile.pre.in.patch + # Make distutils cross-compile aware + epatch "${FILESDIR}"/python-2.5.2-cross-distutils-sysconfig.patch + epatch "${FILESDIR}"/python-2.5.2-cross-distutils-build_ext.patch + epatch "${FILESDIR}"/python-2.5.2-cross-distutils-install.patch + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ Lib/distutils/command/install.py \ Lib/distutils/sysconfig.py \