diff options
Diffstat (limited to 'patches/gobject-introspection-1.46.0/0003-configure.ac-add-host-gi-and-gi-cross-wrapper-option.patch')
-rw-r--r-- | patches/gobject-introspection-1.46.0/0003-configure.ac-add-host-gi-and-gi-cross-wrapper-option.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/patches/gobject-introspection-1.46.0/0003-configure.ac-add-host-gi-and-gi-cross-wrapper-option.patch b/patches/gobject-introspection-1.46.0/0003-configure.ac-add-host-gi-and-gi-cross-wrapper-option.patch new file mode 100644 index 000000000..ae340338f --- /dev/null +++ b/patches/gobject-introspection-1.46.0/0003-configure.ac-add-host-gi-and-gi-cross-wrapper-option.patch @@ -0,0 +1,76 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Mon, 28 Dec 2015 11:42:16 +0100 +Subject: [PATCH] configure.ac: add host-gi and gi-cross-wrapper options + +Based on a patch from Alexander Kanavin <alex.kanavin@gmail.com> + +Note: Not for upstream. It depends on PTXdist modifying the configure script. + +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +--- + common.mk | 12 +++++++++++- + configure.ac | 14 ++++++++++++++ + 2 files changed, 25 insertions(+), 1 deletion(-) + +diff --git a/common.mk b/common.mk +index e26c6377838a..2a6774cc2156 100644 +--- a/common.mk ++++ b/common.mk +@@ -6,6 +6,15 @@ + # module itself. + # + ++if USE_HOST_GI ++INTROSPECTION_SCANNER = \ ++ env PATH="$(PATH)" \ ++ LPATH=.libs \ ++ CC="$(CC)" \ ++ PYTHONPATH=$(top_builddir):$(top_srcdir) \ ++ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ ++ g-ir-scanner ++else + INTROSPECTION_SCANNER = \ + env PATH=".libs:$(PATH)" \ + LPATH=.libs \ +@@ -14,6 +23,7 @@ INTROSPECTION_SCANNER = \ + UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \ + UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ + $(top_builddir)/g-ir-scanner ++endif + + INTROSPECTION_SCANNER_ARGS = \ + --verbose \ +@@ -26,7 +36,7 @@ INTROSPECTION_SCANNER_ARGS = \ + + INTROSPECTION_COMPILER = \ + env PATH=".libs:$(PATH)" \ +- $(top_builddir)/g-ir-compiler$(EXEEXT) ++ $(GI_CROSS_WRAPPER) $(top_builddir)/g-ir-compiler$(EXEEXT) + + INTROSPECTION_COMPILER_ARGS = \ + --includedir=$(srcdir) \ +diff --git a/configure.ac b/configure.ac +index b11596be573c..a7b78715cdf3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -250,6 +250,20 @@ AC_FUNC_STRTOD + AC_CHECK_FUNCS([memchr strchr strspn strstr strtol strtoull]) + AC_CHECK_FUNCS([backtrace backtrace_symbols]) + ++AC_ARG_ENABLE([gi-cross-wrapper], ++[AS_HELP_STRING([--enable-gi-cross-wrapper=path],[Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)])], ++[GI_CROSS_WRAPPER="${enableval}"], [GI_CROSS_WRAPPER=]) ++AC_SUBST(GI_CROSS_WRAPPER) ++ ++AC_ARG_ENABLE([host-gi], ++[AS_HELP_STRING([--enable-host-gi],[Use gobject introspection tools installed in the host system (useful when cross-compiling)])], ++[case "${enableval}" in ++ yes) host_gi=true ;; ++ no) host_gi=false ;; ++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-host-gi]) ;; ++esac],[host_gi=false]) ++AM_CONDITIONAL([USE_HOST_GI], [test x$host_gi = xtrue]) ++ + # Python + AM_PATH_PYTHON([2.7]) + case "$host" in |