From 0700ea4eb6467bb5efad3394f08116c2739415b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Sat, 27 Jan 2018 16:32:46 +0000 Subject: vars/build.vars:native_packages_dev:python2: adds Python v2.7.14. patches/python2-2.7.14.local.patch: updated from chainport/python-2.7.midipix.patch. --- patches/python2-2.7.14.local.patch | 171 +++++++++++++++++++++++++++++++++++++ vars/build.vars | 7 +- 2 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 patches/python2-2.7.14.local.patch diff --git a/patches/python2-2.7.14.local.patch b/patches/python2-2.7.14.local.patch new file mode 100644 index 00000000..a0700b9b --- /dev/null +++ b/patches/python2-2.7.14.local.patch @@ -0,0 +1,171 @@ +--- a/Lib/smtpd.py ++++ b/Lib/smtpd.py +@@ -1,4 +1,3 @@ +-#! /usr/bin/env python + """An RFC 2821 smtp proxy. + + Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]] +--- a/Lib/smtplib.py ++++ b/Lib/smtplib.py +@@ -1,5 +1,3 @@ +-#! /usr/bin/env python +- + '''SMTP/ESMTP client class. + + This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -238,6 +238,7 @@ + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) ++PGEN_FOR_BUILD= $(PGEN) + + PSRCS= \ + Parser/acceler.c \ +@@ -498,8 +499,9 @@ + *) quiet="";; \ + esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ ++ _PYTHON_HOST_PLATFORM='$(_PYTHON_HOST_PLATFORM)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ +- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build ++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py build + + # Build static library + # avoid long command lines, same as LIBRARY_OBJS +@@ -1206,10 +1208,10 @@ + # This goes into $(exec_prefix) + sharedinstall: sharedmods + $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ +- --prefix=$(prefix) \ +- --install-scripts=$(BINDIR) \ +- --install-platlib=$(DESTSHARED) \ +- --root=$(DESTDIR)/ ++ --prefix=$(DESTDIR)///./$(prefix) \ ++ --install-scripts=$(DESTDIR)/./$(BINDIR) \ ++ --install-platlib=$(DESTDIR)/./$(DESTSHARED) \ ++ --root=/ + -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py* + + # Here are a couple of targets for MacOSX again, to install a full +--- a/configure ++++ b/configure +@@ -3212,6 +3212,9 @@ + *-*-cygwin*) + ac_sys_system=Cygwin + ;; ++ *-*-midipix*) ++ ac_sys_system=Midipix ++ ;; + *) + # for now, limit cross builds to known configurations + MACHDEP="unknown" +@@ -3258,6 +3261,9 @@ + *-*-cygwin*) + _host_cpu= + ;; ++ *-*-midipix*) ++ _host_cpu= ++ ;; + *) + # for now, limit cross builds to known configurations + MACHDEP="unknown" +@@ -14570,7 +14576,7 @@ + $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : +- ac_cv_have_long_long_format="cross -- assuming no" ++ ac_cv_have_long_long_format="cross -- assuming yes" + if test x$GCC = xyes; then + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror -Wformat" +@@ -14651,7 +14657,7 @@ + $as_echo "$ac_cv_have_long_long_format" >&6; } + fi + +-if test "$ac_cv_have_long_long_format" = yes ++if test "$ac_cv_have_long_long_format" != no + then + + $as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h +--- a/setup.py ++++ b/setup.py +@@ -294,6 +294,13 @@ + (ext.name, sys.exc_info()[1])) + self.failed.append(ext.name) + return ++ ++ if cross_compiling: ++ self.announce( ++ 'INFO: skipping import check for cross-compiled: "%s"' % ++ ext.name) ++ return ++ + # Workaround for Mac OS X: The Carbon-based modules cannot be + # reliably imported into a command-line Python + if 'Carbon' in ext.extra_link_args: +@@ -376,13 +383,6 @@ + finally: + os.unlink(tmpfile) + +- if multiarch_path_component != '': +- add_dir_to_list(self.compiler.library_dirs, +- '/usr/lib/' + multiarch_path_component) +- add_dir_to_list(self.compiler.include_dirs, +- '/usr/include/' + multiarch_path_component) +- return +- + if not find_executable('dpkg-architecture'): + return + opt = '' +@@ -398,10 +398,6 @@ + if ret >> 8 == 0: + with open(tmpfile) as fp: + multiarch_path_component = fp.readline().strip() +- add_dir_to_list(self.compiler.library_dirs, +- '/usr/lib/' + multiarch_path_component) +- add_dir_to_list(self.compiler.include_dirs, +- '/usr/include/' + multiarch_path_component) + finally: + os.unlink(tmpfile) + +@@ -439,11 +435,6 @@ + + def detect_modules(self): + # Ensure that /usr/local is always used +- if not cross_compiling: +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') +- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') +- if cross_compiling: +- self.add_gcc_paths() + self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and +@@ -501,16 +492,6 @@ + # be assumed that no additional -I,-L directives are needed. + inc_dirs = self.compiler.include_dirs[:] + lib_dirs = self.compiler.library_dirs[:] +- if not cross_compiling: +- for d in ( +- '/usr/include', +- ): +- add_dir_to_list(inc_dirs, d) +- for d in ( +- '/lib64', '/usr/lib64', +- '/lib', '/usr/lib', +- ): +- add_dir_to_list(lib_dirs, d) + exts = [] + missing = [] + +@@ -2002,6 +1983,9 @@ + return True + + def configure_ctypes(self, ext): ++ if cross_compiling: ++ self.use_system_libffi = True ++ + if not self.use_system_libffi: + if host_platform == 'darwin': + return self.configure_ctypes_darwin(ext) diff --git a/vars/build.vars b/vars/build.vars index d720303c..186c567c 100644 --- a/vars/build.vars +++ b/vars/build.vars @@ -760,7 +760,8 @@ mksh sbase sed tar tcsh the_silver_searcher toilet ubase util_linux which zsh"; # # Packages list native_packages_dev NATIVE_PACKAGES_DEV_PACKAGES=" -bdwgc bison chicken cparser diffutils flex lunix m4 make man_db patch patchutils perl python3 ruby smallbasic tcl"; +bdwgc bison chicken cparser diffutils flex lunix m4 make man_db +patch patchutils perl python2 ython3 ruby smallbasic tcl"; : ${PKG_BDWGC_URLS_GIT:="bdwgc=https://github.com/ivmai/bdwgc@master"}; : ${PKG_BISON_SHA256SUM:=a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1}; : ${PKG_BISON_VERSION:=3.0.4}; @@ -817,6 +818,10 @@ bdwgc bison chicken cparser diffutils flex lunix m4 make man_db patch patchutils : ${PKG_PERL_ENV_VARS_EXTRA:="TARGET=${DEFAULT_TARGET}"}; : ${PKG_PERL_MAKEFLAGS_BUILD:=-j1}; : ${PKG_PERL_SUBDIR:=perl-${PKG_PERL_VERSION}}; +: ${PKG_PYTHON2_SHA256SUM:=304c9b202ea6fbd0a4a8e0ad3733715fbd4749f2204a9173a58ec53c32ea73e8}; +: ${PKG_PYTHON2_VERSION:=2.7.14}; +: ${PKG_PYTHON2_URL:=https://www.python.org/ftp/python/${PKG_PYTHON2_VERSION}/Python-${PKG_PYTHON2_VERSION}.tgz}; +: ${PKG_PYTHON2_CONFIGURE_ARGS:="--build=x86_64 -C --enable-ipv6 --enable-shared --host=${DEFAULT_TARGET} --prefix=${PREFIX_NATIVE}"}; : ${PKG_PYTHON3_SHA256SUM:=687e067d9f391da645423c7eda8205bae9d35edc0c76ef5218dcbe4cc770d0d7}; : ${PKG_PYTHON3_VERSION:=3.5.1}; : ${PKG_PYTHON3_URL:=https://www.python.org/ftp/python/${PKG_PYTHON3_VERSION}/Python-${PKG_PYTHON3_VERSION}.tgz}; -- cgit v1.2.3