DescriptionImprove pkg-config-wrapper to support ChromiumOS sysroots
http://codereview.chromium.org/4516002/show had to be reverted because it
conflicts with "old style" sysroots that are still used on the arm builders.
This is a cleaner approach that should work there.
The previous approach assumed that all variables in .pc files were relative to |prefix|. It would be a desirable thing to have but in practice a few packages don't follow this and have already dereferenced |prefix| in other variables (e.g. |libdir|). So instead of forcing |prefix|, this version keeps the original one but strips the path before '/usr' (in |prefix|) from all returned paths before prepending the sysroot path.
For example if you have foo.pc:
prefix=/build/board/usr
libdir=/build/board/usr/lib # instead of libdir=${prefix}/lib
Libs: -L${libdir}/foo -lfoo
Then instead of forcing prefix=/usr (which doesn't fix |libdir|), we find the path before '/usr' in prefix ('/build/board'), that we strip from the returned -L flag ('/build/board/usr/lib/foo' -> '/usr/lib/foo') before prepending the sysroot path (-> '/path/to/sysroot/usr/lib/foo').
BUG=None
TEST=build with sysroot=/path/to/chromiumos/chroot/build/x86-generic
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66712
Patch Set 1 #
Total comments: 2
Patch Set 2 : Add copyright+license notice, add some description #
Messages
Total messages: 5 (0 generated)
|