[oe] How to sane replace a path in a pkgconfig file ?

bernhard.guillon at opensimpad.org bernhard.guillon at opensimpad.org
Sun Feb 14 14:23:09 UTC 2010


Hi all,
currently I am working on fixing blackbox. I had to add a lot of includes to fix compiler errors.
After fixing the compiler errors I came over a sed error of the recipe. sed was not able to find the pc file but the recipe inherits pkgconfig.

----snipped of blackbox_0.70.1.bb----
#fix path of pc file
do_install_append() {
        sed -i s#${STAGING_LIBDIR}#${libdir}#g ${D}/${libdir}/pkgconfig/libbt.pc
}

do_stage () {
        sed -i s#${STAGING_LIBDIR}#${libdir}#g ${STAGING_LIBDIR}/pkgconfig/libbt.pc
}

It looks like the pkgconfig class is called after do_stage()?  What is the right place to replace the wrong path in the libbt.pc file?

I changed the above to this:

#fix path of pc file
do_install_prepend() {
        sed -i s#${STAGING_LIBDIR}#${libdir}#g ${S}/lib/libbt.pc
}

But I am not sure if this is safe! Is there any place where the original path in the pkconfig file is needed? With my approach this file would have the wrong path inside.

What do you think about it? I am looking forward to any advice :)

Best regards
Bernhard Guillon








More information about the Openembedded-devel mailing list