Workaround Arch Linux path for libfakeroot, tested and reported by pancake.

This commit is contained in:
Juan RP 2010-05-07 13:45:26 +02:00
parent 60b08e90c3
commit 97811e8af0
2 changed files with 10 additions and 6 deletions

View file

@ -88,6 +88,8 @@ install_src_phase()
|| msg_error "can't change cwd to build_wrksrc!" || msg_error "can't change cwd to build_wrksrc!"
fi fi
set_build_vars
# Run pre_install func. # Run pre_install func.
run_func pre_install 2>${wrksrc}/.xbps_pre_install.log \ run_func pre_install 2>${wrksrc}/.xbps_pre_install.log \
|| msg_error "$pkgname: pre_install() failed! check $wrksrc/.xbps_pre_install.log" || msg_error "$pkgname: pre_install() failed! check $wrksrc/.xbps_pre_install.log"
@ -115,6 +117,8 @@ install_src_phase()
run_func post_install 2>${wrksrc}/.xbps_post_install.log \ run_func post_install 2>${wrksrc}/.xbps_post_install.log \
|| msg_error "$pkgname: post_install() failed! check $wrksrc/.xbps_post_install.log" || msg_error "$pkgname: post_install() failed! check $wrksrc/.xbps_post_install.log"
unset_build_vars
# Remove libtool archives by default. # Remove libtool archives by default.
if [ -z "$keep_libtool_archives" ]; then if [ -z "$keep_libtool_archives" ]; then
find ${DESTDIR} -type f -name \*.la -delete find ${DESTDIR} -type f -name \*.la -delete
@ -158,9 +162,11 @@ install_src_phase()
. $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template . $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template
pkgname=${subpkg} pkgname=${subpkg}
set_tmpl_common_vars set_tmpl_common_vars
set_build_vars
run_func do_install \ run_func do_install \
2>${wrksrc}/.xbps_do_install_${pkgname}.log || \ 2>${wrksrc}/.xbps_do_install_${pkgname}.log || \
msg_error "$pkgname: do_install() failed! check $wrksrc/.xbps_do_install_$pkgname.log" msg_error "$pkgname: do_install() failed! check $wrksrc/.xbps_do_install_$pkgname.log"
unset_build_vars
done done
# #
@ -185,9 +191,7 @@ make_install()
fi fi
[ -z "$make_cmd" ] && make_cmd=make [ -z "$make_cmd" ] && make_cmd=make
. $XBPS_SHUTILSDIR/buildvars_funcs.sh . $XBPS_SHUTILSDIR/buildvars_funcs.sh
set_build_vars
# #
# Install package via make. # Install package via make.
@ -195,9 +199,6 @@ make_install()
{ ${make_cmd} ${make_install_target} ${make_install_args} \ { ${make_cmd} ${make_install_target} ${make_install_args} \
2>&1 | tee $wrksrc/.xbps_make_install.log; } \ 2>&1 | tee $wrksrc/.xbps_make_install.log; } \
|| msg_error "$pkgname: make install failed! check $wrksrc/.xbps_make_install.log" || msg_error "$pkgname: make install failed! check $wrksrc/.xbps_make_install.log"
# Unset build vars.
unset_build_vars
} }
[ -z "$PKG_TMPLNAME" ] && exit 1 [ -z "$PKG_TMPLNAME" ] && exit 1

View file

@ -32,7 +32,10 @@ set_build_vars()
{ {
if [ -z "$in_chroot" ]; then if [ -z "$in_chroot" ]; then
SAVE_LDLIBPATH=$LD_LIBRARY_PATH SAVE_LDLIBPATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH="$XBPS_MASTERDIR/usr/lib:$LD_LIBRARY_PATH" if [ -d /usr/lib/libfakeroot ]; then
LDLIBPATH="/usr/lib/libfakeroot"
fi
LD_LIBRARY_PATH="$LDLIBPATH:$XBPS_MASTERDIR/usr/lib:$LD_LIBRARY_PATH"
PKG_CONFIG="$XBPS_MASTERDIR/usr/bin/pkg-config" PKG_CONFIG="$XBPS_MASTERDIR/usr/bin/pkg-config"
PKG_CONFIG_LIBDIR="$XBPS_MASTERDIR/usr/lib/pkgconfig" PKG_CONFIG_LIBDIR="$XBPS_MASTERDIR/usr/lib/pkgconfig"
LDFLAGS="-L$XBPS_MASTERDIR/usr/lib" LDFLAGS="-L$XBPS_MASTERDIR/usr/lib"