about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch
blob: 0333c5c9ca2959ff46bd5cda5774e5cd47477ff0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build
index 65faae9b2..4297513d4 100644
--- a/gio/gdbus-2.0/codegen/meson.build
+++ b/gio/gdbus-2.0/codegen/meson.build
@@ -20,7 +20,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir)
 # Install gdbus-codegen executable
 gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
   output : 'gdbus-codegen',
-  install_dir : get_option('bindir'),
+  install_dir : get_option('devbindir'),
   install_tag : 'bin-devel',
   configuration : gdbus_codegen_conf
 )
diff --git a/gio/meson.build b/gio/meson.build
index 75686bb3e..2f1a73482 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -882,14 +882,15 @@ pkg.generate(libgio,
     'schemasdir=' + '${datadir}' / schemas_subdir,
     'dtdsdir=' + '${datadir}' / dtds_subdir,
     'bindir=' + '${prefix}' / get_option('bindir'),
+    'devbindir=' + get_option('devbindir'),
     'giomoduledir=' + pkgconfig_giomodulesdir,
     'gio=' + '${bindir}' / 'gio',
-    'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules',
-    'glib_compile_schemas=' + pkgconfig_multiarch_bindir / 'glib-compile-schemas',
-    'glib_compile_resources=' + '${bindir}' / 'glib-compile-resources',
+    'gio_querymodules=' + '${devbindir}' / 'gio-querymodules',
+    'glib_compile_schemas=' + '${devbindir}' / 'glib-compile-schemas',
+    'glib_compile_resources=' + '${devbindir}' / 'glib-compile-resources',
     'gdbus=' + '${bindir}' /'gdbus',
-    'gdbus_codegen=' + '${bindir}' / 'gdbus-codegen',
-    'gresource=' + '${bindir}' / 'gresource',
+    'gdbus_codegen=' + '${devbindir}' / 'gdbus-codegen',
+    'gresource=' + '${devbindir}' / 'gresource',
     'gsettings=' + '${bindir}' / 'gsettings',
   ],
   version : glib_version,
@@ -992,6 +993,7 @@ executable('gio', gio_tool_sources,
 
 executable('gresource', 'gresource-tool.c',
   install : true,
+  install_dir : get_option('devbindir'),
   install_tag : 'bin',
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
@@ -999,7 +1001,7 @@ executable('gresource', 'gresource-tool.c',
 
 gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
   install : true,
-  install_dir : multiarch_bindir,
+  install_dir : get_option('devbindir'),
   install_tag : 'bin',
   c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
@@ -1009,7 +1011,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
 glib_compile_schemas = executable('glib-compile-schemas',
   ['glib-compile-schemas.c'],
   install : true,
-  install_dir : multiarch_bindir,
+  install_dir : get_option('devbindir'),
   install_tag : 'bin',
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
@@ -1018,6 +1020,7 @@ glib_compile_schemas = executable('glib-compile-schemas',
 glib_compile_resources = executable('glib-compile-resources',
   [gconstructor_as_data_h, 'glib-compile-resources.c'],
   install : true,
+  install_dir : get_option('devbindir'),
   install_tag : 'bin-devel',
   c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 4ef3343ab..2a0a6b56b 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -1131,16 +1131,18 @@ if have_bash and have_pkg_config
 
   gio_binaries = [
     'gio',
-    'glib-compile-resources',
     'gdbus',
-    'gdbus-codegen',
-    'gresource',
     'gsettings',
   ]
-  gio_multiarch_binaries = [
+  gio_dev_binaries = [
+    'glib-compile-resources',
+    'gdbus-codegen',
+    'gresource',
     'gio-querymodules',
     'glib-compile-schemas',
   ]
+  gio_multiarch_binaries = [
+  ]
 
   foreach binary: gio_binaries
     pkg_config_tests += [
@@ -1149,6 +1151,13 @@ if have_bash and have_pkg_config
         prefix / get_option('bindir') / binary)
     ]
   endforeach
+  foreach binary: gio_dev_binaries
+    pkg_config_tests += [
+      'test "$(pkg-config --variable=@0@ gio-2.0)" = "@1@"'.format(
+        binary.underscorify(),
+        prefix / get_option('devbindir') / binary)
+    ]
+  endforeach
 
   foreach binary: gio_multiarch_binaries
     pkg_config_tests += [
diff --git a/glib/meson.build b/glib/meson.build
index c26a35e42..38effe12a 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -447,9 +447,10 @@ pkg.generate(libglib,
   variables : [
     'bindir=' + '${prefix}' / get_option('bindir'),
     'datadir=' + '${prefix}' / get_option('datadir'),
-    'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal',
-    'gobject_query=' + '${bindir}' / 'gobject-query',
-    'glib_mkenums=' + '${bindir}' / 'glib-mkenums',
+    'devbindir=' + get_option('devbindir'),
+    'glib_genmarshal=' + '${devbindir}' / 'glib-genmarshal',
+    'gobject_query=' + '${devbindir}' / 'gobject-query',
+    'glib_mkenums=' + '${devbindir}' / 'glib-mkenums',
     'glib_valgrind_suppressions=' + '${datadir}' /
       valgrind_suppression_file_install_subdir /
       fs.name(valgrind_suppression_file),
@@ -490,6 +491,7 @@ if host_system == 'windows'
 else
   gtester = executable('gtester', 'gtester.c',
     install : true,
+    install_dir : get_option('devbindir'),
     install_tag : 'bin-devel',
     c_args : ['-UG_DISABLE_ASSERT'],
     include_directories : configinc,
@@ -505,7 +507,7 @@ report_conf.set('PYTHON', python_name)
 configure_file(
   input: 'gtester-report.in',
   output: 'gtester-report',
-  install_dir: get_option('bindir'),
+  install_dir: get_option('devbindir'),
   install_tag : 'bin-devel',
   configuration: report_conf,
   install_mode: 'rwxr-xr-x'
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
index 09ecd5ab3..9748d4122 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
@@ -508,9 +508,9 @@ if have_bash and have_pkg_config
         'test "$(pkg-config --variable=datadir glib-2.0)" = "@0@"'.format(
           prefix / get_option('datadir')),
         'test "$(pkg-config --variable=gobject_query glib-2.0)" = "@0@"'.format(
-          prefix / get_option('bindir') / 'gobject-query'),
+          prefix / get_option('devbindir') / 'gobject-query'),
         'test "$(pkg-config --variable=glib_mkenums glib-2.0)" = "@0@"'.format(
-          prefix / get_option('bindir') / 'glib-mkenums'),
+          prefix / get_option('devbindir') / 'glib-mkenums'),
         'test "$(pkg-config --variable=glib_valgrind_suppressions glib-2.0)" = "@0@"'.format(
           prefix / get_option('datadir') /
           valgrind_suppression_file_install_subdir / fs.name(valgrind_suppression_file)),
diff --git a/gobject/meson.build b/gobject/meson.build
index 2129aaf8a..da8462428 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -94,7 +94,7 @@ foreach tool: python_tools
     input : tool + '.in',
     output : tool,
     configuration : python_tools_conf,
-    install_dir : glib_bindir,
+    install_dir : get_option('devbindir'),
     install_tag : 'bin-devel',
   )
 
@@ -172,6 +172,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep)
 
 gobject_query = executable('gobject-query', 'gobject-query.c',
   install : true,
+  install_dir : get_option('devbindir'),
   install_tag : 'bin-devel',
   dependencies : [libglib_dep, libgobject_dep])
 
diff --git a/meson_options.txt b/meson_options.txt
index 517d5757c..198cc1b3c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,6 +4,11 @@ option('runtime_libdir',
        description : 'install runtime libraries relative to libdir',
        deprecated: true)
 
+option('devbindir',
+       type : 'string',
+       value : '',
+       description : 'bindir for development tools')
+
 option('charsetalias_dir',
        type : 'string',
        value : '',
diff --git a/tools/meson.build b/tools/meson.build
index 257312ebf..f8315392b 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -8,7 +8,7 @@ if have_sh
   gettextize_conf.set('datarootdir', glib_datadir)
   gettextize_conf.set('datadir', glib_datadir)
   configure_file(input : 'glib-gettextize.in',
-    install_dir : glib_bindir,
+    install_dir : get_option('devbindir'),
     install_tag : 'bin-devel',
     output : 'glib-gettextize',
     configuration : gettextize_conf)