Skip to content

Commit

Permalink
Feat[freetype]: add freetype into build script
Browse files Browse the repository at this point in the history
  • Loading branch information
artdeell authored Jul 13, 2024
1 parent 6b0684e commit 0941096
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions ci_build_android.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,37 @@ if [ "$SKIP_LIBFFI" != "1" ]; then
cp libffi/$NDK_TARGET-linux-android$NDK_SUFFIX/.libs/libffi.a $LWJGL_NATIVE/
fi

if [ "$SKIP_FREETYPE" != "1" ]; then
#!/bin/bash
export BUILD_FREETYPE_VERSION=2.13.2
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
rm freetype-$BUILD_FREETYPE_VERSION.tar.gz
cd freetype-$BUILD_FREETYPE_VERSION

export CC=$NDK_TARGET-linux-android${NDK_SUFFIX}21-clang

./configure \
--host=$TARGET \
--prefix=`pwd`/build_android-$LWJGL_BUILD_ARCH \
--without-zlib \
--with-brotli=no \
--with-png=no \
--with-harfbuzz=no \
--enable-static=no \
--enable-shared=yes

make -j4
make install

llvm-strip ./build_android-$LWJGL_BUILD_ARCH/lib/libfreetype.so
cp ./build_android-$LWJGL_BUILD_ARCH/lib/libfreetype.so $LWJGL_NATIVE
cd ..
rm -rf freetype-$BUILD_FREETYPE_VERSION
unset BUILD_FREETYPE_VERSION
unset CC
fi

# Download libraries
POJAV_NATIVES="https://github.com/PojavLauncherTeam/PojavLauncher/raw/v3_openjdk/app_pojavlauncher/src/main/jniLibs/$NDK_ABI"
wget -nc $POJAV_NATIVES/libopenal.so -P $LWJGL_NATIVE/openal
Expand Down

0 comments on commit 0941096

Please sign in to comment.