In pkg-config, accept both "CFlags:" and "Cflags:"
authorgkoehler <gkoehler@openbsd.org>
Sun, 11 Feb 2024 03:57:10 +0000 (03:57 +0000)
committergkoehler <gkoehler@openbsd.org>
Sun, 11 Feb 2024 03:57:10 +0000 (03:57 +0000)
commit56038fa2d2611b902f4abd05056420525904463d
tree1dc0cf0f18dd6ec09da655fb46dd655505311d01
parent5a77c2f75946934e92fea8d1f4c0729483ee1d46
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@
usr.bin/pkg-config/OpenBSD/PkgConfig.pm