summaryrefslogtreecommitdiffstats
path: root/patches/gobject-introspection-1.46.0/0004-avoid-Python2-dependency.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/gobject-introspection-1.46.0/0004-avoid-Python2-dependency.patch')
-rw-r--r--patches/gobject-introspection-1.46.0/0004-avoid-Python2-dependency.patch93
1 files changed, 93 insertions, 0 deletions
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