vala.inc 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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"
  5. DEPENDS = "bison-native flex-native glib-2.0"
  6. # Appending libxslt-native to dependencies has an effect
  7. # of rebuilding the manual, which is very slow. Let's do this
  8. # only when api-documentation distro feature is enabled.
  9. DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}"
  10. # vala-native contains a native version of vapigen, which we use instead of the target one
  11. DEPENDS_append_class-target = " vala-native"
  12. BBCLASSEXTEND = "native"
  13. HOMEPAGE = "http://vala-project.org"
  14. LICENSE = "LGPLv2.1"
  15. LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
  16. SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
  17. SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
  18. inherit autotools pkgconfig upstream-version-is-even
  19. FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/"
  20. FILES_${PN}-doc += "${datadir}/devhelp"
  21. # .gir files from gobject-introspection are installed to ${libdir} when multilib is enabled
  22. GIRDIR_OPT = "${@'--girdir=${STAGING_LIBDIR}/gir-1.0' if d.getVar('MULTILIBS') else ''}"
  23. do_configure_prepend_class-target() {
  24. # Write out a vapigen wrapper that will be provided by pkg-config file installed in target sysroot
  25. # The wrapper will call a native vapigen
  26. cat > ${B}/vapigen-wrapper << EOF
  27. #!/bin/sh
  28. vapigen-${SHRT_VER} ${GIRDIR_OPT} "\$@"
  29. EOF
  30. chmod +x ${B}/vapigen-wrapper
  31. }
  32. EXTRA_OECONF += " --disable-valadoc"
  33. # Vapigen wrapper needs to be available system-wide, because it will be used
  34. # to build vapi files from all other packages with vala support
  35. do_install_append_class-target() {
  36. install -d ${D}${bindir}/
  37. install ${B}/vapigen-wrapper ${D}${bindir}/
  38. }
  39. # Put vapigen wrapper into target sysroot so that it can be used when building
  40. # vapi files.
  41. SYSROOT_DIRS_append_class-target = " ${bindir}"
  42. SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess"
  43. vapigen_sysroot_preprocess() {
  44. # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks
  45. # up our wrapper.
  46. sed -i \
  47. -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \
  48. ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc
  49. }
  50. SSTATE_SCAN_FILES += "vapigen-wrapper"