Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/android-openjdk-build-multiarch
Path: blob/buildjre8/buildlibs.sh
861 views
1
#!/bin/bash
2
set -e
3
. setdevkitpath.sh
4
cd freetype-$BUILD_FREETYPE_VERSION
5
6
echo "Building Freetype"
7
8
if [[ "$BUILD_IOS" == "1" ]]; then
9
LDFLAGS=-"arch arm64 -isysroot $thesysroot -miphoneos-version-min=12.0"
10
export CC=$thecc
11
export CXX=$thecxx
12
./configure \
13
--host=$TARGET \
14
--prefix=${PWD}/build_android-${TARGET_SHORT} \
15
--enable-shared=no --enable-static=yes \
16
--without-zlib \
17
--with-brotli=no \
18
--with-png=no \
19
--with-harfbuzz=no \
20
"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" \
21
AR=/usr/bin/ar \
22
"LDFLAGS=$LDFLAGS" \
23
|| error_code=$?
24
namefreetype=build_android-${TARGET_SHORT}/lib/libfreetype
25
else
26
export PATH=$TOOLCHAIN/bin:$PATH
27
./configure \
28
--host=$TARGET \
29
--prefix=`pwd`/build_android-${TARGET_SHORT} \
30
--without-zlib \
31
--with-brotli=no \
32
--with-png=no \
33
--with-harfbuzz=no $EXTRA_ARGS \
34
|| error_code=$?
35
if [[ "$error_code" -ne 0 ]]; then
36
echo "\n\nCONFIGURE ERROR $error_code , config.log:"
37
cat config.log
38
exit $error_code
39
fi
40
fi
41
42
CFLAGS=-fno-rtti CXXFLAGS=-fno-rtti make -j4
43
make install
44
45
if [[ -f "${namefreetype}.a" ]]; then
46
clang -fPIC -shared $LDFLAGS -lbz2 -Wl,-all_load ${namefreetype}.a -o ${namefreetype}.dylib
47
fi
48
49