This commit is contained in:
pojavlauncher 2021-05-24 15:00:33 +07:00
parent 836cee5a86
commit a7c6c8fd86
3 changed files with 10 additions and 7 deletions

View File

@ -11,8 +11,8 @@ else
export TARGET_PHYS=$TARGET
fi
export FREETYPE_DIR=`pwd`/freetype-$BUILD_FREETYPE_VERSION/build_android-$TARGET_SHORT
export CUPS_DIR=`pwd`/cups-2.2.4
export FREETYPE_DIR=$PWD/freetype-$BUILD_FREETYPE_VERSION/build_android-$TARGET_SHORT
export CUPS_DIR=$PWD/cups-2.2.4
export CFLAGS+=" -DLE_STANDALONE" # -I$FREETYPE_DIR -I$CUPS_DI
# if [ "$TARGET_JDK" == "aarch32" ] || [ "$TARGET_JDK" == "aarch64" ]
@ -42,13 +42,12 @@ if [ "$BUILD_IOS" != "1" ]; then
else
ln -s -f /opt/X11/include/X11 $ANDROID_INCLUDE/
platform_args=--with-toolchain-type=clang
AUTOCONF_x11arg="--with-x=/opt/X11/include/X11 --disable-precompiled-headers"
AUTOCONF_x11arg="--with-x=/opt/X11/include/X11 --disable-precompiled-headers --prefix=/usr/lib"
sameflags="-arch arm64 -isysroot $thesysroot -miphoneos-version-min=12.0 -DHEADLESS=1 -I$PWD/ios-missing-include -Wno-implicit-function-declaration"
export CFLAGS+=" $sameflags"
export CXXFLAGS="$sameflags"
brew install xquartz
HOMEBREW_NO_AUTO_UPDATE=1 brew install xquartz
fi
# fix building libjawt

View File

@ -1,8 +1,11 @@
#!/bin/bash
set -e
# hack: remove iOS CFLAGS
args=${@/arm64/x86_64}
if [ "$(uname -m)" == "x86_64" ]; then
args=${@/arm64/x86_64}
fi
args=${args/"-isysroot $thesysroot"/}
args=${args/"-miphoneos-version-min=12.0"/}
/usr/bin/CC $args
/usr/bin/CC $args --stdlib=libstdc++ -isysroot $themacsysroot

View File

@ -40,6 +40,7 @@ if [ "$BUILD_IOS" == "1" ]; then
export thecc=$(xcrun -find -sdk iphoneos clang)
export thecxx=$(xcrun -find -sdk iphoneos clang++)
export thesysroot=$(xcrun --sdk iphoneos --show-sdk-path)
export themacsysroot=$(xcrun --sdk macosx --show-sdk-path)
export thehostcxx=$PWD/macos-host-cc
export CC=$PWD/ios-arm64-clang