mirror of
https://github.com/AngelAuraMC/angelauramc-openjdk-build.git
synced 2025-08-05 16:46:01 -04:00
Fix(iOS): fix freetype build
It looks like latest Xcode has removed typedef Byte, causing freetype to fail compilation. Freetype also internally define it only if it's not Apple platform. A hack define is added to make it compile again.
This commit is contained in:
parent
a3d27d75f4
commit
c8f90f5f58
21
buildlibs.sh
21
buildlibs.sh
@ -5,7 +5,24 @@ cd freetype-$BUILD_FREETYPE_VERSION
|
|||||||
|
|
||||||
echo "Building Freetype"
|
echo "Building Freetype"
|
||||||
|
|
||||||
if [[ "$BUILD_IOS" != "1" ]]; then
|
if [[ "$BUILD_IOS" == "1" ]]; then
|
||||||
|
LDFLAGS=-"arch arm64 -isysroot $thesysroot -miphoneos-version-min=12.0"
|
||||||
|
export CC=$thecc
|
||||||
|
export CXX=$thecxx
|
||||||
|
./configure \
|
||||||
|
--host=$TARGET \
|
||||||
|
--prefix=${PWD}/build_android-${TARGET_SHORT} \
|
||||||
|
--enable-shared=no --enable-static=yes \
|
||||||
|
--without-zlib \
|
||||||
|
--with-brotli=no \
|
||||||
|
--with-png=no \
|
||||||
|
--with-harfbuzz=no \
|
||||||
|
"CFLAGS=-arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -Os -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=12.0 -I$thesysroot/usr/include/libxml2/ -isysroot $thesysroot -DByte=uint8_t" \
|
||||||
|
AR=/usr/bin/ar \
|
||||||
|
"LDFLAGS=$LDFLAGS" \
|
||||||
|
|| error_code=$?
|
||||||
|
namefreetype=build_android-${TARGET_SHORT}/lib/libfreetype
|
||||||
|
else
|
||||||
export PATH=$TOOLCHAIN/bin:$PATH
|
export PATH=$TOOLCHAIN/bin:$PATH
|
||||||
./configure \
|
./configure \
|
||||||
--host=$TARGET \
|
--host=$TARGET \
|
||||||
@ -20,6 +37,7 @@ if [[ "$error_code" -ne 0 ]]; then
|
|||||||
cat config.log
|
cat config.log
|
||||||
exit $error_code
|
exit $error_code
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
CFLAGS=-fno-rtti CXXFLAGS=-fno-rtti make -j4
|
CFLAGS=-fno-rtti CXXFLAGS=-fno-rtti make -j4
|
||||||
make install
|
make install
|
||||||
@ -27,4 +45,3 @@ make install
|
|||||||
if [[ -f "${namefreetype}.a" ]]; then
|
if [[ -f "${namefreetype}.a" ]]; then
|
||||||
clang -fPIC -shared $LDFLAGS -lbz2 -Wl,-all_load ${namefreetype}.a -o ${namefreetype}.dylib
|
clang -fPIC -shared $LDFLAGS -lbz2 -Wl,-all_load ${namefreetype}.a -o ${namefreetype}.dylib
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user