diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 22:31:25 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 19:43:26 +0300 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/classes/sip.bbclass | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.xz |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/classes/sip.bbclass')
-rw-r--r-- | import-layers/yocto-poky/meta/classes/sip.bbclass | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/classes/sip.bbclass b/import-layers/yocto-poky/meta/classes/sip.bbclass new file mode 100644 index 000000000..6ed2a13bd --- /dev/null +++ b/import-layers/yocto-poky/meta/classes/sip.bbclass @@ -0,0 +1,61 @@ +# Build Class for Sip based Python Bindings +# (C) Michael 'Mickey' Lauer <mickey@Vanille.de> +# +STAGING_SIPDIR ?= "${STAGING_DATADIR_NATIVE}/sip" + +DEPENDS =+ "sip-native" +RDEPENDS_${PN} += "python-sip" + +# default stuff, do not uncomment +# EXTRA_SIPTAGS = "-tWS_X11 -tQt_4_3_0" + +# do_generate is before do_configure so ensure that sip_native is populated in sysroot before executing it +do_generate[depends] += "sip-native:do_populate_sysroot" + +sip_do_generate() { + if [ -z "${SIP_MODULES}" ]; then + MODULES="`ls sip/*mod.sip`" + else + MODULES="${SIP_MODULES}" + fi + + if [ -z "$MODULES" ]; then + die "SIP_MODULES not set and no modules found in $PWD" + else + bbnote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'" + fi + + if [ -z "${EXTRA_SIPTAGS}" ]; then + die "EXTRA_SIPTAGS needs to be set!" + else + SIPTAGS="${EXTRA_SIPTAGS}" + fi + + if [ ! -z "${SIP_FEATURES}" ]; then + FEATURES="-z ${SIP_FEATURES}" + bbnote "sip feature file: ${SIP_FEATURES}" + fi + + for module in $MODULES + do + install -d ${module}/ + echo "calling 'sip4 -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'" + sip4 -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf \ + sip/${module}/${module}mod.sip || die "Error calling sip on ${module}" + sed -e 's,target,TARGET,' -e 's,sources,SOURCES,' -e 's,headers,HEADERS,' \ + ${module}/${module}.sbf | sed s,"moc_HEADERS =","HEADERS +=", \ + >${module}/${module}.pro + echo "TEMPLATE=lib" >>${module}/${module}.pro + [ "${module}" = "qt" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qtcanvas" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qttable" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qwt" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qtpe" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qtpe" ] && echo "LIBS+=-lqpe" >>${module}/${module}.pro + true + done +} + +EXPORT_FUNCTIONS do_generate + +addtask generate after do_unpack do_patch before do_configure |