summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-10-11 13:58:02 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-11 22:16:11 +0100
commit9304fccd31cadf0c41720f832ad4fe43972a6f70 (patch)
tree16d7f93ed5c520857ab570f30ff23cf68df52c33
parent4a7eb4b92f32c17abd1111246b1acb9ad3daa355 (diff)
downloadpoky-9304fccd31cadf0c41720f832ad4fe43972a6f70.tar.gz
vte: Build without vala by default
vala.bbclass DEPENDS on vala and vala-native: Drop the inherit so that these dependencies can be added on-demand based on vte PACKAGECONFIG. Add relevant items from vala class into the recipe. Add copy of vapigen.m4 so building without vala actually succeeds. Make building without vala the default PACKAGECONFIG. Fixes [YOCTO #10386]. (From OE-Core rev: 516b5c407e19029c09b870d460f64b7133f742b4) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch119
-rw-r--r--meta/recipes-support/vte/vte_0.44.2.bb25
2 files changed, 139 insertions, 5 deletions
diff --git a/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch b/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch
new file mode 100644
index 0000000000..1c5630ed9c
--- /dev/null
+++ b/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch
@@ -0,0 +1,119 @@
1From 08ca1c48b25c332b75bba2a6b5d757da006e955b Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Fri, 7 Oct 2016 16:27:57 +0300
4Subject: [PATCH] Add m4/vapigen.m4
5
6Building without vala will fail if we don't have a vapigen.m4.
7
8Upstream-Status: Pending
9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
10---
11 m4/vapigen.m4 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12 1 file changed, 96 insertions(+)
13 create mode 100644 m4/vapigen.m4
14
15diff --git a/m4/vapigen.m4 b/m4/vapigen.m4
16new file mode 100644
17index 0000000..f2df12f
18--- /dev/null
19+++ b/m4/vapigen.m4
20@@ -0,0 +1,96 @@
21+dnl vapigen.m4
22+dnl
23+dnl Copyright 2012 Evan Nemerson
24+dnl
25+dnl This library is free software; you can redistribute it and/or
26+dnl modify it under the terms of the GNU Lesser General Public
27+dnl License as published by the Free Software Foundation; either
28+dnl version 2.1 of the License, or (at your option) any later version.
29+dnl
30+dnl This library is distributed in the hope that it will be useful,
31+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
32+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
33+dnl Lesser General Public License for more details.
34+dnl
35+dnl You should have received a copy of the GNU Lesser General Public
36+dnl License along with this library; if not, write to the Free Software
37+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
38+
39+# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT])
40+# --------------------------------------
41+# Check vapigen existence and version
42+#
43+# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
44+AC_DEFUN([VAPIGEN_CHECK],
45+[
46+ AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0])
47+ AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0])
48+
49+ AC_ARG_ENABLE([vala],
50+ [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
51+ AS_IF([test "x$4" = "x"], [
52+ enable_vala=auto
53+ ], [
54+ enable_vala=$4
55+ ])
56+ ])
57+
58+ AS_CASE([$enable_vala], [no], [enable_vala=no],
59+ [yes], [
60+ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
61+ AC_MSG_ERROR([Vala bindings require GObject Introspection])
62+ ])
63+ ], [auto], [
64+ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
65+ enable_vala=no
66+ ])
67+ ], [
68+ AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
69+ ])
70+
71+ AS_IF([test "x$2" = "x"], [
72+ vapigen_pkg_name=vapigen
73+ ], [
74+ vapigen_pkg_name=vapigen-$2
75+ ])
76+ AS_IF([test "x$1" = "x"], [
77+ vapigen_pkg="$vapigen_pkg_name"
78+ ], [
79+ vapigen_pkg="$vapigen_pkg_name >= $1"
80+ ])
81+
82+ PKG_PROG_PKG_CONFIG
83+
84+ PKG_CHECK_EXISTS([$vapigen_pkg], [
85+ AS_IF([test "$enable_vala" = "auto"], [
86+ enable_vala=yes
87+ ])
88+ ], [
89+ AS_CASE([$enable_vala], [yes], [
90+ AC_MSG_ERROR([$vapigen_pkg not found])
91+ ], [auto], [
92+ enable_vala=no
93+ ])
94+ ])
95+
96+ AC_MSG_CHECKING([for vala])
97+
98+ AS_CASE([$enable_vala],
99+ [yes], [
100+ VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen`
101+ VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen
102+ AS_IF([test "x$2" = "x"], [
103+ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen`
104+ ], [
105+ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen`
106+ ])
107+ ])
108+
109+ AC_MSG_RESULT([$enable_vala])
110+
111+ AC_SUBST([VAPIGEN])
112+ AC_SUBST([VAPIGEN_VAPIDIR])
113+ AC_SUBST([VAPIGEN_MAKEFILE])
114+
115+ AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
116+])
117--
1182.1.4
119
diff --git a/meta/recipes-support/vte/vte_0.44.2.bb b/meta/recipes-support/vte/vte_0.44.2.bb
index a1204a3c3b..a0b671e05b 100644
--- a/meta/recipes-support/vte/vte_0.44.2.bb
+++ b/meta/recipes-support/vte/vte_0.44.2.bb
@@ -5,24 +5,39 @@ DEPENDS = "glib-2.0 gtk+3 intltool-native"
5 5
6LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" 6LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
7 7
8inherit gnomebase gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection 8inherit gnomebase gtk-doc distro_features_check upstream-version-is-even gobject-introspection
9 9
10SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch" 10# vapigen.m4 is required when vala is not present (but the one from vala should be used normally)
11SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch \
12 ${@bb.utils.contains('PACKAGECONFIG', 'vala', '', 'file://0001-Add-m4-vapigen.m4.patch', d) } \
13 "
11SRC_URI[archive.md5sum] = "eca8f8a9d9f9bb8e9d592d0acfeec015" 14SRC_URI[archive.md5sum] = "eca8f8a9d9f9bb8e9d592d0acfeec015"
12SRC_URI[archive.sha256sum] = "a1ea594814bb136a3a9a6c7656b46240571f6a198825c1111007fe99194b0949" 15SRC_URI[archive.sha256sum] = "a1ea594814bb136a3a9a6c7656b46240571f6a198825c1111007fe99194b0949"
13 16
14ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" 17ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
15 18
19# Instead of "inherit vala" we do the relevant settings here so we can
20# set DEPENDS based on PACKAGECONFIG.
21
22# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
23export STAGING_DATADIR
24# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files
25export XDG_DATA_DIRS = "${STAGING_DATADIR}"
26
27# Package additional files
28FILES_${PN}-dev += "${datadir}/vala/vapi/*"
29
30PACKAGECONFIG ??= ""
31PACKAGECONFIG[vala] = "--enable-vala,--disable-vala,vala-native vala"
16PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" 32PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
17 33
18CFLAGS += "-D_GNU_SOURCE" 34CFLAGS += "-D_GNU_SOURCE"
19 35
20# Enable vala only if gobject-introspection is enabled 36EXTRA_OECONF = "--disable-test-application"
21EXTRA_OECONF = "--enable-vala=auto --disable-test-application"
22 37
23# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds. 38# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds.
24# Use libtool-cross (which has a hack to prevent that) instead. 39# Use libtool-cross (which has a hack to prevent that) instead.
25EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" 40EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
26 41
27PACKAGES =+ "libvte" 42PACKAGES =+ "libvte"
28FILES_libvte = "${libdir}/*.so.*" 43FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*"