summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2020-09-15 07:18:46 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2020-09-15 07:18:46 +0000
commit809643319ad94f1537ceb7a8c22625cb2a849661 (patch)
treeb08279eecdb45acfa7bafa9ce12d40ff93847790 /usr.bin
parent854bebc28425884d4bfd2fd9ee16fa098a4fd875 (diff)
bump version to 0.29.2, of the changes upstream made between 0.29.1 and 0.29.2
there's effectively only one we didn't have yet which was handling for $C_PATH. turned out we also didn't use a bunch of others so add them too. bump copyright and remove $CSK$ marker while here tested in a ports build by aja@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/pkg-config/pkg-config21
-rw-r--r--usr.bin/pkg-config/pkg-config.18
2 files changed, 20 insertions, 9 deletions
diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config
index aa125284716..71a69b69bb3 100644
--- a/usr.bin/pkg-config/pkg-config
+++ b/usr.bin/pkg-config/pkg-config
@@ -1,9 +1,8 @@
#!/usr/bin/perl
-# $OpenBSD: pkg-config,v 1.94 2020/09/12 12:53:41 jasper Exp $
-# $CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $
+# $OpenBSD: pkg-config,v 1.95 2020/09/15 07:18:45 jasper Exp $
# Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org>
-# Copyright (c) 2011,2019 Jasper Lievisse Adriaanse <jasper@openbsd.org>
+# Copyright (c) 2011-2020 Jasper Lievisse Adriaanse <jasper@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -46,7 +45,7 @@ my $allow_uninstalled =
defined $ENV{PKG_CONFIG_DISABLE_UNINSTALLED} ? 0 : 1;
my $found_uninstalled = 0;
-my $version = '0.29.1'; # pretend to be this version of pkgconfig
+my $version = '0.29.2'; # pretend to be this version of pkgconfig
my %configs = ();
setup_self();
@@ -60,6 +59,13 @@ $variables->{pc_top_builddir} = $ENV{PKG_CONFIG_TOP_BUILD_DIR} //
$variables->{pc_sysrootdir} //= $ENV{PKG_CONFIG_SYSROOT_DIR};
# The default '/' is implied.
+my @sys_includes = ('/usr/include');
+foreach my $path ($ENV{PKG_CONFIG_SYSTEM_INCLUDE_PATH}, $ENV{C_PATH}, $ENV{C_INCLUDE_PATH},
+ $ENV{CPLUS_INCLUDE_PATH}) {
+ next if !defined($path);
+ unshift(@sys_includes, split(/:/, $path));
+}
+
defined $ENV{PKG_CONFIG_DEBUG_SPEW} ? $mode{debug} = 1 : $mode{debug} = 0;
if ($logfile) {
@@ -496,10 +502,11 @@ sub do_cflags
for my $pkg (@$list) {
my $l = $configs{$pkg}->get_property('Cflags', $variables);
- for my $path (@$l) {
- unless ($path =~ /-I\/usr\/include\/*$/) {
- push(@$cflags, $path);
+ PATH: for my $path (@$l) {
+ for my $sys_path (@sys_includes) {
+ next PATH if ($path =~ /${sys_path}\/*$/);
}
+ push(@$cflags, $path);
}
}
my $a = OpenBSD::PkgConfig->compress($cflags,
diff --git a/usr.bin/pkg-config/pkg-config.1 b/usr.bin/pkg-config/pkg-config.1
index 7647becda58..27531a2280a 100644
--- a/usr.bin/pkg-config/pkg-config.1
+++ b/usr.bin/pkg-config/pkg-config.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg-config.1,v 1.34 2019/08/02 22:36:37 schwarze Exp $
+.\" $OpenBSD: pkg-config.1,v 1.35 2020/09/15 07:18:45 jasper Exp $
.\"
.\" Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: August 2 2019 $
+.Dd $Mdocdate: September 15 2020 $
.Dt PKG-CONFIG 1
.Os
.Sh NAME
@@ -176,6 +176,10 @@ Thus -I/usr/local/include will become -I/target/usr/local/include when
PKG_CONFIG_SYSROOT_DIR is set to /target, which is useful when cross compiling
packages that use
.Nm .
+.It Ev PKG_CONFIG_SYSTEM_INCLUDE_PATH
+When set to a list of paths, separated by :, these paths will be excluded from
+the output of include paths set with
+.Fl I .
.It Ev PKG_CONFIG_TOP_BUILD_DIR
If set
.Nm