1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
4 pkgname=(graphite graphite-docs)
9 url="https://github.com/silnrsi/graphite"
10 pkgdesc='reimplementation of the SIL Graphite text processing engine'
11 license=('LGPL' 'GPL' 'custom')
13 makedepends=('cmake' 'freetype2' 'python'
15 'doxygen' 'dblatex' 'graphviz' 'asciidoc')
16 checkdepends=('python-fonttools')
17 # https://github.com/silnrsi/graphite/releases/download/1.3.14/graphite2-1.3.14.sha256sum
18 source=(https://github.com/silnrsi/graphite/releases/download/${pkgver}/graphite2-${pkgver}.tgz)
19 sha256sums=('f99d1c13aa5fa296898a181dff9b82fb25f6cc0933dbaa7a475d8109bd54209d')
23 -DCMAKE_BUILD_TYPE=None
24 -DCMAKE_INSTALL_PREFIX=/usr
25 -DCMAKE_SKIP_INSTALL_RPATH=ON
26 -DGRAPHITE2_COMPARE_RENDERER=OFF
27 -DGRAPHITE2_VM_TYPE=direct
30 cmake -S graphite2-${pkgver} -B build "${cmake_options[@]}"
32 cmake --build build -t docs -j1
37 ctest --output-on-failure --stop-on-failure -j$(nproc)
41 optdepends=('graphite-docs: Documentation')
42 provides=('libgraphite2.so')
44 DESTDIR="$pkgdir" cmake --install build
47 install -Dm644 graphite2-${pkgver}/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
50 package_graphite-docs() {
51 pkgdesc+=" (documentation)"
54 local docdir="${pkgdir}/usr/share/doc/${pkgbase}"
55 mkdir -p "${docdir}/api"
56 cp -vrf build/doc/doxygen/{html,latex/refman.pdf} "${docdir}/api"
57 cp -vrf build/doc/{GTF,manual}.html "${docdir}"
60 install -Dm644 graphite2-${pkgver}/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
63 # vim:set sw=2 sts=-1 et: