Skip to content

Commit

Permalink
menuconfig,mconf-cfg: Allow specification of ncurses location
Browse files Browse the repository at this point in the history
In some cross build environments such as the Yocto Project build
environment it provides an ncurses library that is compiled
differently than the host's version.  This causes display corruption
problems when the host's curses includes are used instead of the
includes from the provided compiler are overridden.  There is a second
case where there is no curses libraries at all on the host system and
menuconfig will just fail entirely.

The solution is simply to allow an override variable in
check-lxdialog.sh for environments such as the Yocto Project.  Adding
a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
compiling and linking against the right headers and libraries.

Stolen from linux-yocto [1]

[1] http://git.yoctoproject.org/cgit.cgi/linux-yocto/commit/?id=846b11d8c834af4fa62393dadb490ea8246b332c

Upstream-Status: Pending

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
cc: Michal Marek <mmarek@suse.cz>
cc: linux-kbuild@vger.kernel.org
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
  • Loading branch information
Bruce Ashfield authored and fbertux committed Jun 14, 2019
1 parent 56bc15a commit 55fcc54
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/kconfig/mconf-cfg.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
PKG="ncursesw"
PKG2="ncurses"

if [ "$CROSS_CURSES_LIB" != "" ]; then
echo libs=\'$CROSS_CURSES_LIB\'
if [ x"$CROSS_CURSES_INC" != x ]; then
echo cflags=\'$CROSS_CURSES_INC\'
fi
exit 0
fi

if [ -n "$(command -v pkg-config)" ]; then
if pkg-config --exists $PKG; then
echo cflags=\"$(pkg-config --cflags $PKG)\"
Expand Down

0 comments on commit 55fcc54

Please sign in to comment.