1
1
# DP: use the correct include directory when linking with ncursesw.
3
Index: python2.7-2.7.2/setup.py
4
===================================================================
5
--- python2.7-2.7.2.orig/setup.py 2011-10-05 10:27:23.459416207 +0000
6
+++ python2.7-2.7.2/setup.py 2011-10-05 10:29:21.739589114 +0000
7
@@ -1251,13 +1251,17 @@
8
# Curses support, requiring the System V version of curses, often
9
# provided by the ncurses library.
10
panel_library = 'panel'
12
if curses_library.startswith('ncurses'):
13
if curses_library == 'ncursesw':
14
# Bug 1464056: If _curses.so links with ncursesw,
6
15
# _curses_panel.so must link with panelw.
7
16
panel_library = 'panelw'
8
17
curses_libs = [curses_library]
9
+ curses_incs = find_file('curses.h',
10
+ [os.path.join(d, 'ncursesw') for d in inc_dirs],
13
+ curses_incs = inc_dirs
18
+ curses_incs = find_file('curses.h', inc_dirs,
19
+ [os.path.join(d, 'ncursesw') for d in inc_dirs])
14
20
exts.append( Extension('_curses', ['_cursesmodule.c'],
15
21
+ include_dirs = curses_incs,
16
22
libraries = curses_libs) )
17
23
elif curses_library == 'curses' and platform != 'darwin':
18
24
# OSX has an old Berkeley curses, not good enough for
26
if (module_enabled(exts, '_curses') and
27
self.compiler.find_library_file(lib_dirs, panel_library)):
28
exts.append( Extension('_curses_panel', ['_curses_panel.c'],
29
+ include_dirs = curses_incs,
30
libraries = [panel_library] + curses_libs) )
32
missing.append('_curses_panel')
33
Index: python2.7-2.7.2/configure.in
34
===================================================================
35
--- python2.7-2.7.2.orig/configure.in 2011-10-05 10:27:23.479416249 +0000
36
+++ python2.7-2.7.2/configure.in 2011-10-05 10:27:23.489416256 +0000
39
# checks for header files
41
+ac_save_cppflags="$CPPFLAGS"
42
+CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
43
AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
45
ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
50
+CPPFLAGS=$ac_save_cppflags
52
# On Linux, netlink.h requires asm/types.h
53
AC_CHECK_HEADERS(linux/netlink.h,,,[
55
[Define if you have struct stat.st_mtimensec])
58
+ac_save_cppflags="$CPPFLAGS"
59
+CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
60
# On HP/UX 11.0, mvwdelch is a block with a return statement
61
AC_MSG_CHECKING(whether mvwdelch is an expression)
62
AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,
67
+CPPFLAGS=$ac_save_cppflags
69
AC_MSG_CHECKING(for /dev/ptmx)