blob: b22faad7805404f2577a56a26cb4bb2b31e0e685 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "C#-like programming language for easing GObject programming"
2DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \
3Vala compiles to plain C and has no runtime environment nor penalities whatsoever."
4SECTION = "devel"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005DEPENDS = "bison-native flex-native glib-2.0"
6
7# Appending libxslt-native to dependencies has an effect
8# of rebuilding the manual, which is very slow. Let's do this
9# only when api-documentation distro feature is enabled.
10DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050011
12# vala-native contains a native version of vapigen, which we use instead of the target one
13DEPENDS_append_class-target = " vala-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014BBCLASSEXTEND = "native"
15HOMEPAGE = "http://vala-project.org"
16LICENSE = "LGPLv2.1"
17LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
18
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
21SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050022inherit autotools pkgconfig upstream-version-is-even
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023
24FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/"
25FILES_${PN}-doc += "${datadir}/devhelp"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050026
27do_configure_prepend_class-target() {
28 # Write out a vapigen wrapper that will be provided by pkg-config file installed in target sysroot
29 # The wrapper will call a native vapigen
30 cat > ${B}/vapigen-wrapper << EOF
31#!/bin/sh
32vapigen-${SHRT_VER} "\$@"
33EOF
34 chmod +x ${B}/vapigen-wrapper
35}
36
Brad Bishop316dfdd2018-06-25 12:45:53 -040037EXTRA_OECONF += " --disable-graphviz"
38
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050039# Vapigen wrapper needs to be available system-wide, because it will be used
40# to build vapi files from all other packages with vala support
41do_install_append_class-target() {
42 install -d ${D}${bindir}/
43 install ${B}/vapigen-wrapper ${D}${bindir}/
44}
45
Patrick Williamsc0f7c042017-02-23 20:41:17 -060046# Put vapigen wrapper into target sysroot so that it can be used when building
47# vapi files.
48SYSROOT_DIRS_append_class-target = " ${bindir}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050049
Patrick Williamsc0f7c042017-02-23 20:41:17 -060050SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050051vapigen_sysroot_preprocess() {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060052 # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks
53 # up our wrapper.
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050054 sed -i \
55 -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050056 ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050057}