diff options
Diffstat (limited to 'meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch')
-rw-r--r-- | meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch new file mode 100644 index 0000000000..48a0c85f02 --- /dev/null +++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch | |||
@@ -0,0 +1,203 @@ | |||
1 | From b1503fe2693d602b3e24e4b832dc0934960d5d22 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Mon, 19 Oct 2015 18:29:21 +0300 | ||
4 | Subject: [PATCH 2/5] configure.ac: add host-gi, gi-cross-wrapper, | ||
5 | gi-ldd-wrapper and introspection-data options | ||
6 | |||
7 | With the first option, gobject-introspection tools (g-ir-doc-tool and g-ir-scanner) | ||
8 | that are already installed in the host system will be used for building the source tree. | ||
9 | |||
10 | With the second option, g-ir-scanner will be instructed to use an executable | ||
11 | wrapper to run binaries it's producing, and g-ir-compiler will be run | ||
12 | through the same wrapper (host system's g-ir-compiler cannot be used because | ||
13 | it's producing architecture-specific output). | ||
14 | |||
15 | With the third option, giscanner will be instructed to use a special ldd | ||
16 | command instead of system's ldd (which does not work when the binary to inspect | ||
17 | is compiled for a different architecture). | ||
18 | |||
19 | With the fourth option, it is possible to disable building of introspection data | ||
20 | (.gir and .typelib files), which may be difficult or impossible in cross-compilation | ||
21 | environments, because of lack of emulation (or native hardware) for the target architecture | ||
22 | on which the target binaries can be run. | ||
23 | |||
24 | These options are useful when cross-compiling for a different target architecture. | ||
25 | |||
26 | Upstream-Status: Pending [review on oe-core list] | ||
27 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
28 | --- | ||
29 | Makefile.am | 2 ++ | ||
30 | common.mk | 39 +++++++++++++++++++++++++++++++++++++++ | ||
31 | configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++ | ||
32 | tests/Makefile.am | 5 ++++- | ||
33 | 4 files changed, 87 insertions(+), 1 deletion(-) | ||
34 | |||
35 | diff --git a/Makefile.am b/Makefile.am | ||
36 | index b080a89..ce8d29b 100644 | ||
37 | --- a/Makefile.am | ||
38 | +++ b/Makefile.am | ||
39 | @@ -21,7 +21,9 @@ include Makefile-cmph.am | ||
40 | include Makefile-girepository.am | ||
41 | include Makefile-giscanner.am | ||
42 | include Makefile-examples.am | ||
43 | +if BUILD_INTROSPECTION_DATA | ||
44 | include Makefile-gir.am | ||
45 | +endif | ||
46 | include Makefile-tools.am | ||
47 | include Makefile-msvcproj.am | ||
48 | |||
49 | diff --git a/common.mk b/common.mk | ||
50 | index e26c637..9f3a65f 100644 | ||
51 | --- a/common.mk | ||
52 | +++ b/common.mk | ||
53 | @@ -6,6 +6,15 @@ | ||
54 | # module itself. | ||
55 | # | ||
56 | |||
57 | +if USE_HOST_GI | ||
58 | +INTROSPECTION_SCANNER = \ | ||
59 | + env PATH="$(PATH)" \ | ||
60 | + LPATH=.libs \ | ||
61 | + CC="$(CC)" \ | ||
62 | + PYTHONPATH=$(top_builddir):$(top_srcdir) \ | ||
63 | + UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ | ||
64 | + g-ir-scanner | ||
65 | +else | ||
66 | INTROSPECTION_SCANNER = \ | ||
67 | env PATH=".libs:$(PATH)" \ | ||
68 | LPATH=.libs \ | ||
69 | @@ -14,9 +23,24 @@ INTROSPECTION_SCANNER = \ | ||
70 | UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \ | ||
71 | UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ | ||
72 | $(top_builddir)/g-ir-scanner | ||
73 | +endif | ||
74 | + | ||
75 | +if USE_CROSS_WRAPPER | ||
76 | +CROSS_WRAPPER_ARG = --use-binary-wrapper=$(GI_CROSS_WRAPPER) | ||
77 | +else | ||
78 | +CROSS_WRAPPER_ARG = | ||
79 | +endif | ||
80 | + | ||
81 | +if USE_LDD_WRAPPER | ||
82 | +LDD_WRAPPER_ARG = --use-ldd-wrapper=$(GI_LDD_WRAPPER) | ||
83 | +else | ||
84 | +LDD_WRAPPER_ARG = | ||
85 | +endif | ||
86 | |||
87 | INTROSPECTION_SCANNER_ARGS = \ | ||
88 | --verbose \ | ||
89 | + $(CROSS_WRAPPER_ARG) \ | ||
90 | + $(LDD_WRAPPER_ARG) \ | ||
91 | -I$(top_srcdir) \ | ||
92 | --add-include-path=$(srcdir) \ | ||
93 | --add-include-path=$(top_srcdir)/gir \ | ||
94 | @@ -24,9 +48,15 @@ INTROSPECTION_SCANNER_ARGS = \ | ||
95 | --add-include-path=$(top_builddir) \ | ||
96 | --add-include-path=$(top_builddir)/gir | ||
97 | |||
98 | +if USE_CROSS_WRAPPER | ||
99 | +INTROSPECTION_COMPILER = \ | ||
100 | + env PATH=".libs:$(PATH)" \ | ||
101 | + $(GI_CROSS_WRAPPER) $(top_builddir)/.libs/g-ir-compiler$(EXEEXT) | ||
102 | +else | ||
103 | INTROSPECTION_COMPILER = \ | ||
104 | env PATH=".libs:$(PATH)" \ | ||
105 | $(top_builddir)/g-ir-compiler$(EXEEXT) | ||
106 | +endif | ||
107 | |||
108 | INTROSPECTION_COMPILER_ARGS = \ | ||
109 | --includedir=$(srcdir) \ | ||
110 | @@ -35,6 +65,14 @@ INTROSPECTION_COMPILER_ARGS = \ | ||
111 | --includedir=$(top_builddir) \ | ||
112 | --includedir=$(top_builddir)/gir | ||
113 | |||
114 | +if USE_HOST_GI | ||
115 | +INTROSPECTION_DOCTOOL = \ | ||
116 | + env PATH="$(PATH)" \ | ||
117 | + LPATH=.libs \ | ||
118 | + PYTHONPATH=$(top_builddir):$(top_srcdir) \ | ||
119 | + UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ | ||
120 | + g-ir-doc-tool | ||
121 | +else | ||
122 | INTROSPECTION_DOCTOOL = \ | ||
123 | env PATH=".libs:$(PATH)" \ | ||
124 | LPATH=.libs \ | ||
125 | @@ -42,6 +80,7 @@ INTROSPECTION_DOCTOOL = \ | ||
126 | UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \ | ||
127 | UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ | ||
128 | $(top_builddir)/g-ir-doc-tool | ||
129 | +endif | ||
130 | |||
131 | INTROSPECTION_DOCTOOL_ARGS = \ | ||
132 | --add-include-path=$(srcdir) \ | ||
133 | diff --git a/configure.ac b/configure.ac | ||
134 | index 6c91fa5..21340a5 100644 | ||
135 | --- a/configure.ac | ||
136 | +++ b/configure.ac | ||
137 | @@ -360,6 +360,48 @@ fi | ||
138 | |||
139 | AC_SUBST(EXTRA_LINK_FLAGS) | ||
140 | |||
141 | +AC_ARG_ENABLE([host-gi], | ||
142 | +[AS_HELP_STRING([--enable-host-gi],[Use gobject introspection tools installed in the host system (useful when cross-compiling)])], | ||
143 | +[case "${enableval}" in | ||
144 | + yes) host_gi=true ;; | ||
145 | + no) host_gi=false ;; | ||
146 | + *) AC_MSG_ERROR([bad value ${enableval} for --enable-host-gi]) ;; | ||
147 | +esac],[host_gi=false]) | ||
148 | +AM_CONDITIONAL([USE_HOST_GI], [test x$host_gi = xtrue]) | ||
149 | + | ||
150 | +AC_ARG_ENABLE([gi-cross-wrapper], | ||
151 | +[AS_HELP_STRING([--enable-gi-cross-wrapper=path],[Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)])], | ||
152 | +[ | ||
153 | +GI_CROSS_WRAPPER="${enableval}" | ||
154 | +use_wrapper=true | ||
155 | +],[ | ||
156 | +GI_CROSS_WRAPPER="" | ||
157 | +use_wrapper=false | ||
158 | +]) | ||
159 | +AC_SUBST(GI_CROSS_WRAPPER) | ||
160 | +AM_CONDITIONAL([USE_CROSS_WRAPPER], [test x$use_wrapper = xtrue]) | ||
161 | + | ||
162 | +AC_ARG_ENABLE([gi-ldd-wrapper], | ||
163 | +[AS_HELP_STRING([--enable-gi-ldd-wrapper=path],[Use a ldd wrapper instead of system's ldd command in giscanner (useful when cross-compiling)])], | ||
164 | +[ | ||
165 | +GI_LDD_WRAPPER="${enableval}" | ||
166 | +use_ldd_wrapper=true | ||
167 | +],[ | ||
168 | +GI_LDD_WRAPPER="" | ||
169 | +use_ldd_wrapper=false | ||
170 | +]) | ||
171 | +AC_SUBST(GI_LDD_WRAPPER) | ||
172 | +AM_CONDITIONAL([USE_LDD_WRAPPER], [test x$use_ldd_wrapper = xtrue]) | ||
173 | + | ||
174 | +AC_ARG_ENABLE([introspection-data], | ||
175 | +[AS_HELP_STRING([--enable-introspection-data],[Build introspection data (.gir and .typelib files) in addition to library and tools])], | ||
176 | +[case "${enableval}" in | ||
177 | + yes) introspection_data=true ;; | ||
178 | + no) introspection_data=false ;; | ||
179 | + *) AC_MSG_ERROR([bad value ${enableval} for --enable-introspection-data]) ;; | ||
180 | +esac],[introspection_data=true]) | ||
181 | +AM_CONDITIONAL([BUILD_INTROSPECTION_DATA], [test x$introspection_data = xtrue]) | ||
182 | + | ||
183 | AC_CONFIG_FILES([ | ||
184 | Makefile | ||
185 | tests/Makefile | ||
186 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
187 | index bdd0fa7..75dd3c9 100644 | ||
188 | --- a/tests/Makefile.am | ||
189 | +++ b/tests/Makefile.am | ||
190 | @@ -1,6 +1,9 @@ | ||
191 | include $(top_srcdir)/common.mk | ||
192 | |||
193 | -SUBDIRS = . scanner repository offsets warn | ||
194 | +SUBDIRS = . scanner repository warn | ||
195 | +if BUILD_INTROSPECTION_DATA | ||
196 | +SUBDIRS += offsets | ||
197 | +endif | ||
198 | |||
199 | EXTRA_DIST= | ||
200 | BUILT_SOURCES= | ||
201 | -- | ||
202 | 2.7.0 | ||
203 | |||