package/brltty: use host pkg-config when building host tools
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 19 Feb 2020 23:37:47 +0000 (00:37 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 26 Feb 2020 21:17:09 +0000 (22:17 +0100)
commit7bed3ee409661107b6ce2a05c48adcc7f79258fa
treed8059a1498c69b9e6054b4eae046b7416af577e2
parentc7d736bb924fb9a85c497651e533d57c5b83d54f
package/brltty: use host pkg-config when building host tools

brltty builds host tools which rely on the expat library, and
pkg-config is used to detect the expat library.

Since commit cd16e18584066d2817d3acb3822e173f9f23455e ("pkgconf:
always keep system libs"), the wrapper script added
--keep-system-libs, which adds a -L$(STAGING_DIR)/usr/lib to the
pkg-config results instead of just -lexpat. So, previously, by chance,
the pkg-config result for the target expat was "good enough" for the
host expat as well. But now that -L$(STAGING_DIR)/usr/lib is added, it
breaks the build in all sort of ways as obviously building host
binaries with the library search path pointing to $(STAGING_DIR) is
not a good idea.

To fix that, this commit adjusts the brltty build system so that the
PKG_CONFIG_FOR_BUILD variable is used when using pkg-config to build
host binaries.

Fixes:

  http://autobuild.buildroot.net/results/5a64dfb845389882c366b6c91aaf5868c090a802/

Many thanks to the initial work from Fabrice Fontaine at
http://patchwork.ozlabs.org/patch/1238163/ which provided an initial
starting point for this investigation.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/brltty/0003-mk4build-also-pass-PKG_CONFIG_FOR_BUILD-to-the-nativ.patch [new file with mode: 0644]
package/brltty/brltty.mk