tools/libtool: fix hard-coded paths
authorSebastian Kemper <sebastian_ml@gmx.net>
Fri, 24 Sep 2021 12:28:20 +0000 (14:28 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 13 Mar 2023 21:53:41 +0000 (22:53 +0100)
commita22c54e39f8cb668ea5d717a51359fe2409fa336
treeb60f47eddcaae88b37267f884ebcf27944e88717
parentefe56a51bcd0b2c2db39c682e88fb166a2431727
tools/libtool: fix hard-coded paths

libtoolize hardcodes some paths. This is fine when building libtool and
then using it (for example in OpenWrt's buildroot). But when using an
SDK the paths are most likely different.

For example, when building util-linux within an SDK we're greeted with
the following message:

  libtoolize: error: $pkgauxdir is not a directory: '/path/to/openwrt/staging_dir/host/share/libtool/build-aux'

This is because staging_dir/host/bin/libtoolize contains the following
hard-coded paths from when the SDK was built in the first place:

  prefix="/path/to/openwrt/staging_dir/host"
  datadir="/path/to/openwrt/staging_dir/host/share"
  pkgauxdir="/path/to/openwrt/staging_dir/host/share/libtool/build-aux"
  pkgltdldir="/path/to/openwrt/staging_dir/host/share/libtool"
  aclocaldir="/path/to/openwrt/staging_dir/host/share/aclocal"

This commits updates 000-relocatable.patch to correct the paths,
relative to "$STAGING_DIR_HOST".

Ref: 96e05e2e3 ("libtool: Revert "libtool: bump to 2.4.6"")
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
[adapted to older libtool version before bumping, use STAGING_DIR_HOST]
Signed-off-by: Michael Pratt <mcpratt@pm.me>
tools/libtool/patches/000-relocatable.patch