summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@ted.(none)>2009-06-04 20:46:09 +0100
committerRichard Purdie <richard@ted.(none)>2009-06-04 20:46:09 +0100
commit1a21e6e2d5a00238c7f9f61315f4aca3659863bc (patch)
tree191c1db40783a6f8e634082dbf6520f30df52839
parent093a11caba486b88a3c7e2ebb8d8a7fc6b9c47ea (diff)
downloadopenembedded-core-1a21e6e2d5a00238c7f9f61315f4aca3659863bc.tar.gz
openembedded-core-1a21e6e2d5a00238c7f9f61315f4aca3659863bc.tar.bz2
openembedded-core-1a21e6e2d5a00238c7f9f61315f4aca3659863bc.tar.xz
openembedded-core-1a21e6e2d5a00238c7f9f61315f4aca3659863bc.zip
packaged-staging.bbclass: Add support for mangling .la files so the staging directory path can change. Someday libtool will support sysroot but until then...
Signed-off-by: Richard Purdie <richard@ted.(none)>
-rw-r--r--meta/classes/packaged-staging.bbclass34
1 files changed, 29 insertions, 5 deletions
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass
index 144087fed..094aa5979 100644
--- a/meta/classes/packaged-staging.bbclass
+++ b/meta/classes/packaged-staging.bbclass
@@ -176,11 +176,17 @@ python packagestage_scenefunc () {
bb.build.exec_func("staging_helper", d)
+ bb.note("Here 1\n")
+
removepkg = bb.data.expand("${PSTAGE_PKGPN}", d)
- pstage_cleanpackage(removepkg, d)
+ bb.note("Here 1.1\n")
+ pstage_cleanpackage(removepkg, d)
+ bb.note("Here 1.2\n")
stagepkg = bb.data.expand("${PSTAGE_PKG}", d)
+ bb.note("Here 2 %s\n"% stagepkg)
+
if os.path.exists(stagepkg):
path = bb.data.getVar("PATH", d, 1)
pstage_set_pkgmanager(d)
@@ -237,6 +243,8 @@ python packagestage_scenefunc () {
if ret != 0:
bb.note("Failure installing prestage package")
+ bb.build.exec_func("staging_package_libtoolhack", d)
+
bb.build.make_stamp("do_stage_package_populated", d)
else:
bb.note("Staging package found but invalid for %s" % file)
@@ -320,11 +328,19 @@ staging_packager () {
echo "Architecture: ${PSTAGE_PKGARCH}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
# Protect against empty SRC_URI
- if [ "${SRC_URI}" != "" ] ; then
- echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
- else
- echo "Source: OpenEmbedded" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
+ srcuri="${SRC_URI}"
+ if [ "$srcuri" == "" ]; then
+ srcuri="OpenEmbedded"
fi
+ echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
+
+ # Deal with libtool not supporting sysroots
+ # Need to remove hardcoded paths and fix these when we install the
+ # staging packages.
+ # Could someone please add sysroot support to libtool!
+ for i in `find ${PSTAGE_TMPDIR_STAGE} -name "*.la" -type f` ; do \
+ sed -i -e s:${STAGING_DIR}:FIXMESTAGINGDIR:g $i
+ done
${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}
}
@@ -348,6 +364,14 @@ staging_package_installer () {
find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${layout_libdir}/opkg/info/${PSTAGE_PKGPN}.list
}
+staging_package_libtoolhack () {
+ # Deal with libtool not supporting sysroots and add our new
+ # staging location
+ for i in `find ${STAGING_DIR} -name "*.la" -type f` ; do \
+ sed -i -e s:FIXMESTAGINGDIR:${STAGING_DIR}:g $i
+ done
+}
+
python do_package_stage () {
if bb.data.getVar("PSTAGING_ACTIVE", d, 1) != "1":
return