mirror of
https://github.com/openbsd/src.git
synced 2024-12-21 23:18:00 -08:00
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@
This commit is contained in:
parent
5a77c2f759
commit
56038fa2d2
@ -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";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user