Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
--- a/Lib/smtpd.py
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+++ b/Lib/smtpd.py
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -1,4 +1,3 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-#! /usr/bin/env python
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 """An RFC 2821 smtp proxy.
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
--- a/Lib/smtplib.py
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+++ b/Lib/smtplib.py
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -1,5 +1,3 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-#! /usr/bin/env python
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 '''SMTP/ESMTP client class.
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
--- a/Makefile.pre.in
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+++ b/Makefile.pre.in
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -238,6 +238,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 ##########################################################################
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 # Parser
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 PGEN=		Parser/pgen$(EXE)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+PGEN_FOR_BUILD=	$(PGEN)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 PSRCS=		\
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		Parser/acceler.c \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -498,8 +499,9 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 	    *) quiet="";; \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 	esac; \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 	$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+		_PYTHON_HOST_PLATFORM='$(_PYTHON_HOST_PLATFORM)' \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-		$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+		$(PYTHON_FOR_BUILD) $(srcdir)/setup.py build
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 # Build static library
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 # avoid long command lines, same as LIBRARY_OBJS
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -1206,10 +1208,10 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 # This goes into $(exec_prefix)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 sharedinstall: sharedmods
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 	$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-	   	--prefix=$(prefix) \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-		--install-scripts=$(BINDIR) \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-		--install-platlib=$(DESTSHARED) \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-		--root=$(DESTDIR)/
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+	   	--prefix=$(DESTDIR)///./$(prefix) \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+		--install-scripts=$(DESTDIR)/./$(BINDIR) \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+		--install-platlib=$(DESTDIR)/./$(DESTSHARED) \
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+		--root=/
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 	-rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py*
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 # Here are a couple of targets for MacOSX again, to install a full
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
--- a/configure
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+++ b/configure
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -3212,6 +3212,9 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 	*-*-cygwin*)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		ac_sys_system=Cygwin
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		;;
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+	*-*-midipix*)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+		ac_sys_system=Midipix
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+		;;
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 	*)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		# for now, limit cross builds to known configurations
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		MACHDEP="unknown"
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -3258,6 +3261,9 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 	*-*-cygwin*)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		_host_cpu=
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		;;
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+	*-*-midipix*)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+		_host_cpu=
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+		;;
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 	*)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		# for now, limit cross builds to known configurations
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 		MACHDEP="unknown"
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -14570,7 +14576,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
   $as_echo_n "(cached) " >&6
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 else
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
   if test "$cross_compiling" = yes; then :
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-  ac_cv_have_long_long_format="cross -- assuming no"
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+  ac_cv_have_long_long_format="cross -- assuming yes"
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
    if test x$GCC = xyes; then
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
     save_CFLAGS=$CFLAGS
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
     CFLAGS="$CFLAGS -Werror -Wformat"
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -14651,7 +14657,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 $as_echo "$ac_cv_have_long_long_format" >&6; }
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 fi
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-if test "$ac_cv_have_long_long_format" = yes
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+if test "$ac_cv_have_long_long_format" != no
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 then
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 $as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
--- a/setup.py
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+++ b/setup.py
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -294,6 +294,13 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
                           (ext.name, sys.exc_info()[1]))
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
             self.failed.append(ext.name)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
             return
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+        if cross_compiling:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+            self.announce(
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+                'INFO: skipping import check for cross-compiled: "%s"' %
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+                ext.name)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+            return
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         # Workaround for Mac OS X: The Carbon-based modules cannot be
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         # reliably imported into a command-line Python
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         if 'Carbon' in ext.extra_link_args:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -376,13 +383,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         finally:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
             os.unlink(tmpfile)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-        if multiarch_path_component != '':
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-            add_dir_to_list(self.compiler.library_dirs,
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                            '/usr/lib/' + multiarch_path_component)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-            add_dir_to_list(self.compiler.include_dirs,
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                            '/usr/include/' + multiarch_path_component)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-            return
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         if not find_executable('dpkg-architecture'):
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
             return
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         opt = ''
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -398,10 +398,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
             if ret >> 8 == 0:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
                 with open(tmpfile) as fp:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
                     multiarch_path_component = fp.readline().strip()
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                add_dir_to_list(self.compiler.library_dirs,
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                                '/usr/lib/' + multiarch_path_component)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                add_dir_to_list(self.compiler.include_dirs,
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                                '/usr/include/' + multiarch_path_component)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         finally:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
             os.unlink(tmpfile)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -439,11 +435,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
     def detect_modules(self):
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         # Ensure that /usr/local is always used
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-        if not cross_compiling:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-        if cross_compiling:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-            self.add_gcc_paths()
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         self.add_multiarch_paths()
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         # Add paths specified in the environment variables LDFLAGS and
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -501,16 +492,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         # be assumed that no additional -I,-L directives are needed.
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         inc_dirs = self.compiler.include_dirs[:]
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         lib_dirs = self.compiler.library_dirs[:]
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-        if not cross_compiling:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-            for d in (
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                '/usr/include',
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                ):
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                add_dir_to_list(inc_dirs, d)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-            for d in (
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                '/lib64', '/usr/lib64',
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                '/lib', '/usr/lib',
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                ):
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
-                add_dir_to_list(lib_dirs, d)
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         exts = []
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         missing = []
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
@@ -2002,6 +1983,9 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         return True
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
 
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
     def configure_ctypes(self, ext):
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+        if cross_compiling:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+            self.use_system_libffi = True
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
+
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
         if not self.use_system_libffi:
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
             if host_platform == 'darwin':
Lucio Andrés Illanes Albornoz (arab, vxp) 0700ea
                 return self.configure_ctypes_darwin(ext)