From 2088d9c05559225affd321fd7a004bcb0c0d4c77 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Sat, 19 Nov 2022 00:10:05 -0800 Subject: [PATCH] libtool: fix include paths when cross compiling --- srcpkgs/libtool/template | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/srcpkgs/libtool/template b/srcpkgs/libtool/template index fc5c53a9c3e9..15aaaed77826 100644 --- a/srcpkgs/libtool/template +++ b/srcpkgs/libtool/template @@ -1,7 +1,7 @@ # Template file for 'libtool' pkgname=libtool version=2.4.7 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="texinfo perl automake help2man xz" depends="tar sed" @@ -45,6 +45,18 @@ post_install() { vsed -i -e "s,\-I${XBPS_CROSS_BASE}/usr/include,,g" \ ${PKGDESTDIR}/usr/bin/libtool + if [ "$XBPS_TARGET_WORDSIZE" = "64" ]; then + vsed -i \ + -e "s,/${XBPS_CROSS_TRIPLET}/lib/../lib64,/lib64,g" \ + -e "s,/${XBPS_CROSS_TRIPLET}/usr/lib/../lib64,/usr/lib64,g" \ + ${PKGDESTDIR}/usr/bin/libtool + else + vsed -i \ + -e "s,/${XBPS_CROSS_TRIPLET}/lib,/lib,g" \ + -e "s,/${XBPS_CROSS_TRIPLET}/usr/lib,/usr/lib,g" \ + ${PKGDESTDIR}/usr/bin/libtool + fi + # canonicalize host_alias, replace build(_alias,_os) _canonical_host=$(grep "^host=" ${PKGDESTDIR}/usr/bin/libtool | sed 's/host=//') _host_os=$(grep "^host_os=" ${PKGDESTDIR}/usr/bin/libtool | sed 's/host_os=//')