summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2020-05-22 15:00:22 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-24 23:56:03 +0100
commit99da3b238f2db1c5de86946ed54aa473670bedbb (patch)
tree12a3bca05a1547f55c46c95374312c552508ef13 /meta/recipes-gnome
parent8f123a53013a52a1935b50156955b1aae6776268 (diff)
downloadpoky-99da3b238f2db1c5de86946ed54aa473670bedbb.tar.gz
libsecret: add meson option introspection
Add meson option 'introspection' for libsecret. For bsp which doesn't support qemu usermode, it could disable gobject introspection build. Then remove distro feature check for 'gobject-introspection-data' too. (From OE-Core rev: 019dd3afb8b49dc268bd7fb122a236b730ed67db) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome')
-rw-r--r--meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch137
-rw-r--r--meta/recipes-gnome/libsecret/libsecret_0.20.3.bb8
2 files changed, 140 insertions, 5 deletions
diff --git a/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch b/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch
new file mode 100644
index 0000000000..51ee66f42b
--- /dev/null
+++ b/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch
@@ -0,0 +1,137 @@
1meson: add option introspection
2
3Add an option 'introspection' for meson which could control whether
4build GIR files or not.
5
6Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/53]
7
8Signed-off-by: Kai Kang <kai.kang@windriver.com>
9---
10 libsecret/meson.build | 86 ++++++++++++++++++++++---------------------
11 meson.build | 1 +
12 meson_options.txt | 1 +
13 3 files changed, 46 insertions(+), 42 deletions(-)
14
15diff --git a/libsecret/meson.build b/libsecret/meson.build
16index 759b5ef..2ee8850 100644
17--- a/libsecret/meson.build
18+++ b/libsecret/meson.build
19@@ -104,50 +104,52 @@ libsecret_dep = declare_dependency(
20 )
21
22 # GObject Introspection
23-libsecret_gir_sources = [
24- 'secret-attributes.c',
25- 'secret-attributes.h',
26- 'secret-backend.c',
27- 'secret-backend.h',
28- 'secret-collection.c',
29- 'secret-collection.h',
30- 'secret-item.c',
31- 'secret-item.h',
32- 'secret-methods.c',
33- 'secret-password.c',
34- 'secret-password.h',
35- 'secret-paths.c',
36- 'secret-paths.h',
37- 'secret-prompt.c',
38- 'secret-prompt.h',
39- 'secret-retrievable.c',
40- 'secret-retrievable.h',
41- 'secret-schema.c',
42- 'secret-schema.h',
43- 'secret-schemas.c',
44- 'secret-schemas.h',
45- 'secret-service.c',
46- 'secret-service.h',
47- 'secret-types.h',
48- 'secret-value.c',
49- 'secret-value.h',
50-]
51-libsecret_gir_sources += version_h
52-libsecret_gir_sources += _enums_generated
53-
54-libsecret_gir = gnome.generate_gir(libsecret,
55- sources: libsecret_gir_sources,
56- namespace: 'Secret',
57- nsversion: api_version_major,
58- export_packages: 'libsecret-@0@'.format(api_version_major),
59- includes: [ 'GObject-2.0', 'Gio-2.0' ],
60- header: 'libsecret/secret.h',
61- extra_args: [ '-D SECRET_COMPILATION'],
62- install: true,
63-)
64+if with_gir
65+ libsecret_gir_sources = [
66+ 'secret-attributes.c',
67+ 'secret-attributes.h',
68+ 'secret-backend.c',
69+ 'secret-backend.h',
70+ 'secret-collection.c',
71+ 'secret-collection.h',
72+ 'secret-item.c',
73+ 'secret-item.h',
74+ 'secret-methods.c',
75+ 'secret-password.c',
76+ 'secret-password.h',
77+ 'secret-paths.c',
78+ 'secret-paths.h',
79+ 'secret-prompt.c',
80+ 'secret-prompt.h',
81+ 'secret-retrievable.c',
82+ 'secret-retrievable.h',
83+ 'secret-schema.c',
84+ 'secret-schema.h',
85+ 'secret-schemas.c',
86+ 'secret-schemas.h',
87+ 'secret-service.c',
88+ 'secret-service.h',
89+ 'secret-types.h',
90+ 'secret-value.c',
91+ 'secret-value.h',
92+ ]
93+ libsecret_gir_sources += version_h
94+ libsecret_gir_sources += _enums_generated
95+
96+ libsecret_gir = gnome.generate_gir(libsecret,
97+ sources: libsecret_gir_sources,
98+ namespace: 'Secret',
99+ nsversion: api_version_major,
100+ export_packages: 'libsecret-@0@'.format(api_version_major),
101+ includes: [ 'GObject-2.0', 'Gio-2.0' ],
102+ header: 'libsecret/secret.h',
103+ extra_args: [ '-D SECRET_COMPILATION'],
104+ install: true,
105+ )
106+endif
107
108 # Vapi
109-if with_vapi
110+if with_vapi and with_gir
111 libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
112 sources: libsecret_gir[0],
113 metadata_dirs: meson.source_root() / 'libsecret',
114diff --git a/meson.build b/meson.build
115index a26d046..d22e008 100644
116--- a/meson.build
117+++ b/meson.build
118@@ -22,6 +22,7 @@ with_gcrypt = get_option('gcrypt')
119 enable_debug = get_option('debugging')
120 with_vapi = get_option('vapi')
121 with_gtkdoc = get_option('gtk_doc')
122+with_gir = get_option('introspection')
123
124 # Some variables
125 config_h_dir = include_directories('.')
126diff --git a/meson_options.txt b/meson_options.txt
127index c1fda5d..445aeb0 100644
128--- a/meson_options.txt
129+++ b/meson_options.txt
130@@ -3,3 +3,4 @@ option('gcrypt', type: 'boolean', value: true, description: 'With gcrypt and tra
131 option('debugging', type: 'boolean', value: false, description: 'Turn debugging on/off')
132 option('vapi', type: 'boolean', value: true, description: 'Create VAPI file.')
133 option('gtk_doc', type: 'boolean', value: true, description: 'Build reference documentation using gtk-doc')
134+option('introspection', type: 'boolean', value: true, description: 'Create GIR file.')
135--
1362.17.1
137
diff --git a/meta/recipes-gnome/libsecret/libsecret_0.20.3.bb b/meta/recipes-gnome/libsecret/libsecret_0.20.3.bb
index 8d317c8efc..533015a1e4 100644
--- a/meta/recipes-gnome/libsecret/libsecret_0.20.3.bb
+++ b/meta/recipes-gnome/libsecret/libsecret_0.20.3.bb
@@ -9,19 +9,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
9 9
10GNOMEBASEBUILDCLASS = "meson" 10GNOMEBASEBUILDCLASS = "meson"
11 11
12inherit gnomebase gtk-doc vala gobject-introspection manpages features_check 12inherit gnomebase gtk-doc vala gobject-introspection manpages
13 13
14DEPENDS += "glib-2.0 libgcrypt gettext-native" 14DEPENDS += "glib-2.0 libgcrypt gettext-native"
15 15
16SRC_URI += "file://0001-meson-add-option-introspection.patch"
17
16SRC_URI[archive.md5sum] = "47c3fdfeb111a87b509ad271e4a6f496" 18SRC_URI[archive.md5sum] = "47c3fdfeb111a87b509ad271e4a6f496"
17SRC_URI[archive.sha256sum] = "4fcb3c56f8ac4ab9c75b66901fb0104ec7f22aa9a012315a14c0d6dffa5290e4" 19SRC_URI[archive.sha256sum] = "4fcb3c56f8ac4ab9c75b66901fb0104ec7f22aa9a012315a14c0d6dffa5290e4"
18 20
19GTKDOC_MESON_OPTION = 'gtk_doc' 21GTKDOC_MESON_OPTION = 'gtk_doc'
20 22
21# gobject-introspection is mandatory and cannot be configured
22REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
23UNKNOWN_CONFIGURE_WHITELIST_append = " introspection"
24
25PACKAGECONFIG[manpages] = "-Dmanpage=true,-Dmanpage=false,libxslt-native xmlto-native" 23PACKAGECONFIG[manpages] = "-Dmanpage=true,-Dmanpage=false,libxslt-native xmlto-native"
26 24
27# http://errors.yoctoproject.org/Errors/Details/20228/ 25# http://errors.yoctoproject.org/Errors/Details/20228/