mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-22 17:17:03 +02:00
libtool: fix include paths when cross compiling
Fix library and object include paths. Fix ntl build by directly assigning cc/cxx/etc instead of using := assignment.
This commit is contained in:
parent
03f99a6e38
commit
dd789b95eb
1 changed files with 17 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'libtool'
|
||||
pkgname=libtool
|
||||
version=2.4.7
|
||||
revision=3
|
||||
revision=4
|
||||
build_style=gnu-configure
|
||||
hostmakedepends="texinfo perl automake help2man xz gnulib tar"
|
||||
depends="tar sed grep"
|
||||
|
@ -38,8 +38,8 @@ post_install() {
|
|||
# things that need to go; the target libtool script is meant to be used
|
||||
# in native environments, not in cross environments, so patch the script
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
# e.g. AR="armv7l-linux-gnueabihf-ar" becomes AR="${AR:=ar}"
|
||||
vsed -i -e "s,\([A-Z]\+\)=\"${XBPS_CROSS_TRIPLET}\-\(.*\)\",\1=\$\{\1:=\2\},g" \
|
||||
# e.g. AR="armv7l-linux-gnueabihf-ar" becomes AR="ar"
|
||||
vsed -i -e "s,\([A-Z]\+\)=\"${XBPS_CROSS_TRIPLET}\-\(.*\)\",\1=\"\2\",g" \
|
||||
${PKGDESTDIR}/usr/bin/libtool
|
||||
|
||||
# clear out any sysroot present
|
||||
|
@ -50,6 +50,20 @@ post_install() {
|
|||
vsed -i -e "s,\-I${XBPS_CROSS_BASE}/usr/include,,g" \
|
||||
${PKGDESTDIR}/usr/bin/libtool
|
||||
|
||||
# Strip cross sysroot from paths
|
||||
vsed -i -e "s,${XBPS_CROSS_BASE},,g" \
|
||||
${PKGDESTDIR}/usr/bin/libtool
|
||||
|
||||
if [ "$XBPS_TARGET_WORDSIZE" = "64" ]; then
|
||||
vsed -i \
|
||||
-e "s,/${XBPS_CROSS_TRIPLET}/lib/../lib64,/lib64,g" \
|
||||
${PKGDESTDIR}/usr/bin/libtool
|
||||
else
|
||||
vsed -i \
|
||||
-e "s,/${XBPS_CROSS_TRIPLET}/lib,/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=//')
|
||||
|
|
Loading…
Add table
Reference in a new issue