From 207cd347945b53a1034d0ed8ad35037cf497e471 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Wed, 17 Apr 2013 14:08:01 +0400 Subject: Examples: vim & python --- examples/python2.7/patches/ncursesw-incdir.diff | 66 +++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 examples/python2.7/patches/ncursesw-incdir.diff (limited to 'examples/python2.7/patches/ncursesw-incdir.diff') diff --git a/examples/python2.7/patches/ncursesw-incdir.diff b/examples/python2.7/patches/ncursesw-incdir.diff new file mode 100644 index 0000000..1ce0b57 --- /dev/null +++ b/examples/python2.7/patches/ncursesw-incdir.diff @@ -0,0 +1,66 @@ +# DP: use the correct include directory when linking with ncursesw. + +--- a/setup.py ++++ b/setup.py +@@ -1251,13 +1251,17 @@ + # Curses support, requiring the System V version of curses, often + # provided by the ncurses library. + panel_library = 'panel' ++ curses_incs = None + if curses_library.startswith('ncurses'): + if curses_library == 'ncursesw': + # Bug 1464056: If _curses.so links with ncursesw, + # _curses_panel.so must link with panelw. + panel_library = 'panelw' + curses_libs = [curses_library] ++ curses_incs = find_file('curses.h', inc_dirs, ++ [os.path.join(d, 'ncursesw') for d in inc_dirs]) + exts.append( Extension('_curses', ['_cursesmodule.c'], ++ include_dirs = curses_incs, + libraries = curses_libs) ) + elif curses_library == 'curses' and platform != 'darwin': + # OSX has an old Berkeley curses, not good enough for +@@ -1278,6 +1282,7 @@ + if (module_enabled(exts, '_curses') and + self.compiler.find_library_file(lib_dirs, panel_library)): + exts.append( Extension('_curses_panel', ['_curses_panel.c'], ++ include_dirs = curses_incs, + libraries = [panel_library] + curses_libs) ) + else: + missing.append('_curses_panel') +--- a/configure.ac ++++ b/configure.ac +@@ -1374,6 +1374,8 @@ + + # checks for header files + AC_HEADER_STDC ++ac_save_cppflags="$CPPFLAGS" ++CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" + AC_CHECK_HEADERS(asm/types.h conio.h 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 \ +@@ -1395,6 +1397,7 @@ + #include + #endif + ]) ++CPPFLAGS=$ac_save_cppflags + + # On Linux, netlink.h requires asm/types.h + AC_CHECK_HEADERS(linux/netlink.h,,,[ +@@ -4123,6 +4126,8 @@ + [Define if you have struct stat.st_mtimensec]) + fi + ++ac_save_cppflags="$CPPFLAGS" ++CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" + # On HP/UX 11.0, mvwdelch is a block with a return statement + AC_MSG_CHECKING(whether mvwdelch is an expression) + AC_CACHE_VAL(ac_cv_mvwdelch_is_expression, +@@ -4177,6 +4182,7 @@ + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)] + ) ++CPPFLAGS=$ac_save_cppflags + + AC_MSG_CHECKING(for /dev/ptmx) + -- cgit v1.2.3