summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2012-06-07 05:51:59 -0700
committerDan Nicholson <dbn.lists@gmail.com>2012-07-11 05:24:23 -0700
commit3ead3dfb7806fc51308f03005a68d848a25b6acb (patch)
tree47e9a1e5ec47f60c5881d61a065582cd7b993360
parenta077e0243050d4b4abb27c41b449980731c72931 (diff)
Enable Requires and Requires.private for --exists
Prior to pkg-config 0.24, --exists honored Requires and Requires.private. This was regressed in commits 02d5ae3f and 669bfe2e, which split the handling of Requires and Requires.private out more correctly for other options. This adds exists to the group of options that enable the Requires functionality. Freedesktop #43149
-rwxr-xr-xcheck/check-missing6
-rw-r--r--main.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/check/check-missing b/check/check-missing
index 1809c4d..69bed61 100755
--- a/check/check-missing
+++ b/check/check-missing
@@ -14,16 +14,16 @@ ARGS="--exists pkg-non-existent"
run_test
# existing package, but with missing Requires
-EXPECT_RETURN=0
+EXPECT_RETURN=1
RESULT=""
ARGS="--exists missing-requires"
run_test
# tests below are on an existing package, but with missing Requires.private;
# when pkg-config outputs error, the actual error text isn't checked
-# package exists
+# package exists, but should fail since deps can't be resolved
ARGS="--exists missing-requires-private"
-EXPECT_RETURN=0
+EXPECT_RETURN=1
RESULT=""
run_test
diff --git a/main.c b/main.c
index b42df6f..385e43d 100644
--- a/main.c
+++ b/main.c
@@ -424,14 +424,15 @@ main (int argc, char **argv)
* libs are requested */
if (want_I_cflags || want_other_cflags || want_cflags ||
- want_requires_private ||
+ want_requires_private || want_exists ||
(want_static_lib_list && (want_libs || want_l_libs || want_L_libs)))
enable_requires_private();
/* ignore Requires if no Cflags or Libs are requested */
if (!want_I_cflags && !want_other_cflags && !want_cflags &&
- !want_libs && !want_l_libs && !want_L_libs && !want_requires)
+ !want_libs && !want_l_libs && !want_L_libs && !want_requires &&
+ !want_exists)
disable_requires();
if (want_my_version)