--- python-2.5.2-r8.ebuild.old 2009-05-07 03:05:22.000000000 +0300 +++ python-2.5.2-r8.ebuild 2009-05-07 02:53:07.000000000 +0300 @@ -62,12 +62,31 @@ else rm "${WORKDIR}/${PV}"/*_all_crosscompile.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}"/python-2.5.2-cross-enable-ctypes-module.patch #Fixes some of the tr_TR locale issues. Bug #250075. Thanks Serkan for pointing it #out epatch "${FILESDIR}/${P}_turkish.patch" EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" + + # We must put the following patches AFTER the patch-bomb above, because they were generated afterwards + 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 + + # Add a libdirname to enable python cross-compiling and add a user specifyable libdir + epatch "${FILESDIR}/python-2.5.2-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" + + # Put in the correct library directory name for the current arch. sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ Lib/distutils/command/install.py \ Lib/distutils/sysconfig.py \