diff --git a/configure.ac b/configure.ac index 3ecdfedc1..0d5581d74 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index e878f20bf..7fcd3e8d0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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)|" \ diff --git a/src/gnome-shell-jhbuild.in b/src/gnome-shell-jhbuild.in index 1cc4ef4d3..924e9b386 100755 --- a/src/gnome-shell-jhbuild.in +++ b/src/gnome-shell-jhbuild.in @@ -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