Use --libdir=/usr/lib32 on x86 and create/remove the symlink via hooks.

This is to make all pkgs that use ${configure_args} work without changes
to the templates on x86_64.
This commit is contained in:
Juan RP 2014-04-05 11:52:22 +02:00
parent ee981ade96
commit 77451b1845
3 changed files with 20 additions and 0 deletions

View file

@ -4,6 +4,11 @@ if [ -z "$build_style" -o "$build_style" = "gnu-configure" ]; then
export configure_args="--prefix=/usr --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man --localstatedir=/var ${configure_args}"
fi
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
# on x86 use /usr/lib32 as libdir, but just as fake directory,
# because /usr/lib32 is a symlink to /usr/lib in void.
export configure_args+=" --libdir=/usr/lib32"
fi
# Cross compilation vars
if [ -z "$CROSS_BUILD" ]; then

View file

@ -0,0 +1,7 @@
# This hook removes the /usr/lib32 symlink on x86.
hook() {
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
rm -f ${DESTDIR}/usr/lib32
fi
}

View file

@ -0,0 +1,8 @@
# This hook creates the /usr/lib32 symlink for x86.
hook() {
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
vmkdir usr/lib
ln -sf lib ${DESTDIR}/usr/lib32
fi
}