Lines 1-6
Link Here
|
1 |
https://github.com/mesonbuild/meson/pull/4325 |
1 |
https://github.com/mesonbuild/meson/pull/4325 |
2 |
|
2 |
|
3 |
From 158d627c141859e28bbca2c2126b5306608aac6e Mon Sep 17 00:00:00 2001 |
3 |
From c4686de2612157a4040766738a700b710d866da4 Mon Sep 17 00:00:00 2001 |
4 |
From: Ting-Wei Lan <lantw@src.gnome.org> |
4 |
From: Ting-Wei Lan <lantw@src.gnome.org> |
5 |
Date: Thu, 4 Oct 2018 23:30:28 +0800 |
5 |
Date: Thu, 4 Oct 2018 23:30:28 +0800 |
6 |
Subject: [PATCH] PkgConfigDependency: Sort -L flags according to |
6 |
Subject: [PATCH] PkgConfigDependency: Sort -L flags according to |
Lines 51-59
Link Here
|
51 |
users, without depending on the unreliable part of pkg-config output. |
51 |
users, without depending on the unreliable part of pkg-config output. |
52 |
|
52 |
|
53 |
Fixes https://github.com/mesonbuild/meson/issues/4271. |
53 |
Fixes https://github.com/mesonbuild/meson/issues/4271. |
54 |
--- mesonbuild/dependencies/base.py.orig 2018-09-22 13:22:03 UTC |
54 |
|
|
|
55 |
--- mesonbuild/dependencies/base.py.orig |
55 |
+++ mesonbuild/dependencies/base.py |
56 |
+++ mesonbuild/dependencies/base.py |
56 |
@@ -604,6 +604,21 @@ class PkgConfigDependency(ExternalDepend |
57 |
@@ -706,6 +706,21 @@ def _set_cargs(self): |
57 |
(self.name, out)) |
58 |
(self.name, out)) |
58 |
self.compile_args = self._convert_mingw_paths(shlex.split(out)) |
59 |
self.compile_args = self._convert_mingw_paths(shlex.split(out)) |
59 |
|
60 |
|
Lines 75-84
Link Here
|
75 |
def _search_libs(self, out, out_raw): |
76 |
def _search_libs(self, out, out_raw): |
76 |
''' |
77 |
''' |
77 |
@out: PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 pkg-config --libs |
78 |
@out: PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 pkg-config --libs |
78 |
@@ -635,6 +650,22 @@ class PkgConfigDependency(ExternalDepend |
79 |
@@ -741,6 +756,22 @@ def _search_libs(self, out, out_raw): |
79 |
for arg in raw_link_args: |
80 |
# Resolve the path as a compiler in the build directory would |
80 |
if arg.startswith('-L') and not arg.startswith(('-L-l', '-L-L')): |
81 |
path = os.path.join(self.env.get_build_dir(), path) |
81 |
prefix_libpaths.add(arg[2:]) |
82 |
prefix_libpaths.add(path) |
82 |
+ # Library paths are not always ordered in a meaningful way |
83 |
+ # Library paths are not always ordered in a meaningful way |
83 |
+ # |
84 |
+ # |
84 |
+ # Instead of relying on pkg-config or pkgconf to provide -L flags in a |
85 |
+ # Instead of relying on pkg-config or pkgconf to provide -L flags in a |