[oe-commits] org.oe.angstrom-2007.12-stable native bbclass: use autotools_stage_all where appropriate

koen commit oe at amethyst.openembedded.net
Tue Mar 25 23:30:19 UTC 2008


native bbclass: use autotools_stage_all where appropriate

Author: koen at openembedded.org
Branch: org.openembedded.angstrom-2007.12-stable
Revision: 963f8fa0158369baf9c4270782acea485d43908d
ViewMTN: http://monotone.openembedded.org/revision/info/963f8fa0158369baf9c4270782acea485d43908d
Files:
1
BACKPORTS.txt
classes/autotools.bbclass
classes/base.bbclass
classes/native.bbclass
Diffs:

#
# mt diff -ra97cd6be533b9df9e5062cf2a32c030748e98e22 -r963f8fa0158369baf9c4270782acea485d43908d
#
#
#
# patch "BACKPORTS.txt"
#  from [0a15154f95af501be1731188d28681bc1e372610]
#    to [85af4fca13c6c18024b45da17e41888b2997ecf0]
# 
# patch "classes/autotools.bbclass"
#  from [701ff1aa962fc32e4a4625ed4cce861e47ca5694]
#    to [cf3689d7bac41e3061a30f8369fb7deaeac1c150]
# 
# patch "classes/base.bbclass"
#  from [bcfa40d682b4d01a54a40a7d2fbf936ef935900b]
#    to [720985c7d8b6cebbc93888efa0d30bb5f8704b2d]
# 
# patch "classes/native.bbclass"
#  from [2fa46cce43d3c753145a63a3deae182b2c88ed8a]
#    to [23365930b7a9ab90d50686461825d952eaf7d270]
#
============================================================
--- BACKPORTS.txt	0a15154f95af501be1731188d28681bc1e372610
+++ BACKPORTS.txt	85af4fca13c6c18024b45da17e41888b2997ecf0
@@ -227,4 +227,7 @@
 a6d2d41d484ef7827260add2c94d270077592a01 db_4.3.29: fix packaging QA <xjqian koen>
 578f199bc6b531a09543f38044f98199ef5f49ad db: sync with poky <xjqian koen>
 847c6e3f16104e7b87568edf06d0d9cc79b5e860 db: fix upstream SRC_URI, unify db4. <xjqian koen>
+a99dc9b34551aa3889d7057538bf2e37b0471af1 patch.bbclass: Show full path of a patch <koen, xjqian>
+complicated                                           : use autotools_stage_all for native packages <koen, xjqian>						
+
+
-a99dc9b34551aa3889d7057538bf2e37b0471af1 patch.bbclass: Show full path of a patch <koen, xjqian> 
============================================================
--- classes/autotools.bbclass	701ff1aa962fc32e4a4625ed4cce861e47ca5694
+++ classes/autotools.bbclass	cf3689d7bac41e3061a30f8369fb7deaeac1c150
@@ -1,5 +1,8 @@ inherit base
 inherit base
 
+# use autotools_stage_all for native packages
+AUTOTOOLS_NATIVE_STAGE_INSTALL = "1"
+
 def autotools_dep_prepend(d):
 	import bb;
 
@@ -55,6 +58,7 @@ oe_runconf () {
 		    --oldincludedir=${oldincludedir} \
 		    --infodir=${infodir} \
 		    --mandir=${mandir} \
+                                --enable-mainainer-mode \
 			${EXTRA_OECONF} \
 		    $@"
 		oenote "Running $cfgcmd..."
@@ -161,6 +165,17 @@ autotools_stage_includes() {
 	fi
 }
 
+autotools_stage_dir() {
+	from="$1"
+	to="$2"
+	# This will remove empty directories so we can ignore them
+	rmdir "$from" 2> /dev/null || true
+	if [ -d "$from" ]; then
+		mkdir -p "$to"
+		cp -fpPR -t "$to" "$from"/*
+	fi
+}
+
 autotools_stage_all() {
 	if [ "${INHIBIT_AUTO_STAGE}" = "1" ]
 	then
@@ -169,26 +184,40 @@ autotools_stage_all() {
 	rm -rf ${STAGE_TEMP}
 	mkdir -p ${STAGE_TEMP}
 	oe_runmake DESTDIR="${STAGE_TEMP}" install
-	if [ -d ${STAGE_TEMP}/${includedir} ]; then
-		cp -fpPR ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}
+	autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR}
+	if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
+		autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_BINDIR_NATIVE}
+		autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_BINDIR_NATIVE}
+		autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_BINDIR_NATIVE}
+		autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_BINDIR_NATIVE}
+		autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${layout_libexecdir}
 	fi
 	if [ -d ${STAGE_TEMP}/${libdir} ]
 	then
-		find ${STAGE_TEMP}/${libdir} -name '*.la' -exec sed -i s,installed=yes,installed=no, {} \;
-
-		for i in ${STAGE_TEMP}/${libdir}/*.la
-		do
-			if [ ! -f "$i" ]; then
-				cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}
-				break
-			fi
-			oe_libinstall -so $(basename $i .la) ${STAGING_LIBDIR}
-		done
+		olddir=`pwd`
+		cd ${STAGE_TEMP}/${libdir}
+		las=$(find . -name \*.la -type f)
+		cd $olddir
+		echo "Found la files: $las"		 
+		if [ -n "$las" ]; then
+			# If there are .la files then libtool was used in the
+			# build, so install them with magic mangling.
+			for i in $las
+			do
+				dir=$(dirname $i)
+				echo "oe_libinstall -C ${S} -so $(basename $i .la) ${STAGING_LIBDIR}/${dir}"
+				oe_libinstall -C ${S} -so $(basename $i .la) ${STAGING_LIBDIR}/${dir}
+			done
+		else
+			# Otherwise libtool wasn't used, and lib/ can be copied
+			# directly.
+			echo "cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}"
+			cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}
+		fi
 	fi
-	if [ -d ${STAGE_TEMP}/${datadir}/aclocal ]; then
-		install -d ${STAGING_DATADIR}/aclocal
-		cp -fpPR ${STAGE_TEMP}/${datadir}/aclocal/* ${STAGING_DATADIR}/aclocal
-	fi
+	rm -rf ${STAGE_TEMP}/${mandir} || true
+	rm -rf ${STAGE_TEMP}/${infodir} || true
+	autotools_stage_dir ${STAGE_TEMP}/${datadir} ${STAGING_DATADIR}
 	rm -rf ${STAGE_TEMP}
 }
 
============================================================
--- classes/base.bbclass	bcfa40d682b4d01a54a40a7d2fbf936ef935900b
+++ classes/base.bbclass	720985c7d8b6cebbc93888efa0d30bb5f8704b2d
@@ -325,6 +325,7 @@ oe_libinstall() {
 			__runcmd rm -f $destpath/$libname.la
 			__runcmd sed -e 's/^installed=yes$/installed=no/' \
 				     -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \
+				     -e "/^dependency_libs=/s,\([[:space:]']+\)${libdir},\1${STAGING_LIBDIR},g" \
 				     $dotlai >$destpath/$libname.la
 		else
 			__runcmd install -m 0644 $dotlai $destpath/$libname.la
============================================================
--- classes/native.bbclass	2fa46cce43d3c753145a63a3deae182b2c88ed8a
+++ classes/native.bbclass	23365930b7a9ab90d50686461825d952eaf7d270
@@ -82,10 +82,15 @@ do_stage () {
 datadir = "${exec_prefix}/share"
 
 do_stage () {
-	if [ "${INHIBIT_NATIVE_STAGE_INSTALL}" != "1" ]
-	then
-		oe_runmake install
-	fi
+        if [ "${INHIBIT_NATIVE_STAGE_INSTALL}" != "1" ]
+        then
+                if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" != "1" ]
+                then
+                        oe_runmake install
+                else
+                        autotools_stage_all
+                fi
+        fi
 }
 
 do_install () {






More information about the Openembedded-commits mailing list