2013-12-21 22:51:12 +00:00
|
|
|
SUMMARY = "C#-like programming language for easing GObject programming"
|
2013-08-26 11:49:26 +00:00
|
|
|
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"
|
2013-11-08 12:07:57 +00:00
|
|
|
DEPENDS = "bison-native flex-native libxslt-native glib-2.0"
|
2016-03-09 15:01:53 +00:00
|
|
|
|
|
|
|
# vala-native contains a native version of vapigen, which we use instead of the target one
|
|
|
|
DEPENDS_append_class-target = " vala-native"
|
2013-08-26 11:49:26 +00:00
|
|
|
BBCLASSEXTEND = "native"
|
|
|
|
HOMEPAGE = "http://vala-project.org"
|
|
|
|
LICENSE = "LGPLv2.1"
|
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
|
|
|
|
|
2016-09-12 08:32:07 +00:00
|
|
|
SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
|
2013-08-26 11:49:26 +00:00
|
|
|
|
|
|
|
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
|
2015-11-11 14:32:16 +00:00
|
|
|
inherit autotools pkgconfig upstream-version-is-even
|
2013-08-26 11:49:26 +00:00
|
|
|
|
2014-10-27 23:21:53 +00:00
|
|
|
FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/"
|
2013-08-26 11:49:26 +00:00
|
|
|
FILES_${PN}-doc += "${datadir}/devhelp"
|
2016-03-09 15:01:53 +00:00
|
|
|
|
|
|
|
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}/
|
|
|
|
}
|
|
|
|
|
2016-05-12 08:37:57 +00:00
|
|
|
# Put vapigen wrapper into target sysroot so that it can be used when building
|
|
|
|
# vapi files.
|
|
|
|
SYSROOT_DIRS_append_class-target = " ${bindir}"
|
2016-03-09 15:01:53 +00:00
|
|
|
|
2016-05-12 08:37:57 +00:00
|
|
|
SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess"
|
2016-03-09 15:01:53 +00:00
|
|
|
vapigen_sysroot_preprocess() {
|
2016-05-12 08:37:57 +00:00
|
|
|
# Tweak the vapigen name in the vapigen pkgconfig file, so that it picks
|
|
|
|
# up our wrapper.
|
2016-03-09 15:01:53 +00:00
|
|
|
sed -i \
|
|
|
|
-e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \
|
2016-10-18 15:22:33 +00:00
|
|
|
${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc
|
2016-03-09 15:01:53 +00:00
|
|
|
}
|