pkg-config/check
Dan Nicholson 9adfd9ebfc Only strip duplicate arguments when they appear consecutively
pkg-config strips all duplicate arguments from the flag output string.
This is done for 2 reasons:

1. When a package shows up twice in the final package list after
resolving all Requires, stripping was used to ensure it's flags only
showed up once at the correct location.

2. An optimization so that the output string is not excessively long.

Since commit c6ec7869, 1. is no longer necessary as the final package
list only contains each package once. 2. causes problems when applied
too aggressively since some arguments have different semantics depending
on the prior or subsequent arguments.

To keep a bit of optimization, the stripping is reduced to only removing
consecutive duplicate arguments. This should ensure that the semantics
are kept intact while removing obviously unnecessary arguments.

The drawback is that some arguments will now appear multiple times in
the output when they previously would have only appeared once. Here we
have to rely on the tools using these arguments to handle the duplicates
appropriately since there is no way for pkg-config to encode all the
semantics of those arguments. Another thing that can help this situation
is if pkg-config is used for all packages in the Requires chain so that
the Libs/Cflags of each package only pertain to itself and don't encode
the compiling/linking rules of a 3rd party package.

Freedesktop #16101 (https://bugs.freedesktop.org/show_bug.cgi?id=16101)
2012-12-04 13:04:57 -08:00
..
gtk Add a gtk testcase to provide something with complex interactions 2012-11-28 05:59:49 -08:00
sort Test ordering of flags based on package depth and path 2012-11-28 05:52:06 -08:00
sub check: Exercise all printing options 2012-09-29 09:57:46 -07:00
check-cflags Allow all combinations of --cflags and --libs variants 2012-11-03 11:07:59 -07:00
check-circular-requires Support circular Requires loops 2012-10-13 08:14:35 -07:00
check-cmd-options check: Ensure unknown options fail 2012-10-03 05:33:31 -07:00
check-conflicts check: Pass args to test function instead of setting in variable 2012-09-29 08:50:57 -07:00
check-debug check: Ensure debugging output works correctly 2012-10-03 05:33:31 -07:00
check-define-variable check: Test --define-variable corner cases 2012-09-29 09:09:30 -07:00
check-duplicate-flags Only strip duplicate arguments when they appear consecutively 2012-12-04 13:04:57 -08:00
check-gtk Only strip duplicate arguments when they appear consecutively 2012-12-04 13:04:57 -08:00
check-idirafter check: Pass args to test function instead of setting in variable 2012-09-29 08:50:57 -07:00
check-includedir check: Pass args to test function instead of setting in variable 2012-09-29 08:50:57 -07:00
check-libs Output -L Libs flags before other Libs flags 2012-12-04 13:04:57 -08:00
check-libs-private check: Pass args to test function instead of setting in variable 2012-09-29 08:50:57 -07:00
check-missing Always use --static test results for indirect depencency results 2012-11-29 19:18:41 -08:00
check-mixed-flags Output -L Libs flags before other Libs flags 2012-12-04 13:04:57 -08:00
check-non-l-flags Start from end of package lists when processing Requires 2012-12-03 07:08:20 -08:00
check-path check: Check path handling 2012-10-02 05:51:22 -07:00
check-print-options Don't crash on --print-variables when there are no variables 2012-10-13 09:06:18 -07:00
check-requires-private Start from end of package lists when processing Requires 2012-12-03 07:08:20 -08:00
check-requires-version check: Test version comparisons within Requires fields 2012-10-03 05:33:32 -07:00
check-sort-order Output -l and other Libs flags in the order they appear 2012-12-04 13:04:57 -08:00
check-sysroot Always use --static test results for indirect depencency results 2012-11-29 19:18:41 -08:00
check-uninstalled check: Test -uninstalled functionality 2012-10-03 05:33:31 -07:00
check-version check: Test pkg-config version 2012-10-02 05:51:22 -07:00
check-whitespace Output -l and other Libs flags in the order they appear 2012-12-04 13:04:57 -08:00
circular-1.pc Support circular Requires loops 2012-10-13 08:14:35 -07:00
circular-2.pc Support circular Requires loops 2012-10-13 08:14:35 -07:00
circular-3.pc Support circular Requires loops 2012-10-13 08:14:35 -07:00
common check: Pass args to test function instead of setting in variable 2012-09-29 08:50:57 -07:00
config.sh.in check: Test pkg-config version 2012-10-02 05:51:22 -07:00
conflicts-test.pc 2008-03-23 Tollef Fog Heen <tfheen@err.no> 2008-03-23 21:39:07 +01:00
fields-blank.pc Add test case for empty fields 2010-05-27 22:23:40 +02:00
flag-dup-1.pc Test stripping of duplicate flags 2012-11-28 05:52:13 -08:00
flag-dup-2.pc Test stripping of duplicate flags 2012-11-28 05:52:13 -08:00
idirafter.pc Handle -idirafter specially 2010-05-09 09:43:10 +02:00
includedir.pc Add includedir test 2005-08-27 09:05:14 +00:00
inst-uninstalled.pc check: Test -uninstalled functionality 2012-10-03 05:33:31 -07:00
inst.pc check: Test -uninstalled functionality 2012-10-03 05:33:31 -07:00
Makefile.am Add a gtk testcase to provide something with complex interactions 2012-11-28 05:59:49 -08:00
missing-requires-private.pc 2009-03-30 Tollef Fog Heen <tfheen@err.no> 2009-03-30 20:40:53 +02:00
missing-requires.pc 2009-03-30 Tollef Fog Heen <tfheen@err.no> 2009-03-30 20:49:17 +02:00
no-variables.pc Don't crash on --print-variables when there are no variables 2012-10-13 09:06:18 -07:00
non-l-required.pc Consistently resolve requires depth-first to fix non-l flag ordering 2012-10-13 08:14:35 -07:00
non-l.pc Consistently resolve requires depth-first to fix non-l flag ordering 2012-10-13 08:14:35 -07:00
other.pc check: Test all variants of --cflags and --libs 2012-10-03 05:33:31 -07:00
private-dep.pc 2005-06-27 Tollef Fog Heen <tfheen@err.no> 2005-07-14 13:07:31 +00:00
public-dep.pc Consistently resolve requires depth-first to fix non-l flag ordering 2012-10-13 08:14:35 -07:00
requires-test.pc check: Enhance --print-requires tests 2012-10-02 05:51:22 -07:00
requires-version-1.pc check: Test version comparisons within Requires fields 2012-10-03 05:33:32 -07:00
requires-version-2.pc check: Test version comparisons within Requires fields 2012-10-03 05:33:32 -07:00
requires-version-3.pc check: Test version comparisons within Requires fields 2012-10-03 05:33:32 -07:00
simple.pc 2005-05-21 Tollef Fog Heen <tfheen@err.no> 2005-07-14 13:07:18 +00:00
sort-order-1-1.pc Test ordering of flags based on package depth and path 2012-11-28 05:52:06 -08:00
sort-order-1-2.pc Test ordering of flags based on package depth and path 2012-11-28 05:52:06 -08:00
sort-order-1-3.pc Test ordering of flags based on package depth and path 2012-11-28 05:52:06 -08:00
whitespace.pc Allow $() through unescaped. 2011-04-13 22:02:51 +02:00