diff options
| -rw-r--r-- | meta-oe/recipes-devtools/meson/meson/native_bindir.patch | 52 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/meson/meson_0.37.1.bb | 5 |
2 files changed, 56 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/meson/meson/native_bindir.patch b/meta-oe/recipes-devtools/meson/meson/native_bindir.patch new file mode 100644 index 0000000000..53eeff7b68 --- /dev/null +++ b/meta-oe/recipes-devtools/meson/meson/native_bindir.patch | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py | ||
| 2 | index da73a57b7ecd..22100f69c580 100644 | ||
| 3 | --- a/mesonbuild/dependencies.py | ||
| 4 | +++ b/mesonbuild/dependencies.py | ||
| 5 | @@ -65,7 +65,7 @@ class Dependency(): | ||
| 6 | def need_threads(self): | ||
| 7 | return False | ||
| 8 | |||
| 9 | - def get_pkgconfig_variable(self, variable_name): | ||
| 10 | + def get_pkgconfig_variable(self, variable_name, use_native=False): | ||
| 11 | raise MesonException('Tried to get a pkg-config variable from a non-pkgconfig dependency.') | ||
| 12 | |||
| 13 | class InternalDependency(Dependency): | ||
| 14 | @@ -177,8 +177,12 @@ class PkgConfigDependency(Dependency): | ||
| 15 | return s.format(self.__class__.__name__, self.name, self.is_found, | ||
| 16 | self.version_reqs) | ||
| 17 | |||
| 18 | - def _call_pkgbin(self, args): | ||
| 19 | - p, out = Popen_safe([self.pkgbin] + args, env=os.environ)[0:2] | ||
| 20 | + def _call_pkgbin(self, args, use_native=False): | ||
| 21 | + if use_native: | ||
| 22 | + pkgbin = [self.pkgbin + "-native"] | ||
| 23 | + else: | ||
| 24 | + pkgbin = [self.pkgbin] | ||
| 25 | + p, out = Popen_safe(pkgbin + args, env=os.environ)[0:2] | ||
| 26 | return (p.returncode, out.strip()) | ||
| 27 | |||
| 28 | def _set_cargs(self): | ||
| 29 | @@ -212,8 +216,8 @@ class PkgConfigDependency(Dependency): | ||
| 30 | self.is_libtool = True | ||
| 31 | self.libs.append(lib) | ||
| 32 | |||
| 33 | - def get_pkgconfig_variable(self, variable_name): | ||
| 34 | - ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name]) | ||
| 35 | + def get_pkgconfig_variable(self, variable_name, use_native=False): | ||
| 36 | + ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name], use_native=use_native) | ||
| 37 | variable = '' | ||
| 38 | if ret != 0: | ||
| 39 | if self.required: | ||
| 40 | @@ -933,10 +937,10 @@ class QtBaseDependency(Dependency): | ||
| 41 | corekwargs = {'required': 'false', 'silent': 'true'} | ||
| 42 | core = PkgConfigDependency(self.qtpkgname + 'Core', env, corekwargs) | ||
| 43 | # Used by self.compilers_detect() | ||
| 44 | - self.bindir = core.get_pkgconfig_variable('host_bins') | ||
| 45 | + self.bindir = core.get_pkgconfig_variable('host_bins', use_native=True) | ||
| 46 | if not self.bindir: | ||
| 47 | # If exec_prefix is not defined, the pkg-config file is broken | ||
| 48 | - prefix = core.get_pkgconfig_variable('exec_prefix') | ||
| 49 | + prefix = core.get_pkgconfig_variable('exec_prefix', use_native=True) | ||
| 50 | if prefix: | ||
| 51 | self.bindir = os.path.join(prefix, 'bin') | ||
| 52 | |||
diff --git a/meta-oe/recipes-devtools/meson/meson_0.37.1.bb b/meta-oe/recipes-devtools/meson/meson_0.37.1.bb index a83af77b3a..dbbea64476 100644 --- a/meta-oe/recipes-devtools/meson/meson_0.37.1.bb +++ b/meta-oe/recipes-devtools/meson/meson_0.37.1.bb | |||
| @@ -4,7 +4,10 @@ SUMMARY = "A high performance build system" | |||
| 4 | LICENSE = "Apache-2.0" | 4 | LICENSE = "Apache-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" |
| 6 | 6 | ||
| 7 | SRC_URI = "git://github.com/mesonbuild/meson.git" | 7 | SRC_URI = " \ |
| 8 | git://github.com/mesonbuild/meson.git \ | ||
| 9 | file://native_bindir.patch \ | ||
| 10 | " | ||
| 8 | 11 | ||
| 9 | SRCREV = "3d4bfdcb22314ea7db45a5b075f8b2a9c1498aab" | 12 | SRCREV = "3d4bfdcb22314ea7db45a5b075f8b2a9c1498aab" |
| 10 | 13 | ||
