[anjuta] project-wizard: Use pkgconfig(pkg-name) for the installation of packages.
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] project-wizard: Use pkgconfig(pkg-name) for the installation of packages.
- Date: Sun, 26 Sep 2010 19:01:46 +0000 (UTC)
commit 8a44d7abbebe864ccbf3e9ef5c488143dff68d10
Author: Johannes Schmid <jhs gnome org>
Date: Sat Sep 25 11:21:35 2010 +0200
project-wizard: Use pkgconfig(pkg-name) for the installation of packages.
plugins/project-wizard/druid.c | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
---
diff --git a/plugins/project-wizard/druid.c b/plugins/project-wizard/druid.c
index 29a3bb8..9d71323 100644
--- a/plugins/project-wizard/druid.c
+++ b/plugins/project-wizard/druid.c
@@ -825,29 +825,26 @@ on_install_button_clicked (GtkWidget *button, NPWDruid *druid)
{
GList *missing_programs, *missing_packages;
GList *missing_files = NULL;
+ GList *node;
+
missing_programs = npw_header_check_required_programs (druid->header);
missing_packages = npw_header_check_required_packages (druid->header);
- /*
- * FIXME: packagekit only allows search by absolute path, so we must
- * come up one. Unfortunately, hardcoding "/usr" prefix seems to be
- * the only sane way since most distros install there. Using anjuta
- * build prefix isn't any better since anjuta can be installed any
- * where irrespective of distro standandard prefix. If there is a
- * dynamic way to know it, we should try that (perhaps by doing
- * `which <some ubiquitous program>`).
- */
anjuta_util_glist_strings_prefix (missing_programs, "/usr/bin/");
+ /* Search for "pkgconfig(pkg_name)" */
g_list_foreach (missing_packages, (GFunc) strip_package_version_info,
NULL);
- anjuta_util_glist_strings_prefix (missing_packages,
- "/usr/lib/pkgconfig/");
- anjuta_util_glist_strings_sufix (missing_packages, ".pc");
-
- missing_files = g_list_concat (missing_programs, missing_packages);
+ missing_files = g_list_concat (missing_files, missing_programs);
+ for (node = missing_packages; node != NULL; node = g_list_next (missing_packages))
+ {
+ gchar* pk_pkg_config_string = g_strdup_printf ("pkgconfig(%s)", (gchar*) node->data);
+ missing_files = g_list_append (missing_files, pk_pkg_config_string);
+ }
+ g_list_free (missing_packages);
+
if (missing_files)
{
gchar * missing_names = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]