Ticket #232: python-2.6-enable-ctypes-cross-build.2.patch

File python-2.6-enable-ctypes-cross-build.2.patch, 2.3 KB (added by sleipnir, 3 years ago)

Slightly modified spielc patch

  • Python-2.6.2

    # CTypes need to know the actual host we are building on.
    # Signed-Off: Michael Dietrich <mdt@emdete.de>
    
    old new  
    16561656                                         ffi_configfile): 
    16571657                from distutils.dir_util import mkpath 
    16581658                mkpath(ffi_builddir) 
    1659                 config_args = [] 
     1659                config_args = ['--host=%s' % os.environ["CHOST"], ] 
    16601660 
    16611661                # Pass empty CFLAGS because we'll just append the resulting 
    16621662                # CFLAGS to Python's; -g or -O2 is to be avoided. 
    1663                 cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ 
    1664                       % (ffi_builddir, ffi_srcdir, " ".join(config_args)) 
     1663                cmd = "(cd %s && autoreconf) && (cd %s && env CFLAGS='' '%s/configure' %s)" \ 
     1664                      % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) 
    16651665 
    16661666                res = os.system(cmd) 
    16671667                if res or not os.path.exists(ffi_configfile): 
    1668                     print "Failed to configure _ctypes module" 
     1668                    print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile ) 
    16691669                    return False 
    16701670 
    16711671            fficonfig = {} 
  • Python-2.6.2/Modules/_ctypes/libffi/Makefile.am

    old new  
    22 
    33AUTOMAKE_OPTIONS = foreign subdir-objects 
    44 
    5 SUBDIRS = include testsuite man 
     5SUBDIRS = include 
    66 
    77EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \ 
    88        src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \ 
     
    3232        src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \ 
    3333        libtool-version ChangeLog.libffi 
    3434 
    35 info_TEXINFOS = doc/libffi.texi 
     35info_TEXINFOS = 
    3636 
    3737## ################################################################ 
    3838 
  • Python-2.6.2/Modules/_ctypes/libffi/configure.ac

    old new  
    372372 
    373373AC_CONFIG_FILES(fficonfig.py) 
    374374 
     375AC_CONFIG_FILES([Makefile]) 
     376 
    375377AC_OUTPUT