2021-08-31 09:27:30 +00:00
|
|
|
#!/bin/sh
|
2021-03-16 18:18:54 +00:00
|
|
|
|
2021-08-31 09:27:30 +00:00
|
|
|
. ./config.sh
|
|
|
|
export ICONV_FILENAME=libiconv-1.16.tar.gz
|
2021-03-16 18:18:54 +00:00
|
|
|
export ICONV_FILE_PATH=$WORKDIR/$ICONV_FILENAME
|
2021-08-31 09:27:30 +00:00
|
|
|
export ICONV_SRC_DIR=$WORKDIR/libiconv-1.16
|
|
|
|
ICONV_SHA256="e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04"
|
2021-03-16 18:18:54 +00:00
|
|
|
|
2021-08-31 09:27:30 +00:00
|
|
|
curl http://ftp.gnu.org/pub/gnu/libiconv/$ICONV_FILENAME -o $ICONV_FILE_PATH
|
|
|
|
echo $ICONV_SHA256 $ICONV_FILE_PATH | sha256sum -c - || exit 1
|
2021-03-16 18:18:54 +00:00
|
|
|
|
|
|
|
for arch in aarch aarch64 i686 x86_64
|
|
|
|
do
|
|
|
|
|
|
|
|
PREFIX=${WORKDIR}/prefix_${arch}
|
2021-12-29 20:12:54 +00:00
|
|
|
PATH="${TOOLCHAIN_BASE_DIR}_${arch}/bin:${ORIGINAL_PATH}"
|
2021-03-16 18:18:54 +00:00
|
|
|
|
|
|
|
case $arch in
|
|
|
|
"aarch" )
|
2021-12-29 21:50:33 +00:00
|
|
|
CLANG=arm-linux-androideabi-clang
|
|
|
|
CXXLANG=arm-linux-androideabi-clang++
|
|
|
|
HOST="arm-linux-android";;
|
2021-03-16 18:18:54 +00:00
|
|
|
* )
|
2021-12-29 20:12:54 +00:00
|
|
|
CLANG=${arch}-linux-android-clang
|
|
|
|
CXXLANG=${arch}-linux-android-clang++
|
2021-03-16 18:18:54 +00:00
|
|
|
HOST="${arch}-linux-android";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
cd $WORKDIR
|
|
|
|
rm -rf $ICONV_SRC_DIR
|
|
|
|
tar -xzf $ICONV_FILE_PATH -C $WORKDIR
|
|
|
|
cd $ICONV_SRC_DIR
|
|
|
|
CC=${CLANG} CXX=${CXXLANG} ./configure --build=x86_64-linux-gnu --host=${HOST} --prefix=${PREFIX} --disable-rpath
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
|
|
|
done
|
2021-08-31 09:27:30 +00:00
|
|
|
|