summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch')
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch70
1 files changed, 0 insertions, 70 deletions
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
deleted file mode 100644
index ddd955354d..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1From 6653c28f0b76aad86e26c512b03efcec6d9d9e95 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 3 Jan 2018 17:02:01 +0200
4Subject: [PATCH] giscanner: add a --lib-dirs-envvar option
5
6By default LD_LIBRARY_PATH is set to the list of target library paths;
7this breaks down in cross-compilation environment, as we need to run a
8native emulation wrapper rather than the target binary itself. This patch
9allows exporting those paths to a different environment variable
10which can be picked up and used by the wrapper.
11
12Upstream-Status: Pending
13Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14
15---
16 giscanner/ccompiler.py | 4 ++--
17 giscanner/dumper.py | 3 ++-
18 giscanner/scannermain.py | 3 +++
19 3 files changed, 7 insertions(+), 3 deletions(-)
20
21diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
22index 32c9296..3fb262b 100644
23--- a/giscanner/ccompiler.py
24+++ b/giscanner/ccompiler.py
25@@ -174,7 +174,7 @@ class CCompiler(object):
26
27 self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations"
28
29- def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths):
30+ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar):
31 # An "internal" link is where the library to be introspected
32 # is being built in the current directory.
33
34@@ -184,7 +184,7 @@ class CCompiler(object):
35 if os.name == 'nt':
36 runtime_path_envvar = ['LIB', 'PATH']
37 else:
38- runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH']
39+ runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar]
40 # Search the current directory first
41 # (This flag is not supported nor needed for Visual C++)
42 args.append('-L.')
43diff --git a/giscanner/dumper.py b/giscanner/dumper.py
44index 2b851a5..10a7c39 100644
45--- a/giscanner/dumper.py
46+++ b/giscanner/dumper.py
47@@ -244,7 +244,8 @@ class DumpCompiler(object):
48 libtool,
49 self._options.libraries,
50 self._options.extra_libraries,
51- self._options.library_paths)
52+ self._options.library_paths,
53+ self._options.lib_dirs_envvar)
54 args.extend(pkg_config_libs)
55
56 else:
57diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
58index 9013562..9c9fe12 100644
59--- a/giscanner/scannermain.py
60+++ b/giscanner/scannermain.py
61@@ -126,6 +126,9 @@ def _get_option_parser():
62 parser.add_option("", "--use-ldd-wrapper",
63 action="store", dest="ldd_wrapper", default=None,
64 help="wrapper to use instead of ldd (useful when cross-compiling)")
65+ parser.add_option("", "--lib-dirs-envvar",
66+ action="store", dest="lib_dirs_envvar", default=None,
67+ help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH")
68 parser.add_option("", "--program-arg",
69 action="append", dest="program_args", default=[],
70 help="extra arguments to program")