Bug 99224

Summary: CPATH include paths are not removed from include flags
Product: pkg-config Reporter: v4hn <me>
Component: srcAssignee: pkg-config
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: nicholson
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: working patch

Description v4hn 2016-12-29 18:34:47 UTC
Created attachment 128687 [details]
working patch

Thanks for maintaining this module!

While paths specified in `C_INCLUDE_PATH` and `CPLUS_INCLUDE_PATH` are automatically excluded from the output of include flags extracted by pkg-config,
paths listed in `CPATH` are not.

I see the following behavior over here:
```
v4hn ~/ros/indigo/core $ cat lib/pkgconfig/tf.pc
prefix=/home/v4hn/ros/indigo/core

Name: tf
Description: Description of tf
Version: 1.11.8
Cflags: -I/home/v4hn/ros/indigo/core/include
Libs: -L/home/v4hn/ros/indigo/core/lib -ltf
Requires: geometry_msgs message_filters message_runtime roscpp sensor_msgs std_msgs tf2_ros rosconsole
v4hn ~/ros/indigo/core $ echo $CPATH
/home/v4hn/ros/indigo/core/include
v4hn ~/ros/indigo/core $ pkg-config --cflags tf
-I/home/v4hn/ros/indigo/core/include
```

I would expect that pkg-config treats these three variables the same.

I only noticed this because it creates unforeseen overlay problems in a software framework that heavily relies on pkgconfig.

The attached patch is my proposed fix of this inconsistent behavior.
Comment 1 Dan Nicholson 2017-03-19 14:50:37 UTC
Pushed to master in commit 4ade8fc. Thanks for the patch!
Comment 2 v4hn 2017-03-20 10:32:16 UTC
Thanks for merging!

When is the next release planned?
There have been a number of changes since 0.29.1
that I would like to see in an official project release.
Comment 3 Dan Nicholson 2017-03-20 16:16:02 UTC
I'll be making a new release in the next couple days.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.