summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/gobject-introspection-1.46.0/0001-giscanner-add-use-binary-wrapper-option.patch47
-rw-r--r--patches/gobject-introspection-1.46.0/0002-giscanner-add-a-use-ldd-wrapper-option.patch43
-rw-r--r--patches/gobject-introspection-1.46.0/0003-configure.ac-add-host-gi-and-gi-cross-wrapper-option.patch76
-rw-r--r--patches/gobject-introspection-1.46.0/0004-avoid-Python2-dependency.patch93
-rw-r--r--patches/gobject-introspection-1.46.0/0005-fix-env-shebang.patch19
l---------patches/gobject-introspection-1.46.0/autogen.sh1
-rw-r--r--patches/gobject-introspection-1.46.0/series8
-rw-r--r--rules/gobject-introspection.in18
-rw-r--r--rules/gobject-introspection.make82
-rw-r--r--rules/host-gobject-introspection.in7
-rw-r--r--rules/host-gobject-introspection.make75
11 files changed, 469 insertions, 0 deletions
diff --git a/patches/gobject-introspection-1.46.0/0001-giscanner-add-use-binary-wrapper-option.patch b/patches/gobject-introspection-1.46.0/0001-giscanner-add-use-binary-wrapper-option.patch
new file mode 100644
index 000000000..320f976cd
--- /dev/null
+++ b/patches/gobject-introspection-1.46.0/0001-giscanner-add-use-binary-wrapper-option.patch
@@ -0,0 +1,47 @@
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 19 Oct 2015 18:26:40 +0300
+Subject: [PATCH] giscanner: add --use-binary-wrapper option
+
+With this option, giscanner will use a wrapper executable to run
+binaries it's producing, instead of running them directly. This
+is useful when binaries are cross-compiled and cannot be run directly,
+but they can be run using for example QEMU emulation.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ giscanner/scannermain.py | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index 89ec193775c4..2cae03764800 100755
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -118,6 +118,9 @@ def _get_option_parser():
+ parser.add_option("", "--program",
+ action="store", dest="program", default=None,
+ help="program to execute")
++ parser.add_option("", "--use-binary-wrapper",
++ action="store", dest="wrapper", default=None,
++ help="wrapper to use for running programs (useful when cross-compiling)")
+ parser.add_option("", "--program-arg",
+ action="append", dest="program_args", default=[],
+ help="extra arguments to program")
+@@ -412,6 +415,17 @@ def create_binary(transformer, options, args):
+ gdump_parser.get_error_quark_functions())
+
+ shlibs = resolve_shlibs(options, binary, options.libraries)
++ if options.wrapper:
++ # The wrapper needs the binary itself, not the libtool wrapper script,
++ # so we check if libtool has sneaked the binary into .libs subdirectory
++ # and adjust the path accordingly
++ import os.path
++ dir_name, binary_name = os.path.split(binary.args[0])
++ libtool_binary = os.path.join(dir_name, '.libs', binary_name)
++ if os.path.exists(libtool_binary):
++ binary.args[0] = libtool_binary
++ # Then prepend the wrapper to the command line to execute
++ binary.args = [options.wrapper] + binary.args
+ gdump_parser.set_introspection_binary(binary)
+ gdump_parser.parse()
+ return shlibs
diff --git a/patches/gobject-introspection-1.46.0/0002-giscanner-add-a-use-ldd-wrapper-option.patch b/patches/gobject-introspection-1.46.0/0002-giscanner-add-a-use-ldd-wrapper-option.patch
new file mode 100644
index 000000000..a5e140c97
--- /dev/null
+++ b/patches/gobject-introspection-1.46.0/0002-giscanner-add-a-use-ldd-wrapper-option.patch
@@ -0,0 +1,43 @@
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Oct 2015 16:28:46 +0200
+Subject: [PATCH] giscanner: add a --use-ldd-wrapper option
+
+This is useful in cross-compile environments where system's ldd
+command does not work on binaries built for a different architecture
+
+Upstream-Status: Pending [review in oe-core]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ giscanner/scannermain.py | 3 +++
+ giscanner/shlibs.py | 4 +++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index 2cae03764800..5afcc2895697 100755
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -121,6 +121,9 @@ def _get_option_parser():
+ parser.add_option("", "--use-binary-wrapper",
+ action="store", dest="wrapper", default=None,
+ help="wrapper to use for running programs (useful when cross-compiling)")
++ parser.add_option("", "--use-ldd-wrapper",
++ action="store", dest="ldd_wrapper", default=None,
++ help="wrapper to use instead of ldd (useful when cross-compiling)")
+ parser.add_option("", "--program-arg",
+ action="append", dest="program_args", default=[],
+ help="extra arguments to program")
+diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
+index 838d34303d90..87a59a90fcb9 100644
+--- a/giscanner/shlibs.py
++++ b/giscanner/shlibs.py
+@@ -100,7 +100,9 @@ def _resolve_non_libtool(options, binary, libraries):
+ args.extend(libtool)
+ args.append('--mode=execute')
+ platform_system = platform.system()
+- if platform_system == 'Darwin':
++ if options.ldd_wrapper:
++ args.extend([options.ldd_wrapper, binary.args[0]])
++ elif platform_system == 'Darwin':
+ args.extend(['otool', '-L', binary.args[0]])
+ else:
+ args.extend(['ldd', binary.args[0]])
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
diff --git a/patches/gobject-introspection-1.46.0/0004-avoid-Python2-dependency.patch b/patches/gobject-introspection-1.46.0/0004-avoid-Python2-dependency.patch
new file mode 100644
index 000000000..106021a51
--- /dev/null
+++ b/patches/gobject-introspection-1.46.0/0004-avoid-Python2-dependency.patch
@@ -0,0 +1,93 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Sun, 27 Dec 2015 17:15:09 +0100
+Subject: [PATCH] avoid Python2 dependency
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ Makefile-gir.am | 5 ++++-
+ Makefile-tools.am | 4 ++++
+ Makefile.am | 2 ++
+ configure.ac | 2 ++
+ 4 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile-gir.am b/Makefile-gir.am
+index 9aca664290c8..d605c8ee7ffa 100644
+--- a/Makefile-gir.am
++++ b/Makefile-gir.am
+@@ -87,7 +87,10 @@ endif
+
+ BUILT_GIRSOURCES += GLib-2.0.gir
+
+-GLib-2.0.gir: g-ir-scanner g-ir-compiler$(EXEEXT)
++if !USE_HOST_GI
++GLib-2.0.gir: g-ir-scanner
++endif
++GLib-2.0.gir: g-ir-compiler$(EXEEXT)
+
+ gir/DBusGLib-1.0.typelib: GObject-2.0.gir
+
+diff --git a/Makefile-tools.am b/Makefile-tools.am
+index dbd264c31df4..840530ee8db1 100644
+--- a/Makefile-tools.am
++++ b/Makefile-tools.am
+@@ -1,15 +1,18 @@
+ bin_PROGRAMS += g-ir-compiler g-ir-generate
++if !USE_HOST_GI
+ bin_SCRIPTS += g-ir-scanner g-ir-annotation-tool
+
+ if BUILD_DOCTOOL
+ bin_SCRIPTS += g-ir-doc-tool
+ endif
++endif
+
+ EXTRA_DIST += \
+ tools/g-ir-tool-template.in
+
+ TOOL_SUBSTITUTIONS = -e s,@libdir\@,$(libdir), -e s,@datarootdir\@,$(datarootdir), -e s,@PYTHON\@,$(PYTHON),
+
++if !USE_HOST_GI
+ g-ir-scanner: tools/g-ir-tool-template.in _giscanner.la Makefile
+ $(AM_V_GEN) sed $(TOOL_SUBSTITUTIONS) -e s,@TOOL_MODULE\@,scannermain, -e s,@TOOL_FUNCTION\@,scanner_main, $< > $@.tmp && mv $@.tmp $@
+ @chmod a+x $@
+@@ -21,6 +24,7 @@ g-ir-annotation-tool: tools/g-ir-tool-template.in _giscanner.la Makefile
+ g-ir-doc-tool: tools/g-ir-tool-template.in _giscanner.la Makefile
+ $(AM_V_GEN) sed $(TOOL_SUBSTITUTIONS) -e s,@TOOL_MODULE\@,docmain, -e s,@TOOL_FUNCTION\@,doc_main, $< > $@.tmp && mv $@.tmp $@
+ @chmod a+x $@
++endif
+
+ g_ir_compiler_SOURCES = tools/compiler.c
+ g_ir_compiler_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
+diff --git a/Makefile.am b/Makefile.am
+index 437c673ffc3c..ca76f352bfdb 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -19,7 +19,9 @@ include Makefile.introspection
+
+ include Makefile-cmph.am
+ include Makefile-girepository.am
++if !USE_HOST_GI
+ include Makefile-giscanner.am
++endif
+ include Makefile-examples.am
+ include Makefile-gir.am
+ include Makefile-tools.am
+diff --git a/configure.ac b/configure.ac
+index a7b78715cdf3..b3d2767ccf07 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -264,6 +264,7 @@ AC_ARG_ENABLE([host-gi],
+ esac],[host_gi=false])
+ AM_CONDITIONAL([USE_HOST_GI], [test x$host_gi = xtrue])
+
++AS_IF([ test x$host_gi != xtrue], [
+ # Python
+ AM_PATH_PYTHON([2.7])
+ case "$host" in
+@@ -277,6 +278,7 @@ AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))
+ if test "x$os_win32" = "xyes"; then
+ AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.]))
+ fi
++])
+
+ dnl Not enabled by default until 3.6 cycle when we can propose mako as
+ dnl an external dependency
diff --git a/patches/gobject-introspection-1.46.0/0005-fix-env-shebang.patch b/patches/gobject-introspection-1.46.0/0005-fix-env-shebang.patch
new file mode 100644
index 000000000..0ef3084c5
--- /dev/null
+++ b/patches/gobject-introspection-1.46.0/0005-fix-env-shebang.patch
@@ -0,0 +1,19 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Sun, 27 Dec 2015 18:14:25 +0100
+Subject: [PATCH] fix env shebang
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ tests/offsets/gen-gitestoffsets | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/offsets/gen-gitestoffsets b/tests/offsets/gen-gitestoffsets
+index 77351060cd5b..5bf5f562e7d2 100755
+--- a/tests/offsets/gen-gitestoffsets
++++ b/tests/offsets/gen-gitestoffsets
+@@ -1,4 +1,4 @@
+-#!/bin/env python
++#!/usr/bin/env python
+ # -*- Mode: Python -*-
+ # GObject-Introspection - a framework for introspecting GObject libraries
+ # Copyright (C) 2008 Red Hat, Inc.
diff --git a/patches/gobject-introspection-1.46.0/autogen.sh b/patches/gobject-introspection-1.46.0/autogen.sh
new file mode 120000
index 000000000..9f8a4cb7d
--- /dev/null
+++ b/patches/gobject-introspection-1.46.0/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh \ No newline at end of file
diff --git a/patches/gobject-introspection-1.46.0/series b/patches/gobject-introspection-1.46.0/series
new file mode 100644
index 000000000..aaeb47861
--- /dev/null
+++ b/patches/gobject-introspection-1.46.0/series
@@ -0,0 +1,8 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-giscanner-add-use-binary-wrapper-option.patch
+0002-giscanner-add-a-use-ldd-wrapper-option.patch
+0003-configure.ac-add-host-gi-and-gi-cross-wrapper-option.patch
+0004-avoid-Python2-dependency.patch
+0005-fix-env-shebang.patch
+# 8d3fd65c073b2de3dc240a42878cef80 - git-ptx-patches magic
diff --git a/rules/gobject-introspection.in b/rules/gobject-introspection.in
new file mode 100644
index 000000000..0c527b073
--- /dev/null
+++ b/rules/gobject-introspection.in
@@ -0,0 +1,18 @@
+## SECTION=multimedia_gtk
+
+
+config GOBJECT_INTROSPECTION_HELPER
+ tristate
+ prompt "gobject-introspection"
+ help
+ Generate interface introspection data for GObject libraries
+
+if GOBJECT_INTROSPECTION_HELPER
+
+config GOBJECT_INTROSPECTION
+ tristate
+ default GOBJECT_INTROSPECTION_HELPER
+ select HOST_GOBJECT_INTROSPECTION
+ select GLIB
+
+endif
diff --git a/rules/gobject-introspection.make b/rules/gobject-introspection.make
new file mode 100644
index 000000000..e47fb0842
--- /dev/null
+++ b/rules/gobject-introspection.make
@@ -0,0 +1,82 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GOBJECT_INTROSPECTION) += gobject-introspection
+
+#
+# Paths and names
+#
+GOBJECT_INTROSPECTION_VERSION := 1.46.0
+GOBJECT_INTROSPECTION_MD5 := adb40a31c7c80b65b0f4c8fd71b493dc
+GOBJECT_INTROSPECTION := gobject-introspection-$(GOBJECT_INTROSPECTION_VERSION)
+GOBJECT_INTROSPECTION_SUFFIX := tar.xz
+GOBJECT_INTROSPECTION_URL := http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/$(basename $(GOBJECT_INTROSPECTION_VERSION))/$(GOBJECT_INTROSPECTION).$(GOBJECT_INTROSPECTION_SUFFIX)
+GOBJECT_INTROSPECTION_SOURCE := $(SRCDIR)/$(GOBJECT_INTROSPECTION).$(GOBJECT_INTROSPECTION_SUFFIX)
+GOBJECT_INTROSPECTION_DIR := $(BUILDDIR)/$(GOBJECT_INTROSPECTION)
+GOBJECT_INTROSPECTION_LICENSE := LGPL-2.1+ AND GPL-2.0+
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+GOBJECT_INTROSPECTION_CONF_TOOL := autoconf
+GOBJECT_INTROSPECTION_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --disable-gtk-doc \
+ --disable-gtk-doc-html \
+ --disable-gtk-doc-pdf \
+ --disable-doctool \
+ --enable-host-gi \
+ --enable-gi-cross-wrapper=$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross \
+ --without-cairo
+
+# needed so g-ir-compiler runs in qemu
+GOBJECT_INTROSPECTION_LDFLAGS := -Wl,-rpath,$(GOBJECT_INTROSPECTION_DIR)/.libs
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/gobject-introspection.install.post:
+ @$(call targetinfo)
+ @$(call world/install.post, GOBJECT_INTROSPECTION)
+ @sed -i 's;bindir=.*;bindir=$(PTXDIST_SYSROOT_CROSS)/bin;' \
+ $(SYSROOT)/usr/lib/pkgconfig/gobject-introspection-1.0.pc
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/gobject-introspection.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, gobject-introspection)
+ @$(call install_fixup, gobject-introspection,PRIORITY,optional)
+ @$(call install_fixup, gobject-introspection,SECTION,base)
+ @$(call install_fixup, gobject-introspection,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
+ @$(call install_fixup, gobject-introspection,DESCRIPTION,missing)
+
+ @$(call install_lib, gobject-introspection, 0, 0, 0644, \
+ libgirepository-1.0)
+ @$(call install_tree, gobject-introspection, 0, 0, -, \
+ /usr/lib/girepository-1.0)
+
+ @$(call install_finish, gobject-introspection)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/rules/host-gobject-introspection.in b/rules/host-gobject-introspection.in
new file mode 100644
index 000000000..4661ce5f7
--- /dev/null
+++ b/rules/host-gobject-introspection.in
@@ -0,0 +1,7 @@
+## SECTION=hosttools_noprompt
+
+config HOST_GOBJECT_INTROSPECTION
+ select HOST_GLIB
+ select HOST_QEMU
+ select HOST_QEMU_USR
+ bool
diff --git a/rules/host-gobject-introspection.make b/rules/host-gobject-introspection.make
new file mode 100644
index 000000000..bfb0a1177
--- /dev/null
+++ b/rules/host-gobject-introspection.make
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_GOBJECT_INTROSPECTION) += host-gobject-introspection
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HOST_GOBJECT_INTROSPECTION_CONF_ENV := \
+ $(HOST_ENV) \
+ PYTHON=python
+
+#
+# autoconf
+#
+HOST_GOBJECT_INTROSPECTION_CONF_TOOL := autoconf
+HOST_GOBJECT_INTROSPECTION_CONF_OPT := \
+ $(HOST_AUTOCONF) \
+ --disable-gtk-doc \
+ --disable-gtk-doc-html \
+ --disable-gtk-doc-pdf \
+ --disable-doctool \
+ --disable-host-gi \
+ --without-cairo
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-gobject-introspection.install.post:
+ @$(call targetinfo)
+ @$(call world/install.post, HOST_GOBJECT_INTROSPECTION)
+ @echo '#!/bin/sh' > $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo 'export GI_SCANNER_DISABLE_CACHE=1' >> $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo 'export pkg_ldflags="$$(find $${pkg_dir} -name .libs -printf "-Wl,-rpath,%p ")$${pkg_ldflags}"' \
+ >> $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo 'export CC=$(CROSS_CC)' >> $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo 'exec "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-scanner" \
+ --use-binary-wrapper=$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross \
+ --use-ldd-wrapper=$(PTXDIST_SYSROOT_CROSS)/bin/ldd-cross \
+ "$${@}"' >> $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @chmod +x $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo -e '#!/bin/sh\n$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross $(SYSROOT)/usr/bin/g-ir-compiler --includedir $(SYSROOT)/usr/share/gir-1.0 "$${@}"' > $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-compiler
+ @chmod +x $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-compiler
+ @sed -i 's;"/share";"$(PTXDIST_SYSROOT_HOST)/share";' \
+ "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-scanner" \
+ "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-annotation-tool"
+ @sed -i 's;'/lib';'$(PTXDIST_SYSROOT_HOST)/lib';' \
+ "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-scanner" \
+ "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-annotation-tool"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-gobject-introspection.clean:
+ @$(call targetinfo)
+ @$(call clean_pkg, HOST_GOBJECT_INTROSPECTION)
+ @rm \
+ $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner \
+ $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-compiler
+
+# vim: syntax=make