summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/meson/meson/cross-libdir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/meson/meson/cross-libdir.patch')
-rw-r--r--meta/recipes-devtools/meson/meson/cross-libdir.patch18
1 files changed, 6 insertions, 12 deletions
diff --git a/meta/recipes-devtools/meson/meson/cross-libdir.patch b/meta/recipes-devtools/meson/meson/cross-libdir.patch
index 2bd4fb3f9e..7395fdbdaa 100644
--- a/meta/recipes-devtools/meson/meson/cross-libdir.patch
+++ b/meta/recipes-devtools/meson/meson/cross-libdir.patch
@@ -7,17 +7,11 @@ Date: Thu, 27 Dec 2018 23:43:35 +0200
7Subject: [PATCH] Default libdir is "lib" when cross compiling. Closes #2535. 7Subject: [PATCH] Default libdir is "lib" when cross compiling. Closes #2535.
8 8
9--- 9---
10 docs/markdown/snippets/crosslib.md | 7 +++++++
11 mesonbuild/coredata.py | 8 ++++++++
12 run_unittests.py | 13 +++++++++++++
13 3 files changed, 28 insertions(+)
14 create mode 100644 docs/markdown/snippets/crosslib.md
15
16diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py 10diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
17index d70c23038c..4e2f3e008c 100644 11index ff810683..9ee23a69 100644
18--- a/mesonbuild/coredata.py 12--- a/mesonbuild/coredata.py
19+++ b/mesonbuild/coredata.py 13+++ b/mesonbuild/coredata.py
20@@ -299,6 +299,7 @@ def __init__(self, options): 14@@ -298,6 +298,7 @@ class CoreData:
21 # Only to print a warning if it changes between Meson invocations. 15 # Only to print a warning if it changes between Meson invocations.
22 self.pkgconf_envvar = os.environ.get('PKG_CONFIG_PATH', '') 16 self.pkgconf_envvar = os.environ.get('PKG_CONFIG_PATH', '')
23 self.config_files = self.__load_config_files(options.native_file) 17 self.config_files = self.__load_config_files(options.native_file)
@@ -25,15 +19,15 @@ index d70c23038c..4e2f3e008c 100644
25 19
26 @staticmethod 20 @staticmethod
27 def __load_config_files(filenames): 21 def __load_config_files(filenames):
28@@ -348,6 +349,13 @@ def __load_cross_file(filename): 22@@ -309,6 +310,13 @@ class CoreData:
29 23 for f in filenames]
30 raise MesonException('Cannot find specified cross file: ' + filename) 24 return filenames
31 25
32+ def libdir_cross_fixup(self): 26+ def libdir_cross_fixup(self):
33+ # By default set libdir to "lib" when cross compiling since 27+ # By default set libdir to "lib" when cross compiling since
34+ # getting the "system default" is always wrong on multiarch 28+ # getting the "system default" is always wrong on multiarch
35+ # platforms as it gets a value like lib/x86_64-linux-gnu. 29+ # platforms as it gets a value like lib/x86_64-linux-gnu.
36+ if self.cross_file is not None: 30+ if self.cross_files:
37+ self.builtins['libdir'].value = 'lib' 31+ self.builtins['libdir'].value = 'lib'
38+ 32+
39 def sanitize_prefix(self, prefix): 33 def sanitize_prefix(self, prefix):