pkg-config not correctly parsing some cflags and libs formats
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pkg-config (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I am running Ubuntu 14.04 64-bit. All updates installed. pkg-config version 0.26
Running 'pkg-config --cflags --libs' on the following (and attached) foo.pc, outputs:
'-I/usr/include/ -I/usr/include/foo -I/usr/include/foo/ -L/usr/lib/ -L/usr/lib/foo -L/usr/lib/foo/ -lfoo'
The contents of foo.pc:
# Begin file
prefix=/usr
exec_prefix=
includedir_
includedir_
includedir_
includedir_
libdir_
libdir_
libdir_
libdir_
Name: foo
Description: The foo library
Version: 1.0.0
Cflags: -I${includedir_2} -I${includedir_1} -I${includedir_3} -I${includedir_4}
Libs: -L${libdir_2} -L${libdir_1} -L${libdir_3} -L${libdir_4} -lfoo
#End file
Notice that 'includedir_1' and 'libdir_1' are not in the output. A trailing slash had to be added to to their values to be parsed correctly. This affects other libraries that use such variable use in their pc config file, such as x11.pc and opencv.pc.
description: | updated |