diff --git a/python/python/python-2.5-cross-printf.patch b/python/python/python-2.5-cross-printf.patch new file mode 100644 index 000000000..017e3d450 --- /dev/null +++ b/python/python/python-2.5-cross-printf.patch @@ -0,0 +1,52 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../python/python-2.5-cross-printf.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +http://ftp.eenet.ee/gentoo-portage/dev-lang/python/files/python-2.5-cross-printf.patch + +http://bugs.gentoo.org/239110 + +assume %zd is supported when cross-compiling. any target we care about +supports it, so ... + +--- ./configure.in ++++ ./configure.in +@@ -3417,7 +3417,7 @@ + + + +-AC_MSG_CHECKING(for %zd printf() format support) ++AC_CACHE_CHECK([for %zd printf() format support], [py_cv_has_zd_printf], [dnl + AC_TRY_RUN([#include + #include + #include +@@ -3451,10 +3451,13 @@ + return 1; + + return 0; +-}], +-[AC_MSG_RESULT(yes) +- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], +- AC_MSG_RESULT(no)) ++}], [py_cv_has_zd_printf="yes"], ++ [py_cv_has_zd_printf="no"], ++ [py_cv_has_zd_printf="cross -- assuming yes"] ++)]) ++if test "$py_cv_has_zd_printf" != "no" ; then ++ AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t]) ++fi + + AC_CHECK_TYPE(socklen_t,, + AC_DEFINE(socklen_t,int, diff --git a/python/python/python-2.6-chflags-cross.patch b/python/python/python-2.6-chflags-cross.patch new file mode 100644 index 000000000..b51fc605c --- /dev/null +++ b/python/python/python-2.6-chflags-cross.patch @@ -0,0 +1,77 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../python/python-2.6-chflags-cross.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +http://ftp.eenet.ee/gentoo-portage/dev-lang/python/files/python-2.6-chflags-cross.patch + +if we're cross-compiling, fall back to a link-only test rather than trying +to run a program for the chflags functions + +--- python-2.6/configure.in ++++ python-2.6/configure.in +@@ -2565,7 +2565,7 @@ + + # On Tru64, chflags seems to be present, but calling it will + # exit Python +-AC_MSG_CHECKING(for chflags) ++AC_CACHE_CHECK([for chflags], [py_cv_has_chflags], [dnl + AC_TRY_RUN([ + #include + #include +@@ -2575,12 +2575,18 @@ + return 1; + return 0; + } +-],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.) +- AC_MSG_RESULT(yes), +- AC_MSG_RESULT(no) +-) ++], [py_cv_has_chflags="yes"], ++ [py_cv_has_chflags="no"], ++ [py_cv_has_chflags="cross"]) ++]) ++if test "$py_cv_has_chflags" = "cross" ; then ++ AC_CHECK_FUNC([chflags], [py_cv_has_chflags="yes"], [py_cv_has_chflags="no"]) ++fi ++if test "$py_cv_has_chflags" = "yes" ; then ++ AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.) ++fi + +-AC_MSG_CHECKING(for lchflags) ++AC_CACHE_CHECK([for lchflags], [py_cv_has_lchflags], [dnl + AC_TRY_RUN([ + #include + #include +@@ -2590,10 +2596,16 @@ + return 1; + return 0; + } +-],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.) +- AC_MSG_RESULT(yes), +- AC_MSG_RESULT(no) +-) ++], [py_cv_has_lchflags="yes"], ++ [py_cv_has_lchflags="no"], ++ [py_cv_has_lchflags="cross"]) ++]) ++if test "$py_cv_has_lchflags" = "cross" ; then ++ AC_CHECK_FUNC([lchflags], [py_cv_has_lchflags="yes"], [py_cv_has_lchflags="no"]) ++fi ++if test "$py_cv_has_lchflags" = "yes" ; then ++ AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.) ++fi + + dnl Check if system zlib has *Copy() functions + dnl diff --git a/python/python/python.conf b/python/python/python.conf index c953a96c0..4ccf5e24e 100644 --- a/python/python/python.conf +++ b/python/python/python.conf @@ -15,10 +15,12 @@ # --- SDE-COPYRIGHT-NOTE-END --- python_postmake() { + if ! atstage toolchain; then cat > $root/etc/profile.d/python <<-EOT export PYTHON="$bindir/python" EOT + fi } python_preconf() @@ -34,6 +36,7 @@ python_preconf() } runpysetup=0 +autogen=1 var_append confopt " " "--enable-shared --with-threads" # We can savely ignore this dependencies. diff --git a/python/python/python.desc b/python/python/python.desc index 7652ccd85..446b2b3c9 100644 --- a/python/python/python.desc +++ b/python/python/python.desc @@ -30,6 +30,6 @@ [L] OpenSource [S] Stable [V] 2.6.2 -[P] X -----5---9 109.000 +[P] X ??---5---9 109.000 [D] 365861345 Python-2.6.2.tar.bz2 http://www.python.org/ftp/python/2.6.2/