Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263901 - dev-libs/libusb: Fix pkg-config file for cross-compilation
Summary: dev-libs/libusb: Fix pkg-config file for cross-compilation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 20:39 UTC by Sven 'sleipnir' Rebhan
Modified: 2009-03-30 20:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for the libusb pkg-config file (libusb-0.1.12-r4.patch,365 bytes, patch)
2009-03-26 20:41 UTC, Sven 'sleipnir' Rebhan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven 'sleipnir' Rebhan 2009-03-26 20:39:05 UTC
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
Comment 1 Sven 'sleipnir' Rebhan 2009-03-26 20:41:10 UTC
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.
Comment 2 SpanKY gentoo-dev 2009-03-28 11:10:46 UTC
i would rather have cross-fix-root handle munging here than attempt to fight a never ending battle with .pc files
Comment 3 solar (RETIRED) gentoo-dev 2009-03-28 16:16:13 UTC
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. 
Comment 4 SpanKY gentoo-dev 2009-03-29 01:14:06 UTC
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.
Comment 5 Sven 'sleipnir' Rebhan 2009-03-30 10:55:10 UTC
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.
Comment 6 Sven 'sleipnir' Rebhan 2009-03-30 20:01:53 UTC
I can confirm libusb-0.1.12-r5 compiles fine here.
Comment 7 SpanKY gentoo-dev 2009-03-30 20:18:20 UTC
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