diff --git a/buildjdk.sh b/buildjdk.sh index 3a32a2b..74fa6d9 100755 --- a/buildjdk.sh +++ b/buildjdk.sh @@ -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 diff --git a/macos-host-cc b/macos-host-cc index eb0f681..1bd3c6d 100755 --- a/macos-host-cc +++ b/macos-host-cc @@ -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 diff --git a/setdevkitpath.sh b/setdevkitpath.sh index 71c886c..f7ba6ee 100755 --- a/setdevkitpath.sh +++ b/setdevkitpath.sh @@ -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