Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "C#-like programming language for easing GObject programming" |
| 2 | DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \ |
| 3 | Vala compiles to plain C and has no runtime environment nor penalities whatsoever." |
| 4 | SECTION = "devel" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 5 | DEPENDS = "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. |
| 10 | DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 11 | |
| 12 | # vala-native contains a native version of vapigen, which we use instead of the target one |
| 13 | DEPENDS_append_class-target = " vala-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | BBCLASSEXTEND = "native" |
| 15 | HOMEPAGE = "http://vala-project.org" |
| 16 | LICENSE = "LGPLv2.1" |
| 17 | LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" |
| 18 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 19 | SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | |
| 21 | SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 22 | inherit autotools pkgconfig upstream-version-is-even |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | |
| 24 | FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/" |
| 25 | FILES_${PN}-doc += "${datadir}/devhelp" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 26 | |
| 27 | do_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 |
| 32 | vapigen-${SHRT_VER} "\$@" |
| 33 | EOF |
| 34 | chmod +x ${B}/vapigen-wrapper |
| 35 | } |
| 36 | |
| 37 | # Vapigen wrapper needs to be available system-wide, because it will be used |
| 38 | # to build vapi files from all other packages with vala support |
| 39 | do_install_append_class-target() { |
| 40 | install -d ${D}${bindir}/ |
| 41 | install ${B}/vapigen-wrapper ${D}${bindir}/ |
| 42 | } |
| 43 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 44 | # Put vapigen wrapper into target sysroot so that it can be used when building |
| 45 | # vapi files. |
| 46 | SYSROOT_DIRS_append_class-target = " ${bindir}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 47 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 48 | SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 49 | vapigen_sysroot_preprocess() { |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 50 | # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks |
| 51 | # up our wrapper. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 52 | sed -i \ |
| 53 | -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 54 | ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 55 | } |