gnome.eog: Hardcode library path in gir
By default, gobject-introspection refers to libraries using their file name in the GIR file. Since we do not have FHS to reliably find libraries by their name, we are patching gobject-introspection to use absolute paths. This works fine for libraries installed to "$out/lib" but when a different path is used, the hard-coded absolute path will be incorrect. To deal with this case, we also patch Meson to be able to pass the install_dir to gobject-introspection. But it currently only passes the data for targets that have absolute install_dir set. To have correct libeog path, we therefore need to absolutize the install_dir.
This commit is contained in:
parent
ac726e8502
commit
e29253ad9b
2 changed files with 20 additions and 0 deletions
|
@ -38,6 +38,13 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-+zW/tRZ6QhIfWae5t6wNdbvQUXua/W2Rgx6E01c13fg=";
|
sha256 = "sha256-+zW/tRZ6QhIfWae5t6wNdbvQUXua/W2Rgx6E01c13fg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix path to libeog.so in the gir file.
|
||||||
|
# We patch gobject-introspection to hardcode absolute paths but
|
||||||
|
# our Meson patch will only pass the info when install_dir is absolute as well.
|
||||||
|
./fix-gir-lib-path.patch
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
|
|
13
pkgs/desktops/gnome/core/eog/fix-gir-lib-path.patch
Normal file
13
pkgs/desktops/gnome/core/eog/fix-gir-lib-path.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/src/meson.build b/src/meson.build
|
||||||
|
index cc9d3856..f909836d 100644
|
||||||
|
--- a/src/meson.build
|
||||||
|
+++ b/src/meson.build
|
||||||
|
@@ -165,7 +165,7 @@ libeog = shared_library(
|
||||||
|
link_args: ldflags,
|
||||||
|
link_depends: symbol_map,
|
||||||
|
install: true,
|
||||||
|
- install_dir: eog_pkglibdir,
|
||||||
|
+ install_dir: eog_prefix / eog_pkglibdir,
|
||||||
|
)
|
||||||
|
|
||||||
|
libeog_dep = declare_dependency(
|
Loading…
Reference in a new issue