[oe-commits] Richard Purdie : binconfig.bbclass: Convert do_install_append() into a PACKAGE_PREPROCESS_FUNCS (from Poky)

git version control git at git.openembedded.org
Tue Nov 10 13:47:24 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 6c47bea276c5a5bc97abb81bae9288421ae89607
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=6c47bea276c5a5bc97abb81bae9288421ae89607

Author: Richard Purdie <rpurdie at linux.intel.com>
Date:   Fri Oct 30 00:33:40 2009 +0000

binconfig.bbclass: Convert do_install_append() into a PACKAGE_PREPROCESS_FUNCS (from Poky)

Signed-off-by: Richard Purdie <rpurdie at linux.intel.com>

---

 classes/binconfig.bbclass |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/classes/binconfig.bbclass b/classes/binconfig.bbclass
index 04268c7..6937452 100644
--- a/classes/binconfig.bbclass
+++ b/classes/binconfig.bbclass
@@ -1,5 +1,3 @@
-inherit base
-
 FILES_${PN}-dev += "${bindir}/*-config"
 
 # The namespaces can clash here hence the two step replace
@@ -28,20 +26,18 @@ def get_binconfig_mangle(d):
 
 BINCONFIG_GLOB ?= "*-config"
 
-do_install_append() {
-
-    #the 'if' protects native packages, since we can't easily check for bb.data.inherits_class('native', d) in shell 
-    if [ -e ${D}${bindir} ] ; then
-        for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
-                cat $config | sed \
-		-e 's:${STAGING_LIBDIR}:${libdir}:g;' \ 
-		-e 's:${STAGING_INCDIR}:${includedir}:g;' \
-		-e 's:${STAGING_DATADIR}:${datadir}:' \
-		-e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' > ${D}${bindir}/`basename $config`
-        done
-    fi	
+PACKAGE_PREPROCESS_FUNCS += "binconfig_package_preprocess"
 
-	for lafile in `find ${D} -name "*.la"` ; do
+binconfig_package_preprocess () {
+	for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do
+		sed -i \
+		    -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ 
+		    -e 's:${STAGING_INCDIR}:${includedir}:g;' \
+		    -e 's:${STAGING_DATADIR}:${datadir}:' \
+		    -e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \
+                    $config
+	done
+	for lafile in `find ${PKGD} -name "*.la"` ; do
 		sed -i \
 		    -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
 		    -e 's:${STAGING_INCDIR}:${includedir}:g;' \





More information about the Openembedded-commits mailing list