Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 245539

Summary: media-libs/libkarma-0.1.0 generates a faulty pkgconfig (.pc) file
Product: Gentoo Linux Reporter: Christopher Friedt <chrisfriedt>
Component: [OLD] LibraryAssignee: Gentoo Sound Team <sound>
Status: RESOLVED FIXED    
Severity: normal CC: kde
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Christopher Friedt 2008-11-04 16:28:41 UTC
It seems that the 'prefix' variable inside the pkgconfig file that libkarma generates incorrectly carries the ${D} variable with it.

i.e. 

prefix=/var/tmp/portage/media-libs/libkarma-0.1.0/image//usr

Reproducible: Always

Steps to Reproduce:
1.emerge =libkarma-0.1.0
2.
3.

Actual Results:  
prefix=/var/tmp/portage/media-libs/libkarma-0.1.0/image//usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Libraries=${prefix}/lib/karma-sharp/karma-sharp.dll

Name: karma-sharp
Description: karma-sharp - Library for interfacing with Rio Karma devices
Version: 0.1.0
Libs: -r:${Libraries}


Expected Results:  
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Libraries=${prefix}/lib/karma-sharp/karma-sharp.dll

Name: karma-sharp
Description: karma-sharp - Library for interfacing with Rio Karma devices
Version: 0.1.0
Libs: -r:${Libraries}
Comment 1 Christopher Friedt 2008-11-04 16:35:09 UTC
The easiest solution (not necessarily the right one) would be to apply a simple sed pattern in src_install() like so:

sed -i -e s:prefix=${D}/usr:prefix=/usr:

Note: This solution does not take into consideration the possibility of ${D} containing a sequences of characters that need escaping in order to qualify as a sed expression.

I'll leave the implementation details up to the package maintainer.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2009-05-12 11:07:32 UTC
I've patched the hell out of the Makefile's to use DESTDIR as it should. Now this is finally usage for e.g. Banshee.