The libusb.pc file contains an absolute path to /usr/lib which makes cross-compilation very hard. The following patch fixes this misbehaviour introduced by a fixed path in the ebuild. Reproducible: Always
Created attachment 186357 [details, diff] Fix for the libusb pkg-config file Fix the libusb.pc file for cross-compilation by replacing the fixed path specified in the ebuild. Tested with armv4tl-softfloat-linux-gnueabi.
i would rather have cross-fix-root handle munging here than attempt to fight a never ending battle with .pc files
libusb is a problem for sure. But I'm only seeing a few problem pc files. libusb, libbluetooth and udev are the only 3 that come to mind out of the 1500 or so pkgs that xcompile that I've worked with. With that said.. I happen to think the solution of using '${exec_prefix}' quoted out is rather elegant and maybe should be done on a near tree wide basis to replace the hard coded /usr prefix stuff.
you'll have to file a bug about that to change the econf behavior. there's nothing to change in libusb as ive removed that --libdir line.
Removing the --libdir also solves the .pc issue. So if you're confident that removing this line is valid (I wasn't so I choose the patch above), you can close the bug as resolved in -r5.
I can confirm libusb-0.1.12-r5 compiles fine here.
i couldnt see any history as to why the libdir was added in the first place, and the resulting build appeared to be the same, so i dropped it