buildscripts/freetype.sh
2023-12-03 23:10:57 +01:00

30 lines
679 B
Bash
Executable file

#!/bin/bash
git clone https://code.teampandory.com/thirdparty/freetype.git
set -e
cd freetype
git checkout VER-2-13-1
export PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig"
export CFLAGS="-I$PREFIX/include -I$PREFIX/include/harfbuzz -O3"
export LDFLAGS=""
./autogen.sh
# Don't enable harfbuzz here or fontconfig will fail to link later!
./configure \
--prefix="$PREFIX" \
--host="$xHOST" \
--with-sysroot="$PREFIX" \
--with-brotli=no \
--with-bzip2=no \
--with-harfbuzz=no \
--enable-freetype-config \
;
make -j$(nproc)
make install
# Patch freetype-config because it's dumb as a brick and assumes pkg-config
sed -i "s#/usr/bin/pkg-config#false#g" "$PREFIX/bin/freetype-config"