summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libtool/libtool_2.4.4.bb
blob: 45f1b2f3a977a3bbc85bc6e8c7f0585c68f2a9f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require libtool-${PV}.inc

RDEPENDS_${PN} += "bash"

#
# We want the results of libtool-cross preserved - don't stage anything ourselves.
#
SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"

do_install_append () {
        sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
            -e 's@${STAGING_DIR_HOST}@@g' \
            -e 's@^\(sys_lib_search_path_spec="\).*@\1${libdir} ${base_libdir}"@' \
            -e 's@^\(compiler_lib_search_dirs="\).*@\1${libdir} ${base_libdir}"@' \
            -e 's@^\(compiler_lib_search_path="\).*@\1${libdir} ${base_libdir}"@' \
            -e 's@^\(predep_objects="\).*@\1"@' \
            -e 's@^\(postdep_objects="\).*@\1"@' \
            -i ${D}${bindir}/libtool
}

libtool_sysroot_preprocess () {
	rm -rf ${SYSROOT_DESTDIR}${bindir}/*
	rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
	rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/build-aux/*
}