• 下载

https://www.freedesktop.org/software/fontconfig/release/

翻到最后,下载最新的。

  • 解压
tar xf fontconfig-2.13.92.tar.xz
cd fontconfig-2.13.92
  • 编译
BUILD_LIBS=${HOME}/build_libs

export PATH=${BUILD_LIBS}/bin:${PATH}
export PKG_CONFIG_PATH=${BUILD_LIBS}/lib/pkgconfig

if [ -f autogen.sh ]; then
    ./autogen.sh
fi

./configure \
    --prefix=${BUILD_LIBS} \
    CFLAGS="-I${BUILD_LIBS}/include -I${BUILD_LIBS}/include/freetype2" \
    LDFLAGS="-L${BUILD_LIBS}/lib" \
    --enable-shared --enable-libxml2

make

make install