diff --git a/0001-Add-missing-dependency-in-gnome.mkenums-test.patch b/0001-Add-missing-dependency-in-gnome.mkenums-test.patch
deleted file mode 100644
index 8d66981..0000000
--- a/0001-Add-missing-dependency-in-gnome.mkenums-test.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 07a44766805965f3f9f2afd1b7515e0a853399e6 Mon Sep 17 00:00:00 2001
-From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
-Date: Mon, 3 Oct 2016 17:52:26 -0400
-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 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/test cases/frameworks/7 gnome/mkenums/meson.build b/test cases/frameworks/7 gnome/mkenums/meson.build
-index f0989cf..efd6b04 100644
---- a/test cases/frameworks/7 gnome/mkenums/meson.build	
-+++ b/test cases/frameworks/7 gnome/mkenums/meson.build	
-@@ -23,17 +23,18 @@ test('enum test 1', enumexe1)
- 
- # Generate both header and source via template individually and overriding.
- 
--enums_c2 = gnome.mkenums('abc2',
-+enums_h2 = gnome.mkenums('abc2',
-   sources : 'meson-sample.h',
--  c_template : 'enums2.c.in',
--  ftail : '/* trailing source file info */',
-+  h_template : 'enums2.h.in',
-+  ftail : '/* trailing header file info */',
-   install_header : true,
-   install_dir : get_option('includedir'))
- 
--enums_h2 = gnome.mkenums('abc2',
-+enums_c2 = gnome.mkenums('abc2',
-   sources : 'meson-sample.h',
--  h_template : 'enums2.h.in',
--  ftail : '/* trailing header file info */',
-+  depends : enums_h2,
-+  c_template : 'enums2.c.in',
-+  ftail : '/* trailing source file info */',
-   install_header : true,
-   install_dir : get_option('includedir'))
- 
--- 
-2.10.1
-
diff --git a/0001-tools-ac_converter-couple-of-trivial-fixes-867.patch b/0001-tools-ac_converter-couple-of-trivial-fixes-867.patch
new file mode 100644
index 0000000..ade2116
--- /dev/null
+++ b/0001-tools-ac_converter-couple-of-trivial-fixes-867.patch
@@ -0,0 +1,63 @@
+From f861391a5916aa5fcbdd0390bad6afa908ee6d29 Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <ignatenko@redhat.com>
+Date: Fri, 7 Oct 2016 20:04:46 +0200
+Subject: [PATCH 01/10] tools/ac_converter: couple of trivial fixes (#867)
+
+W: 31, 4: Duplicate key 'HAVE_UNSETENV' in dictionary (duplicate-key)
+
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+
+* tools/ac_converter: fix undefined variable 'func'
+
+E:283,11: Undefined variable 'func' (undefined-variable)
+
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+
+* tools/ac_converter: use spaces properly in HAVE_SOCKET
+
+C: 97, 0: Exactly one space required after comma
+     'HAVE_SOCKET' : ('socket',' sys/socket.h'),
+                              ^ (bad-whitespace)
+
+This also might cause some issue after conversion.
+
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+
+(cherry picked from commit 1df8c5c62b7492b89eb4c3d836d33eba215def7f)
+---
+ tools/ac_converter.py | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/tools/ac_converter.py b/tools/ac_converter.py
+index c7c9f44..4f284af 100755
+--- a/tools/ac_converter.py
++++ b/tools/ac_converter.py
+@@ -94,7 +94,7 @@ function_data = \
+      'HAVE_READLINK': ('readlink', 'unistd.h'),
+      'HAVE_RES_INIT': ('res_init', 'resolv.h'),
+      'HAVE_SENDMMSG': ('sendmmsg', 'sys/socket.h'),
+-     'HAVE_SOCKET' : ('socket',' sys/socket.h'),
++     'HAVE_SOCKET' : ('socket', 'sys/socket.h'),
+      'HAVE_GETENV': ('getenv', 'stdlib.h'),
+      'HAVE_SETENV': ('setenv', 'stdlib.h'),
+      'HAVE_PUTENV': ('putenv', 'stdlib.h'),
+@@ -115,7 +115,6 @@ function_data = \
+      'HAVE_SYMLINK': ('symlink', 'unistd.h'),
+      'HAVE_SYSCTLBYNAME': ('sysctlbyname', 'sys/sysctl.h'),
+      'HAVE_TIMEGM': ('timegm', 'time.h'),
+-     'HAVE_UNSETENV': ('unsetenv', 'stdlib.h'),
+      'HAVE_USELOCALE': ('uselocale', 'xlocale.h'),
+      'HAVE_UTIMES': ('utimes', 'sys/time.h'),
+      'HAVE_VALLOC': ('valloc', 'stdlib.h'),
+@@ -280,7 +279,7 @@ endforeach
+ 
+ print('check_functions = [')
+ for token in functions:
+-    if len(func) == 3:
++    if len(token) == 3:
+         token, fdata0, fdata1 = token
+         print("  ['%s', '%s', '#include<%s>']," % (token, fdata0, fdata1))
+     else:
+-- 
+2.10.1
+
diff --git a/0002-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch b/0002-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch
new file mode 100644
index 0000000..8c46633
--- /dev/null
+++ b/0002-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch
@@ -0,0 +1,128 @@
+From 7550d108898b30c418d2b95e164988a3aea03471 Mon Sep 17 00:00:00 2001
+From: Jussi Pakkanen <jpakkane@gmail.com>
+Date: Tue, 4 Oct 2016 00:38:42 +0300
+Subject: [PATCH 02/10] 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
+
diff --git a/0002-run_tests-Print-stdo-and-stde-in-failing-test-logs.patch b/0002-run_tests-Print-stdo-and-stde-in-failing-test-logs.patch
deleted file mode 100644
index b51d456..0000000
--- a/0002-run_tests-Print-stdo-and-stde-in-failing-test-logs.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-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
-
diff --git a/0003-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch b/0003-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch
deleted file mode 100644
index e42e5b9..0000000
--- a/0003-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-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
-
diff --git a/0003-gnome.generate_gir-Also-include-current-build-dir.patch b/0003-gnome.generate_gir-Also-include-current-build-dir.patch
new file mode 100644
index 0000000..827ad10
--- /dev/null
+++ b/0003-gnome.generate_gir-Also-include-current-build-dir.patch
@@ -0,0 +1,29 @@
+From 320fda7867428406771adfd3c4afa91a33fd6845 Mon Sep 17 00:00:00 2001
+From: Patrick Griffis <tingping@tingping.se>
+Date: Mon, 3 Oct 2016 12:51:23 -0400
+Subject: [PATCH 03/10] 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
+
diff --git a/0004-Test-arrays-in-languages-for-the-project-method.patch b/0004-Test-arrays-in-languages-for-the-project-method.patch
deleted file mode 100644
index 4ccb7dd..0000000
--- a/0004-Test-arrays-in-languages-for-the-project-method.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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
-
diff --git a/0004-rpm-couple-of-improvements-and-fixes.patch b/0004-rpm-couple-of-improvements-and-fixes.patch
new file mode 100644
index 0000000..54b422f
--- /dev/null
+++ b/0004-rpm-couple-of-improvements-and-fixes.patch
@@ -0,0 +1,133 @@
+From 12501846ca7f5ce3b33bb9f58839d392952e8c78 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 04/10] 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
+
diff --git a/0005-fixup-rpm-couple-of-improvements-and-fixes.patch b/0005-fixup-rpm-couple-of-improvements-and-fixes.patch
new file mode 100644
index 0000000..533f823
--- /dev/null
+++ b/0005-fixup-rpm-couple-of-improvements-and-fixes.patch
@@ -0,0 +1,25 @@
+From b8fa8cafd1dcb77cec9619c23aef99eb2975348d 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 05/10] 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
+
diff --git a/0005-intrp-Don-t-do-custom-AST-parsing-for-project.patch b/0005-intrp-Don-t-do-custom-AST-parsing-for-project.patch
deleted file mode 100644
index 6a4b76c..0000000
--- a/0005-intrp-Don-t-do-custom-AST-parsing-for-project.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-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
-
diff --git a/0006-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch b/0006-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch
new file mode 100644
index 0000000..4da4e76
--- /dev/null
+++ b/0006-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch
@@ -0,0 +1,33 @@
+From 3e5b7cd80b2666fcb1ad4961e7ab9dfd4b99454f 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 06/10] 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
+
diff --git a/0006-gnome.generate_gir-Also-include-current-build-dir.patch b/0006-gnome.generate_gir-Also-include-current-build-dir.patch
deleted file mode 100644
index 99c8c8f..0000000
--- a/0006-gnome.generate_gir-Also-include-current-build-dir.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-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
-
diff --git a/0007-Show-error-log-options-in-help.patch b/0007-Show-error-log-options-in-help.patch
new file mode 100644
index 0000000..15e53a7
--- /dev/null
+++ b/0007-Show-error-log-options-in-help.patch
@@ -0,0 +1,40 @@
+From c66a24034898d0f08b69a02541b22e340fccb80c Mon Sep 17 00:00:00 2001
+From: Jussi Pakkanen <jpakkane@gmail.com>
+Date: Sat, 8 Oct 2016 11:17:22 -0400
+Subject: [PATCH 07/10] 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 587c6b3..2ff3bc8 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
+
diff --git a/0007-rpm-couple-of-improvements-and-fixes.patch b/0007-rpm-couple-of-improvements-and-fixes.patch
deleted file mode 100644
index b976d7a..0000000
--- a/0007-rpm-couple-of-improvements-and-fixes.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-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
-
diff --git a/0008-fixup-rpm-couple-of-improvements-and-fixes.patch b/0008-fixup-rpm-couple-of-improvements-and-fixes.patch
deleted file mode 100644
index 6041dbd..0000000
--- a/0008-fixup-rpm-couple-of-improvements-and-fixes.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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
-
diff --git a/0008-setup.py-On-Unix-install-scripts-without-.py-suffix.patch b/0008-setup.py-On-Unix-install-scripts-without-.py-suffix.patch
new file mode 100644
index 0000000..42175ad
--- /dev/null
+++ b/0008-setup.py-On-Unix-install-scripts-without-.py-suffix.patch
@@ -0,0 +1,68 @@
+From 9c39bec3c0c3ff08674a4924901c1ce8b566866a Mon Sep 17 00:00:00 2001
+From: Patrick Griffis <tingping@tingping.se>
+Date: Fri, 30 Sep 2016 23:28:40 -0400
+Subject: [PATCH 08/10] 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
+
diff --git a/0009-allow-libdir-includedir-etc.-be-absolute-paths.patch b/0009-allow-libdir-includedir-etc.-be-absolute-paths.patch
new file mode 100644
index 0000000..ed33223
--- /dev/null
+++ b/0009-allow-libdir-includedir-etc.-be-absolute-paths.patch
@@ -0,0 +1,52 @@
+From 4e8696fefcc2c4ce2c5d49b19ce5b4a8a9b9debb 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 09/10] 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 2ff3bc8..34bb6f1 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
+
diff --git a/0009-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch b/0009-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch
deleted file mode 100644
index 8598ed8..0000000
--- a/0009-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-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
-
diff --git a/0010-Split-generator-BASENAME-at-the-first-extension.patch b/0010-Split-generator-BASENAME-at-the-first-extension.patch
new file mode 100644
index 0000000..26684b6
--- /dev/null
+++ b/0010-Split-generator-BASENAME-at-the-first-extension.patch
@@ -0,0 +1,55 @@
+From 7fdea0243db634c7ea2262826778d4eac3e8eb29 Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
+Date: Wed, 12 Oct 2016 20:58:33 -0400
+Subject: [PATCH 10/10] Split generator @BASENAME@ at the first extension.
+
+(cherry picked from commit 779788ad82166db028488f68ec90258d4ca63c7d)
+---
+ mesonbuild/build.py                           | 4 ++--
+ test cases/common/118 allgenerate/meson.build | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/mesonbuild/build.py b/mesonbuild/build.py
+index 1ef183b..23a5f4c 100644
+--- a/mesonbuild/build.py
++++ b/mesonbuild/build.py
+@@ -733,14 +733,14 @@ class Generator():
+ 
+     def get_base_outnames(self, inname):
+         plainname = os.path.split(inname)[1]
+-        basename = plainname.split('.')[0]
++        basename = os.path.splitext(plainname)[0]
+         return [x.replace('@BASENAME@', basename).replace('@PLAINNAME@', plainname) for x in self.outputs]
+ 
+     def get_dep_outname(self, inname):
+         if self.depfile is None:
+             raise InvalidArguments('Tried to get dep name for rule that does not have dependency file defined.')
+         plainname = os.path.split(inname)[1]
+-        basename = plainname.split('.')[0]
++        basename = os.path.splitext(plainname)[0]
+         return self.depfile.replace('@BASENAME@', basename).replace('@PLAINNAME@', plainname)
+ 
+     def get_arglist(self):
+diff --git a/test cases/common/118 allgenerate/meson.build b/test cases/common/118 allgenerate/meson.build
+index 1ec93e6..36abbe9 100644
+--- a/test cases/common/118 allgenerate/meson.build	
++++ b/test cases/common/118 allgenerate/meson.build	
+@@ -5,7 +5,7 @@ project('all sources generated', 'c', 'cpp')
+ comp = find_program('converter.py')
+ 
+ g = generator(comp,
+-  output : '@BASENAME@.cpp',
++  output : '@BASENAME@',
+   arguments : ['@INPUT@', '@OUTPUT@'])
+ 
+ c = g.process('foobar.cpp.in')
+@@ -17,4 +17,4 @@ c2 = custom_target('c2gen',
+   input : 'foobar.cpp.in',
+   command : [comp, '@INPUT@', '@OUTPUT@'])
+ 
+-prog2 = executable('genexe2', c2)
+\ No newline at end of file
++prog2 = executable('genexe2', c2)
+-- 
+2.10.1
+
diff --git a/0010-dependencies-Fix-traceback-always-setting-variable.patch b/0010-dependencies-Fix-traceback-always-setting-variable.patch
deleted file mode 100644
index 7e9b6f2..0000000
--- a/0010-dependencies-Fix-traceback-always-setting-variable.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-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
-
diff --git a/0011-Created-path_join-function.patch b/0011-Created-path_join-function.patch
deleted file mode 100644
index c7920d0..0000000
--- a/0011-Created-path_join-function.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-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
-
diff --git a/0012-Show-error-log-options-in-help.patch b/0012-Show-error-log-options-in-help.patch
deleted file mode 100644
index 458ae1a..0000000
--- a/0012-Show-error-log-options-in-help.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-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
-
diff --git a/0013-tests-gnome-Add-missing-enums.h-dep-to-enums2.c.patch b/0013-tests-gnome-Add-missing-enums.h-dep-to-enums2.c.patch
deleted file mode 100644
index 8209899..0000000
--- a/0013-tests-gnome-Add-missing-enums.h-dep-to-enums2.c.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-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
-
diff --git a/0014-Check-contents-of-arguments-inside-project-.-Closes-.patch b/0014-Check-contents-of-arguments-inside-project-.-Closes-.patch
deleted file mode 100644
index d88dd59..0000000
--- a/0014-Check-contents-of-arguments-inside-project-.-Closes-.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-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
-
diff --git a/0015-setup.py-On-Unix-install-scripts-without-.py-suffix.patch b/0015-setup.py-On-Unix-install-scripts-without-.py-suffix.patch
deleted file mode 100644
index 3d856d3..0000000
--- a/0015-setup.py-On-Unix-install-scripts-without-.py-suffix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-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
-
diff --git a/0016-allow-libdir-includedir-etc.-be-absolute-paths.patch b/0016-allow-libdir-includedir-etc.-be-absolute-paths.patch
deleted file mode 100644
index 5b06bd9..0000000
--- a/0016-allow-libdir-includedir-etc.-be-absolute-paths.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-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
-
diff --git a/meson.spec b/meson.spec
index 3c8a508..aaae644 100644
--- a/meson.spec
+++ b/meson.spec
@@ -1,29 +1,23 @@
 %global libname mesonbuild
 
 Name:           meson
-Version:        0.35.0
-Release:        3%{?dist}
+Version:        0.35.1
+Release:        1%{?dist}
 Summary:        High productivity build system
 
 License:        ASL 2.0
 URL:            http://mesonbuild.com/
 Source0:        https://github.com/mesonbuild/meson/archive/%{version}/%{name}-%{version}.tar.gz
-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
+Patch0001:      0001-tools-ac_converter-couple-of-trivial-fixes-867.patch
+Patch0002:      0002-Remove-shebangs-on-files-that-are-not-runnable-and-a.patch
+Patch0003:      0003-gnome.generate_gir-Also-include-current-build-dir.patch
+Patch0004:      0004-rpm-couple-of-improvements-and-fixes.patch
+Patch0005:      0005-fixup-rpm-couple-of-improvements-and-fixes.patch
+Patch0006:      0006-fixup-fixup-rpm-couple-of-improvements-and-fixes.patch
+Patch0007:      0007-Show-error-log-options-in-help.patch
+Patch0008:      0008-setup.py-On-Unix-install-scripts-without-.py-suffix.patch
+Patch0009:      0009-allow-libdir-includedir-etc.-be-absolute-paths.patch
+Patch0010:      0010-Split-generator-BASENAME-at-the-first-extension.patch
 BuildArch:      noarch
 Obsoletes:      %{name}-gui < 0.31.0-3
 
@@ -94,6 +88,9 @@ install -Dpm0644 data/macros.%{name} %{buildroot}%{rpmmacrodir}/macros.%{name}
 %{rpmmacrodir}/macros.%{name}
 
 %changelog
+* Tue Oct 18 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.35.1-1
+- Update to 0.35.1 (RHBZ #1385986)
+
 * Tue Oct 11 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.35.0-3
 - Backport couple of fixes