Backport couple of fixes
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
parent
bc635a1b51
commit
57d01a87c2
@ -1,8 +1,9 @@
|
|||||||
From 71eddecdc7e82b16c5e454137d641f2a5f7c9c94 Mon Sep 17 00:00:00 2001
|
From 07a44766805965f3f9f2afd1b7515e0a853399e6 Mon Sep 17 00:00:00 2001
|
||||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
Date: Mon, 3 Oct 2016 17:52:26 -0400
|
Date: Mon, 3 Oct 2016 17:52:26 -0400
|
||||||
Subject: [PATCH] Add missing dependency in gnome.mkenums test.
|
Subject: [PATCH 01/16] Add missing dependency in gnome.mkenums test.
|
||||||
|
|
||||||
|
(cherry picked from commit 71eddecdc7e82b16c5e454137d641f2a5f7c9c94)
|
||||||
---
|
---
|
||||||
test cases/frameworks/7 gnome/mkenums/meson.build | 13 +++++++------
|
test cases/frameworks/7 gnome/mkenums/meson.build | 13 +++++++------
|
||||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||||
@ -37,5 +38,5 @@ index f0989cf..efd6b04 100644
|
|||||||
install_dir : get_option('includedir'))
|
install_dir : get_option('includedir'))
|
||||||
|
|
||||||
--
|
--
|
||||||
2.10.0
|
2.10.1
|
||||||
|
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
From 14bb66ded6a957d868d91b1349fe982ea864ecef Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nirbheek Chauhan <nirbheek@centricular.com>
|
||||||
|
Date: Wed, 5 Oct 2016 16:45:52 +0530
|
||||||
|
Subject: [PATCH 02/16] run_tests: Print stdo and stde in failing test logs
|
||||||
|
|
||||||
|
This is a superset of the mlog output, and also contains the ninja
|
||||||
|
output and the test output.
|
||||||
|
|
||||||
|
(cherry picked from commit 81423270f58369de1b033bfcff52e889219e88ac)
|
||||||
|
---
|
||||||
|
run_tests.py | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/run_tests.py b/run_tests.py
|
||||||
|
index b57dd39..1e094ad 100755
|
||||||
|
--- a/run_tests.py
|
||||||
|
+++ b/run_tests.py
|
||||||
|
@@ -68,6 +68,7 @@ failing_tests = 0
|
||||||
|
skipped_tests = 0
|
||||||
|
failing_logs = []
|
||||||
|
print_debug = 'MESON_PRINT_TEST_OUTPUT' in os.environ
|
||||||
|
+do_debug = not {'MESON_PRINT_TEST_OUTPUT', 'TRAVIS', 'APPVEYOR'}.isdisjoint(os.environ)
|
||||||
|
|
||||||
|
meson_command = os.path.join(os.getcwd(), 'meson')
|
||||||
|
if not os.path.exists(meson_command):
|
||||||
|
@@ -117,7 +118,7 @@ def setup_commands(backend):
|
||||||
|
ninja_command = environment.detect_ninja()
|
||||||
|
if ninja_command is None:
|
||||||
|
raise RuntimeError('Could not find Ninja v1.6 or newer')
|
||||||
|
- if print_debug:
|
||||||
|
+ if do_debug:
|
||||||
|
compile_commands = [ninja_command, '-v']
|
||||||
|
else:
|
||||||
|
compile_commands = [ninja_command]
|
||||||
|
@@ -378,7 +379,8 @@ def run_tests(extra_args):
|
||||||
|
print('Failed test%s: %s' % (without_install, t))
|
||||||
|
print('Reason:', result.msg)
|
||||||
|
failing_tests += 1
|
||||||
|
- failing_logs.append(result.mlog)
|
||||||
|
+ failing_logs.append(result.stdo)
|
||||||
|
+ failing_logs.append(result.stde)
|
||||||
|
else:
|
||||||
|
print('Succeeded test%s: %s' % (without_install, t))
|
||||||
|
passing_tests += 1
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
128
0003-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch
Normal file
128
0003-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
From dcbb80c5ae3b9dd53a3a1addb69f9e804bf21c14 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jussi Pakkanen <jpakkane@gmail.com>
|
||||||
|
Date: Tue, 4 Oct 2016 00:38:42 +0300
|
||||||
|
Subject: [PATCH 03/16] Remove shebangs on files that are not runnable and add
|
||||||
|
execute bits to those that are.
|
||||||
|
|
||||||
|
(cherry picked from commit 1f4cce86add495fb07ae9ace83907dbd1415dd68)
|
||||||
|
---
|
||||||
|
mesonbuild/mconf.py | 2 --
|
||||||
|
mesonbuild/mesonmain.py | 2 --
|
||||||
|
mesonbuild/mintro.py | 2 --
|
||||||
|
mesonbuild/scripts/commandrunner.py | 0
|
||||||
|
mesonbuild/scripts/delwithsuffix.py | 0
|
||||||
|
mesonbuild/scripts/depfixer.py | 0
|
||||||
|
mesonbuild/scripts/dirchanger.py | 0
|
||||||
|
mesonbuild/scripts/gettext.py | 2 --
|
||||||
|
mesonbuild/scripts/gtkdochelper.py | 0
|
||||||
|
mesonbuild/scripts/meson_benchmark.py | 0
|
||||||
|
mesonbuild/scripts/meson_exe.py | 0
|
||||||
|
mesonbuild/scripts/meson_install.py | 0
|
||||||
|
mesonbuild/scripts/meson_test.py | 0
|
||||||
|
mesonbuild/scripts/regen_checker.py | 0
|
||||||
|
mesonbuild/scripts/scanbuild.py | 1 -
|
||||||
|
mesonbuild/scripts/symbolextractor.py | 0
|
||||||
|
mesonbuild/scripts/vcstagger.py | 0
|
||||||
|
17 files changed, 9 deletions(-)
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/commandrunner.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/delwithsuffix.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/depfixer.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/dirchanger.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/gtkdochelper.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/meson_benchmark.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/meson_exe.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/meson_install.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/meson_test.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/regen_checker.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/symbolextractor.py
|
||||||
|
mode change 100644 => 100755 mesonbuild/scripts/vcstagger.py
|
||||||
|
|
||||||
|
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py
|
||||||
|
index afabc62..25f2c6b 100644
|
||||||
|
--- a/mesonbuild/mconf.py
|
||||||
|
+++ b/mesonbuild/mconf.py
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#!/usr/bin/env python3
|
||||||
|
-
|
||||||
|
# Copyright 2014-2016 The Meson development team
|
||||||
|
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
|
||||||
|
index f35d821..f7da1e0 100644
|
||||||
|
--- a/mesonbuild/mesonmain.py
|
||||||
|
+++ b/mesonbuild/mesonmain.py
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#!/usr/bin/env python3
|
||||||
|
-
|
||||||
|
# Copyright 2012-2016 The Meson development team
|
||||||
|
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
|
||||||
|
index 2086c37..a18912e 100644
|
||||||
|
--- a/mesonbuild/mintro.py
|
||||||
|
+++ b/mesonbuild/mintro.py
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#!/usr/bin/env python3
|
||||||
|
-
|
||||||
|
# Copyright 2014-2016 The Meson development team
|
||||||
|
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
diff --git a/mesonbuild/scripts/commandrunner.py b/mesonbuild/scripts/commandrunner.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/delwithsuffix.py b/mesonbuild/scripts/delwithsuffix.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/dirchanger.py b/mesonbuild/scripts/dirchanger.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/gettext.py b/mesonbuild/scripts/gettext.py
|
||||||
|
index 1f0a391..ba6b242 100644
|
||||||
|
--- a/mesonbuild/scripts/gettext.py
|
||||||
|
+++ b/mesonbuild/scripts/gettext.py
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#!/usr/bin/env python3
|
||||||
|
-
|
||||||
|
# Copyright 2016 The Meson development team
|
||||||
|
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/meson_benchmark.py b/mesonbuild/scripts/meson_benchmark.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/meson_exe.py b/mesonbuild/scripts/meson_exe.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/meson_test.py b/mesonbuild/scripts/meson_test.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/regen_checker.py b/mesonbuild/scripts/regen_checker.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/scanbuild.py b/mesonbuild/scripts/scanbuild.py
|
||||||
|
index f90c3c7..f13a1a4 100644
|
||||||
|
--- a/mesonbuild/scripts/scanbuild.py
|
||||||
|
+++ b/mesonbuild/scripts/scanbuild.py
|
||||||
|
@@ -1,5 +1,4 @@
|
||||||
|
# Copyright 2016 The Meson development team
|
||||||
|
-
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
diff --git a/mesonbuild/scripts/symbolextractor.py b/mesonbuild/scripts/symbolextractor.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
diff --git a/mesonbuild/scripts/vcstagger.py b/mesonbuild/scripts/vcstagger.py
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
30
0004-Test-arrays-in-languages-for-the-project-method.patch
Normal file
30
0004-Test-arrays-in-languages-for-the-project-method.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 6f0aaea65895f359c989df89d9751143a46a8368 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nirbheek Chauhan <nirbheek@centricular.com>
|
||||||
|
Date: Fri, 7 Oct 2016 18:30:35 +0530
|
||||||
|
Subject: [PATCH 04/16] Test arrays in languages for the project() method
|
||||||
|
|
||||||
|
This broke in 6590b7221e1e3a30b33a6b74b380ee5a2b24d7ef and we didn't
|
||||||
|
have a test for it.
|
||||||
|
|
||||||
|
(cherry picked from commit 4990dd197c8bc8b61b940d3564f4d8479ce32d1c)
|
||||||
|
---
|
||||||
|
test cases/common/1 trivial/meson.build | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test cases/common/1 trivial/meson.build b/test cases/common/1 trivial/meson.build
|
||||||
|
index 3f14539..1f7b375 100644
|
||||||
|
--- a/test cases/common/1 trivial/meson.build
|
||||||
|
+++ b/test cases/common/1 trivial/meson.build
|
||||||
|
@@ -1,5 +1,8 @@
|
||||||
|
# Comment on the first line
|
||||||
|
-project('trivial test', 'c', meson_version : '>=0.27.0')
|
||||||
|
+project('trivial test',
|
||||||
|
+ # Comment inside a function call + array for language list
|
||||||
|
+ ['c'],
|
||||||
|
+ meson_version : '>=0.27.0')
|
||||||
|
#this is a comment
|
||||||
|
sources = 'trivial.c'
|
||||||
|
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
81
0005-intrp-Don-t-do-custom-AST-parsing-for-project.patch
Normal file
81
0005-intrp-Don-t-do-custom-AST-parsing-for-project.patch
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
From 5abbbaa2cc5bc554555ead8464ba659f4cd8e4c0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nirbheek Chauhan <nirbheek@centricular.com>
|
||||||
|
Date: Fri, 7 Oct 2016 18:37:03 +0530
|
||||||
|
Subject: [PATCH 05/16] intrp: Don't do custom AST parsing for project()
|
||||||
|
|
||||||
|
Reuse the standard evaluate_codeblock() parsing since it does proper
|
||||||
|
error handling, and also handles, for instance, lists in string
|
||||||
|
arguments (flatten), etc. properly.
|
||||||
|
|
||||||
|
We need to declare more variables in advance now, but that should be ok.
|
||||||
|
|
||||||
|
(cherry picked from commit 411d6c8bc4919c28adfe5041a5576a937876ea29)
|
||||||
|
---
|
||||||
|
mesonbuild/interpreter.py | 22 ++++++++++------------
|
||||||
|
1 file changed, 10 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
|
||||||
|
index cc85e77..b3bb1f2 100644
|
||||||
|
--- a/mesonbuild/interpreter.py
|
||||||
|
+++ b/mesonbuild/interpreter.py
|
||||||
|
@@ -1129,6 +1129,12 @@ class Interpreter():
|
||||||
|
self.sanity_check_ast()
|
||||||
|
self.variables = {}
|
||||||
|
self.builtin = {}
|
||||||
|
+ self.generators = []
|
||||||
|
+ self.visited_subdirs = {}
|
||||||
|
+ self.global_args_frozen = False
|
||||||
|
+ self.subprojects = {}
|
||||||
|
+ self.subproject_stack = []
|
||||||
|
+ self.build_func_dict()
|
||||||
|
self.parse_project()
|
||||||
|
self.builtin['build_machine'] = BuildMachine(self.coredata.compilers)
|
||||||
|
if not self.build.environment.is_cross_build():
|
||||||
|
@@ -1145,13 +1151,7 @@ class Interpreter():
|
||||||
|
else:
|
||||||
|
self.builtin['target_machine'] = self.builtin['host_machine']
|
||||||
|
self.builtin['meson'] = MesonMain(build, self)
|
||||||
|
- self.build_func_dict()
|
||||||
|
self.build_def_files = [os.path.join(self.subdir, environment.build_filename)]
|
||||||
|
- self.generators = []
|
||||||
|
- self.visited_subdirs = {}
|
||||||
|
- self.global_args_frozen = False
|
||||||
|
- self.subprojects = {}
|
||||||
|
- self.subproject_stack = []
|
||||||
|
|
||||||
|
def build_func_dict(self):
|
||||||
|
self.funcs = {'project' : self.func_project,
|
||||||
|
@@ -1203,9 +1203,7 @@ class Interpreter():
|
||||||
|
Parses project() and initializes languages, compilers etc. Do this
|
||||||
|
early because we need this before we parse the rest of the AST.
|
||||||
|
"""
|
||||||
|
- project = self.ast.lines[0]
|
||||||
|
- args, kwargs = self.reduce_arguments(project.args)
|
||||||
|
- self.func_project(project, args, kwargs)
|
||||||
|
+ self.evaluate_codeblock(self.ast, end=1)
|
||||||
|
|
||||||
|
def module_method_callback(self, invalues):
|
||||||
|
unwrap_single = False
|
||||||
|
@@ -1282,7 +1280,7 @@ class Interpreter():
|
||||||
|
self.evaluate_codeblock(self.ast, start=1)
|
||||||
|
mlog.log('Build targets in project:', mlog.bold(str(len(self.build.targets))))
|
||||||
|
|
||||||
|
- def evaluate_codeblock(self, node, start=0):
|
||||||
|
+ def evaluate_codeblock(self, node, start=0, end=None):
|
||||||
|
if node is None:
|
||||||
|
return
|
||||||
|
if not isinstance(node, mparser.CodeBlockNode):
|
||||||
|
@@ -1290,8 +1288,8 @@ class Interpreter():
|
||||||
|
e.lineno = node.lineno
|
||||||
|
e.colno = node.colno
|
||||||
|
raise e
|
||||||
|
- statements = node.lines
|
||||||
|
- i = start
|
||||||
|
+ statements = node.lines[start:end]
|
||||||
|
+ i = 0
|
||||||
|
while i < len(statements):
|
||||||
|
cur = statements[i]
|
||||||
|
try:
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
29
0006-gnome.generate_gir-Also-include-current-build-dir.patch
Normal file
29
0006-gnome.generate_gir-Also-include-current-build-dir.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 6fda56e6be2a9f33e647b5c4d9c1b20b9e29c972 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Patrick Griffis <tingping@tingping.se>
|
||||||
|
Date: Mon, 3 Oct 2016 12:51:23 -0400
|
||||||
|
Subject: [PATCH 06/16] gnome.generate_gir(): Also include current build dir
|
||||||
|
|
||||||
|
Continuation of 084b854ce057ee6d954c24e58321caa92f542bc5
|
||||||
|
|
||||||
|
(cherry picked from commit 94b7b59546cfbc311336ec3700393cfff3d4a840)
|
||||||
|
---
|
||||||
|
mesonbuild/modules/gnome.py | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
|
||||||
|
index 81cc462..be111ea 100644
|
||||||
|
--- a/mesonbuild/modules/gnome.py
|
||||||
|
+++ b/mesonbuild/modules/gnome.py
|
||||||
|
@@ -225,7 +225,8 @@ class GnomeModule:
|
||||||
|
|
||||||
|
extra_args = mesonlib.stringlistify(kwargs.pop('extra_args', []))
|
||||||
|
scan_command += extra_args
|
||||||
|
- scan_command += ['-I' + os.path.join(state.environment.get_source_dir(), state.subdir)]
|
||||||
|
+ scan_command += ['-I' + os.path.join(state.environment.get_source_dir(), state.subdir),
|
||||||
|
+ '-I' + os.path.join(state.environment.get_build_dir(), state.subdir)]
|
||||||
|
scan_command += self.get_include_args(state, girtarget.get_include_dirs())
|
||||||
|
|
||||||
|
if 'link_with' in kwargs:
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
133
0007-rpm-couple-of-improvements-and-fixes.patch
Normal file
133
0007-rpm-couple-of-improvements-and-fixes.patch
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
From 90f928d01f917fcc8944272ad4b30b81a29f53ca Mon Sep 17 00:00:00 2001
|
||||||
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
Date: Sat, 8 Oct 2016 16:54:03 +0200
|
||||||
|
Subject: [PATCH 07/16] rpm: couple of improvements and fixes
|
||||||
|
|
||||||
|
* Don't hardcode /usr/bin, use %{_bindir}
|
||||||
|
* Implement %meson_build / %meson_install / %meson_test
|
||||||
|
* Automatic handling of out-of-tree builds
|
||||||
|
|
||||||
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
(cherry picked from commit 0d58ddd739c1d7f8c0e6e49b721dd3df965167c0)
|
||||||
|
---
|
||||||
|
data/macros.meson | 48 +++++++++++++++++++++++++++--------------------
|
||||||
|
mesonbuild/modules/rpm.py | 22 +++++++---------------
|
||||||
|
2 files changed, 35 insertions(+), 35 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/data/macros.meson b/data/macros.meson
|
||||||
|
index c89854b..05ff484 100644
|
||||||
|
--- a/data/macros.meson
|
||||||
|
+++ b/data/macros.meson
|
||||||
|
@@ -1,21 +1,29 @@
|
||||||
|
-%__meson /usr/bin/meson
|
||||||
|
+%__meson %{_bindir}/meson
|
||||||
|
+%__sourcedir .
|
||||||
|
+%__builddir %{_target_platform}
|
||||||
|
+%__meson_ninja_opts -v %{?_smp_mflags} -C %{__builddir}
|
||||||
|
|
||||||
|
-%meson() %{expand:\
|
||||||
|
- export CFLAGS="%{optflags}" ; \
|
||||||
|
- export CXXFLAGS="%{optflags}" ; \
|
||||||
|
- export FFLAGS="%{optflags} -I%{_fmoddir}" ; \
|
||||||
|
- export FCFLAGS="%{optflags} -I%{_fmoddir}" ; \
|
||||||
|
- export LDFLAGS="%{__global_ldflags}" ; \
|
||||||
|
- %__meson %{?1} \\\
|
||||||
|
- --prefix=%{_prefix} \\\
|
||||||
|
- --libdir=%{_libdir} \\\
|
||||||
|
- --libexecdir=%{_libexecdir} \\\
|
||||||
|
- --bindir=%{_bindir} \\\
|
||||||
|
- --includedir=%{_includedir} \\\
|
||||||
|
- --datadir=%{_datadir} \\\
|
||||||
|
- --mandir=%{_mandir} \\\
|
||||||
|
- --localedir=%{_datadir}/locale \\\
|
||||||
|
- --sysconfdir=%{_sysconfdir} \\\
|
||||||
|
- --buildtype=plain \
|
||||||
|
- %{nil} \
|
||||||
|
-}
|
||||||
|
+%meson \
|
||||||
|
+ export CFLAGS="%{optflags}" \
|
||||||
|
+ export CXXFLAGS="%{optflags}" \
|
||||||
|
+ export FFLAGS="%{optflags} -I%{_fmoddir}" \
|
||||||
|
+ export FCFLAGS="%{optflags} -I%{_fmoddir}" \
|
||||||
|
+ export LDFLAGS="%{?__global_ldflags}" \
|
||||||
|
+ mkdir -p %{__builddir} \
|
||||||
|
+ pushd %{__builddir} \
|
||||||
|
+ %{__meson} \\\
|
||||||
|
+ --buildtype=plain \\\
|
||||||
|
+ --prefix=%{_prefix} \\\
|
||||||
|
+ --libdir=%{_libdir} \\\
|
||||||
|
+ --libexecdir=%{_libexecdir} \\\
|
||||||
|
+ --bindir=%{_bindir} \\\
|
||||||
|
+ --includedir=%{_includedir} \\\
|
||||||
|
+ --datadir=%{_datadir} \\\
|
||||||
|
+ --mandir=%{_mandir} \\\
|
||||||
|
+ --localedir=%{_datadir}/locale \\\
|
||||||
|
+ --sysconfdir=%{_sysconfdir} \\\
|
||||||
|
+ $OLDPWD/%{__sourcedir} \
|
||||||
|
+ popd
|
||||||
|
+%meson_build %ninja_build -C %{__builddir}
|
||||||
|
+%meson_install %ninja_install -C %{__builddir}
|
||||||
|
+%meson_test %ninja_test -C %{__builddir}
|
||||||
|
diff --git a/mesonbuild/modules/rpm.py b/mesonbuild/modules/rpm.py
|
||||||
|
index 89194e9..13aa20b 100644
|
||||||
|
--- a/mesonbuild/modules/rpm.py
|
||||||
|
+++ b/mesonbuild/modules/rpm.py
|
||||||
|
@@ -104,7 +104,7 @@ class RPMModule:
|
||||||
|
mlog.bold('dnf provides %s' % lib.fullpath))
|
||||||
|
for prog in state.environment.coredata.ext_progs.values():
|
||||||
|
if not prog.found():
|
||||||
|
- fn.write('BuildRequires: /usr/bin/%s # FIXME\n' %
|
||||||
|
+ fn.write('BuildRequires: %{_bindir}/%s # FIXME\n' %
|
||||||
|
prog.get_name())
|
||||||
|
else:
|
||||||
|
fn.write('BuildRequires: %s\n' % ' '.join(prog.fullpath))
|
||||||
|
@@ -115,32 +115,25 @@ class RPMModule:
|
||||||
|
if devel_subpkg:
|
||||||
|
fn.write('%package devel\n')
|
||||||
|
fn.write('Summary: Development files for %{name}\n')
|
||||||
|
- fn.write('Requires: %{name}%{?_isa} = %{version}-%{release}\n')
|
||||||
|
+ fn.write('Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}{version}-%{release}\n')
|
||||||
|
fn.write('\n')
|
||||||
|
fn.write('%description devel\n')
|
||||||
|
fn.write('Development files for %{name}.\n')
|
||||||
|
fn.write('\n')
|
||||||
|
fn.write('%prep\n')
|
||||||
|
fn.write('%autosetup\n')
|
||||||
|
- fn.write('rm -rf rpmbuilddir && mkdir rpmbuilddir\n')
|
||||||
|
fn.write('\n')
|
||||||
|
fn.write('%build\n')
|
||||||
|
- fn.write('pushd rpmbuilddir\n')
|
||||||
|
- fn.write(' %meson ..\n')
|
||||||
|
- fn.write(' ninja-build -v\n')
|
||||||
|
- fn.write('popd\n')
|
||||||
|
+ fn.write('%meson\n')
|
||||||
|
+ fn.write('%meson_build\n')
|
||||||
|
fn.write('\n')
|
||||||
|
fn.write('%install\n')
|
||||||
|
- fn.write('pushd rpmbuilddir\n')
|
||||||
|
- fn.write(' DESTDIR=%{buildroot} ninja-build -v install\n')
|
||||||
|
- fn.write('popd\n')
|
||||||
|
+ fn.write('%meson_install\n')
|
||||||
|
if len(to_delete) > 0:
|
||||||
|
- fn.write('rm -rf %s\n' % ' '.join(to_delete))
|
||||||
|
+ fn.write('rm -vf %s\n' % ' '.join(to_delete))
|
||||||
|
fn.write('\n')
|
||||||
|
fn.write('%check\n')
|
||||||
|
- fn.write('pushd rpmbuilddir\n')
|
||||||
|
- fn.write(' ninja-build -v test\n')
|
||||||
|
- fn.write('popd\n')
|
||||||
|
+ fn.write('%meson_test\n')
|
||||||
|
fn.write('\n')
|
||||||
|
fn.write('%files\n')
|
||||||
|
for f in files:
|
||||||
|
@@ -153,7 +146,6 @@ class RPMModule:
|
||||||
|
fn.write('\n')
|
||||||
|
if so_installed:
|
||||||
|
fn.write('%post -p /sbin/ldconfig\n')
|
||||||
|
- fn.write('\n')
|
||||||
|
fn.write('%postun -p /sbin/ldconfig\n')
|
||||||
|
fn.write('\n')
|
||||||
|
fn.write('%changelog\n')
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
25
0008-fixup-rpm-couple-of-improvements-and-fixes.patch
Normal file
25
0008-fixup-rpm-couple-of-improvements-and-fixes.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 9fdf87523943b38a59093fa9bde126f37a6b489b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
Date: Sat, 8 Oct 2016 17:13:37 +0200
|
||||||
|
Subject: [PATCH 08/16] fixup! rpm: couple of improvements and fixes
|
||||||
|
|
||||||
|
(cherry picked from commit b0fc370e727a9ad46516d13dac442c42801884b1)
|
||||||
|
---
|
||||||
|
data/macros.meson | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/data/macros.meson b/data/macros.meson
|
||||||
|
index 05ff484..dd0e60c 100644
|
||||||
|
--- a/data/macros.meson
|
||||||
|
+++ b/data/macros.meson
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
%__meson %{_bindir}/meson
|
||||||
|
%__sourcedir .
|
||||||
|
%__builddir %{_target_platform}
|
||||||
|
-%__meson_ninja_opts -v %{?_smp_mflags} -C %{__builddir}
|
||||||
|
|
||||||
|
%meson \
|
||||||
|
export CFLAGS="%{optflags}" \
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
33
0009-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch
Normal file
33
0009-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 15e90969547bc3946540dfc75e7912bd350972fa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
Date: Sat, 8 Oct 2016 17:15:02 +0200
|
||||||
|
Subject: [PATCH 09/16] fixup! fixup! rpm: couple of improvements and fixes
|
||||||
|
|
||||||
|
(cherry picked from commit 1e640955b6f7730e365f50d810e7031511b0473b)
|
||||||
|
---
|
||||||
|
data/macros.meson | 12 +++++++++---
|
||||||
|
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/data/macros.meson b/data/macros.meson
|
||||||
|
index dd0e60c..4b91c70 100644
|
||||||
|
--- a/data/macros.meson
|
||||||
|
+++ b/data/macros.meson
|
||||||
|
@@ -23,6 +23,12 @@
|
||||||
|
--sysconfdir=%{_sysconfdir} \\\
|
||||||
|
$OLDPWD/%{__sourcedir} \
|
||||||
|
popd
|
||||||
|
-%meson_build %ninja_build -C %{__builddir}
|
||||||
|
-%meson_install %ninja_install -C %{__builddir}
|
||||||
|
-%meson_test %ninja_test -C %{__builddir}
|
||||||
|
+
|
||||||
|
+%meson_build \
|
||||||
|
+ %ninja_build -C %{__builddir}
|
||||||
|
+
|
||||||
|
+%meson_install \
|
||||||
|
+ %ninja_install -C %{__builddir}
|
||||||
|
+
|
||||||
|
+%meson_test \
|
||||||
|
+ %ninja_test -C %{__builddir}
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
@ -0,0 +1,49 @@
|
|||||||
|
From 749448d01669693fe846e8c6496eaf35de1f1dc3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thibault Saunier <thibault.saunier@osg.samsung.com>
|
||||||
|
Date: Sat, 8 Oct 2016 11:16:50 +0200
|
||||||
|
Subject: [PATCH 10/16] dependencies: Fix traceback always setting 'variable'
|
||||||
|
|
||||||
|
if pkg-config return != 0 and the dep is not required, it will not be set
|
||||||
|
|
||||||
|
(cherry picked from commit 6eacca2024b6b4366d427a18372dd4d0aa972df7)
|
||||||
|
---
|
||||||
|
mesonbuild/dependencies.py | 1 +
|
||||||
|
test cases/frameworks/7 gnome/gir/meson.build | 3 +++
|
||||||
|
2 files changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
|
||||||
|
index 1b9e6f4..ccff7a7 100644
|
||||||
|
--- a/mesonbuild/dependencies.py
|
||||||
|
+++ b/mesonbuild/dependencies.py
|
||||||
|
@@ -188,6 +188,7 @@ class PkgConfigDependency(Dependency):
|
||||||
|
p = subprocess.Popen([self.pkgbin, '--variable=%s' % variable_name, self.name],
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
out = p.communicate()[0]
|
||||||
|
+ variable = ''
|
||||||
|
if p.returncode != 0:
|
||||||
|
if self.required:
|
||||||
|
raise DependencyException('%s dependency %s not found.' %
|
||||||
|
diff --git a/test cases/frameworks/7 gnome/gir/meson.build b/test cases/frameworks/7 gnome/gir/meson.build
|
||||||
|
index 287c0d7..a513062 100644
|
||||||
|
--- a/test cases/frameworks/7 gnome/gir/meson.build
|
||||||
|
+++ b/test cases/frameworks/7 gnome/gir/meson.build
|
||||||
|
@@ -14,6 +14,8 @@ girexe = executable(
|
||||||
|
link_with : girlib
|
||||||
|
)
|
||||||
|
|
||||||
|
+fake_dep = dependency('no-way-this-exists', required: false)
|
||||||
|
+
|
||||||
|
gnome.generate_gir(
|
||||||
|
girlib,
|
||||||
|
sources : libsources,
|
||||||
|
@@ -22,6 +24,7 @@ gnome.generate_gir(
|
||||||
|
symbol_prefix : 'meson_',
|
||||||
|
identifier_prefix : 'Meson',
|
||||||
|
includes : ['GObject-2.0'],
|
||||||
|
+ dependencies : [fake_dep],
|
||||||
|
install : true
|
||||||
|
)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
58
0011-Created-path_join-function.patch
Normal file
58
0011-Created-path_join-function.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
From f12c0f31e27ca37400c5ca8deb700af222f0bcb6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jussi Pakkanen <jpakkane@gmail.com>
|
||||||
|
Date: Sun, 9 Oct 2016 05:29:11 -0400
|
||||||
|
Subject: [PATCH 11/16] Created path_join function.
|
||||||
|
|
||||||
|
(cherry picked from commit c2b852c9b392059cba933b0787c1c7880af5e1ae)
|
||||||
|
---
|
||||||
|
mesonbuild/interpreter.py | 10 ++++++++++
|
||||||
|
test cases/common/119 pathjoin/meson.build | 9 +++++++++
|
||||||
|
2 files changed, 19 insertions(+)
|
||||||
|
create mode 100644 test cases/common/119 pathjoin/meson.build
|
||||||
|
|
||||||
|
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
|
||||||
|
index b3bb1f2..be19bab 100644
|
||||||
|
--- a/mesonbuild/interpreter.py
|
||||||
|
+++ b/mesonbuild/interpreter.py
|
||||||
|
@@ -1196,6 +1196,7 @@ class Interpreter():
|
||||||
|
'declare_dependency': self.func_declare_dependency,
|
||||||
|
'assert': self.func_assert,
|
||||||
|
'environment' : self.func_environment,
|
||||||
|
+ 'path_join' : self.func_path_join,
|
||||||
|
}
|
||||||
|
|
||||||
|
def parse_project(self):
|
||||||
|
@@ -2237,6 +2238,15 @@ class Interpreter():
|
||||||
|
def func_environment(self, node, args, kwargs):
|
||||||
|
return EnvironmentVariablesHolder()
|
||||||
|
|
||||||
|
+ @stringArgs
|
||||||
|
+ @noKwargs
|
||||||
|
+ def func_path_join(self, node, args, kwargs):
|
||||||
|
+ if isinstance(args, str):
|
||||||
|
+ st = (args,)
|
||||||
|
+ else:
|
||||||
|
+ st = tuple(args)
|
||||||
|
+ return os.path.join(*args).replace('\\', '/')
|
||||||
|
+
|
||||||
|
def flatten(self, args):
|
||||||
|
if isinstance(args, mparser.StringNode):
|
||||||
|
return args.value
|
||||||
|
diff --git a/test cases/common/119 pathjoin/meson.build b/test cases/common/119 pathjoin/meson.build
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..dd1cf9c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/test cases/common/119 pathjoin/meson.build
|
||||||
|
@@ -0,0 +1,9 @@
|
||||||
|
+project('pathjoin', 'c')
|
||||||
|
+
|
||||||
|
+assert(path_join('foo') == 'foo', 'Single argument join is broken')
|
||||||
|
+assert(path_join('foo', 'bar') == 'foo/bar', 'Path joining is broken')
|
||||||
|
+assert(path_join('foo', 'bar', 'baz') == 'foo/bar/baz', 'Path joining is broken')
|
||||||
|
+assert(path_join('/foo', 'bar') == '/foo/bar', 'Path joining is broken')
|
||||||
|
+assert(path_join('foo', '/bar') == '/bar', 'Absolute path joining is broken')
|
||||||
|
+assert(path_join('/foo', '/bar') == '/bar', 'Absolute path joining is broken')
|
||||||
|
+
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
40
0012-Show-error-log-options-in-help.patch
Normal file
40
0012-Show-error-log-options-in-help.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From ed97ba07f3dee878aca7c5f0d802fd6d75e36704 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jussi Pakkanen <jpakkane@gmail.com>
|
||||||
|
Date: Sat, 8 Oct 2016 11:17:22 -0400
|
||||||
|
Subject: [PATCH 12/16] Show error log options in help.
|
||||||
|
|
||||||
|
(cherry picked from commit e2b3752f875754abcc3981754505ae0db9e18155)
|
||||||
|
---
|
||||||
|
mesonbuild/coredata.py | 2 +-
|
||||||
|
mesonbuild/mesonmain.py | 2 ++
|
||||||
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
|
||||||
|
index 51bf107..b32a257 100644
|
||||||
|
--- a/mesonbuild/coredata.py
|
||||||
|
+++ b/mesonbuild/coredata.py
|
||||||
|
@@ -224,7 +224,7 @@ builtin_options = {
|
||||||
|
'default_library' : [ UserComboOption, 'Default library type.', [ 'shared', 'static' ], 'shared' ],
|
||||||
|
'backend' : [ UserComboOption, 'Backend to use.', backendlist, 'ninja' ],
|
||||||
|
'stdsplit' : [ UserBooleanOption, 'Split stdout and stderr in test logs.', True ],
|
||||||
|
- 'errorlogs' : [ UserBooleanOption, "Whether to print the logs from failing tests.", False ],
|
||||||
|
+ 'errorlogs' : [ UserBooleanOption, "Whether to print the logs from failing tests.", True ],
|
||||||
|
}
|
||||||
|
|
||||||
|
forbidden_target_names = {'clean': None,
|
||||||
|
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
|
||||||
|
index f7da1e0..6374c41 100644
|
||||||
|
--- a/mesonbuild/mesonmain.py
|
||||||
|
+++ b/mesonbuild/mesonmain.py
|
||||||
|
@@ -54,6 +54,8 @@ add_builtin_argument('werror', action='store_true')
|
||||||
|
add_builtin_argument('layout')
|
||||||
|
add_builtin_argument('default-library')
|
||||||
|
add_builtin_argument('warnlevel', dest='warning_level')
|
||||||
|
+add_builtin_argument('stdsplit', action='store_false')
|
||||||
|
+add_builtin_argument('errorlogs', action='store_false')
|
||||||
|
|
||||||
|
parser.add_argument('--cross-file', default=None,
|
||||||
|
help='File describing cross compilation environment.')
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
28
0013-tests-gnome-Add-missing-enums.h-dep-to-enums2.c.patch
Normal file
28
0013-tests-gnome-Add-missing-enums.h-dep-to-enums2.c.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 31b19169cc13b6af0e972db38d1d43967a49ecf0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nirbheek Chauhan <nirbheek@centricular.com>
|
||||||
|
Date: Mon, 10 Oct 2016 23:27:50 +0530
|
||||||
|
Subject: [PATCH 13/16] tests/gnome: Add missing enums.h dep to enums2.c
|
||||||
|
|
||||||
|
Was causing intermittent test failures
|
||||||
|
|
||||||
|
(cherry picked from commit 6a002a7bea8860590fd1ad54d2e12b91c5137e1f)
|
||||||
|
---
|
||||||
|
test cases/frameworks/7 gnome/mkenums/meson.build | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test cases/frameworks/7 gnome/mkenums/meson.build b/test cases/frameworks/7 gnome/mkenums/meson.build
|
||||||
|
index efd6b04..e01e9eb 100644
|
||||||
|
--- a/test cases/frameworks/7 gnome/mkenums/meson.build
|
||||||
|
+++ b/test cases/frameworks/7 gnome/mkenums/meson.build
|
||||||
|
@@ -32,7 +32,7 @@ enums_h2 = gnome.mkenums('abc2',
|
||||||
|
|
||||||
|
enums_c2 = gnome.mkenums('abc2',
|
||||||
|
sources : 'meson-sample.h',
|
||||||
|
- depends : enums_h2,
|
||||||
|
+ depends : [enums_h1, enums_h2],
|
||||||
|
c_template : 'enums2.c.in',
|
||||||
|
ftail : '/* trailing source file info */',
|
||||||
|
install_header : true,
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
From 2105e753c03555a512e3e2dc74921c69cabf40af Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jussi Pakkanen <jpakkane@gmail.com>
|
||||||
|
Date: Mon, 10 Oct 2016 20:32:17 +0300
|
||||||
|
Subject: [PATCH 14/16] Check contents of arguments inside project(). Closes
|
||||||
|
#857.
|
||||||
|
|
||||||
|
(cherry picked from commit 60119753d629053bcd3f0fe973977b8ed8f51ea8)
|
||||||
|
---
|
||||||
|
mesonbuild/interpreter.py | 8 +++-----
|
||||||
|
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
|
||||||
|
index be19bab..645c22f 100644
|
||||||
|
--- a/mesonbuild/interpreter.py
|
||||||
|
+++ b/mesonbuild/interpreter.py
|
||||||
|
@@ -1128,7 +1128,7 @@ class Interpreter():
|
||||||
|
raise me
|
||||||
|
self.sanity_check_ast()
|
||||||
|
self.variables = {}
|
||||||
|
- self.builtin = {}
|
||||||
|
+ self.builtin = {'meson': MesonMain(build, self)}
|
||||||
|
self.generators = []
|
||||||
|
self.visited_subdirs = {}
|
||||||
|
self.global_args_frozen = False
|
||||||
|
@@ -1150,7 +1150,6 @@ class Interpreter():
|
||||||
|
self.builtin['target_machine'] = CrossMachineInfo(cross_info.config['target_machine'])
|
||||||
|
else:
|
||||||
|
self.builtin['target_machine'] = self.builtin['host_machine']
|
||||||
|
- self.builtin['meson'] = MesonMain(build, self)
|
||||||
|
self.build_def_files = [os.path.join(self.subdir, environment.build_filename)]
|
||||||
|
|
||||||
|
def build_func_dict(self):
|
||||||
|
@@ -1254,9 +1253,6 @@ class Interpreter():
|
||||||
|
first = self.ast.lines[0]
|
||||||
|
if not isinstance(first, mparser.FunctionNode) or first.func_name != 'project':
|
||||||
|
raise InvalidCode('First statement must be a call to project')
|
||||||
|
- args = self.reduce_arguments(first.args)[0]
|
||||||
|
- if len(args) < 2:
|
||||||
|
- raise InvalidArguments('Not enough arguments to project(). Needs at least the project name and one language')
|
||||||
|
|
||||||
|
|
||||||
|
def check_cross_stdlibs(self):
|
||||||
|
@@ -1615,6 +1611,8 @@ class Interpreter():
|
||||||
|
self.build.project_name = args[0]
|
||||||
|
if self.environment.first_invocation and 'default_options' in kwargs:
|
||||||
|
self.parse_default_options(kwargs['default_options'])
|
||||||
|
+ if len(args) < 2:
|
||||||
|
+ raise InvalidArguments('Not enough arguments to project(). Needs at least the project name and one language')
|
||||||
|
self.active_projectname = args[0]
|
||||||
|
self.project_version = kwargs.get('version', 'undefined')
|
||||||
|
proj_license = mesonlib.stringlistify(kwargs.get('license', 'unknown'))
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
@ -0,0 +1,68 @@
|
|||||||
|
From 3a621287b7420fe72b2dbe9f1dd3f38ae1687ed5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Patrick Griffis <tingping@tingping.se>
|
||||||
|
Date: Fri, 30 Sep 2016 23:28:40 -0400
|
||||||
|
Subject: [PATCH 15/16] setup.py: On Unix install scripts without .py suffix
|
||||||
|
|
||||||
|
(cherry picked from commit 999669e8501501d4618588008e4bf4353a1ace2a)
|
||||||
|
---
|
||||||
|
setup.py | 27 +++++++++++++++++++++++++++
|
||||||
|
1 file changed, 27 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index d5b79ae..42f8d49 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -14,7 +14,9 @@
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
+import os
|
||||||
|
import sys
|
||||||
|
+from os import path
|
||||||
|
|
||||||
|
if sys.version_info[0] < 3:
|
||||||
|
print('Tried to install with Python 2, Meson only supports Python 3.')
|
||||||
|
@@ -25,8 +27,32 @@ if sys.version_info[0] < 3:
|
||||||
|
# plain distutils when setuptools is not available.
|
||||||
|
try:
|
||||||
|
from setuptools import setup
|
||||||
|
+ from setuptools.command.install_scripts import install_scripts as orig
|
||||||
|
except ImportError:
|
||||||
|
from distutils.core import setup
|
||||||
|
+ from distutils.command.install_scripts import install_scripts as orig
|
||||||
|
+
|
||||||
|
+from distutils.file_util import copy_file
|
||||||
|
+from distutils.dir_util import mkpath
|
||||||
|
+from stat import ST_MODE
|
||||||
|
+
|
||||||
|
+class install_scripts(orig):
|
||||||
|
+ def run(self):
|
||||||
|
+ if sys.platform == 'win32':
|
||||||
|
+ super().run()
|
||||||
|
+ return
|
||||||
|
+
|
||||||
|
+ self.outfiles = []
|
||||||
|
+ if not self.dry_run:
|
||||||
|
+ mkpath(self.install_dir)
|
||||||
|
+
|
||||||
|
+ # We want the files to be installed without a suffix on Unix
|
||||||
|
+ for infile in self.get_inputs():
|
||||||
|
+ in_stripped = infile[:-3] if infile.endswith('.py') else infile
|
||||||
|
+ outfile = path.join(self.install_dir, in_stripped)
|
||||||
|
+ # NOTE: Mode is preserved by default
|
||||||
|
+ copy_file(infile, outfile, dry_run=self.dry_run)
|
||||||
|
+ self.outfiles.append(outfile)
|
||||||
|
|
||||||
|
from mesonbuild.coredata import version
|
||||||
|
|
||||||
|
@@ -46,6 +72,7 @@ setup(name='meson',
|
||||||
|
'mesonconf.py',
|
||||||
|
'mesonintrospect.py',
|
||||||
|
'wraptool.py'],
|
||||||
|
+ cmdclass={'install_scripts': install_scripts},
|
||||||
|
data_files=[('share/man/man1', ['man/meson.1',
|
||||||
|
'man/mesonconf.1',
|
||||||
|
'man/mesonintrospect.1',
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
52
0016-allow-libdir-includedir-etc.-be-absolute-paths.patch
Normal file
52
0016-allow-libdir-includedir-etc.-be-absolute-paths.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
From 02114f9d5066f54c7df9653651c083f590e1da1c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
Date: Fri, 7 Oct 2016 23:15:55 +0200
|
||||||
|
Subject: [PATCH 16/16] allow libdir/includedir/etc. be absolute paths
|
||||||
|
|
||||||
|
In Fedora we don't care about prefix, we want to ensure that libdir
|
||||||
|
is /usr/lib64, localedir is /usr/share/locale, and cetera.
|
||||||
|
|
||||||
|
Additionally, we don't need to ensure that prefix is absolute as we
|
||||||
|
check it in main.
|
||||||
|
|
||||||
|
Fixes: cc19bf0f45f9 ("Move option validation in objects rather than doing it only in the conf script.")
|
||||||
|
Closes: https://github.com/mesonbuild/meson/issues/869
|
||||||
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
(cherry picked from commit a513bcfde613f2a0403f7b0cd34d4bd62674c1d8)
|
||||||
|
---
|
||||||
|
mesonbuild/coredata.py | 5 -----
|
||||||
|
mesonbuild/mesonmain.py | 2 +-
|
||||||
|
2 files changed, 1 insertion(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
|
||||||
|
index b32a257..0a4dca8 100644
|
||||||
|
--- a/mesonbuild/coredata.py
|
||||||
|
+++ b/mesonbuild/coredata.py
|
||||||
|
@@ -36,11 +36,6 @@ class UserStringOption(UserOption):
|
||||||
|
def validate(self, value):
|
||||||
|
if not isinstance(value, str):
|
||||||
|
raise MesonException('Value "%s" for string option "%s" is not a string.' % (str(value), self.name))
|
||||||
|
- if self.name == 'prefix' and not os.path.isabs(value):
|
||||||
|
- raise MesonException('Prefix option value \'{0}\' must be an absolute path.'.format(value))
|
||||||
|
- if self.name in ('libdir', 'bindir', 'includedir', 'datadir', 'mandir', 'localedir') \
|
||||||
|
- and os.path.isabs(value):
|
||||||
|
- raise MesonException('Option %s must not be an absolute path.' % self.name)
|
||||||
|
|
||||||
|
def set_value(self, newvalue):
|
||||||
|
self.validate(newvalue)
|
||||||
|
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
|
||||||
|
index 6374c41..43e4eee 100644
|
||||||
|
--- a/mesonbuild/mesonmain.py
|
||||||
|
+++ b/mesonbuild/mesonmain.py
|
||||||
|
@@ -70,7 +70,7 @@ class MesonApp():
|
||||||
|
def __init__(self, dir1, dir2, script_file, handshake, options, original_cmd_line_args):
|
||||||
|
(self.source_dir, self.build_dir) = self.validate_dirs(dir1, dir2, handshake)
|
||||||
|
if not os.path.isabs(options.prefix):
|
||||||
|
- raise RuntimeError('--prefix value \'{0}\' must be an absolute path: '.format(options.prefix))
|
||||||
|
+ raise RuntimeError('--prefix value must be an absolute path: {!r}'.format(options.prefix))
|
||||||
|
if options.prefix.endswith('/') or options.prefix.endswith('\\'):
|
||||||
|
# On Windows we need to preserve the trailing slash if the
|
||||||
|
# string is of type 'C:\' because 'C:' is not an absolute path.
|
||||||
|
--
|
||||||
|
2.10.1
|
||||||
|
|
34
meson.spec
34
meson.spec
@ -2,14 +2,28 @@
|
|||||||
|
|
||||||
Name: meson
|
Name: meson
|
||||||
Version: 0.35.0
|
Version: 0.35.0
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: High productivity build system
|
Summary: High productivity build system
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://mesonbuild.com/
|
URL: http://mesonbuild.com/
|
||||||
Source0: https://github.com/mesonbuild/meson/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/mesonbuild/meson/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
# https://github.com/mesonbuild/meson/commit/71eddecdc7e82b16c5e454137d641f2a5f7c9c94
|
|
||||||
Patch0001: 0001-Add-missing-dependency-in-gnome.mkenums-test.patch
|
Patch0001: 0001-Add-missing-dependency-in-gnome.mkenums-test.patch
|
||||||
|
Patch0002: 0002-run_tests-Print-stdo-and-stde-in-failing-test-logs.patch
|
||||||
|
Patch0003: 0003-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch
|
||||||
|
Patch0004: 0004-Test-arrays-in-languages-for-the-project-method.patch
|
||||||
|
Patch0005: 0005-intrp-Don-t-do-custom-AST-parsing-for-project.patch
|
||||||
|
Patch0006: 0006-gnome.generate_gir-Also-include-current-build-dir.patch
|
||||||
|
Patch0007: 0007-rpm-couple-of-improvements-and-fixes.patch
|
||||||
|
Patch0008: 0008-fixup-rpm-couple-of-improvements-and-fixes.patch
|
||||||
|
Patch0009: 0009-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch
|
||||||
|
Patch0010: 0010-dependencies-Fix-traceback-always-setting-variable.patch
|
||||||
|
Patch0011: 0011-Created-path_join-function.patch
|
||||||
|
Patch0012: 0012-Show-error-log-options-in-help.patch
|
||||||
|
Patch0013: 0013-tests-gnome-Add-missing-enums.h-dep-to-enums2.c.patch
|
||||||
|
Patch0014: 0014-Check-contents-of-arguments-inside-project-.-Closes-.patch
|
||||||
|
Patch0015: 0015-setup.py-On-Unix-install-scripts-without-.py-suffix.patch
|
||||||
|
Patch0016: 0016-allow-libdir-includedir-etc.-be-absolute-paths.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Obsoletes: %{name}-gui < 0.31.0-3
|
Obsoletes: %{name}-gui < 0.31.0-3
|
||||||
|
|
||||||
@ -36,7 +50,7 @@ BuildRequires: wxGTK3-devel
|
|||||||
BuildRequires: flex bison
|
BuildRequires: flex bison
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: gnustep-base-devel
|
BuildRequires: gnustep-base-devel
|
||||||
BuildRequires: git
|
BuildRequires: git-core
|
||||||
BuildRequires: pkgconfig(protobuf)
|
BuildRequires: pkgconfig(protobuf)
|
||||||
BuildRequires: pkgconfig(glib-2.0)
|
BuildRequires: pkgconfig(glib-2.0)
|
||||||
BuildRequires: pkgconfig(gobject-introspection-1.0) python3-gobject-base gtk-doc
|
BuildRequires: pkgconfig(gobject-introspection-1.0) python3-gobject-base gtk-doc
|
||||||
@ -52,19 +66,18 @@ unit tests, coverage reports, Valgrind, CCache and the like.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
find -type f -name '*.py' -executable -exec sed -i -e '1s|.*|#!%{__python3}|' {} ';'
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%py3_install
|
||||||
install -Dpm 0644 data/macros.%{name} %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{name}
|
install -Dpm0644 data/macros.%{name} %{buildroot}%{rpmmacrodir}/macros.%{name}
|
||||||
for f in %{buildroot}%{_bindir}/*.py; do
|
|
||||||
mv ${f} ${f%%.py}
|
|
||||||
done
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
MESON_PRINT_TEST_OUTPUT=1 ./run_tests.py
|
#export MESON_PRINT_TEST_OUTPUT=1
|
||||||
|
%{__python3} ./run_tests.py
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
@ -78,9 +91,12 @@ MESON_PRINT_TEST_OUTPUT=1 ./run_tests.py
|
|||||||
%{_mandir}/man1/%{name}conf.1.*
|
%{_mandir}/man1/%{name}conf.1.*
|
||||||
%{_mandir}/man1/%{name}introspect.1.*
|
%{_mandir}/man1/%{name}introspect.1.*
|
||||||
%{_mandir}/man1/wraptool.1.*
|
%{_mandir}/man1/wraptool.1.*
|
||||||
%{_rpmconfigdir}/macros.d/macros.%{name}
|
%{rpmmacrodir}/macros.%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 11 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.35.0-3
|
||||||
|
- Backport couple of fixes
|
||||||
|
|
||||||
* Wed Oct 05 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.35.0-2
|
* Wed Oct 05 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.35.0-2
|
||||||
- Apply patch to fix FTBFS
|
- Apply patch to fix FTBFS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user