summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/attr
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-07 12:07:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-08 10:31:29 +0000
commitace9e1d37124a294d72ad75a71d36098cfe6eac4 (patch)
tree057f864c160bc8993c3611fca6be1b726c4f21a3 /meta/recipes-support/attr
parent53c9723ea89cb6a2adb63ee5e330a78db44ce5a7 (diff)
downloadpoky-ace9e1d37124a294d72ad75a71d36098cfe6eac4.tar.gz
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>
Diffstat (limited to 'meta/recipes-support/attr')
-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 () {
17 oe_runmake install install-lib install-dev DIST_ROOT="${D}" 17 oe_runmake install install-lib install-dev DIST_ROOT="${D}"
18} 18}
19 19
20PACKAGES =+ "lib${BPN}" 20do_install_append_class-native () {
21
22FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
23
24BBCLASSEXTEND = "native"
25# Only append ldflags for target recipe and if USE_NLS is enabled
26LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
27EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"
28
29fix_symlink () {
30 if [ "${BB_CURRENTTASK}" != "populate_sysroot" -a "${BB_CURRENTTASK}" != "populate_sysroot_setscene" ]
31 then
32 return
33 fi
34
35 if test "${libdir}" = "${base_libdir}" ; then 21 if test "${libdir}" = "${base_libdir}" ; then
36 return 22 return
37 fi 23 fi
24 librelpath=${@os.path.relpath(d.getVar('libdir',True), d.getVar('base_libdir', True))}
25 baselibrelpath=${@os.path.relpath(d.getVar('base_libdir',True), d.getVar('libdir', True))}
26
38 # Remove bad symlinks & create the correct symlinks 27 # Remove bad symlinks & create the correct symlinks
39 if test -L ${libdir}/lib${BPN}.so ; then 28 if test -L ${D}${libdir}/lib${BPN}.so ; then
40 rm -rf ${libdir}/lib${BPN}.so 29 rm -rf ${D}${libdir}/lib${BPN}.so
41 ln -sf ${base_libdir}/lib${BPN}.so ${libdir}/lib${BPN}.so 30 ln -sf $baselibrelpath/lib${BPN}.so ${D}${libdir}/lib${BPN}.so
42 fi 31 fi
43 if test -L ${base_libdir}/lib${BPN}.a ; then 32 if test -L ${D}${base_libdir}/lib${BPN}.a ; then
44 rm -rf ${base_libdir}/lib${BPN}.a 33 rm -rf ${D}${base_libdir}/lib${BPN}.a
45 ln -sf ${libdir}/lib${BPN}.a ${base_libdir}/lib${BPN}.a 34 ln -sf $librelpath/lib${BPN}.a ${D}${base_libdir}/lib${BPN}.a
46 fi 35 fi
47 if test -L ${base_libdir}/lib${BPN}.la ; then 36 if test -L ${D}${base_libdir}/lib${BPN}.la ; then
48 rm -rf ${base_libdir}/lib${BPN}.la 37 rm -rf ${D}${base_libdir}/lib${BPN}.la
49 ln -sf ${libdir}/lib${BPN}.la ${base_libdir}/lib${BPN}.la 38 ln -sf $librelpath/lib${BPN}.la ${D}${base_libdir}/lib${BPN}.la
50 fi 39 fi
51} 40}
52SSTATEPOSTINSTFUNCS_class-native += "fix_symlink" 41
42PACKAGES =+ "lib${BPN}"
43
44FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
45
46BBCLASSEXTEND = "native"
47# Only append ldflags for target recipe and if USE_NLS is enabled
48LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
49EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"