1SUMMARY = "C#-like programming language for easing GObject programming" 2HOMEPAGE = "http://vala-project.org" 3DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \ 4Vala compiles to plain C and has no runtime environment nor penalities whatsoever." 5SECTION = "devel" 6DEPENDS = "bison-native flex-native glib-2.0" 7 8# Appending libxslt-native to dependencies has an effect 9# of rebuilding the manual, which is very slow. Let's do this 10# only when api-documentation distro feature is enabled. 11DEPENDS:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}" 12 13# vala-native contains a native version of vapigen, which we use instead of the target one 14DEPENDS:append:class-target = " vala-native" 15BBCLASSEXTEND = "native" 16LICENSE = "LGPL-2.1-only" 17LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" 18 19SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" 20 21SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz" 22inherit autotools pkgconfig upstream-version-is-even 23 24FILES:${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/" 25FILES:${PN}-doc += "${datadir}/devhelp" 26 27# .gir files from gobject-introspection are installed to ${libdir} when multilib is enabled 28GIRDIR_OPT = "${@'--girdir=${STAGING_LIBDIR}/gir-1.0' if d.getVar('MULTILIBS') else ''}" 29 30do_configure:prepend:class-target() { 31 # Write out a vapigen wrapper that will be provided by pkg-config file installed in target sysroot 32 # The wrapper will call a native vapigen 33 cat > ${B}/vapigen-wrapper << EOF 34#!/bin/sh 35vapigen-${SHRT_VER} ${GIRDIR_OPT} "\$@" 36EOF 37 chmod +x ${B}/vapigen-wrapper 38} 39 40EXTRA_OECONF += " --disable-valadoc" 41 42# Vapigen wrapper needs to be available system-wide, because it will be used 43# to build vapi files from all other packages with vala support 44do_install:append:class-target() { 45 install -d ${D}${bindir_crossscripts}/ 46 install ${B}/vapigen-wrapper ${D}${bindir_crossscripts}/ 47} 48 49# Put vapigen wrapper into target sysroot so that it can be used when building 50# vapi files. 51SYSROOT_DIRS += "${bindir_crossscripts}" 52 53inherit multilib_script 54MULTILIB_SCRIPTS = "${PN}:${bindir}/vala-gen-introspect-0.56" 55 56SYSROOT_PREPROCESS_FUNCS:append:class-target = " vapigen_sysroot_preprocess" 57vapigen_sysroot_preprocess() { 58 # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks 59 # up our wrapper. 60 sed -i \ 61 -e "s|vapigen=.*|vapigen=${bindir_crossscripts}/vapigen-wrapper|" \ 62 ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc 63} 64 65SSTATE_SCAN_FILES += "vapigen-wrapper" 66 67PACKAGE_PREPROCESS_FUNCS += "vala_package_preprocess" 68 69vala_package_preprocess () { 70 rm -rf ${PKGD}${bindir_crossscripts} 71} 72