diff options
author | George Koehler <gkoehler@cvs.openbsd.org> | 2024-02-11 03:57:11 +0000 |
---|---|---|
committer | George Koehler <gkoehler@cvs.openbsd.org> | 2024-02-11 03:57:11 +0000 |
commit | 5210add1f71e19b407e18856fbd0e4502d40b4e0 (patch) | |
tree | cdba7f0c9372cecd3096bfff0e7fa2283fcaef77 /usr.bin | |
parent | 69ad8bb84fcc9e74c4ac9b4c0a304e30c63ffcfc (diff) |
In pkg-config, accept both "CFlags:" and "Cflags:"
matthieu@ noticed that "pkg-config libpkgconf --cflags" failed because
libpkgconf.pc has "CFlags:" with upper-case 'F', but we accepted only
"Cflags:" with lower-case 'f'. freedesktop.org's pkg-config accepts
both "C[Ff]lags", but is otherwise sensitive to case.
Accept "CFlags" by mapping it to "Cflags" when reading the file. Fail
if the file has more than one "C[Ff]lags".
ok millert@ matthieu@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/pkg-config/OpenBSD/PkgConfig.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/pkg-config/OpenBSD/PkgConfig.pm b/usr.bin/pkg-config/OpenBSD/PkgConfig.pm index e7ae82344c4..89d36f37b15 100644 --- a/usr.bin/pkg-config/OpenBSD/PkgConfig.pm +++ b/usr.bin/pkg-config/OpenBSD/PkgConfig.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PkgConfig.pm,v 1.11 2023/09/22 07:29:14 espie Exp $ +# $OpenBSD: PkgConfig.pm,v 1.12 2024/02/11 03:57:10 gkoehler Exp $ # # Copyright (c) 2006 Marc Espie <espie@openbsd.org> # @@ -86,6 +86,9 @@ sub parse_value($self, $name, $value) sub add_property($self, $name, $value) { + if ($name eq "CFlags") { + $name = "Cflags"; + } if (defined $self->{properties}{$name}) { die "Duplicate property $name"; } |