mksh: moved to github
[openwrt/svn-archive/packages.git] / lang / python / patches / 130-readline-setup.patch
1 --- a/setup.py
2 +++ b/setup.py
3 @@ -573,32 +573,7 @@ class PyBuildExt(build_ext):
4 # readline
5 do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
6 readline_termcap_library = ""
7 - curses_library = ""
8 - # Determine if readline is already linked against curses or tinfo.
9 - if do_readline and find_executable('ldd'):
10 - fp = os.popen("ldd %s" % do_readline)
11 - ldd_output = fp.readlines()
12 - ret = fp.close()
13 - if ret is None or ret >> 8 == 0:
14 - for ln in ldd_output:
15 - if 'curses' in ln:
16 - readline_termcap_library = re.sub(
17 - r'.*lib(n?cursesw?)\.so.*', r'\1', ln
18 - ).rstrip()
19 - break
20 - if 'tinfo' in ln: # termcap interface split out from ncurses
21 - readline_termcap_library = 'tinfo'
22 - break
23 - # Issue 7384: If readline is already linked against curses,
24 - # use the same library for the readline and curses modules.
25 - if 'curses' in readline_termcap_library:
26 - curses_library = readline_termcap_library
27 - elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
28 - curses_library = 'ncursesw'
29 - elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
30 - curses_library = 'ncurses'
31 - elif self.compiler.find_library_file(lib_dirs, 'curses'):
32 - curses_library = 'curses'
33 + curses_library = "ncurses"
34
35 if platform == 'darwin':
36 os_release = int(os.uname()[2].split('.')[0])