Blame 0006-gnome-module-Add-lfoo-after-Lbar-LDFLAGS.patch

Kalev Lember 05cd86
From 19f39ad05952099ecb915399231aa88f9acd3b20 Mon Sep 17 00:00:00 2001
Kalev Lember 05cd86
From: Nirbheek Chauhan <nirbheek@centricular.com>
Kalev Lember 05cd86
Date: Mon, 17 Jul 2017 12:41:54 +0530
Kalev Lember 05cd86
Subject: [PATCH 6/6] gnome module: Add -lfoo after -Lbar LDFLAGS
Kalev Lember 05cd86
Kalev Lember 05cd86
Otherwise they won't take effect
Kalev Lember 05cd86
---
Kalev Lember 05cd86
 mesonbuild/modules/gnome.py | 9 +++++----
Kalev Lember 05cd86
 1 file changed, 5 insertions(+), 4 deletions(-)
Kalev Lember 05cd86
Kalev Lember 05cd86
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
Kalev Lember 05cd86
index 7d539aa8..6e633a70 100644
Kalev Lember 05cd86
--- a/mesonbuild/modules/gnome.py
Kalev Lember 05cd86
+++ b/mesonbuild/modules/gnome.py
Kalev Lember 05cd86
@@ -288,11 +288,8 @@ class GnomeModule(ExtensionModule):
Kalev Lember 05cd86
 
Kalev Lember 05cd86
     def _get_link_args(self, state, lib, depends=None, include_rpath=False,
Kalev Lember 05cd86
                        use_gir_args=False):
Kalev Lember 05cd86
+        link_command = []
Kalev Lember 05cd86
         # Construct link args
Kalev Lember 05cd86
-        if gir_has_extra_lib_arg() and use_gir_args:
Kalev Lember 05cd86
-            link_command = ['--extra-library=' + lib.name]
Kalev Lember 05cd86
-        else:
Kalev Lember 05cd86
-            link_command = ['-l' + lib.name]
Kalev Lember 05cd86
         if isinstance(lib, build.SharedLibrary):
Kalev Lember 05cd86
             libdir = os.path.join(state.environment.get_build_dir(), state.backend.get_target_dir(lib))
Kalev Lember 05cd86
             link_command.append('-L' + libdir)
Kalev Lember 05cd86
@@ -309,6 +306,10 @@ class GnomeModule(ExtensionModule):
Kalev Lember 05cd86
                 link_command.append('-Wl,-rpath,' + libdir)
Kalev Lember 05cd86
             if depends:
Kalev Lember 05cd86
                 depends.append(lib)
Kalev Lember 05cd86
+        if gir_has_extra_lib_arg() and use_gir_args:
Kalev Lember 05cd86
+            link_command.append('--extra-library=' + lib.name)
Kalev Lember 05cd86
+        else:
Kalev Lember 05cd86
+            link_command.append('-l' + lib.name)
Kalev Lember 05cd86
         return link_command
Kalev Lember 05cd86
 
Kalev Lember 05cd86
     def _get_dependencies_flags(self, deps, state, depends=None, include_rpath=False,
Kalev Lember 05cd86
-- 
Kalev Lember 05cd86
2.13.0
Kalev Lember 05cd86