diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/poky/meta/recipes-devtools/vala/vala.inc | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/poky/meta/recipes-devtools/vala/vala.inc')
-rw-r--r-- | external/poky/meta/recipes-devtools/vala/vala.inc | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-devtools/vala/vala.inc b/external/poky/meta/recipes-devtools/vala/vala.inc new file mode 100644 index 00000000..f680640c --- /dev/null +++ b/external/poky/meta/recipes-devtools/vala/vala.inc @@ -0,0 +1,62 @@ +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 glib-2.0" + +# Appending libxslt-native to dependencies has an effect +# of rebuilding the manual, which is very slow. Let's do this +# only when api-documentation distro feature is enabled. +DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}" + +# 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').split('.')[0]}.${@d.getVar('PV').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" + +# .gir files from gobject-introspection are installed to ${libdir} when multilib is enabled +GIRDIR_OPT = "${@'--girdir=${STAGING_LIBDIR}/gir-1.0' if d.getVar('MULTILIBS') else ''}" + +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} ${GIRDIR_OPT} "\$@" +EOF + chmod +x ${B}/vapigen-wrapper +} + +EXTRA_OECONF += " --disable-graphviz" + +# 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}/ +} + +# Put vapigen wrapper into target sysroot so that it can be used when building +# vapi files. +SYSROOT_DIRS_append_class-target = " ${bindir}" + +SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess" +vapigen_sysroot_preprocess() { + # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks + # up our wrapper. + sed -i \ + -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \ + ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc +} + +SSTATE_SCAN_FILES += "vapigen-wrapper" |