commit: 1923e07dd5600359e60cd6bcb4ee202e5f5bf4a3
parent 71d7882ebef08a2da96a996d36afd127bebc5cfa
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 6 Nov 2020 19:20:23 +0100
patches: meson POSIX getopt fix
Diffstat:
1 file changed, 26 insertions(+), 0 deletions(-)
diff --git a/patches/dev-util/meson/meson-0.55.3_posix_getopt.patch b/patches/dev-util/meson/meson-0.55.3_posix_getopt.patch
@@ -0,0 +1,26 @@
+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()