diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/plugin.c | 23 | ||||
-rw-r--r-- | src/plugin.h | 1 |
3 files changed, 28 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2008-03-11 Rob Bradford <rob@openedhand.com> + + * src/plugin.c: (update_path), (update_environment): + * src/plugin.h: + Add the old style staging paths to PKG_CONFIG_PATH and the PATH for + compatability with older OE/Poky. + 2008-03-07 Rob Bradford <rob@openedhand.com> * src/plugin.c: (get_host_component), (update_path), diff --git a/src/plugin.c b/src/plugin.c index 95b8846..9e6fb2e 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -1175,6 +1175,7 @@ update_path (AnjutaPluginSdk *sp) int i = 0; gchar *poky_scripts_dir = NULL; gchar *poky_host_staging_bin_dir = NULL; + gchar *poky_host_staging_usr_bin_dir = NULL; gchar *poky_cross_dir = NULL; gchar *host_component = NULL; @@ -1188,8 +1189,10 @@ update_path (AnjutaPluginSdk *sp) { host_component = get_host_component (); poky_scripts_dir = g_build_filename (sp->poky_root, "scripts", NULL); - poky_host_staging_bin_dir = g_build_filename (sp->poky_root, "build", "tmp", + poky_host_staging_usr_bin_dir = g_build_filename (sp->poky_root, "build", "tmp", "staging", host_component, "usr", "bin", NULL); + poky_host_staging_bin_dir = g_build_filename (sp->poky_root, "build", "tmp", + "staging", host_component, "bin", NULL); poky_cross_dir = g_build_filename (sp->poky_root, "build", "tmp", "cross", "bin", NULL); g_free (host_component); @@ -1217,6 +1220,8 @@ update_path (AnjutaPluginSdk *sp) (sp->poky_scripts_dir && g_str_equal (tmp, sp->poky_scripts_dir)) || (sp->poky_host_staging_bin_dir && g_str_equal (tmp, sp->poky_host_staging_bin_dir)) || + (sp->poky_host_staging_usr_bin_dir + && g_str_equal (tmp, sp->poky_host_staging_usr_bin_dir)) || (sp->poky_cross_dir && g_str_equal (tmp, sp->poky_cross_dir))) { path_array = g_array_remove_index (path_array, i); @@ -1238,11 +1243,13 @@ update_path (AnjutaPluginSdk *sp) if (poky_host_staging_bin_dir) path_array = g_array_prepend_val (path_array, poky_host_staging_bin_dir); + + if (poky_host_staging_usr_bin_dir) + path_array = g_array_prepend_val (path_array, poky_host_staging_usr_bin_dir); } /* Create our new path */ path = g_strjoinv (":", (gchar **)path_array->data); - setenv ("PATH", path, 1); /* Save the components */ @@ -1250,11 +1257,13 @@ update_path (AnjutaPluginSdk *sp) g_free (sp->poky_scripts_dir); g_free (sp->poky_cross_dir); g_free (sp->poky_host_staging_bin_dir); + g_free (sp->poky_host_staging_usr_bin_dir); sp->path_component = new_path_component; sp->poky_scripts_dir = poky_scripts_dir; sp->poky_cross_dir = poky_cross_dir; sp->poky_host_staging_bin_dir = poky_host_staging_bin_dir; + sp->poky_host_staging_usr_bin_dir = poky_host_staging_usr_bin_dir; g_array_free (path_array, TRUE); g_strfreev (pathv); @@ -1304,14 +1313,22 @@ update_environment (AnjutaPluginSdk *sp) 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); - tmp = g_build_filename (sp->poky_root, "build", "tmp", "staging", sp->triplet, + 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); + g_free (pkg_config_usr_path); g_free (tmp); unsetenv ("CONFIG_SITE"); diff --git a/src/plugin.h b/src/plugin.h index 20e5d29..07a8c95 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -81,6 +81,7 @@ struct _AnjutaPluginSdk gchar *path_component; gchar *poky_scripts_dir; + gchar *poky_host_staging_usr_bin_dir; gchar *poky_host_staging_bin_dir; gchar *poky_cross_dir; |