[RFC,07/10] apr: remove obsolete support for renamed libtool

Message ID 20211210142242.2698587-7-ross.burton@arm.com
State Accepted, archived
Commit 07c0c780fb79779827dcd7496fac288c179aa259
Headers show
Series [RFC,01/10] libtool: don't prefix the installed binary | expand

Commit Message

Ross Burton Dec. 10, 2021, 2:22 p.m. UTC
libtool is now longer renamed to ${host}-libtool, so remove the changes
to support this.

This means that apr now installs libtool into the build-1 folder, but
as this has never been needed before (as we use the system libtool) we
can remove it (it contains build paths so is unreproducible).  Also add
a RDEPENDS on libtool for the target -dev package.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-support/apr/apr_1.7.0.bb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-support/apr/apr_1.7.0.bb b/meta/recipes-support/apr/apr_1.7.0.bb
index 5f8fd6a4618..9c826d43807 100644
--- a/meta/recipes-support/apr/apr_1.7.0.bb
+++ b/meta/recipes-support/apr/apr_1.7.0.bb
@@ -63,7 +63,7 @@  MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apr-1-config \
                     ${PN}-dev:${datadir}/build-1/apr_rules.mk"
 
 FILES:${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
-RDEPENDS:${PN}-dev += "bash"
+RDEPENDS:${PN}-dev += "bash libtool"
 
 RDEPENDS:${PN}-ptest += "libgcc"
 
@@ -80,6 +80,8 @@  do_install:append() {
 }
 
 do_install:append:class-target() {
+	rm -f ${D}${datadir}/build-1/libtool
+	sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g ${D}${datadir}/build-1/apr_rules.mk
 	sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \
 	       -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
 	sed -i -e 's,${STAGING_DIR_HOST},,g' \
@@ -97,12 +99,12 @@  apr_sysroot_preprocess () {
 	cp ${S}/build/apr_rules.mk $d/
 	sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
 	sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
-	sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
+	sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g $d/apr_rules.mk
 	sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
 	cp ${S}/build/mkdir.sh $d/
 	cp ${S}/build/make_exports.awk $d/
 	cp ${S}/build/make_var_export.awk $d/
-	cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
+	cp ${S}/libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
 }
 
 do_compile_ptest() {