Strip trailing slash from pkg-config files

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2017-07-13 16:32:54 +02:00
parent 22589f2cb5
commit ba4abe8828
2 changed files with 42 additions and 1 deletions

View File

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

View File

@ -2,12 +2,16 @@
Name: meson Name: meson
Version: 0.41.1 Version: 0.41.1
Release: 1%{?dist} Release: 2%{?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/0283a2fb41fb4c25be1d0078bb40ae761d47462a
Patch0001: 0001-pkgconfig-avoid-appending-slash-at-Cflags.patch
BuildArch: noarch BuildArch: noarch
Obsoletes: %{name}-gui < 0.31.0-3 Obsoletes: %{name}-gui < 0.31.0-3
@ -99,6 +103,9 @@ export MESON_PRINT_TEST_OUTPUT=1
%{rpmmacrodir}/macros.%{name} %{rpmmacrodir}/macros.%{name}
%changelog %changelog
* Thu Jul 13 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.41.1-2
- Strip trailing slash from pkg-config files
* Mon Jun 19 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.41.1-1 * Mon Jun 19 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.41.1-1
- Update to 0.41.1 - Update to 0.41.1