You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

#!/bin/bash
set -ex
#########################################################################
## return error code
#########################################################################
E_INVAL=22 #Invalid param
HARFBUZZ_DIR=`pwd`
cd ${HARFBUZZ_DIR}
tar -jxvf harfbuzz_patch.tar.bz2 -C ${HARFBUZZ_DIR}/
PATCH_DIR=${HARFBUZZ_DIR}/harfbuzz_patch
ORG_TAR_NAME="harfbuzz-2.8.1.tar.gz"
ORG_DIR=${HARFBUZZ_DIR}/harfbuzz-2.8.1
tar -xzvf ${ORG_TAR_NAME}
mkdir -p harfbuzz_tmp
cp -ra ${ORG_DIR}/* harfbuzz_tmp/
cp -rf ${PATCH_DIR}/* harfbuzz_tmp/
rm -rf ${ORG_DIR}
rm -rf harfbuzz_patch
mkdir -p ../harfbuzz
cp -rf harfbuzz_tmp/* ../harfbuzz/
rm -rf harfbuzz_tmp
OPENSOURCE_LIB_DIR=${HARFBUZZ_DIR}/../../huanglong/binary/open_source/nxplayer
if [ -d "$OPENSOURCE_LIB_DIR" ];then
rm -f ${OPENSOURCE_LIB_DIR}/lib64/libharfbuzzvendor.so
sed -i -e '$!N;/\n.*name: "libharfbuzzvendor"/!P;D' ${OPENSOURCE_LIB_DIR}/Android.bp
sed -i '/name: "libharfbuzzvendor"/,+22d' ${OPENSOURCE_LIB_DIR}/Android.bp
else
OPENSOURCE_LIB_DIR=${HARFBUZZ_DIR}/../../huanglong/binary/modules/nxplayer
fi
rm -f ${OPENSOURCE_LIB_DIR}/lib/libharfbuzzvendor.so
echo "make harfbuzz patch file success"