diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/glib | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/glib')
4 files changed, 178 insertions, 169 deletions
diff --git a/nixpkgs/pkgs/development/libraries/glib/default.nix b/nixpkgs/pkgs/development/libraries/glib/default.nix index 8fb12fc0203a..2f50ed4b259d 100644 --- a/nixpkgs/pkgs/development/libraries/glib/default.nix +++ b/nixpkgs/pkgs/development/libraries/glib/default.nix @@ -1,18 +1,27 @@ -{ config, lib, stdenv, fetchurl, gettext, meson, ninja, pkg-config, perl, python3 -, libiconv, zlib, libffi, pcre, libelf, gnome, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45 +{ config +, lib +, stdenv +, fetchurl +, fetchpatch2 +, gettext +, meson +, ninja +, pkg-config +, perl +, python3 +, libiconv, zlib, libffi, pcre2, libelf, gnome, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45, libxslt # use util-linuxMinimal to avoid circular dependency (util-linux, systemd, glib) , util-linuxMinimal ? 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 +, darwin +, makeHardcodeGsettingsPatch +, testers }: -with lib; - assert stdenv.isLinux -> util-linuxMinimal != null; # TODO: @@ -23,7 +32,7 @@ assert stdenv.isLinux -> util-linuxMinimal != null; # $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 + and use them as a separately installed tests run 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 @@ -41,30 +50,29 @@ let done ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true ''; + + buildDocs = stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isStatic; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "glib"; - version = "2.72.3"; + version = "2.76.2"; src = fetchurl { - url = "mirror://gnome/sources/glib/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "Sjmi9iS4US1QDVhAFz7af6hfUcEJBS6ugGrOzoXTRfA="; + url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz"; + sha256 = "JPOEeFex2GdM2wOJo27ewPE8ZmzTznJ+zTQOudqKyp4="; }; - patches = optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.isDarwin [ ./darwin-compilation.patch - ] ++ optionals stdenv.hostPlatform.isMusl [ + ] ++ lib.optionals stdenv.hostPlatform.isMusl [ ./quark_init_on_demand.patch ./gobject_init_on_demand.patch ] ++ [ ./glib-appinfo-watch.patch ./schema-override-variable.patch - # Add support for the GNOME’s default terminal emulator. - # https://gitlab.gnome.org/GNOME/glib/-/issues/2618 - ./gnome-console-support.patch - # Do the same for Pantheon’s terminal emulator. + # Add support for Pantheon’s terminal emulator. ./elementary-terminal-support.patch # GLib contains many binaries used for different purposes; @@ -90,22 +98,28 @@ stdenv.mkDerivation rec { # 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; + + # Disable flaky test. + # https://gitlab.gnome.org/GNOME/glib/-/issues/820 + ./skip-timer-test.patch + ]; outputs = [ "bin" "out" "dev" "devdoc" ]; setupHook = ./setup-hook.sh; buildInputs = [ - libelf setupHook pcre - ] ++ optionals (!stdenv.hostPlatform.isWindows) [ + libelf + finalAttrs.setupHook + pcre2 + ] ++ lib.optionals (!stdenv.hostPlatform.isWindows) [ bash gnum4 # install glib-gettextize and m4 macros for other apps to use - ] ++ optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ libselinux util-linuxMinimal # for libmount - ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Carbon Cocoa CoreFoundation CoreServices Foundation - ]) ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ + ]) ++ lib.optionals buildDocs [ # Note: this needs to be both in buildInputs and nativeBuildInputs. The # Meson gtkdoc module uses find_program to look it up (-> build dep), but # glib's own Meson configuration uses the host pkg-config to find its @@ -121,10 +135,18 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ - (buildPackages.meson.override { - withDarwinFrameworksGtkDocPatch = stdenv.isDarwin; - }) - ninja pkg-config perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 libxml2 + meson + ninja + pkg-config + perl + python3 + gettext + libxslt + docbook_xsl + ] ++ lib.optionals buildDocs [ + gtk-doc + docbook_xml_dtd_45 + libxml2 ]; propagatedBuildInputs = [ zlib libffi gettext libiconv ]; @@ -132,12 +154,17 @@ stdenv.mkDerivation rec { 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=${boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}" + "-Dgtk_doc=${lib.boolToString buildDocs}" "-Dnls=enabled" "-Ddevbindir=${placeholder "dev"}/bin" + ] ++ lib.optionals (!stdenv.isDarwin) [ + "-Dman=true" # broken on Darwin + ] ++ lib.optionals stdenv.isFreeBSD [ + "-Db_lundef=false" + "-Dxattr=false" ]; - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=nonnull" # Default for release buildtype but passed manually because # we're using plain @@ -152,11 +179,26 @@ stdenv.mkDerivation rec { patchShebangs glib/gen-unicode-tables.pl patchShebangs glib/tests/gen-casefold-txt.py patchShebangs glib/tests/gen-casemap-txt.py + patchShebangs tools/gen-visibility-macros.py + + # 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-address-get-session.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 '' + lib.optionalString stdenv.hostPlatform.isWindows '' substituteInPlace gio/win32/meson.build \ --replace "libintl, " "" ''; + postConfigure = '' + patchShebangs gio/gdbus-2.0/codegen/gdbus-codegen gobject/glib-{genmarshal,mkenums} + ''; + DETERMINISTIC_BUILD = 1; postInstall = '' @@ -165,40 +207,41 @@ stdenv.mkDerivation rec { 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"' \ + sed '1i#line 1 "glib-${finalAttrs.version}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \ -i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c - '' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + for i in $bin/bin/*; do + moveToOutput "share/bash-completion/completions/''${i##*/}" "$bin" + done + for i in $dev/bin/*; do + moveToOutput "share/bash-completion/completions/''${i##*/}" "$dev" + done + '' + lib.optionalString (!buildDocs) '' cp -r ${buildPackages.glib.devdoc} $devdoc ''; - checkInputs = [ tzdata desktop-file-utils shared-mime-info ]; + # Move man pages to the same output as their binaries (needs to be + # done after preFixupHooks which moves man pages too - in + # _multioutDocs) + postFixup = '' + for i in $dev/bin/*; do + moveToOutput "share/man/man1/''${i##*/}.1.*" "$dev" + done + ''; - preCheck = optionalString doCheck '' - export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${pname}-${version}/glib/.libs''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" + nativeCheckInputs = [ tzdata desktop-file-utils shared-mime-info ]; + + preCheck = lib.optionalString finalAttrs.doCheck or config.doCheckByDefault or false '' + export LD_LIBRARY_PATH="$NIX_BUILD_TOP/glib-${finalAttrs.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 G_TEST_DBUS_DAEMON="${dbus}/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 { @@ -209,18 +252,40 @@ stdenv.mkDerivation rec { getSchemaPath = pkg: makeSchemaPath pkg pkg.name; getSchemaDataDirPath = pkg: makeSchemaDataDirPath pkg pkg.name; + tests = { + withChecks = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; }); + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + inherit flattenInclude; updateScript = gnome.updateScript { packageName = "glib"; versionPolicy = "odd-unstable"; }; + + mkHardcodeGsettingsPatch = + { + src, + glib-schema-to-var, + }: + builtins.trace + "glib.mkHardcodeGsettingsPatch is deprecated, please use makeHardcodeGsettingsPatch instead" + (makeHardcodeGsettingsPatch { + inherit src; + schemaIdToVariableMapping = glib-schema-to-var; + }); }; meta = with lib; { description = "C library of programming buildings blocks"; - homepage = "https://www.gtk.org/"; + homepage = "https://wiki.gnome.org/Projects/GLib"; license = licenses.lgpl21Plus; maintainers = teams.gnome.members ++ (with maintainers; [ lovek323 raskin ]); + pkgConfigModules = [ + "gio-2.0" + "gobject-2.0" + "gthread-2.0" + ]; platforms = platforms.unix; longDescription = '' @@ -230,4 +295,4 @@ stdenv.mkDerivation rec { set of utility functions for strings and common data structures. ''; }; -} +}) diff --git a/nixpkgs/pkgs/development/libraries/glib/elementary-terminal-support.patch b/nixpkgs/pkgs/development/libraries/glib/elementary-terminal-support.patch index 0b8c8a70871c..34a56c8487ae 100644 --- a/nixpkgs/pkgs/development/libraries/glib/elementary-terminal-support.patch +++ b/nixpkgs/pkgs/development/libraries/glib/elementary-terminal-support.patch @@ -1,16 +1,12 @@ diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c -index a441bfec9..6bcd3e690 100644 +index 30fcb2937..a6a7163a7 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c -@@ -2678,6 +2678,11 @@ prepend_terminal_to_vector (int *argc, - if (check != NULL) - pass_cmd_as_single_arg = TRUE; - } -+ if (check == NULL) { -+ check = g_find_program_in_path ("io.elementary.terminal"); -+ if (check != NULL) -+ pass_cmd_as_single_arg = TRUE; -+ } - if (check == NULL) - check = g_find_program_in_path ("tilix"); - if (check == NULL) +@@ -2704,6 +2704,7 @@ prepend_terminal_to_vector (int *argc, + { "gnome-terminal", "--" }, + { "mate-terminal", "-x" }, + { "xfce4-terminal", "-x" }, ++ { "io.elementary.terminal", "-x" }, + { "tilix", "-e" }, + { "konsole", "-e" }, + { "nxterm", "-e" }, diff --git a/nixpkgs/pkgs/development/libraries/glib/gnome-console-support.patch b/nixpkgs/pkgs/development/libraries/glib/gnome-console-support.patch deleted file mode 100644 index 7f6894a5cec9..000000000000 --- a/nixpkgs/pkgs/development/libraries/glib/gnome-console-support.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c -index 60d6debb2..a441bfec9 100644 ---- a/gio/gdesktopappinfo.c -+++ b/gio/gdesktopappinfo.c -@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int *argc, - int i, j; - char **term_argv = NULL; - int term_argc = 0; -+ gboolean pass_cmd_as_single_arg = FALSE; - char *check; - char **the_argv; - -@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int *argc, - } - else - { -+ if (check == NULL) { -+ check = g_find_program_in_path ("kgx"); -+ if (check != NULL) -+ pass_cmd_as_single_arg = TRUE; -+ } - if (check == NULL) - check = g_find_program_in_path ("tilix"); - if (check == NULL) -@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int *argc, - } - } - -- real_argc = term_argc + *argc; -+ real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc); - real_argv = g_new (char *, real_argc + 1); - - for (i = 0; i < term_argc; i++) - real_argv[i] = term_argv[i]; - -- for (j = 0; j < *argc; j++, i++) -- real_argv[i] = (char *)the_argv[j]; -+ if (pass_cmd_as_single_arg) { -+ char **quoted_argv = g_new (char *, *argc + 1); -+ -+ for (j = 0; j < *argc; j++) { -+ quoted_argv[j] = g_shell_quote (the_argv[j]); -+ g_free (the_argv[j]); -+ } -+ quoted_argv[j] = NULL; -+ -+ real_argv[i++] = g_strjoinv (" ", quoted_argv); -+ g_strfreev (quoted_argv); -+ } else { -+ for (j = 0; j < *argc; j++, i++) -+ real_argv[i] = (char *)the_argv[j]; -+ } - - real_argv[i] = NULL; - diff --git a/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch b/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch index 9a949ea1226c..f0a217f65702 100644 --- a/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch +++ b/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch @@ -1,32 +1,32 @@ diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build -index 5ea6bae2f..e0b584a86 100644 +index 65faae9b2..4297513d4 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) +@@ -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 ) - # 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 +index 462606f3b..a3047fca1 100644 --- a/gio/meson.build +++ b/gio/meson.build -@@ -831,14 +831,15 @@ pkg.generate(libgio, +@@ -880,14 +880,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'), +- 'gio_querymodules=@0@'.format(pkgconfig_multiarch_bindir / 'gio-querymodules'), +- 'glib_compile_schemas=@0@'.format(pkgconfig_multiarch_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'), ++ 'gio_querymodules=@0@'.format('${devbindir}' / 'gio-querymodules'), ++ 'glib_compile_schemas=@0@'.format('${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'), @@ -36,42 +36,45 @@ index 3535788ab..99c3b48d6 100644 'gsettings=' + join_paths('${bindir}', 'gsettings')], version : glib_version, install_dir : glib_pkgconfigreldir, -@@ -939,12 +940,14 @@ executable('gio', gio_tool_sources, +@@ -989,6 +990,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, - dependencies : [libelf, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) +@@ -996,7 +998,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 - link_args : noseh_link_args, -@@ -953,6 +956,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu +@@ -1006,7 +1008,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'], + ['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, - dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) -@@ -960,6 +964,7 @@ glib_compile_schemas = executable('glib-compile-schemas', +@@ -1015,6 +1017,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'], + [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 - link_args : noseh_link_args, diff --git a/glib/meson.build b/glib/meson.build -index aaf5f00f5..09edd291a 100644 +index da76fc005..8e2ef990c 100644 --- a/glib/meson.build +++ b/glib/meson.build -@@ -375,9 +375,10 @@ pkg.generate(libglib, +@@ -441,9 +441,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')), @@ -85,70 +88,70 @@ index aaf5f00f5..09edd291a 100644 version : glib_version, install_dir : glib_pkgconfigreldir, filebase : 'glib-2.0', -@@ -413,6 +414,7 @@ if host_system == 'windows' +@@ -480,6 +481,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, - dependencies : [libglib_dep]) -@@ -424,7 +426,7 @@ report_conf.set('PYTHON', python_name) +@@ -492,7 +494,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/gobject/meson.build b/gobject/meson.build -index 85e283bab..386ad5e4e 100644 +index 2129aaf8a..da8462428 100644 --- a/gobject/meson.build +++ b/gobject/meson.build -@@ -75,7 +75,7 @@ foreach tool: python_tools +@@ -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', ) - # Set variables for later use -@@ -145,6 +145,7 @@ libgobject_dep = declare_dependency(link_with : libgobject, +@@ -172,6 +172,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep) - executable('gobject-query', 'gobject-query.c', + gobject_query = executable('gobject-query', 'gobject-query.c', install : true, + install_dir : get_option('devbindir'), + install_tag : 'bin-devel', 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 +index 517d5757c..198cc1b3c 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -3,6 +3,11 @@ option('runtime_libdir', - value : '', - description : 'install runtime libraries relative to libdir') +@@ -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('iconv', - type : 'combo', - choices : ['auto', 'libc', 'external'], + option('charsetalias_dir', + type : 'string', + value : '', +diff --git a/tools/meson.build b/tools/meson.build +index 2d4192e46..d7e710d6f 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) |