Blame 0001-pkgconfig-avoid-appending-slash-at-Cflags.patch

Igor Gnatenko ba4abe
From 167275763b7eb418b083b2eeb489108047b5d81b Mon Sep 17 00:00:00 2001
Igor Gnatenko ba4abe
From: Laurent Carlier <lordheavym@gmail.com>
Igor Gnatenko ba4abe
Date: Tue, 11 Jul 2017 13:42:59 +0200
Igor Gnatenko ba4abe
Subject: [PATCH] pkgconfig: avoid appending slash at Cflags
Igor Gnatenko ba4abe
Igor Gnatenko ba4abe
otherwise it can break some compilations, see https://bugs.archlinux.org/task/54763
Igor Gnatenko ba4abe
Igor Gnatenko ba4abe
(cherry picked from commit 0283a2fb41fb4c25be1d0078bb40ae761d47462a)
Igor Gnatenko ba4abe
---
Igor Gnatenko ba4abe
 mesonbuild/modules/pkgconfig.py | 7 ++++---
Igor Gnatenko ba4abe
 1 file changed, 4 insertions(+), 3 deletions(-)
Igor Gnatenko ba4abe
Igor Gnatenko ba4abe
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
Igor Gnatenko ba4abe
index 09c615ab..c044d91e 100644
Igor Gnatenko ba4abe
--- a/mesonbuild/modules/pkgconfig.py
Igor Gnatenko ba4abe
+++ b/mesonbuild/modules/pkgconfig.py
Igor Gnatenko ba4abe
@@ -96,10 +96,11 @@ class PkgConfigModule(ExtensionModule):
Igor Gnatenko ba4abe
                 ofile.write('Libs.private: {}\n'.format(' '.join(generate_libs_flags(priv_libs))))
Igor Gnatenko ba4abe
             ofile.write('Cflags:')
Igor Gnatenko ba4abe
             for h in subdirs:
Igor Gnatenko ba4abe
-                if h == '.':
Igor Gnatenko ba4abe
-                    h = ''
Igor Gnatenko ba4abe
                 ofile.write(' ')
Igor Gnatenko ba4abe
-                ofile.write(os.path.join('-I${includedir}', h))
Igor Gnatenko ba4abe
+                if h == '.':
Igor Gnatenko ba4abe
+                    ofile.write('-I${includedir}')
Igor Gnatenko ba4abe
+                else:
Igor Gnatenko ba4abe
+                    ofile.write(os.path.join('-I${includedir}', h))
Igor Gnatenko ba4abe
             ofile.write('\n')
Igor Gnatenko ba4abe
 
Igor Gnatenko ba4abe
     def process_libs(self, libs):
Igor Gnatenko ba4abe
-- 
Igor Gnatenko ba4abe
2.13.2
Igor Gnatenko ba4abe