Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | require libtool-${PV}.inc |
| 2 | |
| 3 | PACKAGES = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 4 | SRC_URI += "file://fixinstall.patch" |
| 5 | |
| 6 | datadir = "${STAGING_DIR_TARGET}${target_datadir}" |
| 7 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 8 | inherit nopackages |
| 9 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 10 | do_configure:prepend () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | # Remove any existing libtool m4 since old stale versions would break |
| 12 | # any upgrade |
| 13 | rm -f ${STAGING_DATADIR}/aclocal/libtool.m4 |
| 14 | rm -f ${STAGING_DATADIR}/aclocal/lt*.m4 |
| 15 | } |
| 16 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 17 | # |
| 18 | # ccache may or may not be INHERITED, we remove references to it so the sstate |
| 19 | # artefact works on a machine where its not present. libtool-cross isn't used |
| 20 | # heavily so any performance issue is minor. |
| 21 | # Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc" |
| 22 | # |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | do_install () { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 24 | ln -s false ${D} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | install -d ${D}${bindir_crossscripts}/ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 26 | install -m 0755 libtool ${D}${bindir_crossscripts}/libtool |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 27 | sed -e 's@^\(predep_objects="\).*@\1"@' \ |
| 28 | -e 's@^\(postdep_objects="\).*@\1"@' \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | -e 's@^CC="ccache.@CC="@' \ |
| 30 | -e 's@^LTCC="ccache.@LTCC="@' \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 31 | -i ${D}${bindir_crossscripts}/libtool |
| 32 | sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool |
| 33 | sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize |
| 35 | chmod 0755 ${D}${bindir_crossscripts}/libtoolize |
| 36 | install -d ${D}${target_datadir}/libtool/build-aux/ |
| 37 | install -d ${D}${target_datadir}/aclocal/ |
| 38 | install -c ${S}/build-aux/compile ${D}${target_datadir}/libtool/build-aux/ |
| 39 | install -c ${S}/build-aux/config.guess ${D}${target_datadir}/libtool/build-aux/ |
| 40 | install -c ${S}/build-aux/config.sub ${D}${target_datadir}/libtool/build-aux/ |
| 41 | install -c ${S}/build-aux/depcomp ${D}${target_datadir}/libtool/build-aux/ |
| 42 | install -c ${S}/build-aux/install-sh ${D}${target_datadir}/libtool/build-aux/ |
| 43 | install -c ${S}/build-aux/missing ${D}${target_datadir}/libtool/build-aux/ |
| 44 | install -c -m 0644 ${S}/build-aux/ltmain.sh ${D}${target_datadir}/libtool/build-aux/ |
| 45 | install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/ |
| 46 | } |
| 47 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 48 | SYSROOT_DIRS += "${bindir_crossscripts} ${target_datadir}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 49 | |
| 50 | SSTATE_SCAN_FILES += "libtoolize *-libtool" |