summaryrefslogtreecommitdiffstats
path: root/meta/classes/multilib_script.bbclass
blob: b11efc1ec5c9a5c14e79bb6ce1945ff6b26a2cae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
# Recipe needs to set MULTILIB_SCRIPTS in the form <pkgname>:<scriptname>, e.g.
# MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/file1 ${PN}:${base_bindir}/file2"
# to indicate which script files to process from which packages.
#

inherit update-alternatives

MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"

PACKAGE_PREPROCESS_FUNCS += "multilibscript_rename"

multilibscript_rename() {
	:
}

python () {
    # Do nothing if multilib isn't being used
    if not d.getVar("MULTILIB_VARIANTS"):
        return
    # Do nothing for native/cross
    if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d):
        return

    for entry in (d.getVar("MULTILIB_SCRIPTS", False) or "").split():
        pkg, script = entry.split(":")
        epkg = d.expand(pkg)
        scriptname = os.path.basename(script)
        d.appendVar("ALTERNATIVE_" + epkg, " " + scriptname + " ")
        d.setVarFlag("ALTERNATIVE_LINK_NAME", scriptname, script)
        d.setVarFlag("ALTERNATIVE_TARGET", scriptname, script + "-${MULTILIB_SUFFIX}")
        d.appendVar("multilibscript_rename",  "\n	mv ${PKGD}" + script + " ${PKGD}" + script + "-${MULTILIB_SUFFIX}")
        d.appendVar("FILES_" + epkg, " " + script + "-${MULTILIB_SUFFIX}")
}
on layer Poky consists of several upstream projects such as BitBake, OpenEmbedded-Core, Yocto documentation and various sources of information e.g. for the hardware support. Poky is in turn a component of the Yocto Project. The Yocto Project has extensive documentation about the system including a reference manual which can be found at: http://yoctoproject.org/documentation OpenEmbedded-Core is a layer containing the core metadata for current versions of OpenEmbedded. It is distro-less (can build a functional image with DISTRO = "nodistro") and contains only emulated machine support. For information about OpenEmbedded, see the OpenEmbedded website: http://www.openembedded.org/ Contribution Guidelines ======================= A guide to submitting patches to OpenEmbedded is available at: http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded There is good documentation on how to write/format patches at: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Where to Send Patches ===================== As Poky is an integration repository (built using a tool called combo-layer), patches against the various components should be sent to their respective upstreams: bitbake: Git repository: http://git.openembedded.org/bitbake/ Mailing list: bitbake-devel@lists.openembedded.org documentation: Git repository: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/ Mailing list: docs@lists.yoctoproject.org meta-poky, meta-yocto-bsp: Git repository: http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto(-bsp) Mailing list: poky@lists.yoctoproject.org Everything else should be sent to the OpenEmbedded Core mailing list. If in doubt, check the oe-core git repository for the content you intend to modify. Before sending, be sure the patches apply cleanly to the current oe-core git repository. Git repository: http://git.openembedded.org/openembedded-core/ Mailing list: openembedded-core@lists.openembedded.org Note: The scripts directory should be treated with extra care as it is a mix of oe-core and poky-specific files from meta-poky.