Revision: 5423 Author: pebender Date: Sat Sep 5 09:50:34 2009 Log: - Added some patches toward support python cross compilation.
http://code.google.com/p/minimyth/source/detail?r=5423 Added: /trunk/gar-minimyth/script/python/python/files /trunk/gar-minimyth/script/python/python/files/Python-2.6.2-configure.patch /trunk/gar-minimyth/script/python/python/files/Python-2.6.2-cross.patch Modified: /trunk/gar-minimyth/script/python/python/Makefile /trunk/gar-minimyth/script/python/python/checksums ======================================= --- /dev/null +++ /trunk/gar-minimyth/script/python/python/files/Python-2.6.2-configure.patch Sat Sep 5 09:50:34 2009 @@ -0,0 +1,130 @@ +diff -Naur Python-2.6.2-old/configure.in Python-2.6.2-new/configure.in +--- Python-2.6.2-old/configure.in 2009-03-30 10:56:14.000000000 -0700 ++++ Python-2.6.2-new/configure.in 2009-09-05 09:26:01.000000000 -0700 +@@ -2567,8 +2567,9 @@ + + # On Tru64, chflags seems to be present, but calling it will + # exit Python +-AC_MSG_CHECKING(for chflags) +-AC_TRY_RUN([ ++AC_CACHE_CHECK([for chflags], ++[ac_cv_func_chflags_works], ++[AC_TRY_RUN([ + #include <sys/stat.h> + #include <unistd.h> + int main(int argc, char*argv[]) +@@ -2577,13 +2578,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) ++], ++ [ac_cv_func_chflags_works=yes], ++ [ac_cv_func_chflags_works=no] ++)] + ) ++if test "x$ac_cv_func_chflags_works" = "xyes" ; then ++ AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the 'chflags' function.) ++fi + +-AC_MSG_CHECKING(for lchflags) +-AC_TRY_RUN([ ++AC_CACHE_CHECK([for lchflags], ++[ac_cv_func_lchflags_works], ++[AC_TRY_RUN([ + #include <sys/stat.h> + #include <unistd.h> + int main(int argc, char*argv[]) +@@ -2592,10 +2598,14 @@ + 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) ++], ++ [ac_cv_func_lchflags_works=yes], ++ [ac_cv_func_lchflags_works=no] ++)] + ) ++if test "x$ac_cv_func_lchflags_works" = "xyes" ; 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 +@@ -3634,30 +3644,37 @@ + AC_MSG_RESULT(no) + ) + +-AC_MSG_CHECKING(for /dev/ptmx) +- +-if test -r /dev/ptmx +-then +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_DEV_PTMX, 1, +- [Define if we have /dev/ptmx.]) ++AC_CACHE_CHECK([for /dev/ptmx], ++[ac_cv_file_dev_ptmx], ++[ ++if test -r /dev/ptmx ; then ++ ac_cv_file_dev_ptmx=yes + else +- AC_MSG_RESULT(no) ++ ac_cv_file_dev_ptmx=no ++fi ++] ++) ++if test "x$ac_cv_file_dev_ptmx" = "xyes" ; then ++ AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if we have /dev/ptmx.]) + fi + +-AC_MSG_CHECKING(for /dev/ptc) +- +-if test -r /dev/ptc +-then +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_DEV_PTC, 1, +- [Define if we have /dev/ptc.]) ++AC_CACHE_CHECK([for /dev/ptc], ++[ac_cv_file_dev_ptc], ++[ ++if test -r /dev/ptc ; then ++ ac_cv_file_dev_ptc=yes + else +- AC_MSG_RESULT(no) ++ ac_cv_file_dev_ptc=no ++fi ++] ++) ++if test "x$ac_cv_file_dev_ptc" = "xyes" ; then ++ AC_DEFINE(HAVE_DEV_PTC, 1, [Define if we have /dev/ptc.]) + fi + +-AC_MSG_CHECKING(for %zd printf() format support) +-AC_TRY_RUN([#include <stdio.h> ++AC_CACHE_CHECK([for %zd printf() format support], ++[ac_cv_func_printf_zd], ++[AC_TRY_RUN([#include <stdio.h> + #include <stddef.h> + #include <string.h> + +@@ -3691,9 +3708,13 @@ + + 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)) ++ [ac_cv_func_printf_zd=yes], ++ [ac_cv_func_printf_zd=no] ++)] ++) ++if test "x$ac_cv_func_printf_zd" = "xyes" ; 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, ======================================= --- /dev/null +++ /trunk/gar-minimyth/script/python/python/files/Python-2.6.2-cross.patch Sat Sep 5 09:50:34 2009 @@ -0,0 +1,122 @@ +diff -Naur Python-2.6.2-old/Makefile.pre.in Python-2.6.2-new/Makefile.pre.in +--- Python-2.6.2-old/Makefile.pre.in 2009-02-24 03:07:44.000000000 -0800 ++++ Python-2.6.2-new/Makefile.pre.in 2009-09-05 09:44:48.000000000 -0700 +@@ -370,7 +370,7 @@ + $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov" + + run_profile_task: +- ./$(BUILDPYTHON) $(PROFILE_TASK) ++ python $(PROFILE_TASK) + + build_all_use_profile: + $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use" +@@ -388,14 +388,14 @@ + $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + + platform: $(BUILDPYTHON) +- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform ++ $(RUNSHARED) python -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform + + + # Build the shared modules + sharedmods: $(BUILDPYTHON) + @case $$MAKEFLAGS in \ +- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ +- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ ++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' python -E $(srcdir)/setup.py -q build;; \ ++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' python -E $(srcdir)/setup.py build;; \ + esac + + # Build static library +@@ -676,7 +676,7 @@ + + TESTOPTS= -l $(EXTRATESTOPTS) + TESTPROG= $(srcdir)/Lib/test/regrtest.py +-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -tt ++TESTPYTHON= $(RUNSHARED) python -E -tt + test: all platform + -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f + -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) +@@ -699,7 +699,7 @@ + -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f + -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall + $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall +- $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall ++ $(RUNSHARED) /usr/libexec/oah/translate python -E -tt $(TESTPROG) $(TESTOPTS) -uall + + + # Like testall, but with a single pass only +@@ -887,23 +887,23 @@ + done + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ ++ python -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ ++ python -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ ++ python -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ ++ python -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" ++ python -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" + + # Create the PLATDIR source directory, if one wasn't distributed.. + $(srcdir)/Lib/$(PLATDIR): +@@ -1001,7 +1001,7 @@ + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: +- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ ++ $(RUNSHARED) python -E $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ +@@ -1039,7 +1039,7 @@ + fi; \ + done + $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers +- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist ++ sed 's/%VERSION%/'"`$(RUNSHARED) python -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist + $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current + $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK) + $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers +@@ -1081,7 +1081,7 @@ + # This installs a few of the useful scripts in Tools/scripts + scriptsinstall: + SRCDIR=$(srcdir) $(RUNSHARED) \ +- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \ ++ python $(srcdir)/Tools/scripts/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --root=/$(DESTDIR) +@@ -1103,7 +1103,7 @@ + + # Run reindent on the library + reindent: +- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib ++ python $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib + + # Rerun configure with the same options as it was run last time, + # provided the config.status script exists +@@ -1199,7 +1199,7 @@ + + # Perform some verification checks on any modified files. + patchcheck: +- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py ++ $(RUNSHARED) python $(srcdir)/Tools/scripts/patchcheck.py + + # Dependencies + ======================================= --- /trunk/gar-minimyth/script/python/python/Makefile Fri Sep 4 18:07:54 2009 +++ /trunk/gar-minimyth/script/python/python/Makefile Sat Sep 5 09:50:34 2009 @@ -3,24 +3,46 @@ CATEGORIES = python MASTER_SITES = http://www.python.org/ftp/python/$(GARVERSION)/ DISTFILES = $(DISTNAME).tar.bz2 +PATCHFILES = $(DISTNAME)-configure.patch +ifneq ($(DESTIMG),build) +PATCHFILES += $(DISTNAME)-cross.patch +endif LICENSE = DESCRIPTION = define BLURB endef -DEPENDS = lang/c -BUILDDEPS = +DEPENDS = lang/c +BUILDDEPS = +ifneq ($(DESTIMG),build) +BUILDDEPS += python/python +endif CONFIGURE_SCRIPTS = $(WORKSRC)/configure BUILD_SCRIPTS = $(WORKSRC)/Makefile INSTALL_SCRIPTS = $(WORKSRC)/Makefile CONFIGURE_ARGS = $(DIRPATHS) --build=$(GARBUILD) --host=$(GARHOST) \ + --cache-file=config.cache \ --enable-shared + +ifneq ($(DESTIMG),build) +CONFIGURE_ENV = \ + ac_cv_file_dev_ptc=no \ + ac_cv_file_dev_ptmx=yes \ + ac_cv_func_lchflags_works=no \ + ac_cv_func_chflags_works=no \ + ac_cv_func_printf_zd=yes +endif include ../../gar.mk +pre-configure: + @cd $(WORKSRC) ; autoreconf --verbose --install --force + @$(call FIX_LIBTOOL,$(WORKSRC)/configure) + @$(MAKECOOKIE) + post-install: @rm -f $(DESTDIR)$(libdir)/python2.6/config/libpython2.6.a @$(MAKECOOKIE) ======================================= --- /trunk/gar-minimyth/script/python/python/checksums Thu Sep 3 16:21:15 2009 +++ /trunk/gar-minimyth/script/python/python/checksums Sat Sep 5 09:50:34 2009 @@ -1,1 +1,3 @@ 245db9f1e0f09ab7e0faaa0cf7301011 download/Python-2.6.2.tar.bz2 +4f84ffd3f04cf6094ce61a5d4908e756 download/Python-2.6.2-configure.patch +05da041853d3040af31720a4da0aca15 download/Python-2.6.2-cross.patch --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "minimyth-commits" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/minimyth-commits?hl=en -~----------~----~----~----~------~----~------~--~---
