From ccb749501367bacb0e8129673b52943cacdc27a4ff2e9f29d0d62fb208088dfc Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Wed, 21 Mar 2018 22:53:28 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=86 --- meson-fix-gcc48.patch | 14 +++++++------- meson-restore-python3.4.patch | 10 +++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/meson-fix-gcc48.patch b/meson-fix-gcc48.patch index c1fe097..4ce10ef 100644 --- a/meson-fix-gcc48.patch +++ b/meson-fix-gcc48.patch @@ -4,15 +4,15 @@ '3': default_warn_args + ['-Wextra', '-Wpedantic']} def get_options(self): -+ c_stds = ['c++98', 'c++03', 'c++11'] -+ g_stds = ['gnu++03', 'gnu++11'] ++ cpp_stds = ['c++98', 'c++03', 'c++11', 'gnu++03', 'gnu++11'] + if version_compare(self.version, '>=5.0.0'): -+ c_stds += ['c++14', 'c++17', 'c++1z'] -+ g_stds += ['gnu++14', 'gnu++17', 'gnu++1z'] ++ c_stds += ['c++14', 'c++17', 'c++1z', 'gnu++14', 'gnu++17', 'gnu++1z'] ++ else: ++ c_stds += ['c++1y', 'gnu++1y'] opts = {'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use', - ['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z', - 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z'], -+ ['none'] + c_stds + g_stds, ++ ['none'] + cpp_stds, 'none'), 'cpp_debugstl': coredata.UserBooleanOption('cpp_debugstl', 'STL debug mode', @@ -23,7 +23,7 @@ version : '{version}', default_options : ['warning_level=3', - 'cpp_std=c++14']) -+ 'cpp_std=c++11']) ++ 'cpp_std=c++1y']) exe = executable('{exe_name}', '{source_name}', install : true) @@ -32,7 +32,7 @@ lib_cpp_meson_template = '''project('{project_name}', 'cpp', version : '{version}', - default_options : ['warning_level=3', 'cpp_std=c++14']) -+ default_options : ['warning_level=3', 'cpp_std=c++11']) ++ default_options : ['warning_level=3', 'cpp_std=c++1y']) # These arguments are only used to build the shared library # not the executables that use the library. diff --git a/meson-restore-python3.4.patch b/meson-restore-python3.4.patch index bc1e292..63420bf 100644 --- a/meson-restore-python3.4.patch +++ b/meson-restore-python3.4.patch @@ -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,32 @@ def detect_subprojects(spdir_name, curre +@@ -935,6 +935,30 @@ def detect_subprojects(spdir_name, curre result[basename] = [trial] return result @@ -64,10 +64,8 @@ + if c != p: + break + new.append(c) -+ # Don't convert '' into '.' + if not new: -+ common = '' -+ break ++ raise ValueError("Can't mix absolute and relative paths") from None + new = os.path.join(*new) + common = pathlib.PurePath(new) + return str(common) @@ -90,7 +88,7 @@ return 1 --- a/run_unittests.py +++ b/run_unittests.py -@@ -427,6 +427,26 @@ class InternalTests(unittest.TestCase): +@@ -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')) @@ -108,8 +106,6 @@ + self.assertEqual(commonpath(['/usr/./bin', '/usr/bin']), sep + 'usr' + sep + 'bin') + self.assertEqual(commonpath(['/usr/local', '/usr/lib']), sep + 'usr') + self.assertEqual(commonpath(['/usr', '/bin']), sep) -+ self.assertEqual(commonpath(['/usr', 'bin']), '') -+ self.assertEqual(commonpath(['blam', 'bin']), '') + prefix = '/some/path/to/prefix' + libdir = '/some/path/to/prefix/libdir' + self.assertEqual(commonpath([prefix, libdir]), str(PurePath(prefix)))