diff -aur --unidirectional-new-file Python-3.2.2/configure new-Python/configure --- Python-3.2.2/configure 2011-09-03 12:16:50.000000000 -0400 +++ new-Python/configure 2012-02-02 02:02:38.171875000 -0500 @@ -6150,9 +6150,9 @@ fi -for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ +for ac_header in asm/types.h conio.h curses.h ncurses/curses.h ncursesw/curses.h direct.h dlfcn.h errno.h \ fcntl.h grp.h \ -ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ +ieeefp.h io.h langinfo.h libintl.h ncurses/ncurses.h ncursesw/ncurses.h poll.h process.h pthread.h \ shadow.h signal.h stdint.h stropts.h termios.h thread.h \ unistd.h utime.h \ sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ @@ -6174,6 +6174,16 @@ done +if test -n $ac_cv_header_ncurses_curses_h \ +|| test -n $ac_cv_header_ncurses_ncurses_h; then + CPPFLAGS="-I/usr/include/ncurses $CPPFLAGS" + CONFIGURE_CPPFLAGS="-I/usr/include/ncurses $CONFIGURE_CPPFLAGS" +fi +if test -n $ac_cv_header_ncursesw_curses_h \ +|| test -n $ac_cv_header_ncursesw_ncurses_h; then + CPPFLAGS="-I/usr/include/ncursesw $CPPFLAGS" + CONFIGURE_CPPFLAGS="-I/usr/include/ncursesw $CONFIGURE_CPPFLAGS" +fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` @@ -14474,8 +14484,8 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. -config_files="`echo $ac_config_files`" -config_headers="`echo $ac_config_headers`" +config_files="$ac_config_files" +config_headers="$ac_config_headers" _ACEOF diff -aur --unidirectional-new-file Python-3.2.2/configure.in new-Python/configure.in --- Python-3.2.2/configure.in 2011-09-03 12:16:50.000000000 -0400 +++ new-Python/configure.in 2012-02-02 01:54:29.187500000 -0500 @@ -1326,9 +1326,9 @@ # checks for header files AC_HEADER_STDC -AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ +AC_CHECK_HEADERS(asm/types.h conio.h curses.h ncurses/curses.h ncursesw/curses.h direct.h dlfcn.h errno.h \ fcntl.h grp.h \ -ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ +ieeefp.h io.h langinfo.h libintl.h ncurses/ncurses.h ncursesw/ncurses.h poll.h process.h pthread.h \ shadow.h signal.h stdint.h stropts.h termios.h thread.h \ unistd.h utime.h \ sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ @@ -1338,6 +1338,16 @@ sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ bluetooth/bluetooth.h linux/tipc.h spawn.h util.h) +[if test -n $ac_cv_header_ncurses_curses_h \ +|| test -n $ac_cv_header_ncurses_ncurses_h; then + CPPFLAGS="-I/usr/include/ncurses $CPPFLAGS" + CONFIGURE_CPPFLAGS="-I/usr/include/ncurses $CONFIGURE_CPPFLAGS" +fi +if test -n $ac_cv_header_ncursesw_curses_h \ +|| test -n $ac_cv_header_ncursesw_ncurses_h; then + CPPFLAGS="-I/usr/include/ncursesw $CPPFLAGS" + CONFIGURE_CPPFLAGS="-I/usr/include/ncursesw $CONFIGURE_CPPFLAGS" +fi] AC_HEADER_DIRENT AC_HEADER_MAJOR diff -aur --unidirectional-new-file Python-3.2.2/pyconfig.h.in new-Python/pyconfig.h.in --- Python-3.2.2/pyconfig.h.in 2011-09-03 12:16:50.000000000 -0400 +++ new-Python/pyconfig.h.in 2012-02-02 02:02:41.453125000 -0500 @@ -473,8 +473,17 @@ /* Define to 1 if you have the `mremap' function. */ #undef HAVE_MREMAP -/* Define to 1 if you have the header file. */ -#undef HAVE_NCURSES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NCURSESW_CURSES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NCURSESW_NCURSES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NCURSES_CURSES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NCURSES_NCURSES_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H diff -aur --unidirectional-new-file Python-3.2.2/Lib/distutils/command/build_ext.py new-Python/Lib/distutils/command/build_ext.py --- Python-3.2.2/Lib/distutils/command/build_ext.py 2011-09-03 12:16:40.000000000 -0400 +++ new-Python/Lib/distutils/command/build_ext.py 2012-02-01 13:13:34.078125000 -0500 @@ -721,9 +721,9 @@ # extensions, it is a reference to the original list return ext.libraries + [pythonlib] elif sys.platform[:6] == "cygwin": - template = "python%d.%d" - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + pythonlib = 'python{}.{}{}.dll'.format( + sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, + sys.abiflags) # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] diff -aur --unidirectional-new-file Python-3.2.2/Lib/distutils/unixccompiler.py new-Python/Lib/distutils/unixccompiler.py --- Python-3.2.2/Lib/distutils/unixccompiler.py 2011-09-03 12:16:40.000000000 -0400 +++ new-Python/Lib/distutils/unixccompiler.py 2012-02-01 14:22:35.093750000 -0500 @@ -295,9 +295,11 @@ # use it anyway. Since distutils has always passed in # -Wl whenever gcc was used in the past it is probably # safest to keep doing so. - if sysconfig.get_config_var("GNULD") == "yes": + if (sysconfig.get_config_var("GNULD") == "yes" # GNU ld needs an extra option to get a RUNPATH # instead of just an RPATH. + and sys.platform != "cygwin"): + # ELF systems only. Need better test. return "-Wl,--enable-new-dtags,-R" + dir else: return "-Wl,-R" + dir diff -aur --unidirectional-new-file Python-3.2.2/Makefile.pre.in new-Python/Makefile.pre.in --- Python-3.2.2/Makefile.pre.in 2011-09-03 12:16:45.000000000 -0400 +++ new-Python/Makefile.pre.in 2012-02-01 03:59:05.937500000 -0500 @@ -504,12 +504,11 @@ # This rule builds the Cygwin Python DLL and import library if configured # for a shared core library; otherwise, this rule is a noop. -$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS) - if test -n "$(DLLLIBRARY)"; then \ - $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ - $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \ - else true; \ - fi +$(DLLLIBRARY): libpython$(LDVERSION).dll.a + touch $@ + +libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) + $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) oldsharedmods: $(SHAREDMODS) diff -aur --unidirectional-new-file Python-3.2.2/Modules/makesetup new-Python/Modules/makesetup --- Python-3.2.2/Modules/makesetup 2011-09-03 12:16:46.000000000 -0400 +++ new-Python/Modules/makesetup 2012-02-01 15:45:44.359375000 -0500 @@ -91,7 +91,7 @@ else ExtraLibDir='$(LIBPL)' fi - ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";; + ExtraLibs="-L$ExtraLibDir \$(LDLIBRARY)";; esac # Main loop diff -aur --unidirectional-new-file Python-3.2.2/setup.py new-Python/setup.py --- Python-3.2.2/setup.py 2011-09-03 12:16:50.000000000 -0400 +++ new-Python/setup.py 2012-02-01 13:14:48.296875000 -0500 @@ -1160,15 +1160,20 @@ # Curses support, requiring the System V version of curses, often # provided by the ncurses library. + curses_inc_dirs = [] panel_library = 'panel' if curses_library.startswith('ncurses'): + curses_inc_dir = '/usr/include/ncurses' if curses_library == 'ncursesw': + curses_inc_dir += 'w' # Bug 1464056: If _curses.so links with ncursesw, # _curses_panel.so must link with panelw. panel_library = 'panelw' + curses_inc_dirs = [curses_inc_dir] curses_libs = [curses_library] exts.append( Extension('_curses', ['_cursesmodule.c'], - libraries = curses_libs) ) + libraries = curses_libs, + include_dirs = curses_inc_dirs) ) elif curses_library == 'curses' and platform != 'darwin': # OSX has an old Berkeley curses, not good enough for # the _curses module. @@ -1188,7 +1193,8 @@ if (module_enabled(exts, '_curses') and self.compiler.find_library_file(lib_dirs, panel_library)): exts.append( Extension('_curses_panel', ['_curses_panel.c'], - libraries = [panel_library] + curses_libs) ) + libraries = [panel_library] + curses_libs, + include_dirs = curses_inc_dirs) ) else: missing.append('_curses_panel')