2023-05-23 23:36:06 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2023-08-01 02:02:59 +03:00
|
|
|
FREETYPE_VERSION=2.13.1
|
2023-05-23 23:36:06 +02:00
|
|
|
|
|
|
|
. ./sdk.sh
|
|
|
|
|
|
|
|
if [ ! -d freetype-src ]; then
|
2023-08-01 02:02:59 +03:00
|
|
|
wget https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$FREETYPE_VERSION.tar.gz
|
|
|
|
tar -xzf freetype-$FREETYPE_VERSION.tar.gz
|
2023-05-23 23:36:06 +02:00
|
|
|
mv freetype-$FREETYPE_VERSION freetype-src
|
|
|
|
rm freetype-$FREETYPE_VERSION.tar.gz
|
|
|
|
mkdir freetype-src/build
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd freetype-src/build
|
|
|
|
|
|
|
|
cmake .. \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DBUILD_SHARED_LIBS=FALSE \
|
|
|
|
-DFT_DISABLE_BZIP2=TRUE \
|
|
|
|
-DFT_DISABLE_PNG=TRUE \
|
|
|
|
-DFT_DISABLE_HARFBUZZ=TRUE \
|
|
|
|
-DFT_DISABLE_BROTLI=TRUE \
|
|
|
|
-DCMAKE_C_FLAGS_RELEASE="$CFLAGS"
|
|
|
|
|
2023-08-01 02:02:59 +03:00
|
|
|
cmake --build . -j${NPROC}
|
2023-05-23 23:36:06 +02:00
|
|
|
|
|
|
|
# update `include` folder
|
|
|
|
rm -rf ../../freetype/include
|
|
|
|
mkdir -p ../../freetype/include
|
|
|
|
cp -a ../include ../../freetype
|
|
|
|
cp -a ./include ../../freetype
|
|
|
|
rm -rf ../../freetype/include/dlg
|
|
|
|
# update lib
|
|
|
|
rm -rf ../../freetype/lib
|
|
|
|
mkdir -p ../../freetype/lib
|
|
|
|
cp libfreetype.a ../../freetype/lib
|
|
|
|
|
|
|
|
echo "Freetype build successful"
|