Merge pull request #310856 from symphorien/glib_gdb_script

glib: fix installing gdb scripts
This commit is contained in:
Guillaume Girol
2024-06-03 20:18:06 +02:00
committed by GitHub
2 changed files with 30 additions and 0 deletions
@@ -124,6 +124,12 @@ stdenv.mkDerivation (finalAttrs: {
# 3. Tools for desktop environment that cannot go to $bin due to $out depending on them ($out)
# * gio-launch-desktop
./split-dev-programs.patch
# Tell Meson to install gdb scripts next to the lib
# GDB only looks there and in ${gdb}/share/gdb/auto-load,
# and by default meson installs in to $out/share/gdb/auto-load
# which does not help
./gdb_script.patch
];
outputs = [ "bin" "out" "dev" "devdoc" ];
@@ -221,6 +227,7 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = ''
moveToOutput "share/glib-2.0" "$dev"
moveToOutput "share/glib-2.0/gdb" "$out"
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|"
@@ -0,0 +1,23 @@
diff --git a/glib/meson.build b/glib/meson.build
index b2dd569e1..b013991a1 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -541,7 +540,7 @@ configure_file(
input: 'libglib-gdb.py.in',
output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
- install_dir: gdb_install_dir,
+ install_dir: glib_libdir,
install_tag: 'devel',
install: gdb_install,
)
diff --git a/gobject/meson.build b/gobject/meson.build
@@ -185,7 +184,7 @@ configure_file(
input: 'libgobject-gdb.py.in',
output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
- install_dir: gdb_install_dir,
+ install_dir: glib_libdir,
install_tag: 'devel',
install: gdb_install,
)