summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-09-09 16:03:28 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-09-21 20:46:04 +0000
commita58b2bdb41761cf635b2d4fbb43beba71c166166 (patch)
treea561c850daf22a8d2c60bac05b6772cecf314db3
parent761c50c69014f92ffb1af44f4a1e4220c04ac32e (diff)
meson.recipe: Bump to 0.55.3
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/601>
-rw-r--r--recipes/build-tools/meson.recipe12
-rw-r--r--recipes/build-tools/meson/0001-Add-UNIX-large-file-support-for-MinGW.patch32
-rw-r--r--recipes/build-tools/meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch83
-rw-r--r--recipes/build-tools/meson/0001-qt-dependency-Pick-debug-libraries-based-on-b_vscrt.patch71
-rw-r--r--recipes/build-tools/meson/0001-ui-qt-use-new-directory-layout-for-qt-on-android.patch55
5 files changed, 6 insertions, 247 deletions
diff --git a/recipes/build-tools/meson.recipe b/recipes/build-tools/meson.recipe
index c5040fd1..f5c15407 100644
--- a/recipes/build-tools/meson.recipe
+++ b/recipes/build-tools/meson.recipe
@@ -5,21 +5,15 @@ from pathlib import PurePath, Path
class Recipe(recipe.Recipe):
name = 'meson'
- version = '0.54.0'
+ version = '0.55.3'
licenses = [License.Apachev2]
btype = BuildType.CUSTOM
stype = SourceType.TARBALL
url = 'https://github.com/mesonbuild/meson/releases/download/%(version)s/meson-%(version)s.tar.gz'
- tarball_checksum = 'dde5726d778112acbd4a67bb3633ab2ee75d33d1e879a6283a7b4a44c3363c27'
+ tarball_checksum = '6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5'
patches = [
- # Remove this on bump to 0.54.1, https://github.com/mesonbuild/meson/pull/6896
- 'meson/0001-qt-dependency-Pick-debug-libraries-based-on-b_vscrt.patch',
- # https://github.com/mesonbuild/meson/pull/7138
- 'meson/0001-ui-qt-use-new-directory-layout-for-qt-on-android.patch',
- # https://github.com/mesonbuild/meson/pull/7021
+ # Remove on bump to 0.56, https://github.com/mesonbuild/meson/pull/7021
'meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch',
- # https://github.com/mesonbuild/meson/pull/7272
- 'meson/0001-Add-UNIX-large-file-support-for-MinGW.patch',
]
deps = ['ninja']
diff --git a/recipes/build-tools/meson/0001-Add-UNIX-large-file-support-for-MinGW.patch b/recipes/build-tools/meson/0001-Add-UNIX-large-file-support-for-MinGW.patch
deleted file mode 100644
index 5a5eea76..00000000
--- a/recipes/build-tools/meson/0001-Add-UNIX-large-file-support-for-MinGW.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b259e432f70c7cb86d121986d9a3a8a6143d9023 Mon Sep 17 00:00:00 2001
-From: Seungha Yang <seungha@centricular.com>
-Date: Mon, 8 Jun 2020 21:24:54 +0900
-Subject: [PATCH] Add UNIX large file support for MinGW
-
-MinGW gcc supports _FILE_OFFSET_BITS=64 and we need to set it for
-MinGW as well
----
- mesonbuild/compilers/compilers.py | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
-index 4b286fe4..50e21883 100644
---- a/mesonbuild/compilers/compilers.py
-+++ b/mesonbuild/compilers/compilers.py
-@@ -1246,10 +1246,10 @@ def get_largefile_args(compiler):
- '''
- Enable transparent large-file-support for 32-bit UNIX systems
- '''
-- if not (compiler.info.is_windows() or compiler.info.is_darwin()):
-+ if not (compiler.get_argument_syntax() == 'msvc' or compiler.info.is_darwin()):
- # Enable large-file support unconditionally on all platforms other
-- # than macOS and Windows. macOS is now 64-bit-only so it doesn't
-- # need anything special, and Windows doesn't have automatic LFS.
-+ # than macOS and MSVC. macOS is now 64-bit-only so it doesn't
-+ # need anything special, and MSVC doesn't have automatic LFS.
- # You must use the 64-bit counterparts explicitly.
- # glibc, musl, and uclibc, and all BSD libcs support this. On Android,
- # support for transparent LFS is available depending on the version of
---
-2.17.1
-
diff --git a/recipes/build-tools/meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch b/recipes/build-tools/meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch
index 4025f35f..584fc097 100644
--- a/recipes/build-tools/meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch
+++ b/recipes/build-tools/meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch
@@ -1,13 +1,12 @@
From a6aa905f2c580a34e6bb1c547b20ec6ecd4011d0 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Thu, 23 Apr 2020 08:32:15 +0530
-Subject: [PATCH 1/2] Allow cross-compile without a native compiler
+Subject: Allow cross-compile without a native compiler
---
mesonbuild/backend/ninjabackend.py | 2 +-
- mesonbuild/environment.py | 2 +-
mesonbuild/interpreter.py | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
+ 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 03ccd196..aeffc80a 100644
@@ -19,22 +18,9 @@ index 03ccd196..aeffc80a 100644
if static_linker is None:
- return
+ continue
- rule = 'STATIC_LINKER%s' % self.get_rule_suffix(for_machine)
+ rule = 'STATIC_LINKER{}'.format(self.get_rule_suffix(for_machine))
cmdlist = []
args = ['$in']
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 11bc76c9..fd375571 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -899,7 +899,7 @@ class Environment:
- def _detect_c_or_cpp_compiler(self, lang: str, for_machine: MachineChoice) -> Compiler:
- popen_exceptions = {}
- compilers, ccache, exe_wrap = self._get_compilers(lang, for_machine)
-- is_cross = not self.machines.matches_build_machine(for_machine)
-+ is_cross = not self.machines.matches_build_machine(for_machine) or self.need_exe_wrapper(for_machine)
- info = self.machines[for_machine]
-
- for compiler in compilers:
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 214b1eb5..c8473cb6 100644
--- a/mesonbuild/interpreter.py
@@ -51,66 +37,3 @@ index 214b1eb5..c8473cb6 100644
--
2.26.1.windows.1
-
-From 4efad015b9377710a15507083bb12ad2830fde80 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Thu, 23 Apr 2020 09:38:21 +0530
-Subject: [PATCH 2/2] windows linker: Only guess if we don't know target
- cpu_family
-
-Unlike `cl.exe, MSVC `link.exe` has a 'default' target machine, and
-the actual target machine can be selected with `/MACHINE:`. The
-'default' is `X86` if you use the x86 native or cross toolchain and
-it's `X64` if you use the x64 native or cross toolchain.
-
-So, if you call `vcvarsall.bat x86_arm64` which is the x86 cross
-toolchain for arm64, `link.exe` will default to `X86`, not `ARM64`.
-It has to be selected by the build system by passing `/MACHINE:ARM64`
-
-So that's what we do now. In the native build case when a native file
-is not passed, the auto-detect will always be correct, and in the
-cross build case we will always know the `cpu_family`, so this fixes
-it for all cases.
----
- mesonbuild/environment.py | 22 +++++++++++++++++-----
- 1 file changed, 17 insertions(+), 5 deletions(-)
-
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index fd375571..ca6208c9 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -804,14 +804,26 @@ class Environment:
- return OptlinkDynamicLinker(compiler, for_machine, version=search_version(o))
- elif o.startswith('Microsoft') or e.startswith('Microsoft'):
- out = o or e
-- match = re.search(r'.*(X86|X64|ARM|ARM64).*', out)
-- if match:
-- target = str(match.group(1))
-+
-+ target_arch = self.machines[for_machine].cpu_family
-+ if target_arch is None:
-+ match = re.search(r'.*(X86|X64|ARM|ARM64)\s+', out)
-+ if match:
-+ target_arch = str(match.group(1))
-+ else:
-+ target_arch = 'X86'
-+ elif target_arch in ('x86', 'arm'):
-+ target_arch = target_arch.upper()
-+ elif target_arch == 'x86_64':
-+ target_arch = 'X64'
-+ elif target_arch == 'aarch64':
-+ target_arch = 'ARM64'
- else:
-- target = 'x86'
-+ raise EnvironmentException('Unknown target arch {!r} for MSVC linker '
-+ '`link.exe`'.format(target_arch))
-
- return MSVCDynamicLinker(
-- for_machine, [], machine=target, exelist=compiler,
-+ for_machine, [], machine=target_arch, exelist=compiler,
- prefix=comp_class.LINKER_PREFIX if use_linker_prefix else [],
- version=search_version(out), direct=invoked_directly)
- elif 'GNU coreutils' in o:
---
-2.26.1.windows.1
-
diff --git a/recipes/build-tools/meson/0001-qt-dependency-Pick-debug-libraries-based-on-b_vscrt.patch b/recipes/build-tools/meson/0001-qt-dependency-Pick-debug-libraries-based-on-b_vscrt.patch
deleted file mode 100644
index e12c2128..00000000
--- a/recipes/build-tools/meson/0001-qt-dependency-Pick-debug-libraries-based-on-b_vscrt.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 5a8c70cbcfb492ea3f916b7a4be0496d3c524573 Mon Sep 17 00:00:00 2001
-From: Cerbero <cerbero@gstreamer.freedesktop.org>
-Date: Sat, 4 Apr 2020 00:41:17 +0530
-Subject: [PATCH] qt dependency: Pick debug libraries based on b_vscrt
-
-`b_vscrt` has existed forever, and is the canonical source for
-which CRT to link to, and hence whether to use the debug libraries
-or not.
----
- mesonbuild/dependencies/ui.py | 5 +++++
- run_unittests.py | 27 +++++++++++++++++++++++++++
- 2 files changed, 32 insertions(+)
-
-diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
-index da411ef..1d2ca1e 100644
---- a/mesonbuild/dependencies/ui.py
-+++ b/mesonbuild/dependencies/ui.py
-@@ -385,7 +385,12 @@ class QtBaseDependency(ExternalDependency):
- self.bindir = self.get_qmake_host_bins(qvars)
- self.is_found = True
-
-+ # Use the buildtype by default, but look at the b_vscrt option if the
-+ # compiler supports it.
- is_debug = self.env.coredata.get_builtin_option('buildtype') == 'debug'
-+ if 'b_vscrt' in self.env.coredata.base_options:
-+ if self.env.coredata.base_options['b_vscrt'].value in ('mdd', 'mtd'):
-+ is_debug = True
- modules_lib_suffix = self._get_modules_lib_suffix(is_debug)
-
- for module in mods:
-diff --git a/run_unittests.py b/run_unittests.py
-index b42b9db..abc1c5f 100644
---- a/run_unittests.py
-+++ b/run_unittests.py
-@@ -4696,6 +4696,33 @@ class WindowsTests(BasePlatformTests):
- # Verify that a valid checksum was written by all other compilers
- self.assertTrue(pe.verify_checksum(), msg=msg)
-
-+ def test_qt5dependency_vscrt(self):
-+ '''
-+ Test that qt5 dependencies use the debug module suffix when b_vscrt is
-+ set to 'mdd'
-+ '''
-+ # Verify that the `b_vscrt` option is available
-+ env = get_fake_env()
-+ cc = env.detect_c_compiler(MachineChoice.HOST)
-+ if 'b_vscrt' not in cc.base_options:
-+ raise unittest.SkipTest('Compiler does not support setting the VS CRT')
-+ # Verify that qmake is for Qt5
-+ if not shutil.which('qmake-qt5'):
-+ if not shutil.which('qmake') and not is_ci():
-+ raise unittest.SkipTest('QMake not found')
-+ output = subprocess.getoutput('qmake --version')
-+ if 'Qt version 5' not in output and not is_ci():
-+ raise unittest.SkipTest('Qmake found, but it is not for Qt 5.')
-+ # Setup with /MDd
-+ testdir = os.path.join(self.framework_test_dir, '4 qt')
-+ self.init(testdir, extra_args=['-Db_vscrt=mdd'])
-+ # Verify that we're linking to the debug versions of Qt DLLs
-+ build_ninja = os.path.join(self.builddir, 'build.ninja')
-+ with open(build_ninja, 'r', encoding='utf-8') as f:
-+ contents = f.read()
-+ m = re.search('build qt5core.exe: cpp_LINKER.*Qt5Cored.lib', contents)
-+ self.assertIsNotNone(m, msg=contents)
-+
-
- @unittest.skipUnless(is_osx(), "requires Darwin")
- class DarwinTests(BasePlatformTests):
---
-2.26.0.windows.1
-
diff --git a/recipes/build-tools/meson/0001-ui-qt-use-new-directory-layout-for-qt-on-android.patch b/recipes/build-tools/meson/0001-ui-qt-use-new-directory-layout-for-qt-on-android.patch
deleted file mode 100644
index 3e1ad5cd..00000000
--- a/recipes/build-tools/meson/0001-ui-qt-use-new-directory-layout-for-qt-on-android.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From f73687d64d49ba9b291910c75bd1ddf6379d257d Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 14 May 2020 13:07:26 +1000
-Subject: [PATCH] ui/qt: use new directory layout for qt on android
-
----
- mesonbuild/dependencies/ui.py | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
-index 4cec814..cdb517c 100644
---- a/mesonbuild/dependencies/ui.py
-+++ b/mesonbuild/dependencies/ui.py
-@@ -18,6 +18,7 @@ import os
- import re
- import subprocess
- import typing as T
-+import textwrap
- from collections import OrderedDict
-
- from .. import mlog
-@@ -406,6 +407,9 @@ class QtBaseDependency(ExternalDependency):
- if libfile:
- libfile = libfile[0]
- else:
-+ mlog.log("Could not find:", module,
-+ self.qtpkgname + module + modules_lib_suffix,
-+ 'in', libdir)
- self.is_found = False
- break
- self.link_args.append(libfile)
-@@ -426,6 +430,20 @@ class QtBaseDependency(ExternalDependency):
- if self.env.machines[self.for_machine].is_darwin():
- if is_debug:
- suffix += '_debug'
-+ if mesonlib.version_compare(self.version, '>= 5.14.0'):
-+ if self.env.machines[self.for_machine].is_android():
-+ cpu_family = self.env.machines[self.for_machine].cpu_family
-+ if cpu_family == 'x86':
-+ suffix += '_x86'
-+ elif cpu_family == 'x86_64':
-+ suffix += '_x86_64'
-+ elif cpu_family == 'arm':
-+ suffix += '_armeabi-v7a'
-+ elif cpu_family == 'aarch64':
-+ suffix += '_arm64-v8a'
-+ else:
-+ mlog.warning(textwrap.dedent('''cpu_family {} is not known
-+ to be available with Qt {} on Android'''.format(cpu_family, self.version)))
- return suffix
-
- def _link_with_qtmain(self, is_debug, libdir):
---
-2.26.2
-