powertop: Patch pkg-config calls

Originally submitted as pull request at
https://github.com/gentoo/gentoo/pull/17579
and
https://github.com/fenrus75/powertop/pull/68

The goal of this commit is to fix an error encountered when building
2.13 on Chromium OS.
emerge-${board} powertop
  <snip>
  checking for libnl-3.0 >= 3.0 libnl-genl-3.0 >= 3.0... yes
  checking for library containing inet_aton... none required
   * pkg-config: ERROR: Do not call unprefixed tools directly.
   * pkg-config: ERROR: For board tools, use `tc-export PKG_CONFIG` (or ${CHOST}-pkg-config).
   * pkg-config: ERROR: For build-time-only tools, `tc-export BUILD_PKG_CONFIG` (or ${CBUILD}-pkg-config).
   * python3 /mnt/data/chromiumos/chromite/bin/cros_sdk --enter --chrome_root=chrome_root
   *   `-python3 /mnt/data/chromiumos/chromite/bin/cros_sdk --enter --chrome_root=chrome_root
   *       `-bash
   *           `-emerge -b /usr/lib/python-exec/python3.6/emerge --root-deps powertop
   *               `-sandbox /usr/lib/portage/python3.6/ebuild.sh configure
   *                   `-ebuild.sh /usr/lib/portage/python3.6/ebuild.sh configure
   *                       `-ebuild.sh /usr/lib/portage/python3.6/ebuild.sh configure
   *                           `-configure ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-cros-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/powertop-2.13 --htmldir=/usr/share/doc/powertop-2.13/html --with-sysroot=/build/volteer --libdir=/usr/lib64 --disable-nls
   *                               `-pkg-config /build/volteer/tmp/portage/sys-power/powertop-2.13/temp/build-toolchain-wrappers/pkg-config --exists bash-completion
   *                                   `-pstree -a -A -s -l 10567
   * ERROR: sys-power/powertop-2.13::portage-stable failed (configure phase):
   *   Bad pkg-config [--exists bash-completion] invocation
<snip>

BUG=b:167535714
TEST=PowerTOP builds and runs
     emerge-volteer powertop
     cros deploy ${DUT_IP} powertop

Change-Id: Ic2c859c61c1407971ddd6ccc0e4bae28b5cee68a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2392777
Tested-by: Manoj Gupta (OoO) <manojgupta@chromium.org>
Commit-Queue: Manoj Gupta (OoO) <manojgupta@chromium.org>
Reviewed-by: Manoj Gupta (OoO) <manojgupta@chromium.org>
2 files changed