On Mon, Jan 4, 2021 at 6:45 PM Mike Gilbert <flop...@gentoo.org> wrote: > > On Mon, Jan 4, 2021 at 6:18 PM James Le Cuirot <ch...@gentoo.org> wrote: > > $ PKG_CONFIG_SYSROOT_DIR=/foo pkg-config --variable=udevdir udev > > /lib/udev > > > > The udevdir variable is not affected by PKG_CONFIG_SYSROOT_DIR at all. > > And why would it be? The man page says that this variable is only > > applied to -I and -L flags. I don't know for sure but I suspect that > > pkg-config just sees this as some arbitrary variable with no special > > path handling at all. I wonder what led you to think that this fix was > > necessary? > > Interesting! > > pkg-config behaves differently on my system: > > % PKG_CONFIG_SYSROOT_DIR=/foo pkg-config --variable=udevdir udev > /foo/lib/udev > > This appears to be a difference in behavior between dev-util/pkgconfig > and dev-util/pkgconf. I am using pkgconf, and I would guess you are > using pkgconfig. > > I guess I will ask pkgconf upstream for help on this; it seems like > this is probably an unintended behavior.
It seems that the pkgconf behavior is intentional. https://github.com/pkgconf/pkgconf/issues/69 I opened an issue to see if we can get some kind of opt-out. https://github.com/pkgconf/pkgconf/issues/205