How to do it...

The Yocto build system also contains classes with the required knowledge to build SCons packages. All your recipe needs to do is to inherit the scons class and configure the arguments to be passed to the configure script in the EXTRA_OESCONS variable. Although some packages using SCons might deal with installation through an install alias as required by the scons class, your recipe will mostly need to provide a do_install task override. An example recipe to build the helloworld.c example application, meta-custom/recipes-example/helloworld-scons/helloworld-scons_1.0.bb, follows:

DESCRIPTION = "Simple helloworld scons application" 
SECTION = "examples" 
LICENSE = "MIT" 
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" 
 
SRC_URI = "file://SConstruct   
           file://helloworld.c" 
 
S = "${WORKDIR}" 
 
inherit scons 
 
EXTRA_OESCONS = "" 
 
do_install() { 
    install -d ${D}/${bindir} 
    install -m 0755 helloworld ${D}${bindir} 
} 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset