~ubuntu-branches/ubuntu/quantal/python2.7/quantal-updates

« back to all changes in this revision

Viewing changes to debian/patches/ncursesw-incdir.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2011-11-30 19:16:23 UTC
  • mfrom: (36.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20111130191623-ov9hszutdakcsnbz
Tags: 2.7.2-8
* Update to 20111130, taken from the 2.7 branch.
* New patch, ctypes-arm, allow for ",hard-float" after libc6 in ldconfig -p
  output (Loic Minier). LP: #898172.
* debian/rules: Define DPKG_VARS (Alban Browaeys). Closes: #647419).
* Add python-config man page (Johann Felix Soden). Closes: #650181).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# DP: use the correct include directory when linking with ncursesw.
2
2
 
3
 
--- a/setup.py
4
 
+++ b/setup.py
5
 
@@ -1257,7 +1257,13 @@
 
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'
 
11
+        curses_incs = None
 
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],
11
 
+                                    [])
12
 
+            if not curses_incs:
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
 
25
@@ -1278,6 +1282,7 @@
 
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) )
 
31
         else:
 
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
 
37
@@ -1374,6 +1374,8 @@
 
38
 
 
39
 # checks for header files
 
40
 AC_HEADER_STDC
 
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 \
 
44
 fcntl.h grp.h \
 
45
 ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
 
46
@@ -1395,6 +1397,7 @@
 
47
 #include <curses.h>
 
48
 #endif
 
49
 ])
 
50
+CPPFLAGS=$ac_save_cppflags
 
51
 
 
52
 # On Linux, netlink.h requires asm/types.h
 
53
 AC_CHECK_HEADERS(linux/netlink.h,,,[
 
54
@@ -4114,6 +4117,8 @@
 
55
   [Define if you have struct stat.st_mtimensec])
 
56
 fi
 
57
 
 
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,
 
63
@@ -4168,6 +4173,7 @@
 
64
    AC_MSG_RESULT(yes)],
 
65
   [AC_MSG_RESULT(no)]
 
66
 )
 
67
+CPPFLAGS=$ac_save_cppflags
 
68
 
 
69
 AC_MSG_CHECKING(for /dev/ptmx)
 
70