diff -Nurd -x'*~' pkg-config-0.28.orig/check/check-print-options pkg-config-0.28/check/check-print-options --- pkg-config-0.28.orig/check/check-print-options 2013-01-22 08:11:53.000000000 -0500 +++ pkg-config-0.28/check/check-print-options 2014-06-05 02:53:24.000000000 -0400 @@ -16,9 +16,9 @@ run_test --print-variables no-variables RESULT="exec_prefix -prefix +includedir libdir -includedir" +prefix" run_test --print-variables simple # --print-provides diff -Nurd -x'*~' pkg-config-0.28.orig/main.c pkg-config-0.28/main.c --- pkg-config-0.28.orig/main.c 2013-01-22 08:11:53.000000000 -0500 +++ pkg-config-0.28/main.c 2014-06-05 01:57:43.000000000 -0400 @@ -277,11 +277,10 @@ } void -print_hashtable_key (gpointer key, - gpointer value, - gpointer user_data) +print_list_entry (gpointer entry, + gpointer user_data) { - printf("%s\n", (gchar*)key); + printf("%s\n", (gchar*)entry); } static void @@ -682,9 +681,14 @@ { Package *pkg = tmp->data; if (pkg->vars != NULL) - g_hash_table_foreach(pkg->vars, - &print_hashtable_key, - NULL); + { + GList *vars = g_hash_table_get_keys(pkg->vars); + vars = g_list_sort(vars, (GCompareFunc)g_ascii_strcasecmp); + g_list_foreach(vars, + &print_list_entry, + NULL); + g_list_free(vars); + } tmp = g_list_next (tmp); if (tmp) printf ("\n"); }