gnome-shell-jhbuild: Adjust GI_TYPELIB_PATH for NM inclusion

When jhbuilding, we use a jhbuilt gobject-introspection, so the
default typelib path is the jhbuild prefix, not /usr. So if we are
using NetworkManager from packages, we need to adjust GI_TYPELIB_PATH
to include it.

https://bugzilla.gnome.org/show_bug.cgi?id=621707
This commit is contained in:
Dan Winship 2011-03-16 09:40:25 -04:00
parent c8ac3fd4f5
commit cab9a580e8
3 changed files with 15 additions and 4 deletions

View File

@ -98,6 +98,14 @@ AC_DEFINE_UNQUOTED([GJS_VERSION], ["$GJS_VERSION"], [The version of GJS we're li
AC_SUBST([GJS_VERSION], ["$GJS_VERSION"])
GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION])
JHBUILD_TYPELIBDIR="$INTROSPECTION_TYPELIBDIR"
# NM is the only typelib we use that we don't jhbuild
PKG_CHECK_EXISTS([libnm-glib >= 0.8.995],
[NM_TYPELIBDIR=`$PKG_CONFIG --variable=libdir libnm-glib`/girepository-1.0
if test "$INTROSPECTION_TYPELIBDIR" != "$NM_TYPELIBDIR"; then
JHBUILD_TYPELIBDIR="$JHBUILD_TYPELIBDIR:$NM_TYPELIBDIR"
fi])
AC_SUBST(JHBUILD_TYPELIBDIR)
saved_CFLAGS=$CFLAGS
saved_LIBS=$LIBS

View File

@ -38,6 +38,7 @@ generated_script_substitutions = \
-e "s|@datadir[@]|$(datadir)|" \
-e "s|@libexecdir[@]|$(libexecdir)|" \
-e "s|@libdir[@]|$(libdir)|" \
-e "s|@JHBUILD_TYPELIBDIR[@]|$(JHBUILD_TYPELIBDIR)|" \
-e "s|@pkgdatadir[@]|$(pkgdatadir)|" \
-e "s|@PYTHON[@]|$(PYTHON)|" \
-e "s|@VERSION[@]|$(VERSION)|" \

View File

@ -197,12 +197,16 @@ def start_shell(perf_output=None):
if os.path.exists(os.path.join(self_dir, 'gnome-shell-jhbuild.in')):
running_from_source_tree = True
top_dir = os.path.dirname(self_dir)
typelib_dir = os.path.join(top_dir, "src")
typelib_dir = '@JHBUILD_TYPELIBDIR@:' + os.path.join(top_dir, "src")
js_dir = os.path.join(top_dir, "js")
data_dir = os.path.join(top_dir, "data")
else:
running_from_source_tree = False
js_dir = os.path.join('@pkgdatadir@', 'js')
typelib_dir = '@JHBUILD_TYPELIBDIR@'
if os.environ.has_key('GI_TYPELIB_PATH'):
typelib_dir = typelib_dir + ":" + os.environ.get('GI_TYPELIB_PATH')
# Set up environment
env = dict(os.environ)
@ -215,14 +219,12 @@ def start_shell(perf_output=None):
# run". See bug #642084
env.update({'GNOME_SHELL_JS' : js_dir,
'PATH' : '@bindir@:' + os.environ.get('PATH', ''),
'GI_TYPELIB_PATH' : typelib_dir,
'XDG_CONFIG_DIRS' : '@sysconfdir@/xdg:' + (os.environ.get('XDG_CONFIG_DIRS') or '/etc/xdg'),
'XDG_DATA_DIRS' : '@datadir@:' + (os.environ.get('XDG_DATA_DIRS') or '/usr/local/share:/usr/share')})
if running_from_source_tree:
if os.environ.has_key('GI_TYPELIB_PATH'):
typelib_dir = typelib_dir + ":" + os.environ.get('GI_TYPELIB_PATH')
env.update({'GNOME_SHELL_BINDIR' : self_dir,
'GNOME_SHELL_DATADIR' : data_dir,
'GI_TYPELIB_PATH' : typelib_dir,
'GSETTINGS_SCHEMA_DIR' : data_dir })
else:
# This is just broken to set in the installed case; see bug #642084