The libpanel(3) library was developed after the NetBSD-7.0 release.
This curses' extension lib is used within lldb.
There were few ways to address this lack of functionality in the base:
a. require ncurses in 7.0 (ncurses it's not a part of base in NetBSD)
b. provide external package library with libpanel in pkgsrc
c. mix native curses with ncurses' panel
d. embed libpanel in lldb
I was trying to go for a) and b), but it was trouble some increasing
complexity of Makefiles and sources and it required additional paths from
command line, as pkgsrc with ncurses may be installed in freely given prefix.
b) and c) resulted in conflicts.
Go for d) as it's the simplest solution:
- it doesn't require pkgsrc neither any externally specified libpanel,
- this approach is already in use for getopt_long_only(3),
- no need to ifdefing paths for libraries and headers of curses(3), ncurses headers are prefixed with a directory 'ncurses/' and source code will need to be fixed for it,
- paradoxically it doesn't require changes in the common code like the other solutions,
- it doesn't need manually specified paths from command line,
- it's self-containing.
The libpanel library is relatively tiny and built only for the NetBSD target.
With this diff I can built LLDB on NetBSD using CMake.