Merge pull request #53 from tonytheodore/keep-system-libs

Test failure with default prefix and parsing of keep-system-* args
pull/62/head
William Pitcock 2013-08-24 11:17:15 -07:00
commit 2ae72283fc
2 changed files with 3 additions and 3 deletions

4
main.c
View File

@ -62,10 +62,10 @@ fragment_has_system_dir(pkg_fragment_t *frag)
switch (frag->type) switch (frag->type)
{ {
case 'L': 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; return true;
case 'I': 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; return true;
default: default:
break; break;

View File

@ -136,7 +136,7 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --cflags tilde-quoting" \
# 5) tests for other regressions # 5) tests for other regressions
run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --variable=includedir foo" \ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --variable=includedir foo" \
'/usr/include' '/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' '-L/usr/local/lib'
run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs-only-L --libs-only-l cflags-libs-only" \ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs-only-L --libs-only-l cflags-libs-only" \
'-lfoo' '-lfoo'