Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ perl:
- "5.18"
- "5.20"
- "5.22"

- "5.24"
- "5.26"
- "5.28"

script:
- perl Makefile.PL
- make
- prove -bv t
- make install

2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PkgConfig

This module provides a pure perl version of pkg-config, a program
This module is a pure perl version of pkg-config, a program
that provides compiler and linker flags for installed packages.
See:

Expand Down
14 changes: 8 additions & 6 deletions lib/PkgConfig.pm
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,6 @@ sub GuessPaths {
}
#log_info(@cpp_output);
my @include_paths;
while (my $path = shift @cpp_output) {
if($path =~ /\s*End of search list/) {
last;
}
push @include_paths, $path;
}
@DEFAULT_EXCLUDE_CFLAGS = map { "-I$_" } @include_paths;
log_debug("Determine exclude CFLAGS", @DEFAULT_EXCLUDE_CFLAGS);
}
Expand Down Expand Up @@ -890,6 +884,14 @@ sub get_cflags {

filter_omit(\@cflags, $self->exclude_cflags);
filter_dups(\@cflags);
my @new_flags;
if ( $ENV{PKG_CONFIG_SYSTEM_INCLUDE_PATH} ){
for my $i (@cflags) {
my @path = split("/", $i);
push @new_flags, "-I$ENV{PKG_CONFIG_SYSTEM_INCLUDE_PATH}/".$path[$#path];
}
}
push @cflags, @new_flags;
_return_context @cflags;
}

Expand Down