[jhbuild] Automatically set GI_TYPELIB_PATH



commit dcda5c0f0e7f9bd784a0dc4e3417258962d7b902
Author: Steve Frécinaux <code istique net>
Date:   Sun Jun 13 18:12:47 2010 +0200

    Automatically set GI_TYPELIB_PATH
    
    This env var is required to be able to run stuff that depend on
    gobject-introspection.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=621461

 jhbuild/config.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index fcb6791..7d0ba1f 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -343,6 +343,17 @@ class Config:
         addpath('PKG_CONFIG_PATH', pkgconfigdatadir)
         addpath('PKG_CONFIG_PATH', pkgconfigdir)
 
+        # GI_TYPELIB_PATH
+        if not 'GI_TYPELIB_PATH' in os.environ:
+            if self.use_lib64:
+                full_name = '/usr/lib64/girepository-1.0'
+            else:
+                full_name = '/usr/lib/girepository-1.0'
+            if os.path.exists(full_name):
+                addpath('GI_TYPELIB_PATH', full_name)
+        typelibpath = os.path.join(self.libdir, 'girepository-1.0')
+        addpath('GI_TYPELIB_PATH', typelibpath)
+
         # XDG_DATA_DIRS
         xdgdatadir = os.path.join(self.prefix, 'share')
         addpath('XDG_DATA_DIRS', xdgdatadir)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]