~ruther/guix-local

94987ebe136569dfe0180277384d7c04e18ab78c — Federico Beffa 11 years ago 58d3230
gnu: gobject-introspection: Add patch.

* gnu/packages/glib.scm (gobject-introspection): Add patch
  gobject-introspection-girepository.patch.
2 files changed, 27 insertions(+), 0 deletions(-)

M gnu/packages/glib.scm
A gnu/packages/patches/gobject-introspection-girepository.patch
M gnu/packages/glib.scm => gnu/packages/glib.scm +2 -0
@@ 213,6 213,8 @@ dynamic loading, and an object system.")
              (base32 "1xwm7wmr9r9wp6xljb3bckx3a4siybavaq39w46ly7gpskxfv8iv"))
             (patches (list 
                       (search-patch "gobject-introspection-cc.patch")
                       (search-patch
                        "gobject-introspection-girepository.patch")
                       (search-patch 
                        "gobject-introspection-absolute-shlib-path.patch")))))
    (build-system gnu-build-system)

A gnu/packages/patches/gobject-introspection-girepository.patch => gnu/packages/patches/gobject-introspection-girepository.patch +25 -0
@@ 0,0 1,25 @@
--- a/girepository/gitypelib.c.orig
+++ b/girepository/gitypelib.c
@@ -2296,7 +2296,22 @@ _g_typelib_do_dlopen (GITypelib *typelib)
         {
           GModule *module;
 
+          /* 'gobject-introspection' doesn't store the path of shared
+             libraries into '.typelib' and '.gir' files.  Shared
+             libraries are searched for in the dynamic linker search
+             path.  In Guix we patch 'gobject-introspection' such that
+             it stores the absolute path of shared libraries in
+             '.typelib' and '.gir' files.  Here, in order to minimize
+             side effects, we make sure that if the library is not
+             found at the indicated path location, we try with just
+             the basename and the system dynamic library
+             infrastructure, as per default behaviour of the
+             library. */
           module = load_one_shared_library (shlibs[i]);
+          if (module == NULL && g_path_is_absolute (shlibs[i]))
+            {
+              module = load_one_shared_library (g_basename(shlibs[i]));
+            }
 
           if (module == NULL)
             {