mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
extra/meson to 1.4.0-5
This commit is contained in:
parent
7e3672b726
commit
8d446b14ea
3 changed files with 157 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
pkgbase = meson
|
||||
pkgdesc = High productivity build system
|
||||
pkgver = 1.4.0
|
||||
pkgrel = 4
|
||||
pkgrel = 5
|
||||
url = https://mesonbuild.com/
|
||||
arch = any
|
||||
license = Apache-2.0
|
||||
|
@ -56,7 +56,6 @@ pkgbase = meson
|
|||
depends = ninja
|
||||
depends = python
|
||||
depends = python-tqdm
|
||||
depends = python-typing_extensions
|
||||
source = https://github.com/mesonbuild/meson/releases/download/1.4.0/meson-1.4.0.tar.gz
|
||||
source = https://github.com/mesonbuild/meson/releases/download/1.4.0/meson-1.4.0.tar.gz.asc
|
||||
source = meson-reference-1.4.0.3::https://github.com/mesonbuild/meson/releases/download/1.4.0/meson-reference.3
|
||||
|
@ -68,6 +67,7 @@ pkgbase = meson
|
|||
source = 0002-unittests-Add-a-helper-for-copying-source-trees.patch
|
||||
source = 0003-tests-Fix-unit-tests-with-high-parallelism.patch
|
||||
source = 0004-Revert-rust-recursively-pull-proc-macro-dependencies.patch
|
||||
source = 0005-Fix-builds-with-Ninja-12-and-remove-a-5-year-old-wor.patch
|
||||
validpgpkeys = 19E2D6D9B46D8DAA6288F877C24E631BABB1FE70
|
||||
b2sums = 7f742ef870c182e552c1ff3508d65f251009d610def6a08e01fddb6c6a4ed6d608ead0d52cf8ca7d66b5bd7a4732dccd7ab5d98f141a4a61e275398885f79486
|
||||
b2sums = SKIP
|
||||
|
@ -80,5 +80,6 @@ pkgbase = meson
|
|||
b2sums = a5206ac07afa0c3cde982109f52e208a30e59daf1200b42946005bc6db09e647dc9ce220eb359fc0820d2ab1d401c5547e44bbadc0c5e1d7c942865951b9fdd7
|
||||
b2sums = 655fdebe13d1857505889c5c8bd4605c989e1c92ac930f42e0162bb75fc53e460c15d929c93e2e9740a99ea49b5ed36f264da5a99dc6110eb1509d665a33ccf9
|
||||
b2sums = 62e19e7ec8c3448989167fdda724104389176440ead253e8f1665f6f383542fbc9afae9d6c64f6365e8b2878863416554266e6e651d6e58981fa8e145d321e49
|
||||
b2sums = c7e8e652505ef349b5ad91c71c7d1665dda22945fdfceeddac51dfca43edfec7cae89f5bd962dca27661dd5396835b8b59614d7cb01db67b5a189e1d7dc3ba22
|
||||
|
||||
pkgname = meson
|
||||
|
|
|
@ -0,0 +1,145 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jussi Pakkanen <jpakkane@gmail.com>
|
||||
Date: Sun, 14 Apr 2024 20:46:42 +0300
|
||||
Subject: [PATCH] Fix builds with Ninja 12 and remove a 5 year old workaround.
|
||||
|
||||
---
|
||||
run_project_tests.py | 3 +--
|
||||
run_tests.py | 35 ++++++++++------------------------
|
||||
unittests/baseplatformtests.py | 5 +----
|
||||
3 files changed, 12 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/run_project_tests.py b/run_project_tests.py
|
||||
index a14741364aab..222e12f74b30 100755
|
||||
--- a/run_project_tests.py
|
||||
+++ b/run_project_tests.py
|
||||
@@ -45,7 +45,7 @@ from mesonbuild.coredata import backendlist, version as meson_version
|
||||
from mesonbuild.modules.python import PythonExternalProgram
|
||||
from run_tests import (
|
||||
get_fake_options, run_configure, get_meson_script, get_backend_commands,
|
||||
- get_backend_args_for_dir, Backend, ensure_backend_detects_changes,
|
||||
+ get_backend_args_for_dir, Backend,
|
||||
guess_backend, handle_meson_skip_test,
|
||||
)
|
||||
|
||||
@@ -720,7 +720,6 @@ def _run_test(test: TestDef,
|
||||
|
||||
# Touch the meson.build file to force a regenerate
|
||||
def force_regenerate() -> None:
|
||||
- ensure_backend_detects_changes(backend)
|
||||
os.utime(str(test.path / 'meson.build'))
|
||||
|
||||
# just test building
|
||||
diff --git a/run_tests.py b/run_tests.py
|
||||
index 20765321981e..0c51f3d695be 100755
|
||||
--- a/run_tests.py
|
||||
+++ b/run_tests.py
|
||||
@@ -39,29 +39,27 @@ from mesonbuild.mesonlib import OptionKey, setup_vsenv
|
||||
if T.TYPE_CHECKING:
|
||||
from mesonbuild.coredata import SharedCMDOptions
|
||||
|
||||
-NINJA_1_9_OR_NEWER = False
|
||||
+NINJA_1_12_OR_NEWER = False
|
||||
NINJA_CMD = None
|
||||
# If we're on CI, detecting ninja for every subprocess unit test that we run is slow
|
||||
# Optimize this by respecting $NINJA and skipping detection, then exporting it on
|
||||
# first run.
|
||||
try:
|
||||
- NINJA_1_9_OR_NEWER = bool(int(os.environ['NINJA_1_9_OR_NEWER']))
|
||||
+ NINJA_1_12_OR_NEWER = bool(int(os.environ['NINJA_1_12_OR_NEWER']))
|
||||
NINJA_CMD = [os.environ['NINJA']]
|
||||
except (KeyError, ValueError):
|
||||
- # Look for 1.9 to see if https://github.com/ninja-build/ninja/issues/1219
|
||||
- # is fixed
|
||||
- NINJA_CMD = detect_ninja('1.9')
|
||||
+ # Look for 1.12, which removes -w dupbuild=err
|
||||
+ NINJA_CMD = detect_ninja('1.12')
|
||||
if NINJA_CMD is not None:
|
||||
- NINJA_1_9_OR_NEWER = True
|
||||
+ NINJA_1_12_OR_NEWER = True
|
||||
else:
|
||||
- mlog.warning('Found ninja <1.9, tests will run slower', once=True)
|
||||
NINJA_CMD = detect_ninja()
|
||||
|
||||
if NINJA_CMD is not None:
|
||||
- os.environ['NINJA_1_9_OR_NEWER'] = str(int(NINJA_1_9_OR_NEWER))
|
||||
+ os.environ['NINJA_1_12_OR_NEWER'] = str(int(NINJA_1_12_OR_NEWER))
|
||||
os.environ['NINJA'] = NINJA_CMD[0]
|
||||
else:
|
||||
- raise RuntimeError('Could not find Ninja v1.7 or newer')
|
||||
+ raise RuntimeError('Could not find Ninja.')
|
||||
|
||||
# Emulate running meson with -X utf8 by making sure all open() calls have a
|
||||
# sane encoding. This should be a python default, but PEP 540 considered it not
|
||||
@@ -271,32 +269,19 @@ def get_backend_commands(backend: Backend, debug: bool = False) -> \
|
||||
test_cmd = cmd + ['-target', 'RUN_TESTS']
|
||||
elif backend is Backend.ninja:
|
||||
global NINJA_CMD
|
||||
- cmd = NINJA_CMD + ['-w', 'dupbuild=err', '-d', 'explain']
|
||||
+ cmd = NINJA_CMD + ['-d', 'explain']
|
||||
+ if not NINJA_1_12_OR_NEWER:
|
||||
+ cmd += ['-w', 'dupbuild=err']
|
||||
if debug:
|
||||
cmd += ['-v']
|
||||
clean_cmd = cmd + ['clean']
|
||||
test_cmd = cmd + ['test', 'benchmark']
|
||||
install_cmd = cmd + ['install']
|
||||
uninstall_cmd = cmd + ['uninstall']
|
||||
else:
|
||||
raise AssertionError(f'Unknown backend: {backend!r}')
|
||||
return cmd, clean_cmd, test_cmd, install_cmd, uninstall_cmd
|
||||
|
||||
-def ensure_backend_detects_changes(backend: Backend) -> None:
|
||||
- global NINJA_1_9_OR_NEWER
|
||||
- if backend is not Backend.ninja:
|
||||
- return
|
||||
- need_workaround = False
|
||||
- # We're using ninja >= 1.9 which has QuLogic's patch for sub-1s resolution
|
||||
- # timestamps
|
||||
- if not NINJA_1_9_OR_NEWER:
|
||||
- mlog.warning('Don\'t have ninja >= 1.9, enabling timestamp resolution workaround', once=True)
|
||||
- need_workaround = True
|
||||
- # Increase the difference between build.ninja's timestamp and the timestamp
|
||||
- # of whatever you changed: https://github.com/ninja-build/ninja/issues/371
|
||||
- if need_workaround:
|
||||
- time.sleep(1)
|
||||
-
|
||||
def run_mtest_inprocess(commandlist: T.List[str]) -> T.Tuple[int, str, str]:
|
||||
out = StringIO()
|
||||
with mock.patch.object(sys, 'stdout', out), mock.patch.object(sys, 'stderr', out):
|
||||
diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py
|
||||
index 93bfc8905b73..fb0eff185a13 100644
|
||||
--- a/unittests/baseplatformtests.py
|
||||
+++ b/unittests/baseplatformtests.py
|
||||
@@ -31,7 +31,7 @@ import mesonbuild.modules.pkgconfig
|
||||
|
||||
|
||||
from run_tests import (
|
||||
- Backend, ensure_backend_detects_changes, get_backend_commands,
|
||||
+ Backend, get_backend_commands,
|
||||
get_builddir_target_args, get_meson_script, run_configure_inprocess,
|
||||
run_mtest_inprocess, handle_meson_skip_test,
|
||||
)
|
||||
@@ -292,22 +292,19 @@ class BasePlatformTests(TestCase):
|
||||
def setconf(self, arg, will_build=True):
|
||||
if not isinstance(arg, list):
|
||||
arg = [arg]
|
||||
- if will_build:
|
||||
- ensure_backend_detects_changes(self.backend)
|
||||
self._run(self.mconf_command + arg + [self.builddir])
|
||||
|
||||
def getconf(self, optname: str):
|
||||
opts = self.introspect('--buildoptions')
|
||||
for x in opts:
|
||||
if x.get('name') == optname:
|
||||
return x.get('value')
|
||||
self.fail(f'Option {optname} not found')
|
||||
|
||||
def wipe(self):
|
||||
windows_proof_rmtree(self.builddir)
|
||||
|
||||
def utime(self, f):
|
||||
- ensure_backend_detects_changes(self.backend)
|
||||
os.utime(f)
|
||||
|
||||
def get_compdb(self):
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
pkgname=meson
|
||||
pkgver=1.4.0
|
||||
pkgrel=4
|
||||
pkgrel=5
|
||||
pkgdesc="High productivity build system"
|
||||
url="https://mesonbuild.com/"
|
||||
arch=(any)
|
||||
|
@ -16,7 +16,6 @@ depends=(
|
|||
ninja
|
||||
python
|
||||
python-tqdm
|
||||
python-typing_extensions
|
||||
)
|
||||
makedepends=(
|
||||
python-build
|
||||
|
@ -80,6 +79,7 @@ source=(
|
|||
0002-unittests-Add-a-helper-for-copying-source-trees.patch
|
||||
0003-tests-Fix-unit-tests-with-high-parallelism.patch
|
||||
0004-Revert-rust-recursively-pull-proc-macro-dependencies.patch
|
||||
0005-Fix-builds-with-Ninja-12-and-remove-a-5-year-old-wor.patch
|
||||
)
|
||||
b2sums=('7f742ef870c182e552c1ff3508d65f251009d610def6a08e01fddb6c6a4ed6d608ead0d52cf8ca7d66b5bd7a4732dccd7ab5d98f141a4a61e275398885f79486'
|
||||
'SKIP'
|
||||
|
@ -91,7 +91,8 @@ b2sums=('7f742ef870c182e552c1ff3508d65f251009d610def6a08e01fddb6c6a4ed6d608ead0d
|
|||
'b0e050d6cfa7e9cb5692e6aa12185632313536bd4ad59c704cfa2b655ad52e3f34d038da3e2f01d47b16f910db8d458b69f3b2b07bd8d74b92622b00bfc7d120'
|
||||
'a5206ac07afa0c3cde982109f52e208a30e59daf1200b42946005bc6db09e647dc9ce220eb359fc0820d2ab1d401c5547e44bbadc0c5e1d7c942865951b9fdd7'
|
||||
'655fdebe13d1857505889c5c8bd4605c989e1c92ac930f42e0162bb75fc53e460c15d929c93e2e9740a99ea49b5ed36f264da5a99dc6110eb1509d665a33ccf9'
|
||||
'62e19e7ec8c3448989167fdda724104389176440ead253e8f1665f6f383542fbc9afae9d6c64f6365e8b2878863416554266e6e651d6e58981fa8e145d321e49')
|
||||
'62e19e7ec8c3448989167fdda724104389176440ead253e8f1665f6f383542fbc9afae9d6c64f6365e8b2878863416554266e6e651d6e58981fa8e145d321e49'
|
||||
'c7e8e652505ef349b5ad91c71c7d1665dda22945fdfceeddac51dfca43edfec7cae89f5bd962dca27661dd5396835b8b59614d7cb01db67b5a189e1d7dc3ba22')
|
||||
validpgpkeys=(
|
||||
19E2D6D9B46D8DAA6288F877C24E631BABB1FE70 # Jussi Pakkanen <jpakkane@gmail.com>
|
||||
)
|
||||
|
@ -107,7 +108,12 @@ prepare() {
|
|||
patch -Np1 -i ../0003-tests-Fix-unit-tests-with-high-parallelism.patch
|
||||
|
||||
# Fix lib32-mesa
|
||||
# https://github.com/mesonbuild/meson/issues/12973
|
||||
patch -Np1 -i ../0004-Revert-rust-recursively-pull-proc-macro-dependencies.patch
|
||||
|
||||
# Fix tests with recent Ninja
|
||||
# https://github.com/mesonbuild/meson/pull/13087
|
||||
patch -Np1 -i ../0005-Fix-builds-with-Ninja-12-and-remove-a-5-year-old-wor.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
Loading…
Reference in a new issue