Hello community, here is the log from the commit of package meson for openSUSE:Factory checked in at 2018-05-06 14:56:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/meson (Old) and /work/SRC/openSUSE:Factory/.meson.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "meson" Sun May 6 14:56:52 2018 rev:32 rq:602533 version:0.46.0 Changes: -------- --- /work/SRC/openSUSE:Factory/meson/meson-testsuite.changes 2018-03-24 16:10:26.926163476 +0100 +++ /work/SRC/openSUSE:Factory/.meson.new/meson-testsuite.changes 2018-05-06 14:56:53.911088429 +0200 @@ -1,0 +2,15 @@ +Mon Apr 30 07:03:53 UTC 2018 - [email protected] + +- Add meson-keep-spaces-in-pc-files.patch: Keep spaces in generated + pkgconfig files (gh#mesonbuild/meson#3479). +- Rebase meson-restore-python3.4.patch. + +------------------------------------------------------------------- +Wed Apr 25 18:53:17 UTC 2018 - [email protected] + +- 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. + +------------------------------------------------------------------- meson.changes: same change Old: ---- meson-0.45.0.tar.gz meson-0.45.0.tar.gz.asc New: ---- meson-0.46.0.tar.gz meson-0.46.0.tar.gz.asc meson-keep-spaces-in-pc-files.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ meson-testsuite.spec ++++++ --- /var/tmp/diff_new_pack.wBjGNU/_old 2018-05-06 14:56:54.603063039 +0200 +++ /var/tmp/diff_new_pack.wBjGNU/_new 2018-05-06 14:56:54.607062892 +0200 @@ -24,25 +24,27 @@ %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 Group: Development/Tools/Building -Url: http://mesonbuild.com/ +URL: http://mesonbuild.com/ Source: https://github.com/%{_name}/meson/releases/download/%{version}/meson-%{version}.tar.gz Source1: https://github.com/%{_name}/meson/releases/download/%{version}/meson-%{version}.tar.gz.asc Source2: meson.keyring # PATCH-FIX-OPENSUSE meson-suse-ify-macros.patch [email protected] -- 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-test-installed-bin.patch [email protected] -- We want the test suite to run against /usr/bin/meson coming from our meson package. +Patch1: meson-test-installed-bin.patch +# PATCH-FIX-UPSTREAM meson-keep-spaces-in-pc-files.patch gh#mesonbuild/meson#3479 [email protected] -- Keep spaces in generated .pc files +Patch2: meson-keep-spaces-in-pc-files.patch # PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests. -Patch1: meson-suse-fix-llvm-3.8.patch +Patch3: 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 +Patch4: meson-restore-python3.4.patch # PATCH-FIX-OPENSUSE meson-fix-gcc48.patch [email protected] -- Fix GCC 4.8 handling for openSUSE Leap 42.x. -Patch3: meson-fix-gcc48.patch -# PATCH-FIX-OPENSUSE meson-test-installed-bin.patch [email protected] -- We want the test suite to run against /usr/bin/meson coming from our meson package. -Patch100: meson-test-installed-bin.patch +Patch5: meson-fix-gcc48.patch BuildRequires: python3 BuildArch: noarch %if %{testsuite} @@ -128,12 +130,13 @@ %prep %setup -q -n meson-%{version} %patch0 -p1 -%if 0%{?suse_version} < 1500 %patch1 -p1 %patch2 -p1 +%if 0%{?suse_version} < 1500 %patch3 -p1 +%patch4 -p1 +%patch5 -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 ++++++ meson.spec ++++++ --- /var/tmp/diff_new_pack.wBjGNU/_old 2018-05-06 14:56:54.639061718 +0200 +++ /var/tmp/diff_new_pack.wBjGNU/_new 2018-05-06 14:56:54.639061718 +0200 @@ -24,25 +24,27 @@ %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 Group: Development/Tools/Building -Url: http://mesonbuild.com/ +URL: http://mesonbuild.com/ Source: https://github.com/%{_name}/meson/releases/download/%{version}/meson-%{version}.tar.gz Source1: https://github.com/%{_name}/meson/releases/download/%{version}/meson-%{version}.tar.gz.asc Source2: meson.keyring # PATCH-FIX-OPENSUSE meson-suse-ify-macros.patch [email protected] -- 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-test-installed-bin.patch [email protected] -- We want the test suite to run against /usr/bin/meson coming from our meson package. +Patch1: meson-test-installed-bin.patch +# PATCH-FIX-UPSTREAM meson-keep-spaces-in-pc-files.patch gh#mesonbuild/meson#3479 [email protected] -- Keep spaces in generated .pc files +Patch2: meson-keep-spaces-in-pc-files.patch # PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests. -Patch1: meson-suse-fix-llvm-3.8.patch +Patch3: 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 +Patch4: meson-restore-python3.4.patch # PATCH-FIX-OPENSUSE meson-fix-gcc48.patch [email protected] -- Fix GCC 4.8 handling for openSUSE Leap 42.x. -Patch3: meson-fix-gcc48.patch -# PATCH-FIX-OPENSUSE meson-test-installed-bin.patch [email protected] -- We want the test suite to run against /usr/bin/meson coming from our meson package. -Patch100: meson-test-installed-bin.patch +Patch5: meson-fix-gcc48.patch BuildRequires: python3 BuildArch: noarch %if %{testsuite} @@ -128,12 +130,13 @@ %prep %setup -q -n meson-%{version} %patch0 -p1 -%if 0%{?suse_version} < 1500 %patch1 -p1 %patch2 -p1 +%if 0%{?suse_version} < 1500 %patch3 -p1 +%patch4 -p1 +%patch5 -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 ++++++ meson-0.45.0.tar.gz -> meson-0.46.0.tar.gz ++++++ ++++ 12171 lines of diff (skipped) ++++++ meson-fix-gcc48.patch ++++++ --- /var/tmp/diff_new_pack.wBjGNU/_old 2018-05-06 14:56:55.575027375 +0200 +++ /var/tmp/diff_new_pack.wBjGNU/_new 2018-05-06 14:56:55.575027375 +0200 @@ -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) { ++++++ meson-keep-spaces-in-pc-files.patch ++++++ >From cbc2f2d1df769123caa2e4562dbe1809cca1304d Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen <[email protected]> Date: Sun, 29 Apr 2018 21:43:24 +0300 Subject: [PATCH] Keep separator spaces in pkg-config declarations. Closes #3479. --- mesonbuild/modules/pkgconfig.py | 6 ++++-- run_unittests.py | 11 +++++++++++ test cases/unit/31 pkgconfig format/meson.build | 12 ++++++++++++ test cases/unit/31 pkgconfig format/somelib.c | 5 +++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 test cases/unit/31 pkgconfig format/meson.build create mode 100644 test cases/unit/31 pkgconfig format/somelib.c diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index a3ba973f3..419a14c77 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -139,8 +139,10 @@ def add_version_reqs(self, name, version_reqs): if version_reqs: if name not in self.version_reqs: self.version_reqs[name] = set() - # We could have '>=1.0' or '>= 1.0', remove spaces to normalize - new_vreqs = [s.replace(' ', '') for s in mesonlib.stringlistify(version_reqs)] + # Note that pkg-config is picky about whitespace. + # 'foo > 1.2' is ok but 'foo>1.2' is not. + # foo, bar' is ok, but 'foo,bar' is not. + new_vreqs = [s for s in mesonlib.stringlistify(version_reqs)] self.version_reqs[name].update(new_vreqs) def split_version_req(self, s): diff --git a/run_unittests.py b/run_unittests.py index f06c9a0ea..ce5fe14dd 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3056,6 +3056,17 @@ def test_pkgconfig_internal_libraries(self): self.init(os.path.join(testdirbase, 'app')) self.build() + @unittest.skipIf(shutil.which('pkg-config') is None, 'Pkg-config not found.') + def test_pkgconfig_formatting(self): + testdir = os.path.join(self.unit_test_dir, '31 pkgconfig format') + self.init(testdir) + myenv = os.environ.copy() + myenv['PKG_CONFIG_PATH'] = self.privatedir + ro = subprocess.run(['pkg-config', '--libs', 'libsomething'], stdout=subprocess.PIPE, + env=myenv) + self.assertEqual(ro.returncode, 0) + self.assertIn(b'-lgobject-2.0', ro.stdout) + self.assertIn(b'-lgio-2.0', ro.stdout) class LinuxArmCrossCompileTests(BasePlatformTests): ''' diff --git a/test cases/unit/31 pkgconfig format/meson.build b/test cases/unit/31 pkgconfig format/meson.build new file mode 100644 index 000000000..bb702401f --- /dev/null +++ b/test cases/unit/31 pkgconfig format/meson.build @@ -0,0 +1,12 @@ +project('pkgformat', 'c', + version : '1.0') + +pkgg = import('pkgconfig') + +l = shared_library('something', 'somelib.c') + +pkgg.generate(libraries: l, + version: '1.0', + name: 'libsomething', + description: 'A library that does something', + requires: 'gobject-2.0 >= 2.54, gio-2.0 >= 2.54') diff --git a/test cases/unit/31 pkgconfig format/somelib.c b/test cases/unit/31 pkgconfig format/somelib.c new file mode 100644 index 000000000..6d876c8f2 --- /dev/null +++ b/test cases/unit/31 pkgconfig format/somelib.c @@ -0,0 +1,5 @@ +#include<stdio.h> + +int some_func() { + return 0; +} ++++++ meson-restore-python3.4.patch ++++++ --- /var/tmp/diff_new_pack.wBjGNU/_old 2018-05-06 14:56:55.591026788 +0200 +++ /var/tmp/diff_new_pack.wBjGNU/_new 2018-05-06 14:56:55.591026788 +0200 @@ -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,79 @@ 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: +@@ -2940,8 +2966,13 @@ endian = 'little' + self.init(testdir) + myenv = os.environ.copy() + myenv['PKG_CONFIG_PATH'] = self.privatedir +- ro = subprocess.run(['pkg-config', '--libs', 'libsomething'], stdout=subprocess.PIPE, +- env=myenv) ++ if sys.version_info >= (3, 5): ++ ro = subprocess.run(['pkg-config', '--libs', 'libsomething'], ++ stdout=subprocess.PIPE, env=myenv) ++ else: ++ ro = subprocess.Popen(['pkg-config', '--libs', 'libsomething'], ++ stdout=subprocess.PIPE, env=myenv) ++ ro.stdout = ro.communicate()[0] + self.assertEqual(ro.returncode, 0) + self.assertIn(b'-lgobject-2.0', ro.stdout) + self.assertIn(b'-lgio-2.0', ro.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) ++++++ meson-test-installed-bin.patch ++++++ --- /var/tmp/diff_new_pack.wBjGNU/_old 2018-05-06 14:56:55.603026347 +0200 +++ /var/tmp/diff_new_pack.wBjGNU/_new 2018-05-06 14:56:55.603026347 +0200 @@ -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 @@ 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']
