]> code.ossystems Code Review - openembedded-core.git/commitdiff
cmd1.bbclass: Ensure ncurses is built and used for menuconfig tasks
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 31 May 2012 13:22:34 +0000 (13:22 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Jun 2012 15:31:41 +0000 (16:31 +0100)
Currently, the task just exits if something goes wrong. This adds the
ncurses-native dependency. It also adds a small delay before closing the
window so any messages displayed there can be seen.

Trying to get the kernel build system to correctly find and link with
our copy of ncurses is some kind of nightmare. I ended up having to add
it to HOST_LOADLIBES globally for this task which is rather nasty but I
couldn't find any other way.

[YOCTO #2513]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/cml1.bbclass

index d429188c708a4d24e8f011a84df5cdffeff8e2cb..bd253117aa76fb6dc05213daf719d03642d49ac0 100644 (file)
@@ -9,9 +9,15 @@ addtask configure after do_unpack do_patch before do_compile
 
 inherit terminal
 
+OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES"
+HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
+HOSTLDFLAGS = "${BUILD_LDFLAGS}"
+HOST_LOADLIBES = "-lncurses"
+
 python do_menuconfig() {
-        oe_terminal("make menuconfig", '${PN} Configuration', d)
+        oe_terminal("${SHELL} -c \"make menuconfig; echo 'Pausing for 5 seconds'; sleep 5\"", '${PN} Configuration', d)
 }
+do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
 do_menuconfig[nostamp] = "1"
 addtask menuconfig after do_configure