This commit is contained in:
Duy Tran Khanh 2021-09-22 06:17:59 +07:00
parent 0ae6eb1975
commit 39a25b42fe
3 changed files with 16 additions and 10 deletions

View File

@ -41,14 +41,6 @@ if [ "$BUILD_IOS" != "1" ]; then
ar cru dummy_libs/libpthread.a
ar cru dummy_libs/libthread_db.a
else
wget https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz
tar xvf libffi-3.4.2.tar.gz
cd libffi-3.4.2
python generate-darwin-source-and-headers.py --only-ios
xcodebuild -arch arm64
cd build_iphoneos-arm64
make prefix=`pwd` install
ln -s -f /opt/X11/include/X11 $ANDROID_INCLUDE/
platform_args="--with-toolchain-type=clang"
# --disable-precompiled-headers
@ -63,6 +55,8 @@ fi
# fix building libjawt
ln -s -f $CUPS_DIR/cups $ANDROID_INCLUDE/
LIBFFI_DIR=libffi-3.4.2/build_iphoneos-arm64
cd openjdk
#rm -rf build
@ -83,6 +77,8 @@ bash ./configure \
--with-fontconfig-include=$ANDROID_INCLUDE \
--with-freetype-lib=$FREETYPE_DIR/lib \
--with-freetype-include=$FREETYPE_DIR/include/freetype2 \
--with-libffi-include=$LIBFFI_DIR/include \
--with-libffi-lib=$LIBFFI_DIR/lib \
$AUTOCONF_x11arg $AUTOCONF_EXTRA_ARGS \
--x-libraries=/usr/lib \
$platform_args || \

View File

@ -6,10 +6,16 @@ cd freetype-$BUILD_FREETYPE_VERSION
echo "Building Freetype"
if [ "$BUILD_IOS" == "1" ]; then
LDFLAGS=-"arch arm64 -isysroot $thesysroot -miphoneos-version-min=12.0"
export CC=$thecc
export CXX=$thecxx
LDFLAGS=-"arch arm64 -isysroot $thesysroot -miphoneos-version-min=12.0"
cd libffi-3.4.2
python generate-darwin-source-and-headers.py --only-ios
xcodebuild -arch arm64
cd build_iphoneos-arm64
make prefix=`pwd` install
./configure \
--host=$TARGET \
--prefix=${PWD}/build_android-${TARGET_SHORT} \

View File

@ -6,6 +6,10 @@ set -e
wget https://downloads.sourceforge.net/project/freetype/freetype2/$BUILD_FREETYPE_VERSION/freetype-$BUILD_FREETYPE_VERSION.tar.gz
tar xf freetype-$BUILD_FREETYPE_VERSION.tar.gz
wget https://github.com/apple/cups/releases/download/v2.2.4/cups-2.2.4-source.tar.gz
tar xf cups-2.2.4-source.tar.gz
rm cups-2.2.4-source.tar.gz freetype-$BUILD_FREETYPE_VERSION.tar.gz
wget https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz
tar xvf libffi-3.4.2.tar.gz