summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/autotools.bbclass49
-rw-r--r--meta/classes/base.bbclass60
2 files changed, 64 insertions, 45 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 5ddf8baa0..bd88184a7 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -170,34 +170,11 @@ autotools_stage_includes() {
}
autotools_stage_dir() {
- from="$1"
- to="$2"
- prefix="${STAGE_TEMP_PREFIX}"
- # This will remove empty directories so we can ignore them
- rmdir "$from" 2> /dev/null || true
- if [ -d "$from" ]; then
- mkdir -p "$prefix$to"
- cp -fpPR "$from"/* "$prefix$to"
- fi
+ sysroot_stage_dir $1 ${STAGE_TEMP_PREFIX}$2
}
autotools_stage_libdir() {
- from="$1"
- to="$2"
-
- olddir=`pwd`
- cd $from
- las=$(find . -name \*.la -type f)
- cd $olddir
- echo "Found la files: $las"
- for i in $las
- do
- 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" \
- -i $from/$i
- done
- autotools_stage_dir $from $to
+ sysroot_stage_libdir $1 ${STAGE_TEMP_PREFIX}$2
}
@@ -209,26 +186,8 @@ autotools_stage_all() {
rm -rf ${STAGE_TEMP}
mkdir -p ${STAGE_TEMP}
oe_runmake DESTDIR="${STAGE_TEMP}" install
- autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR}
- if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
- autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${bindir}
- autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${sbindir}
- autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${base_bindir}
- autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${base_sbindir}
- autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${libexecdir}
- fi
- if [ -d ${STAGE_TEMP}/${libdir} ]
- then
- autotools_stage_libdir ${STAGE_TEMP}/${libdir} ${STAGING_LIBDIR}
- fi
- if [ -d ${STAGE_TEMP}/${base_libdir} ]
- then
- autotools_stage_libdir ${STAGE_TEMP}/${base_libdir} ${STAGING_DIR_HOST}${base_libdir}
- 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}
+
+ sysroot_stage_dirs ${STAGE_TEMP} ${STAGE_TEMP_PREFIX}
}
EXPORT_FUNCTIONS do_configure do_install
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 7dbac018e..9e78ce292 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -922,6 +922,66 @@ base_do_compile() {
fi
}
+
+sysroot_stage_dir() {
+ src="$1"
+ dest="$2"
+ # This will remove empty directories so we can ignore them
+ rmdir "$src" 2> /dev/null || true
+ if [ -d "$src" ]; then
+ mkdir -p "$dest"
+ cp -fpPR "$src"/* "$dest"
+ fi
+}
+
+sysroot_stage_libdir() {
+ src="$1"
+ dest="$2"
+
+ olddir=`pwd`
+ cd $src
+ las=$(find . -name \*.la -type f)
+ cd $olddir
+ echo "Found la files: $las"
+ for i in $las
+ do
+ 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" \
+ -i $src/$i
+ done
+ sysroot_stage_dir $src $dest
+}
+
+sysroot_stage_dirs() {
+ from="$1"
+ to="$2"
+
+ sysroot_stage_dir $from${includedir} $to${STAGING_INCDIR}
+ if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
+ sysroot_stage_dir $from${bindir} $to${STAGING_DIR_HOST}${bindir}
+ sysroot_stage_dir $from${sbindir} $to${STAGING_DIR_HOST}${sbindir}
+ sysroot_stage_dir $from${base_bindir} $to${STAGING_DIR_HOST}${base_bindir}
+ sysroot_stage_dir $from${base_sbindir} $to${STAGING_DIR_HOST}${base_sbindir}
+ sysroot_stage_dir $from${libexecdir} $to${STAGING_DIR_HOST}${libexecdir}
+ fi
+ if [ -d $from${libdir} ]
+ then
+ sysroot_stage_libdir $from/${libdir} $to${STAGING_LIBDIR}
+ fi
+ if [ -d $from${base_libdir} ]
+ then
+ sysroot_stage_libdir $from${base_libdir} $to${STAGING_DIR_HOST}${base_libdir}
+ fi
+ sysroot_stage_dir $from${datadir} $to${STAGING_DATADIR}
+}
+
+
+sysroot_stage_all() {
+ sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR}
+}
+
+
base_do_stage () {
:
}