PKG_CONFIG_SYSROOT_DIR and pcfiledir
I've noticed a difference in behaviour when compared to pkgconf (https://github.com/pkgconf/pkgconf)
Given a .pc-file like
❯ cat /home/git/android-native/root/linux/lib/pkgconfig/wdyGrendel.pc prefix=${pcfiledir}/../.. ...
when called with a PKG_CONFIG_SYSROOT_DIR environment-variable, pkg-config adds the sysroot-prefix to to the pcfiledir, while pkgconf does not:
PKG_CONFIG_SYSROOT_DIR=/home/git/android-native/root/linux PKG_CONFIG_LIBDIR=/home/git/android-native/root/linux/lib/pkgconfig ./pkg-config --cflags wdyGrendel
-I/home/git/android-native/root/linux/home/git/android-native/root/linux/lib/pkgconfig/../../include
PKG_CONFIG_SYSROOT_DIR=/home/git/android-native/root/linux PKG_CONFIG_LIBDIR=/home/git/android-native/root/linux/lib/pkgconfig pkgconf --cflags wdyGrendel
-I/home/git/android-native/root/linux/lib/pkgconfig/../../include
Who is right?