meson-0.55.3_posix_getopt.patch (1039B)
- commit d679381d2815da4ebc33cdec9600f8a1b3fb2428
- Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
- Date: 2020-11-01T03:08:16 GMT
- dependencies: Put pkgconfig options before operands
- This fixes building with meson when the POSIX behavior of getopt is used, such as when GNU libc is used with POSIXLY_CORRECT=1 defined
- diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
- index 3a5f5f8..0592da7 100644
- --- a/mesonbuild/dependencies/base.py
- +++ b/mesonbuild/dependencies/base.py
- @@ -869,9 +869,11 @@ class PkgConfigDependency(ExternalDependency):
- def _set_libs(self):
- env = None
- - libcmd = [self.name, '--libs']
- if self.static:
- - libcmd.append('--static')
- + libcmd = ['--libs', '--static', self.name]
- + else:
- + libcmd = ['--libs', self.name]
- +
- # Force pkg-config to output -L fields even if they are system
- # paths so we can do manual searching with cc.find_library() later.
- env = os.environ.copy()