summaryrefslogtreecommitdiff
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-07 12:07:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 11:46:46 +0000
commitf884ee9b911d1ce38b84d90113113c6e8c30253b (patch)
tree77588af9ee67b77f2f236590dd94d1248a657ea2 /meta/recipes-support
parentb8b261d2e40457ee2e0cf1e8f40bd22230eb8ca7 (diff)
downloadopenembedded-core-f884ee9b911d1ce38b84d90113113c6e8c30253b.tar.gz
openembedded-core-f884ee9b911d1ce38b84d90113113c6e8c30253b.tar.bz2
openembedded-core-f884ee9b911d1ce38b84d90113113c6e8c30253b.zip
attr: Convert SSTATEPOSTINSTFUNCS to a do_install_append
A SSTATEPOSTINSTFUNCS function here is overkill, just do this in a do_install_append_class-native and create relative symlinks rather than absolute ones which would then have to be relocated. (From OE-Core rev: 518e8d0216b0f42f574e42288804f553b9ff6f99) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/attr/ea-acl.inc47
1 files changed, 22 insertions, 25 deletions
diff --git a/meta/recipes-support/attr/ea-acl.inc b/meta/recipes-support/attr/ea-acl.inc
index 370e16f4a6..583ca1f84c 100644
--- a/meta/recipes-support/attr/ea-acl.inc
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -17,36 +17,33 @@ do_install () {
oe_runmake install install-lib install-dev DIST_ROOT="${D}"
}
-PACKAGES =+ "lib${BPN}"
-
-FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
-
-BBCLASSEXTEND = "native"
-# Only append ldflags for target recipe and if USE_NLS is enabled
-LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
-EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"
-
-fix_symlink () {
- if [ "${BB_CURRENTTASK}" != "populate_sysroot" -a "${BB_CURRENTTASK}" != "populate_sysroot_setscene" ]
- then
- return
- fi
-
+do_install_append_class-native () {
if test "${libdir}" = "${base_libdir}" ; then
return
fi
+ librelpath=${@os.path.relpath(d.getVar('libdir',True), d.getVar('base_libdir', True))}
+ baselibrelpath=${@os.path.relpath(d.getVar('base_libdir',True), d.getVar('libdir', True))}
+
# Remove bad symlinks & create the correct symlinks
- if test -L ${libdir}/lib${BPN}.so ; then
- rm -rf ${libdir}/lib${BPN}.so
- ln -sf ${base_libdir}/lib${BPN}.so ${libdir}/lib${BPN}.so
+ if test -L ${D}${libdir}/lib${BPN}.so ; then
+ rm -rf ${D}${libdir}/lib${BPN}.so
+ ln -sf $baselibrelpath/lib${BPN}.so ${D}${libdir}/lib${BPN}.so
fi
- if test -L ${base_libdir}/lib${BPN}.a ; then
- rm -rf ${base_libdir}/lib${BPN}.a
- ln -sf ${libdir}/lib${BPN}.a ${base_libdir}/lib${BPN}.a
+ if test -L ${D}${base_libdir}/lib${BPN}.a ; then
+ rm -rf ${D}${base_libdir}/lib${BPN}.a
+ ln -sf $librelpath/lib${BPN}.a ${D}${base_libdir}/lib${BPN}.a
fi
- if test -L ${base_libdir}/lib${BPN}.la ; then
- rm -rf ${base_libdir}/lib${BPN}.la
- ln -sf ${libdir}/lib${BPN}.la ${base_libdir}/lib${BPN}.la
+ if test -L ${D}${base_libdir}/lib${BPN}.la ; then
+ rm -rf ${D}${base_libdir}/lib${BPN}.la
+ ln -sf $librelpath/lib${BPN}.la ${D}${base_libdir}/lib${BPN}.la
fi
}
-SSTATEPOSTINSTFUNCS_class-native += "fix_symlink"
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
+
+BBCLASSEXTEND = "native"
+# Only append ldflags for target recipe and if USE_NLS is enabled
+LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
+EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"