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}
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.
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.