diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/plugin.c | 23 |
2 files changed, 20 insertions, 8 deletions
@@ -1,3 +1,8 @@ +2008-04-03 Rob Bradford <rob@openedhand.com> + + * src/plugin.c: (update_environment): + Add support for using the new pkgconfig path in toolchain mode. + 2008-03-25 Rob Bradford <rob@openedhand.com> * src/plugin.c: (update_state): diff --git a/src/plugin.c b/src/plugin.c index 92314dc..59e370b 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -1162,6 +1162,9 @@ static void update_environment (AnjutaPluginSdk *sp) { gchar *tmp = NULL; + gchar *pkg_config_usr_path = NULL; + gchar *pkg_config_path = NULL; + if (sp->triplet == NULL || (sp->poky_mode == POKY_MODE_TOOLCHAIN && sp->sdk_root == NULL) || @@ -1179,26 +1182,30 @@ update_environment (AnjutaPluginSdk *sp) setenv ("PKG_CONFIG_SYSROOT_DIR", tmp, 1); g_free (tmp); - tmp = g_build_filename (sp->sdk_root, sp->triplet, "lib", "pkgconfig", NULL); + pkg_config_path = g_build_filename (sp->sdk_root, sp->triplet, "lib", + "pkgconfig", NULL); + pkg_config_usr_path = g_build_filename (sp->sdk_root, sp->triplet, "usr", + "lib", "pkgconfig", NULL); + tmp = g_strdup_printf ("%s:%s", pkg_config_usr_path, pkg_config_path); + setenv ("PKG_CONFIG_PATH", tmp, 1); + g_free (pkg_config_path); + g_free (pkg_config_usr_path); g_free (tmp); tmp = g_build_filename (sp->sdk_root, "site-config", NULL); setenv ("CONFIG_SITE", tmp, 1); g_free (tmp); } else { - gchar *pkg_config_usr_path = NULL; - gchar *pkg_config_path = NULL; - tmp = g_build_filename (sp->poky_root, "build", "tmp", "staging", sp->triplet, NULL); setenv ("PKG_CONFIG_SYSROOT_DIR", tmp, 1); g_free (tmp); - pkg_config_usr_path = g_build_filename (sp->poky_root, "build", "tmp", "staging", sp->triplet, - "usr", "lib", "pkgconfig", NULL); - pkg_config_path = g_build_filename (sp->poky_root, "build", "tmp", "staging", sp->triplet, - "lib", "pkgconfig", NULL); + pkg_config_usr_path = g_build_filename (sp->poky_root, "build", "tmp", + "staging", sp->triplet, "usr", "lib", "pkgconfig", NULL); + pkg_config_path = g_build_filename (sp->poky_root, "build", "tmp", + "staging", sp->triplet, "lib", "pkgconfig", NULL); tmp = g_strdup_printf ("%s:%s", pkg_config_usr_path, pkg_config_path); setenv ("PKG_CONFIG_PATH", tmp, 1); g_free (pkg_config_path); |