# Description: reimplementation of the SIL Graphite text processing engine # URL: https://github.com/silnrsi/graphite # Maintainer: KRAK3N Team, extra ports at krak3n dot my # Depends on: cmake name=graphite2 version=1.3.14 release=1 source=(https://github.com/silnrsi/graphite/releases/download/${version}/${name}-${version}.tgz clang.patch) build() { cd ${name}-${version} patch -Np1 -i ../clang.patch sed -i '/cmake_policy(SET CMP0012 NEW)/d' CMakeLists.txt sed -i 's/PythonInterp/Python3/' CMakeLists.txt find . -name CMakeLists.txt | xargs sed -i 's/VERSION 2.8.0 FATAL_ERROR/VERSION 4.0.0/' mkdir -p cmakebuild cd cmakebuild cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_SYSCONFDIR=/etc \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_BUILD_TYPE=Release \ -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" \ -DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \ -B build .. cmake --build build DESTDIR=$PKG cmake --install build }