summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/vala
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/vala')
-rw-r--r--meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch38
-rw-r--r--meta/recipes-devtools/vala/vala_0.50.3.bb5
-rw-r--r--meta/recipes-devtools/vala/vala_0.56.17.bb (renamed from meta/recipes-devtools/vala/vala.inc)37
3 files changed, 24 insertions, 56 deletions
diff --git a/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch b/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch
deleted file mode 100644
index ecab0fc1c9..0000000000
--- a/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From dbb1c58e86f2af4613f3ac9571d9b163d4bca675 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 23 Oct 2015 16:13:54 +0300
4Subject: [PATCH] vapigen.m4: use $PKG_CONFIG_SYSROOT_DIR
5
6This is necessary in cross-compiling environments, where directories
7returned by pkg-config should be prefixed with sysroot location.
8
9Upstream-Status: Pending [review in oe-core list]
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12 vapigen/vapigen.m4 | 8 ++++----
13 1 file changed, 4 insertions(+), 4 deletions(-)
14
15diff --git a/vapigen/vapigen.m4 b/vapigen/vapigen.m4
16index 2c435e7..6228991 100644
17--- a/vapigen/vapigen.m4
18+++ b/vapigen/vapigen.m4
19@@ -82,12 +82,12 @@ AC_DEFUN([VAPIGEN_CHECK],
20
21 AS_CASE([$enable_vala],
22 [yes], [
23- VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
24- VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
25+ VAPIGEN=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
26+ VAPIGEN_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
27 AS_IF([test "x$2" = "x"], [
28- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
29+ VAPIGEN_VAPIDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
30 ], [
31- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
32+ VAPIGEN_VAPIDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
33 ])
34 ])
35
36--
372.1.4
38
diff --git a/meta/recipes-devtools/vala/vala_0.50.3.bb b/meta/recipes-devtools/vala/vala_0.50.3.bb
deleted file mode 100644
index 302f562549..0000000000
--- a/meta/recipes-devtools/vala/vala_0.50.3.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1require ${BPN}.inc
2
3SRC_URI += " file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch"
4
5SRC_URI[sha256sum] = "6165c1b42beca4856e2fb9a31c5e81949d76fa670e2f0cfc8389ce9b95eca5db"
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala_0.56.17.bb
index 71da2ef07c..acd6c43096 100644
--- a/meta/recipes-devtools/vala/vala.inc
+++ b/meta/recipes-devtools/vala/vala_0.56.17.bb
@@ -3,31 +3,33 @@ HOMEPAGE = "http://vala-project.org"
3DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \ 3DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \
4Vala compiles to plain C and has no runtime environment nor penalities whatsoever." 4Vala compiles to plain C and has no runtime environment nor penalities whatsoever."
5SECTION = "devel" 5SECTION = "devel"
6DEPENDS = "bison-native flex-native glib-2.0" 6DEPENDS = "bison-native flex-native glib-2.0 gobject-introspection"
7 7
8# Appending libxslt-native to dependencies has an effect 8# Appending libxslt-native to dependencies has an effect
9# of rebuilding the manual, which is very slow. Let's do this 9# of rebuilding the manual, which is very slow. Let's do this
10# only when api-documentation distro feature is enabled. 10# only when api-documentation distro feature is enabled.
11DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}" 11DEPENDS:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}"
12 12
13# vala-native contains a native version of vapigen, which we use instead of the target one 13# vala-native contains a native version of vapigen, which we use instead of the target one
14DEPENDS_append_class-target = " vala-native" 14DEPENDS:append:class-target = " vala-native"
15BBCLASSEXTEND = "native" 15BBCLASSEXTEND = "native"
16LICENSE = "LGPLv2.1" 16LICENSE = "LGPL-2.1-only"
17LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" 17LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
18 18
19SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" 19SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
20 20
21SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz" 21SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
22SRC_URI[sha256sum] = "26100c4e4ef0049c619275f140d97cf565883d00c7543c82bcce5a426934ed6a"
23
22inherit autotools pkgconfig upstream-version-is-even 24inherit autotools pkgconfig upstream-version-is-even
23 25
24FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/" 26FILES:${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/"
25FILES_${PN}-doc += "${datadir}/devhelp" 27FILES:${PN}-doc += "${datadir}/devhelp"
26 28
27# .gir files from gobject-introspection are installed to ${libdir} when multilib is enabled 29# .gir files from gobject-introspection are installed to ${libdir} when multilib is enabled
28GIRDIR_OPT = "${@'--girdir=${STAGING_LIBDIR}/gir-1.0' if d.getVar('MULTILIBS') else ''}" 30GIRDIR_OPT = "${@'--girdir=${STAGING_LIBDIR}/gir-1.0' if d.getVar('MULTILIBS') else ''}"
29 31
30do_configure_prepend_class-target() { 32do_configure:prepend:class-target() {
31 # Write out a vapigen wrapper that will be provided by pkg-config file installed in target sysroot 33 # 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 34 # The wrapper will call a native vapigen
33 cat > ${B}/vapigen-wrapper << EOF 35 cat > ${B}/vapigen-wrapper << EOF
@@ -41,22 +43,31 @@ EXTRA_OECONF += " --disable-valadoc"
41 43
42# Vapigen wrapper needs to be available system-wide, because it will be used 44# 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 45# to build vapi files from all other packages with vala support
44do_install_append_class-target() { 46do_install:append:class-target() {
45 install -d ${D}${bindir}/ 47 install -d ${D}${bindir_crossscripts}/
46 install ${B}/vapigen-wrapper ${D}${bindir}/ 48 install ${B}/vapigen-wrapper ${D}${bindir_crossscripts}/
47} 49}
48 50
49# Put vapigen wrapper into target sysroot so that it can be used when building 51# Put vapigen wrapper into target sysroot so that it can be used when building
50# vapi files. 52# vapi files.
51SYSROOT_DIRS_append_class-target = " ${bindir}" 53SYSROOT_DIRS += "${bindir_crossscripts}"
54
55inherit multilib_script
56MULTILIB_SCRIPTS = "${PN}:${bindir}/vala-gen-introspect-0.56"
52 57
53SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess" 58SYSROOT_PREPROCESS_FUNCS:append:class-target = " vapigen_sysroot_preprocess"
54vapigen_sysroot_preprocess() { 59vapigen_sysroot_preprocess() {
55 # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks 60 # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks
56 # up our wrapper. 61 # up our wrapper.
57 sed -i \ 62 sed -i \
58 -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \ 63 -e "s|vapigen=.*|vapigen=${bindir_crossscripts}/vapigen-wrapper|" \
59 ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc 64 ${SYSROOT_DESTDIR}${libdir}/pkgconfig/vapigen-${SHRT_VER}.pc
60} 65}
61 66
62SSTATE_SCAN_FILES += "vapigen-wrapper" 67SSTATE_SCAN_FILES += "vapigen-wrapper"
68
69PACKAGE_PREPROCESS_FUNCS += "vala_package_preprocess"
70
71vala_package_preprocess () {
72 rm -rf ${PKGD}${bindir_crossscripts}
73}