From bc661124da051240ce4eb36afc7eccedb73a24ac Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Sat, 24 Aug 2013 15:19:41 +1000 Subject: [PATCH] fix keep-system-* arg parsing and test with default prefix --- main.c | 4 ++-- tests/run.sh.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 761cbd9..59d6d53 100644 --- a/main.c +++ b/main.c @@ -62,10 +62,10 @@ fragment_has_system_dir(pkg_fragment_t *frag) switch (frag->type) { case 'L': - if ((want_flags & PKG_KEEP_SYSTEM_CFLAGS) == 0 && !strcasecmp(SYSTEM_LIBDIR, frag->data)) + if ((want_flags & PKG_KEEP_SYSTEM_LIBS) == 0 && !strcasecmp(SYSTEM_LIBDIR, frag->data)) return true; case 'I': - if ((want_flags & PKG_KEEP_SYSTEM_LIBS) == 0 && !strcasecmp(SYSTEM_INCLUDEDIR, frag->data)) + if ((want_flags & PKG_KEEP_SYSTEM_CFLAGS) == 0 && !strcasecmp(SYSTEM_INCLUDEDIR, frag->data)) return true; default: break; diff --git a/tests/run.sh.in b/tests/run.sh.in index 0883666..60346c7 100644 --- a/tests/run.sh.in +++ b/tests/run.sh.in @@ -136,7 +136,7 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --cflags tilde-quoting" \ # 5) tests for other regressions run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --variable=includedir foo" \ '/usr/include' -run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs-only-L cflags-libs-only" \ +run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs-only-L --keep-system-libs cflags-libs-only" \ '-L/usr/local/lib' run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs-only-L --libs-only-l cflags-libs-only" \ '-lfoo'