aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/pkgconfig.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-04-29 21:43:24 +0300
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-05-02 11:46:47 +0000
commit2b5766980b960d0de6b142fe4d266be88f751b77 (patch)
tree2dcb6e79e55412de5dc8c2f1f25b10df297569e6 /mesonbuild/modules/pkgconfig.py
parent554266d6f26d6b19cf29f7b655c214a073c8882e (diff)
downloadmeson-2b5766980b960d0de6b142fe4d266be88f751b77.zip
meson-2b5766980b960d0de6b142fe4d266be88f751b77.tar.gz
meson-2b5766980b960d0de6b142fe4d266be88f751b77.tar.bz2
Keep separator spaces in pkg-config declarations. Closes #3479.
Diffstat (limited to 'mesonbuild/modules/pkgconfig.py')
-rw-r--r--mesonbuild/modules/pkgconfig.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index a3ba973..419a14c 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -139,8 +139,10 @@ class DependenciesHelper:
if version_reqs:
if name not in self.version_reqs:
self.version_reqs[name] = set()
- # We could have '>=1.0' or '>= 1.0', remove spaces to normalize
- new_vreqs = [s.replace(' ', '') for s in mesonlib.stringlistify(version_reqs)]
+ # Note that pkg-config is picky about whitespace.
+ # 'foo > 1.2' is ok but 'foo>1.2' is not.
+ # foo, bar' is ok, but 'foo,bar' is not.
+ new_vreqs = [s for s in mesonlib.stringlistify(version_reqs)]
self.version_reqs[name].update(new_vreqs)
def split_version_req(self, s):