SHA256
3
0
forked from pool/meson

- Update to version 0.46.0.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=91
This commit is contained in:
Alexei Sorokin 2018-04-26 08:56:00 +00:00 committed by Git OBS Bridge
parent ea3c72be46
commit 7dc9d32c88
11 changed files with 156 additions and 78 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3455abbc30a3fbd9cc8abb6d5fcdc42ce618665b95ac2c3ad7792a4a6ba47ce4
size 1161396

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEElRgfTu0U/fTkG1GNO/RpO/7rlCgFAlqcP/oACgkQO/RpO/7r
lCgLjhAAlqY3T4kJdglzcuIg30DJ2qvXQVq5d9hPyaxHcujzPvQMyXEv4gznxY6H
zIlcDsBhwhbWddpXV3IJYtM4vD+RiSTUqWSOX+9eEvjQSqXZIMdTCN5H/3YqiIdi
CmvTLB9vzgUhv3s0Hioju2/QzAx5vZBUuaZWgkseXlffUWfMEdFxI4OcKRUV7q2P
lgH1cHEnw4Zl7aQvHbbnttczSKRKujXahmO5VgfXVCgYZydopVlDkO1pBOY7s4Nn
whtW5vrLg4i5co1as2L63u99QOHlzuuDi6LD4srCM4tMdS/qtvQc8fM2au0fRk4j
j3HE8l5YiAPjQ6PzJMFdI2Gg+zIznOweljnls59iTtQa1O6VqoXKIL5G1cQ/7n0o
qjsLGIbdGx8uRpE3jELqJ6t1qdO0cRuX3BFozm0/8xzUp4fPTbbrGPq2iSrWC43t
CC+47nTYfbDlp+/Q3Y7fKUmj1Fz0JdbsKpg4wHyJ3odim17ddFZcpydLM2nIKpUq
9S46mL4oFi85fxYr1zzTnM7Le6awC36KUTvUA5+O/oo44l0vEd8cOIgtSrCIfHea
j8Bz0J82YDwygAmq/ZmsBCIm6y/ZkVaBn7pQpAHwyheTSyAsQgZiAKI7oUVWgH/Q
CyKd4es9JYIsRnIWbiRiFD+fDxJu/bjNO6PxLvRXvXj26ZUZ51Y=
=tqjk
-----END PGP SIGNATURE-----

3
meson-0.46.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b7df91b01a358a8facdbfa33596a47cda38a760435ab55e1985c0bff06a9cbf0
size 1200001

16
meson-0.46.0.tar.gz.asc Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEElRgfTu0U/fTkG1GNO/RpO/7rlCgFAlrdLJYACgkQO/RpO/7r
lCgkAhAAhwghFqGK9CveQzzoFKkjTAwAk76sYGbABzIQtA0AHiU+Mo4vzcSlSY/Q
GSX235VWs0JIeIKduqsBuOnzfoI6wAZ6z9Bw8NfCiPz4x6jRZpUPs51JKt1DTsaO
+1lBdczVPb2K+PJFUudd2tg1NUe6UJ0oDfCeTsITQPyovU5YU7e3/9lUhT9eb1iM
l0hFLvP355WryOfHC1F1wS44h7HboeKYShA6Ft0IRAHQR9H+W9VFmZuQ3xVwGDcx
lPZB9i0aHZCDZBcjlbyQpIraXahlURkS3kkZIMUnmsC/51mCzxOKwj7B+bkbmo0G
JYC9ogXfi27cYbZCAnSZVKuFMcZpegCPUuMDbozCThvj3E1Jq9yt9FAS21i0To+l
qlH3eLlP7SY3UaHi2ZOXF2TK4bm07f3K0QJnE4Wq9wUzYwp2CU93BM9xc/ygTk3D
SYPlw48CLtnt0LlhtPk0DuHTA+skJX8f5wWRyeVnnUulOhwEHJ5CZglPM5AFrWqv
KKjBc8r8dBrgsWu+SOdNtKOwU+dixxbnOO1fcjovGRSppUkm0JtMlbHxd4IDqYS4
GZSnpNVqJa3m6/qROlfDTYz9IGGY86YMEhIEqVAQcNjq67XLsud5au7LK9/LxfD4
rSADCtgQvF0VDlpYy63yLk65GrjKRZaFBzpTpoBwWPQXbYNqXCA=
=UZwn
-----END PGP SIGNATURE-----

View File

@ -1,6 +1,6 @@
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -102,9 +102,11 @@ class GnuCPPCompiler(GnuCompiler, CPPCom
@@ -104,9 +104,11 @@ class GnuCPPCompiler(GnuCompiler, CPPCom
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
def get_options(self):
@ -16,27 +16,16 @@
'STL debug mode',
--- a/mesonbuild/minit.py
+++ b/mesonbuild/minit.py
@@ -123,8 +123,7 @@ int main(int argc, char **argv) {{
hello_c_meson_template = '''project('{project_name}', 'c',
version : '{version}',
- default_options : ['warning_level=3',
- 'cpp_std=c++14'])
+ default_options : ['warning_level=3'])
exe = executable('{exe_name}', '{source_name}',
install : true)
@@ -148,7 +147,8 @@ int main(int argc, char **argv) {{
@@ -149,7 +149,7 @@ int main(int argc, char **argv) {{
hello_cpp_meson_template = '''project('{project_name}', 'cpp',
version : '{version}',
- default_options : ['warning_level=3'])
+ default_options : ['warning_level=3',
default_options : ['warning_level=3',
- 'cpp_std=c++14'])
+ 'cpp_std=c++1y'])
exe = executable('{exe_name}', '{source_name}',
install : true)
@@ -219,7 +219,7 @@ int main(int argc, char **argv) {{
@@ -220,7 +220,7 @@ int main(int argc, char **argv) {{
lib_cpp_meson_template = '''project('{project_name}', 'cpp',
version : '{version}',
@ -45,6 +34,15 @@
# These arguments are only used to build the shared library
# not the executables that use the library.
@@ -416,7 +416,7 @@ def create_meson_build(options):
default_options = ['warning_level=3']
if options.language == 'cpp':
# This shows how to set this very common option.
- default_options += ['cpp_std=c++14']
+ default_options += ['cpp_std=c++1y']
# If we get a meson.build autoformatter one day, this code could
# be simplified quite a bit.
formatted_default_options = ', '.join("'{}'".format(x) for x in default_options)
--- "a/test cases/unit/16 prebuilt shared/patron.c"
+++ "b/test cases/unit/16 prebuilt shared/patron.c"
@@ -5,4 +5,5 @@ int main(int argc, char **argv) {

View File

@ -1,15 +1,15 @@
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -26,7 +26,7 @@ from .. import compilers
@@ -27,7 +27,7 @@ from .. import compilers
from ..compilers import CompilerArgs
from ..linkers import ArLinker
from ..mesonlib import File, MesonException, OrderedSet
-from ..mesonlib import get_compiler_for_source
+from ..mesonlib import get_compiler_for_source, commonpath
-from ..mesonlib import get_compiler_for_source, has_path_sep
+from ..mesonlib import get_compiler_for_source, has_path_sep, commonpath
from .backends import CleanTrees, InstallData
from ..build import InvalidArguments
@@ -1166,8 +1166,8 @@ int dummy;
@@ -1157,8 +1157,8 @@ int dummy;
# Check if the vala file is in a subdir of --basedir
abs_srcbasedir = os.path.join(self.environment.get_source_dir(), target.get_subdir())
abs_vala_file = os.path.join(self.environment.get_build_dir(), vala_file)
@ -17,7 +17,7 @@
- vala_c_subdir = PurePath(abs_vala_file).parent.relative_to(abs_srcbasedir)
+ if PurePath(commonpath((abs_srcbasedir, abs_vala_file))) == PurePath(abs_srcbasedir):
+ vala_c_subdir = str(PurePath(abs_vala_file).parent.relative_to(abs_srcbasedir))
vala_c_file = os.path.join(vala_c_subdir, vala_c_file)
vala_c_file = os.path.join(str(vala_c_subdir), vala_c_file)
else:
path_to_target = os.path.join(self.build_to_src, target.get_subdir())
--- a/mesonbuild/coredata.py
@ -30,8 +30,8 @@
+from .mesonlib import MesonException, commonpath
from .mesonlib import default_libdir, default_libexecdir, default_prefix
import ast
@@ -286,7 +286,7 @@ class CoreData:
import argparse
@@ -261,7 +261,7 @@ class CoreData:
# commonpath will always return a path in the native format, so we
# must use pathlib.PurePath to do the same conversion before
# comparing.
@ -42,7 +42,7 @@
'relative path, it is assumed to be a subdir of prefix.'
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -935,6 +935,30 @@ def detect_subprojects(spdir_name, curre
@@ -972,6 +972,30 @@ def detect_subprojects(spdir_name, curre
result[basename] = [trial]
return result
@ -75,7 +75,7 @@
insertion.
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -274,8 +274,8 @@ def run_script_command(args):
@@ -257,8 +257,8 @@ def run_script_command(args):
return cmdfunc(cmdargs)
def run(original_args, mainfile=None):
@ -88,9 +88,17 @@
return 1
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -427,6 +427,24 @@ class InternalTests(unittest.TestCase):
kwargs = {'sources': [1, 2, 3], 'pch_sources': [4, 5, 6]}
self.assertEqual([[1, 2, 3], [4, 5, 6]], extract(kwargs, 'sources', 'pch_sources'))
@@ -21,6 +21,7 @@ import tempfile
import textwrap
import os
import shutil
+import sys
import unittest
from unittest import mock
from configparser import ConfigParser
@@ -476,6 +477,24 @@ class InternalTests(unittest.TestCase):
deps.add_pub_reqs([mock])
self.assertEqual(deps.format_reqs(deps.pub_reqs), "some_name")
+ def test_commonpath(self):
+ from os.path import sep
@ -113,3 +121,63 @@
class BasePlatformTests(unittest.TestCase):
def setUp(self):
@@ -556,9 +575,16 @@ class BasePlatformTests(unittest.TestCas
# If this call hangs CI will just abort. It is very hard to distinguish
# between CI issue and test bug in that case. Set timeout and fail loud
# instead.
- p = subprocess.run(command, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT, env=os.environ.copy(),
- universal_newlines=True, cwd=workdir, timeout=60 * 5)
+ if sys.version_info >= (3, 5):
+ p = subprocess.run(command, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT, env=os.environ.copy(),
+ universal_newlines=True, cwd=workdir,
+ timeout=60 * 5)
+ else:
+ p = subprocess.Popen(command, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT, env=os.environ.copy(),
+ universal_newlines=True, cwd=workdir)
+ p.stdout = p.communicate(timeout=60 * 5)[0]
print(p.stdout)
if p.returncode != 0:
if 'MESON_SKIP_TEST' in p.stdout:
--- a/setup.py
+++ b/setup.py
@@ -19,9 +19,9 @@ import sys
from mesonbuild.coredata import version
-if sys.version_info < (3, 5, 0):
+if sys.version_info < (3, 4, 0):
print('Tried to install with an unsupported version of Python. '
- 'Meson requires Python 3.5.0 or greater')
+ 'Meson requires Python 3.4.0 or greater')
sys.exit(1)
# We need to support Python installations that have nothing but the basic
--- "a/test cases/common/193 find override/subdir/converter.py"
+++ "b/test cases/common/193 find override/subdir/converter.py"
@@ -10,6 +10,7 @@ ftempl = '''int %s() {
}
'''
-d = pathlib.Path(ifilename).read_text().split('\n')[0].strip()
-
-pathlib.Path(ofilename).write_text(ftempl % d)
+with pathlib.Path(ifilename).open('r') as f:
+ d = f.readline().split('\n')[0].strip()
+with pathlib.Path(ofilename).open('w') as f:
+ f.write(ftempl % d)
--- "a/test cases/common/193 find override/subdir/gencodegen.py.in"
+++ "b/test cases/common/193 find override/subdir/gencodegen.py.in"
@@ -10,6 +10,7 @@ ftempl = '''int %s() {
}
'''
-d = pathlib.Path(ifilename).read_text().split('\n')[0].strip()
-
-pathlib.Path(ofilename).write_text(ftempl % d)
+with pathlib.Path(ifilename).open('r') as f:
+ d = f.readline().split('\n')[0].strip()
+with pathlib.Path(ofilename).open('w') as f:
+ f.write(ftempl % d)

View File

@ -1,8 +1,6 @@
Index: meson-0.44.0/run_project_tests.py
===================================================================
--- meson-0.44.0.orig/run_project_tests.py
+++ meson-0.44.0/run_project_tests.py
@@ -126,7 +126,7 @@ no_meson_log_msg = 'No meson-log.txt fou
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -80,7 +80,7 @@ no_meson_log_msg = 'No meson-log.txt fou
system_compiler = None
@ -11,16 +9,14 @@ Index: meson-0.44.0/run_project_tests.py
if not os.path.exists(meson_command):
meson_command += '.py'
if not os.path.exists(meson_command):
Index: meson-0.44.0/run_unittests.py
===================================================================
--- meson-0.44.0.orig/run_unittests.py
+++ meson-0.44.0/run_unittests.py
@@ -462,7 +462,7 @@ class BasePlatformTests(unittest.TestCas
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -506,7 +506,7 @@ class BasePlatformTests(unittest.TestCas
# Get the backend
# FIXME: Extract this from argv?
self.backend = getattr(Backend, os.environ.get('MESON_UNIT_TEST_BACKEND', 'ninja'))
- self.meson_mainfile = os.path.join(src_root, 'meson.py')
+ self.meson_mainfile = '/usr/bin/meson'
self.meson_args = ['--backend=' + self.backend.name]
self.meson_cross_file = None
self.meson_command = meson_command + self.meson_args
self.mconf_command = meson_command + ['configure']

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Apr 25 18:53:17 UTC 2018 - sor.alexei@meowr.ru
- Update to version 0.46.0:
* See http://mesonbuild.com/Release-notes-for-0-46-0.html
- Rebase meson-test-installed-bin.patch,
meson-restore-python3.4.patch, meson-fix-gcc48.patch.
-------------------------------------------------------------------
Wed Mar 21 23:46:12 UTC 2018 - sor.alexei@meowr.ru

View File

@ -24,7 +24,7 @@
%endif
%define _name mesonbuild
Name: meson%{name_ext}
Version: 0.45.0
Version: 0.46.0
Release: 0
Summary: Python-based build system
License: Apache-2.0
@ -35,14 +35,14 @@ Source1: https://github.com/%{_name}/meson/releases/download/%{version}/m
Source2: meson.keyring
# PATCH-FIX-OPENSUSE meson-suse-ify-macros.patch dimstar@opensuse.org -- Make the macros non-RedHat specific: so far there are no separate {C,CXX,F}FLAGS.
Patch0: meson-suse-ify-macros.patch
# PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests.
Patch1: meson-suse-fix-llvm-3.8.patch
# PATCH-FIX-OPENSUSE meson-restore-python3.4.patch -- Restore Python 3.4 support (reverts commit 0538009).
Patch2: meson-restore-python3.4.patch
# PATCH-FIX-OPENSUSE meson-fix-gcc48.patch sor.alexei@meowr.ru -- Fix GCC 4.8 handling for openSUSE Leap 42.x.
Patch3: meson-fix-gcc48.patch
# PATCH-FIX-OPENSUSE meson-test-installed-bin.patch dimstar@opensuse.org -- We want the test suite to run against /usr/bin/meson coming from our meson package.
Patch100: meson-test-installed-bin.patch
Patch1: meson-test-installed-bin.patch
# PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests.
Patch2: meson-suse-fix-llvm-3.8.patch
# PATCH-FIX-OPENSUSE meson-restore-python3.4.patch -- Restore Python 3.4 support (reverts commit 0538009).
Patch3: meson-restore-python3.4.patch
# PATCH-FIX-OPENSUSE meson-fix-gcc48.patch sor.alexei@meowr.ru -- Fix GCC 4.8 handling for openSUSE Leap 42.x.
Patch4: meson-fix-gcc48.patch
BuildRequires: python3
BuildArch: noarch
%if %{testsuite}
@ -128,12 +128,12 @@ This package provides support for meson.build files in Vim.
%prep
%setup -q -n meson-%{version}
%patch0 -p1
%if 0%{?suse_version} < 1500
%patch1 -p1
%if 0%{?suse_version} < 1500
%patch2 -p1
%patch3 -p1
%patch4 -p1
%endif
%patch100 -p1
# Remove static boost tests from test cases/frameworks/1 boost (can't use patch due to spaces in dirname)
sed -i "/static/d" test\ cases/frameworks/1\ boost/meson.build

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Apr 25 18:53:17 UTC 2018 - sor.alexei@meowr.ru
- Update to version 0.46.0:
* See http://mesonbuild.com/Release-notes-for-0-46-0.html
- Rebase meson-test-installed-bin.patch,
meson-restore-python3.4.patch, meson-fix-gcc48.patch.
-------------------------------------------------------------------
Wed Mar 21 23:46:12 UTC 2018 - sor.alexei@meowr.ru

View File

@ -24,7 +24,7 @@
%endif
%define _name mesonbuild
Name: meson%{name_ext}
Version: 0.45.0
Version: 0.46.0
Release: 0
Summary: Python-based build system
License: Apache-2.0
@ -35,14 +35,14 @@ Source1: https://github.com/%{_name}/meson/releases/download/%{version}/m
Source2: meson.keyring
# PATCH-FIX-OPENSUSE meson-suse-ify-macros.patch dimstar@opensuse.org -- Make the macros non-RedHat specific: so far there are no separate {C,CXX,F}FLAGS.
Patch0: meson-suse-ify-macros.patch
# PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests.
Patch1: meson-suse-fix-llvm-3.8.patch
# PATCH-FIX-OPENSUSE meson-restore-python3.4.patch -- Restore Python 3.4 support (reverts commit 0538009).
Patch2: meson-restore-python3.4.patch
# PATCH-FIX-OPENSUSE meson-fix-gcc48.patch sor.alexei@meowr.ru -- Fix GCC 4.8 handling for openSUSE Leap 42.x.
Patch3: meson-fix-gcc48.patch
# PATCH-FIX-OPENSUSE meson-test-installed-bin.patch dimstar@opensuse.org -- We want the test suite to run against /usr/bin/meson coming from our meson package.
Patch100: meson-test-installed-bin.patch
Patch1: meson-test-installed-bin.patch
# PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests.
Patch2: meson-suse-fix-llvm-3.8.patch
# PATCH-FIX-OPENSUSE meson-restore-python3.4.patch -- Restore Python 3.4 support (reverts commit 0538009).
Patch3: meson-restore-python3.4.patch
# PATCH-FIX-OPENSUSE meson-fix-gcc48.patch sor.alexei@meowr.ru -- Fix GCC 4.8 handling for openSUSE Leap 42.x.
Patch4: meson-fix-gcc48.patch
BuildRequires: python3
BuildArch: noarch
%if %{testsuite}
@ -128,12 +128,12 @@ This package provides support for meson.build files in Vim.
%prep
%setup -q -n meson-%{version}
%patch0 -p1
%if 0%{?suse_version} < 1500
%patch1 -p1
%if 0%{?suse_version} < 1500
%patch2 -p1
%patch3 -p1
%patch4 -p1
%endif
%patch100 -p1
# Remove static boost tests from test cases/frameworks/1 boost (can't use patch due to spaces in dirname)
sed -i "/static/d" test\ cases/frameworks/1\ boost/meson.build