perl: Do not unset AR for global scope

This commit is contained in:
Yaksh Bariya 2021-11-19 16:27:19 +05:30 committed by YAKSH BARIYA
parent 77bce9623a
commit 2b8b24fe09

View File

@ -39,36 +39,38 @@ termux_step_post_get_source() {
termux_step_configure() {
export PATH=$PATH:$TERMUX_STANDALONE_TOOLCHAIN/bin
ORIG_AR=$AR; unset AR
ORIG_AS=$AS; unset AS
ORIG_CC=$CC; unset CC
ORIG_CXX=$CXX; unset CXX
ORIG_CPP=$CPP; unset CPP
ORIG_CFLAGS=$CFLAGS; unset CFLAGS
ORIG_CPPFLAGS=$CPPFLAGS; unset CPPFLAGS
ORIG_CXXFLAGS=$CXXFLAGS; unset CXXFLAGS
ORIG_LDFLAGS=$LDFLAGS; unset LDFLAGS
ORIG_RANLIB=$RANLIB; unset RANLIB
ORIG_LD=$LD; unset LD
# Since we specify $TERMUX_PREFIX/bin/sh below for the shell
# it will be run during the build, so temporarily (removed in
# termux_step_post_make_install below) setup symlink:
rm -f $TERMUX_PREFIX/bin/sh
ln -s /bin/sh $TERMUX_PREFIX/bin/sh
cd $TERMUX_PKG_BUILDDIR
$TERMUX_PKG_SRCDIR/configure \
--target=$TERMUX_HOST_PLATFORM \
-Dosname=android \
-Dsysroot=$TERMUX_STANDALONE_TOOLCHAIN/sysroot \
-Dprefix=$TERMUX_PREFIX \
-Dsh=$TERMUX_PREFIX/bin/sh \
-Dcc="$ORIG_CC" \
-Dld="$ORIG_CC -Wl,-rpath=$TERMUX_PREFIX/lib -Wl,--enable-new-dtags" \
-Dar="$ORIG_AR" \
-Duseshrplib \
-Dusethreads
(
ORIG_AR=$AR; unset AR
ORIG_AS=$AS; unset AS
ORIG_CC=$CC; unset CC
ORIG_CXX=$CXX; unset CXX
ORIG_CPP=$CPP; unset CPP
ORIG_CFLAGS=$CFLAGS; unset CFLAGS
ORIG_CPPFLAGS=$CPPFLAGS; unset CPPFLAGS
ORIG_CXXFLAGS=$CXXFLAGS; unset CXXFLAGS
ORIG_LDFLAGS=$LDFLAGS; unset LDFLAGS
ORIG_RANLIB=$RANLIB; unset RANLIB
ORIG_LD=$LD; unset LD
cd $TERMUX_PKG_BUILDDIR
$TERMUX_PKG_SRCDIR/configure \
--target=$TERMUX_HOST_PLATFORM \
-Dosname=android \
-Dsysroot=$TERMUX_STANDALONE_TOOLCHAIN/sysroot \
-Dprefix=$TERMUX_PREFIX \
-Dsh=$TERMUX_PREFIX/bin/sh \
-Dcc="$ORIG_CC" \
-Dld="$ORIG_CC -Wl,-rpath=$TERMUX_PREFIX/lib -Wl,--enable-new-dtags" \
-Dar="$ORIG_AR" \
-Duseshrplib \
-Dusethreads
)
}
termux_step_post_make_install() {