mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-26 19:47:17 +00:00
android-tools: export libsparse/libbase/liblog headers and libs to sysroot
Export libsparse, libbase, and liblog headers and libraries to the sysroot.
Currently, these are often internal to the build.
Reorganise header installation to ${includedir}/sparse to match the expected
include paths for e2fsprogs contrib tools.
Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
committed by
Khem Raj
parent
66bb9b8e2a
commit
16497d1ff4
@@ -0,0 +1,54 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
# e2fsprogs expecting headers in sparse/ subdirectory
|
||||
do_install:append:class-native() {
|
||||
# to resolve the "Multiple shlib providers" conflict.
|
||||
rm -f ${D}${libdir}/android/libsparse.so*
|
||||
rm -f ${D}${libdir}/android/libbase.so*
|
||||
rm -f ${D}${libdir}/android/liblog.so*
|
||||
|
||||
if [ -d "${S}/system/core/libsparse/include/sparse" ]; then
|
||||
install -d ${D}${includedir}/sparse
|
||||
cp -r ${S}/system/core/libsparse/include/sparse/* ${D}${includedir}/sparse/
|
||||
else
|
||||
bbfatal "Sparse headers not found in ${S}/system/core/libsparse/include/sparse"
|
||||
fi
|
||||
|
||||
install -d ${D}${libdir}
|
||||
for lib in libsparse libbase liblog; do
|
||||
if [ -f "${S}/debian/out/system/${lib}.so" ]; then
|
||||
bbnote "Installing ${lib} from ${S}/debian/out/system/${lib}.so"
|
||||
install -m 0755 ${S}/debian/out/system/${lib}.so ${D}${libdir}/${lib}.so.0
|
||||
ln -sf ${lib}.so.0 ${D}${libdir}/${lib}.so
|
||||
elif [ -f "${S}/debian/out/system/${lib}.so.0" ]; then
|
||||
bbnote "Installing ${lib} from ${S}/debian/out/system/${lib}.so.0"
|
||||
install -m 0755 ${S}/debian/out/system/${lib}.so.0 ${D}${libdir}/${lib}.so.0
|
||||
ln -sf ${lib}.so.0 ${D}${libdir}/${lib}.so
|
||||
else
|
||||
bberror "${lib} not found in ${S}/debian/out/system"
|
||||
fi
|
||||
done
|
||||
|
||||
install -d ${D}${libdir}/android
|
||||
for lib in libsparse libbase liblog; do
|
||||
if [ -f "${D}${libdir}/${lib}.so.0" ]; then
|
||||
ln -sf ../${lib}.so.0 ${D}${libdir}/android/${lib}.so.0
|
||||
ln -sf ../${lib}.so ${D}${libdir}/android/${lib}.so
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
FILES:${PN}-dev += " \
|
||||
${includedir}/sparse \
|
||||
${libdir}/lib*.so \
|
||||
${libdir}/android/lib*.so \
|
||||
"
|
||||
|
||||
FILES:${PN} += " \
|
||||
${libdir}/lib*.so.* \
|
||||
${libdir}/android/lib*.so.* \
|
||||
"
|
||||
|
||||
SYSROOT_DIRS:append:class-native = " ${includedir} ${libdir}"
|
||||
|
||||
DEPENDS:append:class-native = " googletest-native"
|
||||
Reference in New Issue
Block a user