generic-poky/meta/classes/cml1.bbclass
Fahad Usman 7d450fb74a cml1: set and export TERMINFO, to handle ncurses-native relocation
ncurses library looks at the compiled-in search path for the terminfo
database, and that path no longer exists, when using cached binaries (sstate).
Export TERMINFO pointing at the current sysroot, so the attempt to run mconf
is able to find the correct terminfo db.

(From OE-Core rev: b036adfb868c042245cd8fba8ecc2ba53169bfea)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>

the patch was imported from meta-mentor layer on yoctoproject git server
http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id
0cae284f294e3a2c99d9a4d79c95c25103cd8f8b

Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-26 11:34:07 +00:00

41 lines
1.2 KiB
Text

cml1_do_configure() {
set -e
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake oldconfig
}
EXPORT_FUNCTIONS do_configure
addtask configure after do_unpack do_patch before do_compile
inherit terminal
OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES TERMINFO"
HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
HOSTLDFLAGS = "${BUILD_LDFLAGS}"
HOST_LOADLIBES = "-lncurses"
TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
python do_menuconfig() {
try:
mtime = os.path.getmtime(".config")
except OSError:
mtime = 0
oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d)
# FIXME this check can be removed when the minimum bitbake version has been bumped
if hasattr(bb.build, 'write_taint'):
try:
newmtime = os.path.getmtime(".config")
except OSError:
newmtime = 0
if newmtime > mtime:
bb.note("Configuration changed, recompile will be forced")
bb.build.write_taint('do_compile', d)
}
do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
do_menuconfig[nostamp] = "1"
addtask menuconfig after do_configure