# Description: reimplementation of the SIL Graphite text processing engine.
# URL: https://github.com/silnrsi/graphite
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: freetype
# Optional: asciidoc dblatex doxygen graphviz

name=graphite2
version=1.3.14
release=1
source=(https://github.com/silnrsi/graphite/releases/download/$version/$name-$version.tgz)

build() {
  cmake -S $name-$version -B build -G Ninja \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
    -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
    -D GRAPHITE2_COMPARE_RENDERER=OFF \
    -Wno-dev
  cmake --build build
  DESTDIR=$PKG cmake --install build
}
