1From 8981db5d775e04b72fb68b6a4553c87fdaedee65 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 15 Feb 2019 11:17:27 +0100
4Subject: [PATCH] Do not prefix executables with $bindir in pkg-config files
5
6This would otherwise break when using the executables to build other target
7components (we need to rely on PATH containing the paths to utilities,
8rather than use target paths).
9
10Upstream-Status: Inappropriate [upstream wants the paths in .pc files]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12---
13 gio/meson.build  | 17 +++++++++--------
14 glib/meson.build |  7 ++++---
15 2 files changed, 13 insertions(+), 11 deletions(-)
16
17diff --git a/gio/meson.build b/gio/meson.build
18index 5d91b89..1a8da12 100644
19--- a/gio/meson.build
20+++ b/gio/meson.build
21@@ -901,17 +901,18 @@ libgio_dep = declare_dependency(link_with : libgio,
22 pkg.generate(libgio,
23   requires : ['glib-2.0', 'gobject-2.0'],
24   variables : [
25+    'bindir=' + '${prefix}' / get_option('bindir'),
26     'schemasdir=' + '${datadir}' / schemas_subdir,
27     'dtdsdir=' + '${datadir}' / dtds_subdir,
28     'giomoduledir=' + pkgconfig_giomodulesdir,
29-    'gio=' + '${bindir}' / 'gio',
30-    'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules',
31-    'glib_compile_schemas=' + pkgconfig_multiarch_bindir / 'glib-compile-schemas',
32-    'glib_compile_resources=' + '${bindir}' / 'glib-compile-resources',
33-    'gdbus=' + '${bindir}' /'gdbus',
34-    'gdbus_codegen=' + '${bindir}' / 'gdbus-codegen',
35-    'gresource=' + '${bindir}' / 'gresource',
36-    'gsettings=' + '${bindir}' / 'gsettings',
37+    'gio=gio',
38+    'gio_querymodules=gio-querymodules',
39+    'glib_compile_schemas=glib-compile-schemas',
40+    'glib_compile_resources=glib-compile-resources',
41+    'gdbus=gdbus',
42+    'gdbus_codegen=gdbus-codegen',
43+    'gresource=gresource',
44+    'gsettings=gsettings',
45   ],
46   uninstalled_variables : [
47     'gio=${prefix}/gio/gio',
48diff --git a/glib/meson.build b/glib/meson.build
49index 837960d..97d4af0 100644
50--- a/glib/meson.build
51+++ b/glib/meson.build
52@@ -443,9 +443,10 @@ pkg.generate(libglib,
53   subdirs : ['glib-2.0'],
54   extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
55   variables : [
56-    'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal',
57-    'gobject_query=' + '${bindir}' / 'gobject-query',
58-    'glib_mkenums=' + '${bindir}' / 'glib-mkenums',
59+    'bindir=' + '${prefix}' / get_option('bindir'),
60+    'glib_genmarshal=glib-genmarshal',
61+    'gobject_query=gobject-query',
62+    'glib_mkenums=glib-mkenums',
63     'glib_valgrind_suppressions=' + '${datadir}' /
64       valgrind_suppression_file_install_subdir /
65       fs.name(valgrind_suppression_file),
66