diff options
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/vala/vala.inc | 71 | ||||
| -rw-r--r-- | meta/recipes-devtools/vala/vala_0.56.15.bb | 72 |
2 files changed, 71 insertions, 72 deletions
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc deleted file mode 100644 index 0177e86240..0000000000 --- a/meta/recipes-devtools/vala/vala.inc +++ /dev/null | |||
| @@ -1,71 +0,0 @@ | |||
| 1 | SUMMARY = "C#-like programming language for easing GObject programming" | ||
| 2 | HOMEPAGE = "http://vala-project.org" | ||
| 3 | DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \ | ||
| 4 | Vala compiles to plain C and has no runtime environment nor penalities whatsoever." | ||
| 5 | SECTION = "devel" | ||
| 6 | DEPENDS = "bison-native flex-native glib-2.0 gobject-introspection" | ||
| 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. | ||
| 11 | DEPENDS: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 | ||
| 14 | DEPENDS:append:class-target = " vala-native" | ||
| 15 | BBCLASSEXTEND = "native" | ||
| 16 | LICENSE = "LGPL-2.1-only" | ||
| 17 | LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" | ||
| 18 | |||
| 19 | SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" | ||
| 20 | |||
| 21 | SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz" | ||
| 22 | inherit autotools pkgconfig upstream-version-is-even | ||
| 23 | |||
| 24 | FILES:${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/" | ||
| 25 | FILES:${PN}-doc += "${datadir}/devhelp" | ||
| 26 | |||
| 27 | # .gir files from gobject-introspection are installed to ${libdir} when multilib is enabled | ||
| 28 | GIRDIR_OPT = "${@'--girdir=${STAGING_LIBDIR}/gir-1.0' if d.getVar('MULTILIBS') else ''}" | ||
| 29 | |||
| 30 | do_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 | ||
| 35 | vapigen-${SHRT_VER} ${GIRDIR_OPT} "\$@" | ||
| 36 | EOF | ||
| 37 | chmod +x ${B}/vapigen-wrapper | ||
| 38 | } | ||
| 39 | |||
| 40 | EXTRA_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 | ||
| 44 | do_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. | ||
| 51 | SYSROOT_DIRS += "${bindir_crossscripts}" | ||
| 52 | |||
| 53 | inherit multilib_script | ||
| 54 | MULTILIB_SCRIPTS = "${PN}:${bindir}/vala-gen-introspect-0.56" | ||
| 55 | |||
| 56 | SYSROOT_PREPROCESS_FUNCS:append:class-target = " vapigen_sysroot_preprocess" | ||
| 57 | vapigen_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 | |||
| 65 | SSTATE_SCAN_FILES += "vapigen-wrapper" | ||
| 66 | |||
| 67 | PACKAGE_PREPROCESS_FUNCS += "vala_package_preprocess" | ||
| 68 | |||
| 69 | vala_package_preprocess () { | ||
| 70 | rm -rf ${PKGD}${bindir_crossscripts} | ||
| 71 | } | ||
diff --git a/meta/recipes-devtools/vala/vala_0.56.15.bb b/meta/recipes-devtools/vala/vala_0.56.15.bb index dc483b12ba..a8fdd0a97a 100644 --- a/meta/recipes-devtools/vala/vala_0.56.15.bb +++ b/meta/recipes-devtools/vala/vala_0.56.15.bb | |||
| @@ -1,3 +1,73 @@ | |||
| 1 | require ${BPN}.inc | 1 | SUMMARY = "C#-like programming language for easing GObject programming" |
| 2 | HOMEPAGE = "http://vala-project.org" | ||
| 3 | DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \ | ||
| 4 | Vala compiles to plain C and has no runtime environment nor penalities whatsoever." | ||
| 5 | SECTION = "devel" | ||
| 6 | DEPENDS = "bison-native flex-native glib-2.0 gobject-introspection" | ||
| 2 | 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. | ||
| 11 | DEPENDS: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 | ||
| 14 | DEPENDS:append:class-target = " vala-native" | ||
| 15 | BBCLASSEXTEND = "native" | ||
| 16 | LICENSE = "LGPL-2.1-only" | ||
| 17 | LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" | ||
| 18 | |||
| 19 | SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" | ||
| 20 | |||
| 21 | SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz" | ||
| 3 | SRC_URI[sha256sum] = "535b6452ed310fd5fb5c7dd6794b6213dac3b48e645e5bff3173741ec2cb3f2b" | 22 | SRC_URI[sha256sum] = "535b6452ed310fd5fb5c7dd6794b6213dac3b48e645e5bff3173741ec2cb3f2b" |
| 23 | |||
| 24 | inherit autotools pkgconfig upstream-version-is-even | ||
| 25 | |||
| 26 | FILES:${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/" | ||
| 27 | FILES:${PN}-doc += "${datadir}/devhelp" | ||
| 28 | |||
| 29 | # .gir files from gobject-introspection are installed to ${libdir} when multilib is enabled | ||
| 30 | GIRDIR_OPT = "${@'--girdir=${STAGING_LIBDIR}/gir-1.0' if d.getVar('MULTILIBS') else ''}" | ||
| 31 | |||
| 32 | do_configure:prepend:class-target() { | ||
| 33 | # Write out a vapigen wrapper that will be provided by pkg-config file installed in target sysroot | ||
| 34 | # The wrapper will call a native vapigen | ||
| 35 | cat > ${B}/vapigen-wrapper << EOF | ||
| 36 | #!/bin/sh | ||
| 37 | vapigen-${SHRT_VER} ${GIRDIR_OPT} "\$@" | ||
| 38 | EOF | ||
| 39 | chmod +x ${B}/vapigen-wrapper | ||
| 40 | } | ||
| 41 | |||
| 42 | EXTRA_OECONF += " --disable-valadoc" | ||
| 43 | |||
| 44 | # Vapigen wrapper needs to be available system-wide, because it will be used | ||
| 45 | # to build vapi files from all other packages with vala support | ||
| 46 | do_install:append:class-target() { | ||
| 47 | install -d ${D}${bindir_crossscripts}/ | ||
| 48 | install ${B}/vapigen-wrapper ${D}${bindir_crossscripts}/ | ||
| 49 | } | ||
| 50 | |||
| 51 | # Put vapigen wrapper into target sysroot so that it can be used when building | ||
| 52 | # vapi files. | ||
| 53 | SYSROOT_DIRS += "${bindir_crossscripts}" | ||
| 54 | |||
| 55 | inherit multilib_script | ||
| 56 | MULTILIB_SCRIPTS = "${PN}:${bindir}/vala-gen-introspect-0.56" | ||
| 57 | |||
| 58 | SYSROOT_PREPROCESS_FUNCS:append:class-target = " vapigen_sysroot_preprocess" | ||
| 59 | vapigen_sysroot_preprocess() { | ||
| 60 | # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks | ||
| 61 | # up our wrapper. | ||
| 62 | sed -i \ | ||
| 63 | -e "s|vapigen=.*|vapigen=${bindir_crossscripts}/vapigen-wrapper|" \ | ||
| 64 | ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc | ||
| 65 | } | ||
| 66 | |||
| 67 | SSTATE_SCAN_FILES += "vapigen-wrapper" | ||
| 68 | |||
| 69 | PACKAGE_PREPROCESS_FUNCS += "vala_package_preprocess" | ||
| 70 | |||
| 71 | vala_package_preprocess () { | ||
| 72 | rm -rf ${PKGD}${bindir_crossscripts} | ||
| 73 | } | ||
