diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-03-04 12:12:40 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2008-03-04 12:12:40 +0000 |
commit | 18074765f1529a3a632abbaa79724c38ff25578a (patch) | |
tree | ef53bce90adfd058282eecca096aada696b4abf0 /classes/pkgconfig.bbclass | |
parent | 39ade776625e7fdd746d91fa8497d16646b77362 (diff) |
Change staging layout to match the target system layout. WARNING - staging ABI change.
This update completes the conversion of OE.dev to use sysroot and have a staging layout that matches the target system. This means we no longer need to mangle pkgconfig files and can use its sysroot option instead. Users of old toolchains (gcc prior to 3.4 and external ones) may need to add cross-linkage and staging-linkage to their toolchain dependencies. Since this update changes staging layout and the contents of the .pc files it updates the staging ABI and people will need to rebuild.
Diffstat (limited to 'classes/pkgconfig.bbclass')
-rw-r--r-- | classes/pkgconfig.bbclass | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass index d2176d8b39..d65f8a6253 100644 --- a/classes/pkgconfig.bbclass +++ b/classes/pkgconfig.bbclass @@ -2,36 +2,10 @@ inherit base DEPENDS_prepend = "pkgconfig-native " -# The namespaces can clash here hence the two step replace -def get_pkgconfig_mangle(d): - import bb.data - s = "-e ''" - if not bb.data.inherits_class('native', d): - s += " -e 's:=${libdir}:=OELIBDIR:;'" - s += " -e 's:=${includedir}:=OEINCDIR:;'" - s += " -e 's:=${datadir}:=OEDATADIR:'" - s += " -e 's:=${prefix}:=OEPREFIX:'" - s += " -e 's:=${exec_prefix}:=OEEXECPREFIX:'" - s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'" - s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'" - s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" - s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${layout_prefix}:'" - s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${layout_exec_prefix}:'" - s += " -e 's:-L${WORKDIR}\S*: :g'" - s += " -e 's:-I${WORKDIR}\S*: :g'" - - return s - -do_install_append () { - for pc in `find ${D} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do - sed -i ${@get_pkgconfig_mangle(d)} -e 's:${D}::g' -e 's:${STAGING_LIBDIR}:${libdir}:g' -e 's:${STAGING_INCDIR}:${includedir}:g' -e 's:${STAGING_DIR_TARGET}:${prefix}:g' ${pc} - done -} - do_stage_append () { + install -d ${PKG_CONFIG_DIR} for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do pcname=`basename $pc` - install -d ${PKG_CONFIG_DIR} - cat $pc | sed ${@get_pkgconfig_mangle(d)} -e 's:${D}${libdir}\S*:${STAGING_LIBDIR}:g' -e 's:${D}${prefix}/include\S*:${STAGING_INCDIR}:g' > ${PKG_CONFIG_DIR}/$pcname + cat $pc > ${PKG_CONFIG_DIR}/$pcname done } |