Skip to content

Commit

Permalink
Fix terminfo detection in libncurses
Browse files Browse the repository at this point in the history
Bug: android/ndk#1565

1. Mac has a case-insensitive file system where the subdirs of
   /usr/share/terminfo are ascii values ('78') instead of letters ('x').
   The ncurses configure script detects this based on the filesystem
   it's running on.  Unfortunately, the android build servers run on a
   separate volume with a case-sensitive file system, breaking this
   detection.  Override by setting --disable-mixed-case config flag.

2. Set --with-default-terminfo-dir to always read from
   /usr/share/terminfo for all platforms.

Test: lldb.sh opens successfully on a Mac
Change-Id: I1b9da0093be44331b80b6b21cbe3254de8f53408
  • Loading branch information
pirama-arumuga-nainar committed May 10, 2023
1 parent e1b55d9 commit 97bd2c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,9 +662,13 @@ class LibNcursesBuilder(base_builders.AutoconfBuilder, base_builders.LibInfo):

@property
def config_flags(self) -> List[str]:
return super().config_flags + [
flags = super().config_flags + [
'--with-shared',
'--with-default-terminfo-dir=/usr/share/terminfo',
]
if self._config.target_os.is_darwin:
flags.append('--disable-mixed-case')
return flags

@property
def _lib_names(self) -> List[str]:
Expand Down

0 comments on commit 97bd2c8

Please sign in to comment.