diff options
-rw-r--r-- | meta/recipes-devtools/vala/vala.inc | 34 | ||||
-rw-r--r-- | meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch | 38 | ||||
-rw-r--r-- | meta/recipes-devtools/vala/vala_0.30.1.bb | 4 |
3 files changed, 75 insertions, 1 deletions
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc index 43f9bb3c3c..2a8875f011 100644 --- a/meta/recipes-devtools/vala/vala.inc +++ b/meta/recipes-devtools/vala/vala.inc | |||
@@ -3,6 +3,9 @@ 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." | 3 | Vala compiles to plain C and has no runtime environment nor penalities whatsoever." |
4 | SECTION = "devel" | 4 | SECTION = "devel" |
5 | DEPENDS = "bison-native flex-native libxslt-native glib-2.0" | 5 | DEPENDS = "bison-native flex-native libxslt-native glib-2.0" |
6 | |||
7 | # vala-native contains a native version of vapigen, which we use instead of the target one | ||
8 | DEPENDS_append_class-target = " vala-native" | ||
6 | BBCLASSEXTEND = "native" | 9 | BBCLASSEXTEND = "native" |
7 | HOMEPAGE = "http://vala-project.org" | 10 | HOMEPAGE = "http://vala-project.org" |
8 | LICENSE = "LGPLv2.1" | 11 | LICENSE = "LGPLv2.1" |
@@ -15,3 +18,34 @@ inherit autotools pkgconfig upstream-version-is-even | |||
15 | 18 | ||
16 | FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/" | 19 | FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/" |
17 | FILES_${PN}-doc += "${datadir}/devhelp" | 20 | FILES_${PN}-doc += "${datadir}/devhelp" |
21 | |||
22 | do_configure_prepend_class-target() { | ||
23 | # Write out a vapigen wrapper that will be provided by pkg-config file installed in target sysroot | ||
24 | # The wrapper will call a native vapigen | ||
25 | cat > ${B}/vapigen-wrapper << EOF | ||
26 | #!/bin/sh | ||
27 | vapigen-${SHRT_VER} "\$@" | ||
28 | EOF | ||
29 | chmod +x ${B}/vapigen-wrapper | ||
30 | } | ||
31 | |||
32 | # Vapigen wrapper needs to be available system-wide, because it will be used | ||
33 | # to build vapi files from all other packages with vala support | ||
34 | do_install_append_class-target() { | ||
35 | install -d ${D}${bindir}/ | ||
36 | install ${B}/vapigen-wrapper ${D}${bindir}/ | ||
37 | } | ||
38 | |||
39 | |||
40 | SYSROOT_PREPROCESS_FUNCS_append_class-target += "vapigen_sysroot_preprocess" | ||
41 | |||
42 | vapigen_sysroot_preprocess() { | ||
43 | # Put vapigen wrapper into target sysroot so that it can be used when building vapi files. | ||
44 | sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} | ||
45 | |||
46 | # Also, tweak the vapigen name in vapigen pkgconfig file, so that it picks up our | ||
47 | # wrapper. | ||
48 | sed -i \ | ||
49 | -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \ | ||
50 | ${SYSROOT_DESTDIR}${datadir}/pkgconfig/vapigen-${SHRT_VER}.pc | ||
51 | } | ||
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 new file mode 100644 index 0000000000..ecab0fc1c9 --- /dev/null +++ b/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From dbb1c58e86f2af4613f3ac9571d9b163d4bca675 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 23 Oct 2015 16:13:54 +0300 | ||
4 | Subject: [PATCH] vapigen.m4: use $PKG_CONFIG_SYSROOT_DIR | ||
5 | |||
6 | This is necessary in cross-compiling environments, where directories | ||
7 | returned by pkg-config should be prefixed with sysroot location. | ||
8 | |||
9 | Upstream-Status: Pending [review in oe-core list] | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | vapigen/vapigen.m4 | 8 ++++---- | ||
13 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/vapigen/vapigen.m4 b/vapigen/vapigen.m4 | ||
16 | index 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 | -- | ||
37 | 2.1.4 | ||
38 | |||
diff --git a/meta/recipes-devtools/vala/vala_0.30.1.bb b/meta/recipes-devtools/vala/vala_0.30.1.bb index 4452298fec..6394afcc10 100644 --- a/meta/recipes-devtools/vala/vala_0.30.1.bb +++ b/meta/recipes-devtools/vala/vala_0.30.1.bb | |||
@@ -1,6 +1,8 @@ | |||
1 | require ${BPN}.inc | 1 | require ${BPN}.inc |
2 | 2 | ||
3 | SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch" | 3 | SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \ |
4 | file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \ | ||
5 | " | ||
4 | 6 | ||
5 | SRC_URI[md5sum] = "cc2eb2384fc10038b643753d734a5a51" | 7 | SRC_URI[md5sum] = "cc2eb2384fc10038b643753d734a5a51" |
6 | SRC_URI[sha256sum] = "23add78e5c6a5e6df019d4a885c9c79814c9e0b957519ec8a4f4d826c4e5df2c" | 8 | SRC_URI[sha256sum] = "23add78e5c6a5e6df019d4a885c9c79814c9e0b957519ec8a4f4d826c4e5df2c" |