diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
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/recipes-devtools/vala/vala.inc')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc new file mode 100644 index 000000000..2a8875f01 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc @@ -0,0 +1,51 @@ +SUMMARY = "C#-like programming language for easing GObject programming" +DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \ +Vala compiles to plain C and has no runtime environment nor penalities whatsoever." +SECTION = "devel" +DEPENDS = "bison-native flex-native libxslt-native glib-2.0" + +# vala-native contains a native version of vapigen, which we use instead of the target one +DEPENDS_append_class-target = " vala-native" +BBCLASSEXTEND = "native" +HOMEPAGE = "http://vala-project.org" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" + +SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}" + +SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz" +inherit autotools pkgconfig upstream-version-is-even + +FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/" +FILES_${PN}-doc += "${datadir}/devhelp" + +do_configure_prepend_class-target() { + # Write out a vapigen wrapper that will be provided by pkg-config file installed in target sysroot + # The wrapper will call a native vapigen + cat > ${B}/vapigen-wrapper << EOF +#!/bin/sh +vapigen-${SHRT_VER} "\$@" +EOF + chmod +x ${B}/vapigen-wrapper +} + +# Vapigen wrapper needs to be available system-wide, because it will be used +# to build vapi files from all other packages with vala support +do_install_append_class-target() { + install -d ${D}${bindir}/ + install ${B}/vapigen-wrapper ${D}${bindir}/ +} + + +SYSROOT_PREPROCESS_FUNCS_append_class-target += "vapigen_sysroot_preprocess" + +vapigen_sysroot_preprocess() { + # Put vapigen wrapper into target sysroot so that it can be used when building vapi files. + sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} + + # Also, tweak the vapigen name in vapigen pkgconfig file, so that it picks up our + # wrapper. + sed -i \ + -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \ + ${SYSROOT_DESTDIR}${datadir}/pkgconfig/vapigen-${SHRT_VER}.pc +} |