diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/glib')
8 files changed, 563 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/glib/darwin-compilation.patch b/nixpkgs/pkgs/development/libraries/glib/darwin-compilation.patch new file mode 100644 index 000000000000..f215eef798af --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/glib/darwin-compilation.patch @@ -0,0 +1,24 @@ +Fix compilation on Mac OS X with gcc 4.8. + +diff -ru glib-2.40.0-orig/gio/gdummyfile.c glib-2.40.0/gio/gdummyfile.c +--- glib-2.40.0-orig/gio/gdummyfile.c 2014-02-03 18:40:41.000000000 +0100 ++++ glib-2.40.0/gio/gdummyfile.c 2014-07-15 10:58:31.000000000 +0200 +@@ -454,7 +454,8 @@ + result = g_malloc (escaped_string_end - escaped_string + 1); + + out = result; +- for (in = escaped_string; in < escaped_string_end; in++) ++ in = escaped_string; ++ for (; in < escaped_string_end; in++) + { + character = *in; + if (*in == '%') +@@ -551,6 +552,7 @@ + + decoded->scheme = g_malloc (p - uri); + out = decoded->scheme; +- for (in = uri; in < p - 1; in++) ++ in = uri; ++ for (; in < p - 1; in++) + *out++ = g_ascii_tolower (*in); + *out = 0; diff --git a/nixpkgs/pkgs/development/libraries/glib/default.nix b/nixpkgs/pkgs/development/libraries/glib/default.nix new file mode 100644 index 000000000000..d74bd0c4067a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/glib/default.nix @@ -0,0 +1,202 @@ +{ config, stdenv, fetchurl, gettext, meson, ninja, pkgconfig, perl, python3 +, libiconv, zlib, libffi, pcre, libelf, gnome3, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45 +# use utillinuxMinimal to avoid circular dependency (utillinux, systemd, glib) +, utillinuxMinimal ? null +, buildPackages + +# this is just for tests (not in the closure of any regular package) +, doCheck ? config.doCheckByDefault or false +, coreutils, dbus, libxml2, tzdata +, desktop-file-utils, shared-mime-info +, darwin, fetchpatch +}: + +with stdenv.lib; + +assert stdenv.isLinux -> utillinuxMinimal != null; + +# TODO: +# * Add gio-module-fam +# Problem: cyclic dependency on gamin +# Possible solution: build as a standalone module, set env. vars +# * Make it build without python +# Problem: an example (test?) program needs it. +# Possible solution: disable compilation of this example somehow +# Reminder: add 'sed -e 's@python2\.[0-9]@python@' -i +# $out/bin/gtester-report' to postInstall if this is solved +/* + * Use --enable-installed-tests for GNOME-related packages, + and use them as a separately installed tests runned by Hydra + (they should test an already installed package) + https://wiki.gnome.org/GnomeGoals/InstalledTests + * Support org.freedesktop.Application, including D-Bus activation from desktop files +*/ +let + # Some packages don't get "Cflags" from pkgconfig correctly + # and then fail to build when directly including like <glib/...>. + # This is intended to be run in postInstall of any package + # which has $out/include/ containing just some disjunct directories. + flattenInclude = '' + for dir in "''${!outputInclude}"/include/*; do + cp -r "$dir"/* "''${!outputInclude}/include/" + rm -r "$dir" + ln -s . "$dir" + done + ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true + ''; +in + +stdenv.mkDerivation rec { + pname = "glib"; + version = "2.64.1"; + + src = fetchurl { + url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "1ixvjmsrj45xq9bq3chhj98jhgcsqa08v627mjx6sjxlph1pd5hp"; + }; + + patches = optionals stdenv.isDarwin [ + ./darwin-compilation.patch + ] ++ optionals stdenv.hostPlatform.isMusl [ + ./quark_init_on_demand.patch + ./gobject_init_on_demand.patch + ] ++ [ + ./schema-override-variable.patch + + # GLib contains many binaries used for different purposes; + # we will install them to different outputs: + # 1. Tools for desktop environment ($bin) + # * gapplication (non-darwin) + # * gdbus + # * gio + # * gio-launch-desktop (symlink to $out) + # * gsettings + # 2. Development/build tools ($dev) + # * gdbus-codegen + # * gio-querymodules + # * glib-compile-resources + # * glib-compile-schemas + # * glib-genmarshal + # * glib-gettextize + # * glib-mkenums + # * gobject-query + # * gresource + # * gtester + # * gtester-report + # 3. Tools for desktop environment that cannot go to $bin due to $out depending on them ($out) + # * gio-launch-desktop + ./split-dev-programs.patch + ] ++ optional doCheck ./skip-timer-test.patch; + + outputs = [ "bin" "out" "dev" "devdoc" ]; + + setupHook = ./setup-hook.sh; + + buildInputs = [ + libelf setupHook pcre + bash gnum4 # install glib-gettextize and m4 macros for other apps to use + ] ++ optionals stdenv.isLinux [ + libselinux + utillinuxMinimal # for libmount + ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + AppKit Carbon Cocoa CoreFoundation CoreServices Foundation + ]); + + nativeBuildInputs = [ + meson ninja pkgconfig perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 + ]; + + propagatedBuildInputs = [ zlib libffi gettext libiconv ]; + + mesonFlags = [ + # Avoid the need for gobject introspection binaries in PATH in cross-compiling case. + # Instead we just copy them over from the native output. + "-Dgtk_doc=${if stdenv.hostPlatform == stdenv.buildPlatform then "true" else "false"}" + "-Dnls=enabled" + "-Ddevbindir=${placeholder ''dev''}/bin" + ]; + + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=nonnull" + # Default for release buildtype but passed manually because + # we're using plain + "-DG_DISABLE_CAST_CHECKS" + ]; + + postPatch = '' + chmod +x gio/tests/gengiotypefuncs.py + patchShebangs gio/tests/gengiotypefuncs.py + chmod +x docs/reference/gio/concat-files-helper.py + patchShebangs docs/reference/gio/concat-files-helper.py + patchShebangs glib/gen-unicode-tables.pl + patchShebangs tests/gen-casefold-txt.py + patchShebangs tests/gen-casemap-txt.py + ''; + + DETERMINISTIC_BUILD = 1; + + postInstall = '' + moveToOutput "share/glib-2.0" "$dev" + substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev" + sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|" + + # This file is *included* in gtk3 and would introduce runtime reference via __FILE__. + sed '1i#line 1 "${pname}-${version}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \ + -i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c + '' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + cp -r ${buildPackages.glib.devdoc} $devdoc + ''; + + checkInputs = [ tzdata libxml2 desktop-file-utils shared-mime-info ]; + + preCheck = optionalString doCheck '' + export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${pname}-${version}/glib/.libs''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" + export TZDIR="${tzdata}/share/zoneinfo" + export XDG_CACHE_HOME="$TMP" + export XDG_RUNTIME_HOME="$TMP" + export HOME="$TMP" + export XDG_DATA_DIRS="${desktop-file-utils}/share:${shared-mime-info}/share" + export G_TEST_DBUS_DAEMON="${dbus.daemon}/bin/dbus-daemon" + export PATH="$PATH:$(pwd)/gobject" + echo "PATH=$PATH" + + substituteInPlace gio/tests/desktop-files/home/applications/epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop \ + --replace "Exec=/bin/true" "Exec=${coreutils}/bin/true" + # Needs machine-id, comment the test + sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c + sed -e '/g_test_add_func/ s/^\/*/\/\//' -i gio/tests/gdbus-unix-addresses.c + # All gschemas fail to pass the test, upstream bug? + sed -e '/g_test_add_data_func/ s/^\/*/\/\//' -i gio/tests/gschema-compile.c + # Cannot reproduce the failing test_associations on hydra + sed -e '/\/appinfo\/associations/d' -i gio/tests/appinfo.c + # Needed because of libtool wrappers + sed -e '/g_subprocess_launcher_set_environ (launcher, envp);/a g_subprocess_launcher_setenv (launcher, "PATH", g_getenv("PATH"), TRUE);' -i gio/tests/gsubprocess.c + ''; + + inherit doCheck; + + separateDebugInfo = stdenv.isLinux; + + passthru = rec { + gioModuleDir = "lib/gio/modules"; + makeSchemaPath = dir: name: "${dir}/share/gsettings-schemas/${name}/glib-2.0/schemas"; + getSchemaPath = pkg: makeSchemaPath pkg pkg.name; + inherit flattenInclude; + updateScript = gnome3.updateScript { packageName = "glib"; }; + }; + + meta = with stdenv.lib; { + description = "C library of programming buildings blocks"; + homepage = "https://www.gtk.org/"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ lovek323 raskin worldofpeace ]; + platforms = platforms.unix; + + longDescription = '' + GLib provides the core application building blocks for libraries + and applications written in C. It provides the core object + system used in GNOME, the main loop implementation, and a large + set of utility functions for strings and common data structures. + ''; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/glib/gobject_init_on_demand.patch b/nixpkgs/pkgs/development/libraries/glib/gobject_init_on_demand.patch new file mode 100644 index 000000000000..d72d0b61dca2 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/glib/gobject_init_on_demand.patch @@ -0,0 +1,87 @@ +--- glib-source/gobject/gtype.c 2016-08-17 17:20:47.000000000 +0200 ++++ glib-source/gobject/gtype.c 2016-09-01 21:56:31.777406646 +0200 +@@ -209,6 +209,9 @@ + static gboolean type_node_is_a_L (TypeNode *node, + TypeNode *iface_node); + ++#if !defined(__GLIBC__) ++static void gobject_init (void); ++#endif + + /* --- enumeration --- */ + +@@ -2631,7 +2634,10 @@ + GTypeFlags flags) + { + TypeNode *node; +- ++ ++#if !defined(__GLIBC__) ++ gobject_init(); ++#endif + g_assert_type_system_initialized (); + g_return_val_if_fail (type_id > 0, 0); + g_return_val_if_fail (type_name != NULL, 0); +@@ -2749,6 +2755,9 @@ + TypeNode *pnode, *node; + GType type = 0; + ++#if !defined(__GLIBC__) ++ gobject_init(); ++#endif + g_assert_type_system_initialized (); + g_return_val_if_fail (parent_type > 0, 0); + g_return_val_if_fail (type_name != NULL, 0); +@@ -2804,6 +2813,9 @@ + TypeNode *pnode, *node; + GType type; + ++#if !defined(__GLIBC__) ++ gobject_init(); ++#endif + g_assert_type_system_initialized (); + g_return_val_if_fail (parent_type > 0, 0); + g_return_val_if_fail (type_name != NULL, 0); +@@ -3319,6 +3331,9 @@ + { + TypeNode *node; + ++#if !defined(__GLIBC__) ++ gobject_init(); ++#endif + g_assert_type_system_initialized (); + + node = lookup_type_node_I (type); +@@ -4343,6 +4358,9 @@ + void + g_type_init_with_debug_flags (GTypeDebugFlags debug_flags) + { ++#if !defined(__GLIBC__) ++ gobject_init(); ++#endif + g_assert_type_system_initialized (); + + if (debug_flags) +@@ -4361,6 +4379,9 @@ + void + g_type_init (void) + { ++#if !defined(__GLIBC__) ++ gobject_init(); ++#endif + g_assert_type_system_initialized (); + } + +@@ -4372,6 +4393,12 @@ + TypeNode *node; + GType type; + ++#if !defined(__GLIBC__) ++ static int gobject_initialized = 0; ++ if (gobject_initialized) ++ return; ++ gobject_initialized = 1; ++#endif + /* Ensure GLib is initialized first, see + * https://bugzilla.gnome.org/show_bug.cgi?id=756139 + */ diff --git a/nixpkgs/pkgs/development/libraries/glib/quark_init_on_demand.patch b/nixpkgs/pkgs/development/libraries/glib/quark_init_on_demand.patch new file mode 100644 index 000000000000..168086484314 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/glib/quark_init_on_demand.patch @@ -0,0 +1,33 @@ +--- glib-source/glib/gquark.c 2016-08-17 17:20:47.000000000 +0200 ++++ glib-source/glib/gquark.c 2016-08-30 07:49:13.298234757 +0200 +@@ -57,6 +57,9 @@ + void + g_quark_init (void) + { ++ if (quark_ht) ++ return; ++ + g_assert (quark_seq_id == 0); + quark_ht = g_hash_table_new (g_str_hash, g_str_equal); + quarks = g_new (gchar*, QUARK_BLOCK_SIZE); +@@ -138,9 +141,12 @@ + return 0; + + G_LOCK (quark_global); ++#if !defined(__GLIBC__) ++ g_quark_init (); ++#endif + quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string)); + G_UNLOCK (quark_global); + + return quark; + } + +@@ -280,6 +286,7 @@ + GQuark quark; + gchar **quarks_new; + ++ g_quark_init (); + if (quark_seq_id % QUARK_BLOCK_SIZE == 0) + { + quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE); diff --git a/nixpkgs/pkgs/development/libraries/glib/schema-override-variable.patch b/nixpkgs/pkgs/development/libraries/glib/schema-override-variable.patch new file mode 100644 index 000000000000..1cb5a730351b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/glib/schema-override-variable.patch @@ -0,0 +1,12 @@ +--- a/gio/gsettingsschema.c ++++ b/gio/gsettingsschema.c +@@ -352,6 +352,9 @@ + + try_prepend_data_dir (g_get_user_data_dir ()); + ++ if ((path = g_getenv ("NIX_GSETTINGS_OVERRIDES_DIR")) != NULL) ++ try_prepend_dir (path); ++ + if ((path = g_getenv ("GSETTINGS_SCHEMA_DIR")) != NULL) + try_prepend_dir (path); + diff --git a/nixpkgs/pkgs/development/libraries/glib/setup-hook.sh b/nixpkgs/pkgs/development/libraries/glib/setup-hook.sh new file mode 100644 index 000000000000..8ead5510ec4f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/glib/setup-hook.sh @@ -0,0 +1,34 @@ +make_glib_find_gsettings_schemas() { + # For packages that need gschemas of other packages (e.g. empathy) + for maybe_dir in "$1"/share/gsettings-schemas/*; do + if [[ -d "$maybe_dir/glib-2.0/schemas" ]]; then + addToSearchPath GSETTINGS_SCHEMAS_PATH "$maybe_dir" + fi + done +} +addEnvHooks "$targetOffset" make_glib_find_gsettings_schemas + +# Install gschemas, if any, in a package-specific directory +glibPreInstallPhase() { + makeFlagsArray+=("gsettingsschemadir=${!outputLib}/share/gsettings-schemas/$name/glib-2.0/schemas/") +} +preInstallPhases+=" glibPreInstallPhase" + +glibPreFixupPhase() { + # Move gschemas in case the install flag didn't help + if [ -d "$prefix/share/glib-2.0/schemas" ]; then + mkdir -p "${!outputLib}/share/gsettings-schemas/$name/glib-2.0" + mv "$prefix/share/glib-2.0/schemas" "${!outputLib}/share/gsettings-schemas/$name/glib-2.0/" + fi + + addToSearchPath GSETTINGS_SCHEMAS_PATH "${!outputLib}/share/gsettings-schemas/$name" +} + +# gappsWrapperArgsHook expects GSETTINGS_SCHEMAS_PATH variable to be set by this. +# Until we have dependency mechanism in generic builder, we need to use this ugly hack. +if [[ " ${preFixupPhases:-} " =~ " gappsWrapperArgsHook " ]]; then + preFixupPhases+=" " + preFixupPhases="${preFixupPhases/ gappsWrapperArgsHook / glibPreFixupPhase gappsWrapperArgsHook }" +else + preFixupPhases+=" glibPreFixupPhase" +fi diff --git a/nixpkgs/pkgs/development/libraries/glib/skip-timer-test.patch b/nixpkgs/pkgs/development/libraries/glib/skip-timer-test.patch new file mode 100644 index 000000000000..942f3e7864c4 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/glib/skip-timer-test.patch @@ -0,0 +1,17 @@ +Description: Skip test which performs some unreliable floating point comparisons +Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=722604 + +Index: b/glib/tests/timer.c +=================================================================== +--- a/glib/tests/timer.c ++++ b/glib/tests/timer.c +@@ -203,7 +203,7 @@ + { + g_test_init (&argc, &argv, NULL); + +- g_test_add_func ("/timer/basic", test_timer_basic); ++/* g_test_add_func ("/timer/basic", test_timer_basic);*/ +- g_test_add_func ("/timer/stop", test_timer_stop); ++/* g_test_add_func ("/timer/stop", test_timer_stop);*/ + g_test_add_func ("/timer/continue", test_timer_continue); + g_test_add_func ("/timer/reset", test_timer_reset); diff --git a/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch b/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch new file mode 100644 index 000000000000..9a949ea1226c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch @@ -0,0 +1,154 @@ +diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build +index 5ea6bae2f..e0b584a86 100644 +--- a/gio/gdbus-2.0/codegen/meson.build ++++ b/gio/gdbus-2.0/codegen/meson.build +@@ -16,7 +16,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'), + configuration : gdbus_codegen_conf + ) + # Provide tools for others when we're a subproject and they use the Meson GNOME module +diff --git a/gio/meson.build b/gio/meson.build +index 3535788ab..99c3b48d6 100644 +--- a/gio/meson.build ++++ b/gio/meson.build +@@ -831,14 +831,15 @@ pkg.generate(libgio, + variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')), + 'schemasdir=' + join_paths('${datadir}', schemas_subdir), + 'bindir=' + join_paths('${prefix}', get_option('bindir')), ++ 'devbindir=' + get_option('devbindir'), + 'giomoduledir=' + pkgconfig_giomodulesdir, + 'gio=' + join_paths('${bindir}', 'gio'), +- 'gio_querymodules=' + join_paths('${bindir}', 'gio-querymodules'), +- 'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'), +- 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'), ++ 'gio_querymodules=' + join_paths('${devbindir}', 'gio-querymodules'), ++ 'glib_compile_schemas=' + join_paths('${devbindir}', 'glib-compile-schemas'), ++ 'glib_compile_resources=' + join_paths('${devbindir}', 'glib-compile-resources'), + 'gdbus=' + join_paths('${bindir}', 'gdbus'), +- 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'), +- 'gresource=' + join_paths('${bindir}', 'gresource'), ++ 'gdbus_codegen=' + join_paths('${devbindir}', 'gdbus-codegen'), ++ 'gresource=' + join_paths('${devbindir}', 'gresource'), + 'gsettings=' + join_paths('${bindir}', 'gsettings')], + version : glib_version, + install_dir : glib_pkgconfigreldir, +@@ -939,12 +940,14 @@ executable('gio', gio_tool_sources, + + executable('gresource', 'gresource-tool.c', + install : true, ++ install_dir : get_option('devbindir'), + # intl.lib is not compatible with SAFESEH + link_args : noseh_link_args, + dependencies : [libelf, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) + + gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c', + install : true, ++ install_dir : get_option('devbindir'), + c_args : gio_c_args, + # intl.lib is not compatible with SAFESEH + link_args : noseh_link_args, +@@ -953,6 +956,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu + glib_compile_schemas = executable('glib-compile-schemas', + [gconstructor_as_data_h, 'gvdb/gvdb-builder.c', 'glib-compile-schemas.c'], + install : true, ++ install_dir : get_option('devbindir'), + # intl.lib is not compatible with SAFESEH + link_args : noseh_link_args, + dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) +@@ -960,6 +964,7 @@ glib_compile_schemas = executable('glib-compile-schemas', + glib_compile_resources = executable('glib-compile-resources', + [gconstructor_as_data_h, 'gvdb/gvdb-builder.c', 'glib-compile-resources.c'], + install : true, ++ install_dir : get_option('devbindir'), + c_args : gio_c_args, + # intl.lib is not compatible with SAFESEH + link_args : noseh_link_args, +diff --git a/glib/meson.build b/glib/meson.build +index aaf5f00f5..09edd291a 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -375,9 +375,10 @@ pkg.generate(libglib, + subdirs : ['glib-2.0'], + extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, + variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')), +- 'glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'), +- 'gobject_query=' + join_paths('${bindir}', 'gobject-query'), +- 'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')], ++ 'devbindir=' + get_option('devbindir'), ++ 'glib_genmarshal=' + join_paths('${devbindir}', 'glib-genmarshal'), ++ 'gobject_query=' + join_paths('${devbindir}', 'gobject-query'), ++ 'glib_mkenums=' + join_paths('${devbindir}', 'glib-mkenums')], + version : glib_version, + install_dir : glib_pkgconfigreldir, + filebase : 'glib-2.0', +@@ -413,6 +414,7 @@ if host_system == 'windows' + else + gtester = executable('gtester', 'gtester.c', + install : true, ++ install_dir : get_option('devbindir'), + c_args : ['-UG_DISABLE_ASSERT'], + include_directories : configinc, + dependencies : [libglib_dep]) +@@ -424,7 +426,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'), + configuration: report_conf, + install_mode: 'rwxr-xr-x' + ) +diff --git a/gobject/meson.build b/gobject/meson.build +index 85e283bab..386ad5e4e 100644 +--- a/gobject/meson.build ++++ b/gobject/meson.build +@@ -75,7 +75,7 @@ foreach tool: python_tools + input : tool + '.in', + output : tool, + configuration : python_tools_conf, +- install_dir : glib_bindir, ++ install_dir : get_option('devbindir'), + ) + + # Set variables for later use +@@ -145,6 +145,7 @@ libgobject_dep = declare_dependency(link_with : libgobject, + + executable('gobject-query', 'gobject-query.c', + install : true, ++ install_dir : get_option('devbindir'), + dependencies : [libglib_dep, libgobject_dep]) + + install_data('gobject_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb')) +diff --git a/meson.build b/meson.build +index 484f4c750..c7f9327d9 100644 +--- a/meson.build ++++ b/meson.build +@@ -2122,7 +2122,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'), + output : 'glib-gettextize', + configuration : gettextize_conf) + endif +diff --git a/meson_options.txt b/meson_options.txt +index 2c831e37e..5d8928577 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -3,6 +3,11 @@ option('runtime_libdir', + value : '', + description : 'install runtime libraries relative to libdir') + ++option('devbindir', ++ type : 'string', ++ value : '', ++ description : 'bindir for development tools') ++ + option('iconv', + type : 'combo', + choices : ['auto', 'libc', 'external'], |