From 00a3d1ac4f86c85b3e0ba8e929e34547d20a0134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 24 Jul 2017 20:48:13 +0200 Subject: [PATCH] gnome: Fix translation of -l to --extra-library args We prefer to use the --extra-library parameter for passing -l arguments to g-ir-scanner, however we need to be careful to only replace the first '-l' occurrence to not translate '-lfoo-lib' to '--extra-library=foo--extra-library=ib' --- mesonbuild/modules/gnome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index addcab328..1630d95f0 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -368,7 +368,7 @@ class GnomeModule(ExtensionModule): if lib.startswith("-W"): continue if gir_has_extra_lib_arg() and use_gir_args: - lib = lib.replace('-l', '--extra-library=') + lib = lib.replace('-l', '--extra-library=', 1) ldflags.update([lib]) if isinstance(dep, PkgConfigDependency):